	var	pg 			= 1;
	var qualidade 	= 65;
	var resolucao 	= $(window).width() + 'x' + $(window).height();
	var currentImg 	= 0;
	var imgs 		=  ['fundos/' + qualidade + '/' + resolucao + '/01-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/02-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/03-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/04-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/05-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/06-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/07-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/08-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/09-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/10-catharina.jpg',
						'fundos/' + qualidade + '/' + resolucao + '/11-catharina.jpg'];

	
	$(document).ready(function(){
		
		//$('.LiteBox').lightBox().css('cursor', 'pointer');
		
		//$('body').css('background', 'url(' + imgs[1] + ')');
		
		$('.Pagina').center('h');
		$('.Center').center('v');
		
		$('#telaMulti').center('vh', -45);
		$('#linhadotempo').center('vh', -45);
		$('#hotpoints').center('vh', -45);
		$('#pessoas').center('vh', -45);
		$('#portifolio').center('vh', 13);
		
		$('.menuLogo').center('h', 0);
		$('.menuLogo2').center('h', 140);
		
		
		
		
		$('#ET').center('vh', 13);
		
		
		sobe();
		comEfeito();
		
		
		$('#logo1').css('cursor', 'pointer').click(function(){ 	LoagPage(1);	link(0, -1);	});
		
		moveImg('nossaVida', 3194);
		moveImg('linhadotempo', 4487);
		
		$('input[type=text]').focus(function(){
			if($(this).val() == $(this).attr('alt'))	 	$(this).val('');										 
		}).blur(function(){
			if($(this).val() == '')	 						$(this).val($(this).attr('alt'));
		});
		
		$('textarea').focus(function(){
			$(this).val('');
		});
	});

	function bodyEffect(){
		
		var cnt 		= (imgs.length-1);
		var current2	= cnt;
		
		if(currentImg >= cnt) 
			currentImg 	= 0;
		else
			currentImg++;
		
		
		if((currentImg+1) == cnt)
			current2	= cnt;
		else
			current2	= currentImg+1;
		
		$('body').css('background', 'url(' + imgs[current2-1] + ')');
		$('#bodyEfect').animate({left: '-1600px'}, {	duration: 3000, complete: function(){
			$(this).css('background', 'url(' + imgs[current2-1] + ')').css('left', '0px');
			setTimeout(bodyEffect, 4300);
		}});
	}
	
	function link(num1, num2){
		$('.ativo').removeClass('ativo');
		$("#d > li:eq(" + num1 + ")").addClass('ativo');
		$("#d > li:eq(" + num1 + ") > ul > li:eq(" + num2 + ")").addClass('ativo');
	}
	
	function moveImg(obj, size){
		$('#' + obj).mousemove(function(e){	
			var left 		= (e.pageX - $(this).offset().left) * (size-screen.availWidth) / screen.availWidth;
			$(this).css('backgroundPosition', '-' + left + 'px 0px');
		});
	}

	/*
	*	Efeito para inverno 2012
	*/
		function comEfeito(){
			$('#bodyEfect').fadeIn(2000, function(){	semEfeito();		});
		}
		function semEfeito(){
			$('#bodyEfect').fadeOut(2000, function(){	comEfeito();		});
		}
		function desse(){
			$('body').animate({backgroundPosition: '0px 0px'}, {duration: 6000, complete: function(){			sobe();			}});
			$('#bodyEfect').animate({backgroundPosition: '0px 0px'}, {duration: 6000});
		}
		function sobe(){
			$('body').animate({backgroundPosition: '-150px -150px'}, {duration: 6000, complete: function(){		desse();		}});
			$('#bodyEfect').animate({backgroundPosition: '-150px -150px'}, {duration: 6000});
		}
		function desse2(){
			$('body').animate({backgroundPosition: '0px -150px'}, {duration: 6000, complete: function(){		sobe2();		}});
		}
		function sobe2(){
			$('body').animate({backgroundPosition: '-150px 0px'}, {duration: 6000, complete: function(){		desse();		}});
		}
	/**/

	function LoagPage(num){
		
		qvc(false);
		
		var change = false;
		
		if(pg != num){
			$('.Pagina').hide();
			$('.Obj').hide();
			$('.pg_' + num).fadeIn(1000);
			
			if(num == 5)	jQuery('#flip').jcoverflip('current', 6);
			if(num == 6)	jQuery('.flip').jcoverflip('current', 8);
			if(num == 7)	jQuery('.flip2').jcoverflip('current', 6);
			if(num == 9)	jQuery('.flip3').jcoverflip('current', 6);
			
			if(num == 2){	blackScreen(true);	change = true;		}
			if(num == 3){	blackScreen(true);	change = true;		}
			if(num == 8){	blackScreen(true);	change = true;		}
			if(num == 10){	blackScreen(true);	change = true;		}
			
			
			if(!change)	blackScreen(false);
		}
		
		pg = num;
	}
	
	function qvc(boolean){
		if(boolean)
			$('.QuemEVOCE').fadeIn(1000);
		else
			$('.QuemEVOCE').fadeOut(300);
	}


	/*	PLUGIN	*/
	jQuery(document).ready( function(){
		jQuery('#flip, .flip').jcoverflip({
			current : 0,
			beforeCss: function( el, container, offset){
				
				el.find('img').css({ opacity: 0.6 });
				
				return [
					$.jcoverflip.animationElement( el, { left: (container.width()/2- 210 - 110*offset + 20*offset)+'px', bottom: '0px' }, { } ),
					
					$.jcoverflip.animationElement( el.find( 'img' ), { width: Math.max(10,100-20) + 'px', height: '94px' }, {})
				];
			},
			afterCss: function( el, container, offset ){
				
				el.find('img').css({ opacity: 0.6 });
				
				return [
					$.jcoverflip.animationElement(el, {left: (container.width()/2 + 210 + 110*offset - (offset*20))+'px', bottom: '0px'}, { }),
					
					$.jcoverflip.animationElement(el.find('img' ), {width: Math.max(10,100-20) + 'px', height: '94px'}, {})			
				];
			},
			currentCss: function( el, container ){
				
				el.find('img').css({ opacity: 1.0 });
				
				return [
					$.jcoverflip.animationElement(el, { left: ( container.width()/2 - 110 )+'px', bottom: 0 }, { }),
					$.jcoverflip.animationElement(el.find( 'img' ), { width: '305px', height: '355px' }, { })
				];
			}
		});
	});
	
	function blackScreen(boolean){
		
		var totalScreen = $(window).height() - 62 - 35;
		
		if(boolean){
			
			$('#blackScreen').css('width', '100%')
							.css('height', totalScreen + 'px')
							.css('top', '62px')
							.css('position', 'absolute')
							.css('background', 'url(design/bgPx.png)')
							.css('z-index', '3');
							
			$('#blackScreen').fadeIn();
			
		}	else	{
			
			$('#blackScreen').fadeOut();
		
		}
		
	}
