$(document).ready(function(){
		$('.slider_stil').hover(function(){
			$(".capa", this).stop().animate({top:'-410px'},{queue:false,duration:1000});
		}, function() {
			$(".capa", this).stop().animate({top:'0px'},{queue:false,duration:1000});
		});
		
		$('.slider_fit').hover(function(){
			$(".capa", this).stop().animate({top:'-410px'},{queue:false,duration:1000});
		}, function() {
			$(".capa", this).stop().animate({top:'0px'},{queue:false,duration:1000});
		});
		
		$('.slider_facilidades').hover(function(){
			$(".capa", this).stop().animate({top:'-410px'},{queue:false,duration:1000});
		}, function() {
			$(".capa", this).stop().animate({top:'0px'},{queue:false,duration:1000});
		});

		
			$("a[rel=group]").fancybox({
			'transitionIn'		: 'elastic',
			'transitionOut'		: 'elastic',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Moldura ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
			}
		});
		
		
		$("#port_galeria").scrollable().navigator(
		{
			navi: "#flow",
			naviItem: 'a',
			activeClass: 'current',
			history: true
	
		});

			$('a[name=modal]').click(function(e) {
		
		e.preventDefault();
		
		var id = $(this).attr('href');

		
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();

		$('#mask').css({'width':maskWidth,'height':maskHeight});

		$('#mask').fadeIn(100);
		$('#mask').fadeTo("slow",0.8);
		
		var winH = $(window).height();
		var winW = $(window).width();
		$(id).fadeIn(1000);
	});

	
	$('.window .close').click(function (e) {
		
		e.preventDefault();
		$('#mask, .window').hide();
	});

	$('#mask').click(function () {
		$(this).hide();
		$('.window').hide();
	});
	
	$('a[name=modal2]').click(function(e) {
		
		e.preventDefault();

		var id = $(this).attr('href');

		var maskHeight = $(document).height();
		var maskWidth = $(window).width();

		$('#mask2').css({'width':maskWidth,'height':maskHeight});

		$('#mask2').fadeIn(100);
		$('#mask2').fadeTo("slow",0.8);
		
		var winH = $(window).height();
		var winW = $(window).width();
		$(id).fadeIn(1000);
	});

	$('.window2 .close2').click(function (e) {
		e.preventDefault();
		$('#mask2, .window2').hide();
	});

	$('#mask2').click(function () {
		$(this).hide();
		$('.window2').hide();
	});
	$('#desenho').hover(function(){
			$(".slider_desenho_tecnico", '#foto_descricao_produto_img').stop().animate({left:'329px'},{queue:false,duration:300});
		}, function() {
			$(".slider_desenho_tecnico", '#foto_descricao_produto_img').stop().animate({left:'520px'},{queue:false,duration:300});
		});

	
});
$(function(){
		$('.news').vTicker();
	});
$(function() {
		$("#modelos").scrollable({ vertical: true, mousewheel: false}).navigator({
			history: true
		});
	});

