/*
var minWidth = 1024; //COLOCAR LARGURA MÍNIMA DO FLASH PARA IE6
var minHeight = 830; // COLOCAR ALTURA MÍNIMA DO FLASH PARA IE6
*/

/* ************************************************************** +document ready ************************************************************* */
$(document).ready(
	function(){
		if(notSupMaxPropert()) {
			ieFlickerFix();
			flashMinMsieProperties();
		}
		
		rels();	
	}
);
/* ************************************************************** end document ready ************************************************************ */


/* *************************************************************** +window resize *************************************************************** */
/*
$(window).resize(
	function(){
		if(notSupMaxPropert()) {
			flashMinMsieProperties();
		}
	}
);
*/
/* *************************************************************** end window resize ************************************************************ */


/* *********************************************************** +document ready functions ********************************************************* */
function rels() {
	$("a[rel*=external]").attr("target", "_blank");
	$("a[rel*=print]").click( function(){ print(); });
}
/* *********************************************************** end document ready functions ********************************************************* */

/* *********************************************************** +ie hacks ********************************************************* */
if($.browser.msie && $.browser.version <= 6.0) {
	$(document).ready(minMsieProperties);
	$(window).resize(minMsieProperties);
}

function minMsieProperties() {
	if(jQuery(window).width() <= 999) { //COLOCAR LARGURA MÍNIMA DO FLASH PARA IE6
		jQuery('html, body, #wrapper').css("width","999px");
	}
	else {
		jQuery('html, body, #wrapper').css("width","100%");
	}
	if(jQuery(window).height() <= 750) { // COLOCAR ALTURA MÍNIMA DO FLASH PARA IE6
		jQuery('html, body, #wrapper').css("height","750px");
	}
	else {
		jQuery('html, body, #wrapper').css("height","100%");
	}
}

function ieFlickerFix(){
	try {
		document.execCommand("BackgroundImageCache", false, true);

	} catch(err) {}
}

function notSupMaxPropert() { // não suporta CSS max properties
	if (typeof document.body.style.maxHeight === "undefined") return true;
	else return false;
}
/* ********************************************************* end ie hacks ******************************************************** */
