/****************************************** +init ********************************************/
// flash 100%
var flashMinWidth = 990; // largura mínima do flash
var flashMinHeight = 500; // altura mínima do flash

$(document).ready(function(){
	if(isIe6())  // flash 100%
		flashMinMsieProperties(flashMinWidth, flashMinHeight); 
	
	rels();
});

// flash 100%
$(window).resize(
	function() {
		if(isIe6())
			flashMinMsieProperties(flashMinWidth, flashMinHeight);
	}
);
/***************************************** end init *********************************************/


/*************************************** +document ********************************************/
function rels() {
	$("a[rel*=external]").attr("target", "_blank");
}
/************************************* end document *******************************************/


/********************************** +document, resize ******************************************/
function flashMinMsieProperties(flashMinWidth, flashMinHeight) {
	// +width
	if(jQuery(window).width() <= flashMinWidth) { 
		jQuery('html, body, #wrap').css('width', flashMinWidth + 'px');
	}
	else {
		jQuery('html, body, #wrap').css('width', '100%');
	}
	// end widtH
	
	// +height
	if(jQuery(window).height() <= flashMinHeight) { 
		jQuery('html, body, #wrap').css('height', flashMinHeight + 'px');
	}
	else {
		jQuery('html, body, #wrap').css('height', '100%');
	}
	// end height
}
/********************************* end document, resize *****************************************/


/****************************************** +ie  **********************************************/
function isIe6() {
	if (typeof document.body.style.maxHeight === "undefined") return true;
	else return false;
}
/**************************************** end ie  *********************************************/