

/* ************************************************************** +document ready ************************************************************* */
$(document).ready(
	function(){
		if(notSupMaxPropert()) { //ie6
			//flashMinMsieProperties();
		}
		
		rels();	
	}
);
$(window).load(
	function() {
		carregaFoto();
	}
);
/* ************************************************************** end document ready ************************************************************ */




/* *********************************************************** +document ready functions ********************************************************* */
function rels() {
	$("a[rel*=external]").attr("target", "_blank");
}


function carregaFoto(){
	jQuery.jQueryRandom = 0;
	jQuery.extend(jQuery.expr[":"],
	{
		random: function(a, i, m, r) {
			if (i == 0) {
				jQuery.jQueryRandom = Math.floor(Math.random() * r.length);
			};
			return i == jQuery.jQueryRandom;
		}	
	});
	$('li').hide();
	
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	if(IE6) {
		$('li:random').show();
	} else{
		$('li:random').show('slow');
	}
}


/* *********************************************************** end document ready functions ********************************************************* */


/* ******************************************************************* +ie hacks ******************************************************************* */
/*
function flashMinMsieProperties() {
	var window = $(window); 
	
	if(window.width() <= minWidth) { 		
		$('html, body, #wrapper').css("width", minWidth + "px");
	}
	else {
		$('html, body, #wrapper').css("width","100%");
	}
	if(window.height() <= minHeight) { 
		$('html, body, #wrapper').css("height", minHeight + "px");
	}
	else {
		$('html, body, #wrapper').css("height","100%");
	}
}
*/

function notSupMaxPropert() { // não suporta CSS max properties
	if (typeof document.body.style.maxHeight === "undefined") return true;
	else return false;
}
/* ***************************************************************** end ie hacks ****************************************************************** */