﻿$(function() {		
$("#vagas").accordion({		
	collapsible: true,		
	active: '2',		
	autoHeight: false
	});	
});
	
	
$(document).ready (function(){
if ($("body").attr("id") == "home"){		
$(window).load( function(){		
	ReposTelaHome();		
}).resize( function(){		
	ReposTelaHome();		
});	}
$(".submenu-special ul li").hover(function(){		
$(this).find('a').stop().animate({"color": "#000000"}, 200);	},function(){		
$(this).find('a').stop().animate({"color": "#FFFFFF"}, 200);	});		
		
$(".top_menu > div:eq(2)").hover(function(){		
$(this).find("a").stop().animate({borderTopColor: "#019BA3"}, 200);	},function(){		
if(!$(this).hasClass('selected')){		
	$(this).find("a").stop().animate({borderTopColor: "#80CDD1"}, 200);		
}	});		
$(".top_menu > div:eq(1)").hover(function(){		
$(this).find("a").stop().animate({borderTopColor: "#01AFD4"}, 200);	},function(){		
if(!$(this).hasClass('selected')){		
	$(this).find("a").stop().animate({borderTopColor: "#80D7E9"}, 200);		
}	});		
$(".top_menu > div:eq(0)").hover(function(){		
$(this).find("a").stop().animate({borderTopColor: "#0193C4"}, 200);	},function(){		
if(!$(this).hasClass('selected')){		
	$(this).find("a").stop().animate({borderTopColor: "#80C9E1"}, 200);		
}	});		
$(".submenu-special").append("<span class='close_menu'>X</span>");	$(".close_menu").click(function(){		
$(".submenu-special:visible").slideUp(200);		
		
$(".top_menu > div").css("background-color", "");		
$(".top_menu > div").css("margin-right", "0px");		
if($(".top_menu > div.selected").length > 0){		
	$(".top_menu > div.selected").removeClass("selected");		
}	});		
	$(".top_menu .special-link").click(function(){		
		
if($(this).find(".submenu-special").is(":hidden")){		
	if($("#transparent-div").length == 0 && !$.browser.msie){		
	
	$("body").append("<div id='transparent-div'></div>");		
			
	$("#transparent-div").css({		
			
		"position": "absolute",		
			
		"opacity": "0",		
			
		"z-index":"1000",		
			
		"background-color": "#FFFFFF",		
			
		"top": "0px",		
			
		"left": "0px",		
			
		"width": "100%",		
			
		"height": $("body").height()		
			
	});		
		
$('#transparent-div').click(function(){		
		
	$(this).remove();		
		
	$(".submenu-special:visible").slideUp(200);		
		
		
		
		
$(".top_menu > div").css("background-color", "");		
		
	$(".top_menu > div").css("margin-right", "0px");		
		
	if($(".top_menu > div.selected").length > 0){		
		
		
$(".top_menu > div.selected").removeClass("selected");		
		
	}		
		
});		
	}		
		
		
$(".submenu-special:visible").slideUp(200);		
		
		
$(".top_menu > div").css("background-color", "");		
	$(".top_menu > div").css("margin-right", "0px");		
	if($(".top_menu > div.selected").length > 0){		
		
$(".top_menu > div.selected").removeClass("selected");		
	}		
		
		
		
	$(this).find(".submenu-special").slideDown(200);		
		
		
$(this).addClass("selected");		
	$(this).css("background-color", $(this).find('a').css("border-top-color"));		
	if($(this).next('div').length > 0){		
		
$(this).next('div').css("margin-right", "220px");		
	}		
		
	}else{		
	$(this).find(".submenu-special").slideUp(200);		
	$(".top_menu > div").css("margin-right", "0px");		
	$(this).css("background-color", "");		
	$(this).removeClass("selected");		
	$('#transparent-div').remove();		
}		
	});		
$("#submenu li:not('.escolhido') a").hover(function(){		
$(this).stop().animate({"color": "#000000"}, 200);	},function(){		
$(this).stop().animate({"color": "#777777"}, 200);	});		
$("#content ul.left_menu li a.itemmenu:not('.selected')").hover(function(){		
$(this).stop().animate({"color": "#000000"}, 200);	},function(){		
$(this).stop().animate({"color": "#9D9D9D"}, 200);	});		
$("#content .highlights .hightlight_switch img#up").click(function(){		
var actual_leaf = $("#content .highlights .highlight_leaf:visible").attr('class').split(' ').slice(-1);		
$("#content .highlights .highlight_leaf:visible").fadeOut('fast');		
actual_leaf = actual_leaf.toString();		
actual_leaf = actual_leaf.replace("leaf_","");		
		
var actual_leaf_number = parseInt(actual_leaf);		
		
var limit = $("#content .highlights .highlight_page #total_leaf").text();		
		
var limit_number = parseInt(limit);		
		
if(actual_leaf_number <= 1){		
	$("#content .highlights .highlight_page #current_leaf").text(limit);		
	$("#content .highlights .highlight_leaf:visible").fadeOut('fast',function(){$("#content .highlights .highlight_leaf.leaf_" + limit_number).fadeIn('fast')});		
}else{		
	$("#content .highlights .highlight_page #current_leaf").text(actual_leaf_number - 1);		
	$("#content .highlights .highlight_leaf:visible").fadeOut('fast',function(){$("#content .highlights .highlight_leaf.leaf_" + (actual_leaf_number - 1)).fadeIn("fast")});		
}	});		
$("#content .highlights .hightlight_switch img#down").click(function(){		
var actual_leaf = $("#content .highlights .highlight_leaf:visible").attr('class').split(' ').slice(-1);		
		
actual_leaf = actual_leaf.toString();		
actual_leaf = actual_leaf.replace("leaf_","");		
		
var actual_leaf_number = parseInt(actual_leaf);		
		
var limit = $("#content .highlights .highlight_page #total_leaf").text();		
var limit_number = parseInt(limit);		
		
if(actual_leaf_number >= limit_number){		
	$("#content .highlights .highlight_page #current_leaf").text("1");		
	$("#content .highlights .highlight_leaf:visible").fadeOut('fast',function(){$("#content .highlights .highlight_leaf.leaf_1").fadeIn('fast')});		
}else{		
	$("#content .highlights .highlight_page #current_leaf").text(actual_leaf_number + 1);		
	$("#content .highlights .highlight_leaf:visible").fadeOut('fast',function(){$("#content .highlights .highlight_leaf.leaf_" + (actual_leaf_number + 1)).fadeIn("fast")});		
}	});	});




function ReposTelaHome(){	var telah = $(window).height();	var telaw = $(window).width();		
var conth = telah - 307;	if (telah<600) conth = 210;	var contw = telaw - 665;	var divw = telaw	
if (telaw<950) 
	var divw = 950;
if (telaw<950) var contw = 255;		
if ($.browser.msie && parseInt($.browser.version)==6){		
$("#destaques").height(conth);		
$("#unitri").width(contw);		
$("#topo").width(divw);		
//$("#barrahome").css("border","1px dotted red");		
$("#divhome").width("100%");	} else {		
$("#destaques").css("minHeight", String(conth)+"px");		
$("#unitri").css("minWidth",String(contw)+"px");		
		
//style.minWidth = String(contw)+"px";	}		
$("divhome").width(divw);}function ReposTelaInt(){	var telah = $(window).height();	var conth = telah - 272;	if (telah<600) conth = 328;		
if ($.browser.msie && parseInt($.browser.version)==6){		
$("#conteudoint").height(conth);	} else {		
$("#conteudoint").css("minHeight", String(conth)+"px");	}}
}
