
			var scrollContent;
			var scrollSide;

var Site = {
	init: function() {
		$('#header a').click(Site.area.menu.click);

		$('.negocio-body .call').click(function() { $('.menu-processo').trigger('click'); })
		$('.processo-body .call').click(function() { $('.menu-servicos').trigger('click'); })
		$('.servicos-body .call').click(function() { $('.menu-clientes').trigger('click'); })
		$('.clientes-body .call').click(function() { $('.menu-portfolio').trigger('click'); })
		$('.portfolio-body .call').live('click',function() { $('.menu-contato').trigger('click'); })
		$('.portfolio-voltar').live('click',function() { $('.menu-portfolio').trigger('click'); })

		
		$(window).resize(Site.layout.resize);
		$(window).trigger('resize');

		if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') {
			$('#header,#header-background').css('position','absolute');
			$(window).scroll(function() {
				$('#header,#header-background').css('top',$(window).scrollTop());
			})
			$(window).trigger('scroll');
		};
	},
	layout: {
		moveTo: function(top) {
			$('html,body').stop().animate({
				scrollTop: top
			},800,function() {
				if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') {
					$(window).trigger('scroll');
				};
			});
			
		},
		resize: function() {
			$('.overlay').css('height',($(window).height()-140));
			$('.overlay').css('width',($(window).width()-980) / 2);
		}
	},
	area: {
		menu: {
			click: function() {
				var analytics = '/' + $(this).attr('rel').replace('content-','').replace('colecao-','colecao/').replace('index','');
				if (typeof _gaq != 'undefined') {
					_gaq.push(['_trackPageview', analytics]);
				}
				
				var elemento = $('.' + $(this).attr('rel'));

				if ($(this).attr('rel') == 'content-index') {
					$('.menu-current').animate({
						top: -20
					},800);
					Site.layout.moveTo(0);
				} else {
					$('.menu-current').animate({
						top: 0,
						left: $(this).position().left + $(this).width()/2
					},800);
					Site.layout.moveTo($(elemento).position().top-160);
				}

				
				
				return false;
			}
		},
		colecao: {
			resize: function() {
				$('.colecao-body').each(function() {
					$(this).css('width',Math.ceil($(this).find('.colecao-image').length / 6) * 880);
				});
			},
			navigationPrev: function() {
				var colecao = $(this).closest('.colecao-main');
				var colecaoBody = $(colecao).find('.colecao-body');
				var total = Math.ceil($(colecao).find('.colecao-image').length / 6);

				if ($(colecao).attr('rel') == '') {
					$(colecao).attr('rel','0');
				}

				var current = parseInt($(colecao).attr('rel'));
				
				if (current > 0) {
					current--;
					$(colecao).attr('rel',current);
				} else {
					return false;
				}
				
				$(colecaoBody).animate({
					left:(-880*current)
				},1000)
			},
			navigationNext: function() {
				var colecao = $(this).closest('.colecao-main');
				var colecaoBody = $(colecao).find('.colecao-body');
				var total = Math.ceil($(colecao).find('.colecao-image').length / 6);

				if ($(colecao).attr('rel') == '') {
					$(colecao).attr('rel','0');
				}
				
				var current = parseInt($(colecao).attr('rel'));

				if ((current+1) < total) {
					current++;
					$(colecao).attr('rel',current);
				} else {
					return false;
				}
				
				$(colecaoBody).animate({
					left:(-880*current)
				},1000)
			}
		}
	}
};

$(document).ready(Site.init);

















