/*
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 ********************************************************* */
/*
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 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 ******************************************************** */
