	Cufon.replace('#menu-principal ul li, h2.designacaoProd, span.referenciaProd',{ fontFamily: 'Segoe Semibold', hover:true/*, textShadow: '1px 1px #FFF'*/});
	
	Cufon.replace('li#destaque, span#labelProdutos, li.categoriaP, h2#ce, h2#news, .designacaoCE, .designacaoNot',{ fontFamily: 'BMWTypeRegular', textShadow: '1px 1px #FFF'});
	Cufon.replace('h2#produtos, h2#in-the-world, h2#designacaoProduto, h2#referencia, .opcao a, h2#designacaoConteudo, h3#tituloConteudo, h4#tituloContacto, h5#subTituloContacto,span#mapaDesignacao, span#formDesignacao, h5.areaInt',{ fontFamily: 'BMWTypeRegular'});

        Cufon.replace('.areaNeg, .ver-mais-an',{fontFamily: 'BMWTypeRegular',fontWeight:'bold'});
        Cufon.replace('h2.designacaoAreaNeg, li.highlight, li.no_highlight, .subCatP ul li a',{ fontFamily: 'Segoe Black', hover:true});

        Cufon.replace('#subdesignacao h2',{fontFamily: 'HelveticaNeue LT 93 BlackEx'});

			
$(document).ready(function(){
                
                var $alert = $('#alert');
				if($alert.length)
				{
					var alerttimer = window.setTimeout(function () {
						$alert.trigger('click');
					}, 6000);
					$alert.animate({height: $alert.css('line-height') || '50px'}, 200)
					.click(function () {
						window.clearTimeout(alerttimer);
						$alert.animate({height: '0'}, 200);
					});
				}
				
				/*
					$('.imprimir').click(function() {
                        window.print();
                        return false;
                });*/
				
				var newwindow;
				function poptastic(url)
				{
					newwindow=window.open(url,'name','height=400,width=200');
					if (window.focus) {newwindow.focus()}
				}
				
				

/*
				$("#imprimir").fancybox({
					'padding'           : 0,
					'autoScale'     	: false,
					'transitionIn'		: 'none',
					'transitionOut'		: 'none'
				});*/

                

                $("#slideshow").jqFancyTransitions({
                        width: 939,
                        height: 383,
                        effect: 'curtain', // wave, zipper, curtain
                        strips: 20, // number of strips
                        delay: 5000, // delay between images in ms
                        stripDelay: 50, // delay beetwen strips in ms
                        titleOpacity: 0, // opacity of title
                        titleSpeed: 1000, // speed of title appereance in ms
                        position: 'alternate', // top, bottom, alternate, curtain
                        direction: 'random', // left, right, alternate, random, fountain, fountainAlternate
                        navigation: false, // prev and next navigation buttons
                        links: false // show images as links
                });
							
			var sectionsMenuVisible = false;
			
			$("#finder").click(function() {
				if (sectionsMenuVisible) {
					$(this).removeClass("hover");
					$("#produtos-menu").hide();
					sectionsMenuVisible = false;
				} else {
					$(this).addClass("hover");
					$("#produtos-menu").show();
					sectionsMenuVisible = true;
					$(document).one("click", function() {
						$("#menu-pesquisa-produto").removeClass("hover");
						$("#produtos-menu").hide();
						sectionsMenuVisible = false;
					});
				}
				return false;
			});
		
			var $subCatP		= $('#subCatP');
			var $subCatP_items	= $subCatP.children('li');
	
			$subCatP_items.bind('mouseenter',function(){
				var $this = $(this);
				$('.subCatP li a').removeClass("selected");
				
				$this.addClass('slided selected');
				$this.children('div').css('z-index','9999').stop(true,true).slideToggle('slow',
				function(){
					$subCatP_items.not('.slided').children('div').hide();
					$this.removeClass('slided');
				});
			}).bind('mouseleave',function(){
				var $this = $(this);
				$this.removeClass('selected').children('div').css('z-index','1');
			});

			$subCatP.bind('mouseenter',function(){
				var $this = $(this);
				$this.addClass('hovered');
			}).bind('mouseleave',function(){
				var $this = $(this);
				$this.removeClass('hovered');
				$subCatP_items.children('div').hide();
			});
				//antes hover
			$('.pesquisarProHome .top label').toggle(function () 
			{
			  $('.pesquisarProHome').removeClass('closed');
			  $('.pesquisarProHome').addClass('open');
			}, 
			function () {
			  $('.pesquisarProHome').removeClass('open');
			  $('.pesquisarProHome').addClass('closed');
			});

                



});
