/************************* + vars *********************************/
var nav_about		= new Image();
nav_about.src		= rootUrl + "imgs/buttons/nav_about_hover.png";
var nav_team		= new Image();
nav_team.src		= rootUrl + "imgs/buttons/nav_team_hover.png";
var nav_contact		= new Image();
nav_contact.src		= rootUrl + "imgs/buttons/nav_contact_hover.png";
/************************ end vars ********************************/


/************************ + INIT **********************************/
jQuery(document).ready(
	function() {
		jQuery('a[rel*="external"]').each( // abre uma nova janela
			function(elm) {
				jQuery(this).attr({ target:'_blank', title: jQuery(this).attr('title') +  ' ( Este link abre uma nova janela ) ' });
			}
		); 
		
		disabled("(Este botão está desabilitado)","0.5",false);
		
		if (isIe6()) { // ie 6
			ieFooterMinWidth();
			ieFlickerFix();
		}
	}
);

jQuery(window).resize
(
	function()
	{
		if (isIe6()) { // ie 6
			ieFooterMinWidth();
		}
	}
);
/*********************** end INIT *********************************/


/*********************** +document ********************************/
// todos os elementos que possuem a classe disabled estarao com  o evento padrao de click desabilitados, como parametros podem ser passados o titulo para o elemento, a opacidade e ou a posicao da imagem de fundo
function disabled(title, opacity, backgroundPosition)
{
	if (opacity != false)
		jQuery('.disabled').css("opacity",opacity);
	if (backgroundPosition != false)
		jQuery('.disabled').css("backgroundPosition",backgroundPosition);
		
	jQuery('.disabled').attr("title",title);
	
	jQuery('.disabled').click(
		function() 
		{
			return false;
		}
	);
}
/********************** end document *******************************/


/*************************** +IE ***********************************/
function ieFooterMinWidth() {
	if(jQuery(window).width() < jQuery('#wrapper').width()) 
		jQuery('#wrapper, #header_swf, #footer').css("width","997px");
	else
		jQuery('#wrapper, #header_swf, #footer').css("width","100%");
}

function ieFlickerFix(){
	try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}
}

function isIe6() {
	if (typeof document.body.style.maxHeight === "undefined") 
		return true;
	else 
		return false;
}
/************************** end IE **********************************/