/*..............................................................................................................

Bascol Brasil

Scripts Gerais

..............................................................................................................*/

$(document).ready(function(){

	/* Gill Sans MT [Start] */
		Cufon.replace('h1');
		Cufon.replace('h2');
		Cufon.replace('h3');
		Cufon.replace('h4');
		Cufon.replace('h5');
		Cufon.replace('h6');
	/* Gill Sans MT [End] */
	
	/* Menu Principal [Start] */
		$("#menu-principal li").hover(
			function(){
				$(this).css("background-image","url(_imagens/layout/menu-on.gif)").css("background-color", "#90c8d4").css("color","#000");
				if ($(this).attr('class') == "sub"){
					$(this).find("div").css("display", "block");
				}
			},
			function(){
				$(this).css("background-image","url(_imagens/layout/menu-off.gif)").css("color","#fff");
			}
		);
		
		//Sub-Menu
		$("#menu-principal li div").hover(
			function(){
				$(this).css("display","block").css("z-index", "10").css("background-color","transparent");
			},
			function(){
				$(this).css("display","none").css("z-index", "1").css("background-color","transparent");;
			}
		);
		
		$("#menu-principal li ul li:first-child a").css("border-top", "none").css("padding-top", "0");
		$("#menu-principal li ul li:last-child a").css("border-bottom", "none").css("padding-bottom", "0");
		
		$("body [href = 'contato.php'] ").addClass("highslide").click(function(){
			
			return hs.htmlExpand(this, {
				wrapperClassName: 'draggable-header',
				objectType: 'iframe',
				height: 500,
				width: 400
			})
			
		});

		$("#link-3").click(function(){
			window.location.href = "diferenciais-construtivos.php";
		});
		
		$("#link-4").click(function(){
			window.location.href = "cadastro.php";
		});
	/* Menu Principal [End] */
	
	/* Adicionar aos Favoritos */
	$(".favoritos").jFav();
});

// Highslide

hs.lang.loadingText = '';
hs.lang.loadingTitle = 'Clique para Cancelar';
hs.lang.focusTitle = 'Clique para ir para frente';
hs.lang.fullExpandTitle = 'Expandir o tamanho atual (f)';
hs.lang.previousText = 'Anterior';
hs.lang.nextText = 'Pr&oacute;xima';
hs.lang.moveText = 'Mover';
hs.lang.closeText  = 'Fechar'; 
hs.lang.closeTitle = 'Fechar (esc)';
hs.lang.resizeTitle = 'Ajustar';
hs.lang.playText = 'Play';
hs.lang.playTitle = 'Play slideshow (spacebar)';
hs.lang.pauseText = 'Pause',
hs.lang.pauseTitle = 'Pause slideshow (spacebar)';
hs.lang.previousTitle = 'Anterior';
hs.lang.nextTitle = 'Pr&oacute;xima';
hs.lang.moveTitle = 'Mover';
hs.lang.fullExpandText = 'Tamanho maximo';
hs.lang.number = 'Imagem %1 de %2';
hs.lang.restoreTitle = 'Clique para fechar a imagem.';

hs.graphicsDir		= '_scripts/highslide/graphics/';
hs.align			= 'center';
hs.showCredits		= false;
hs.transitions		= ['expand', 'crossfade'];
hs.outlineType		= 'rounded-white';
hs.fadeInOut		= true;
hs.dimmingOpacity 	= 0.75;

function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
