$(document).ready(function(){
	
	//centraliza imagem dos parceiros no ie 6 e 7
	if ($("#parceiros").length>0) {
		if($.browser.msie && ($.browser.version=="6.0" || $.browser.version=="7.0")) {
			ph = $("#parceiros").height();
			ih = $("#parceiros img").height();
			dif = (ph-ih);
			pad = (dif/2);
			$("#parceiros img").css("margin-top",pad+"px");
		}
	}

	//animação home
	if ($("#imoboffice .animacao").length>0) {
		$('#imoboffice .animacao').cycle({
			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	}
	
	//parceiros
	if ($(".cycle-parceiros").length>0) {
		$('.cycle-parceiros').cycle({
			fx: 'fade',
			timeout: 2000 // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	}	
	
	//clientes
	if ($(".cycle-clientes").length>0) {
		$('.cycle-clientes').cycle({
			fx: 'fade',
			timeout: 700 // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	}	
	
	//twitter
	if ($("#twitter").length>0) {
		$("#twitter #posts").getTwitter({
			userName: "gregorisoft",
			numTweets: 3,
			loaderText: "Aguarde, carregando...",
			slideIn: false,
			showHeading: false,
			showProfileLink: false,
			showTimestamp: false,
			beforeEachTweet: "<b>Gregorysoft: </b>"
		});
	}
	
	//amplia fotos
	$('a img').each(function(){
		url = $(this).parents("a").attr('href');
		if( url.indexOf("jpg")>0 || url.indexOf("gif")>0 || url.indexOf("png")>0 ) {
			$(this).parents("a").lightBox(); 
		}
	});			
	
});

