$(document).ready(function() {
	
	//Dito paggination fix
	( !$('a.ditto_page').length ) ? $('div.pagination,span.ditto_currentpage').css('display','none') : '';
	

	//------------- Galleries
	
	$('div.swicher li:first').remove();

	$("ul.slide").cycle({
		fx: 'scrollUp',
		pager:  '#slideNav',
		pagerAnchorBuilder: function(idx, slide) { 
			return '<li><a href="#">&nbsp;</a></li>'; 
		},
		before:  onBefore, 
		after: onAfter,
		timeout: 4000
	});
	

	function onBefore() { 
		//$('div#slideInfo').fadeOut();
		//alert('removed');
		$('div#slideInfo').animate({ 
			left: '-750px'
      	}, 400 );

	} 
	function onAfter() { 

		data = $(this).find('div.slideContent').html();
		
		$('div#slideInfo').html(data); 
		
		$('div#slideInfo').animate({ 
			left: "20px"
      	}, 700 );		
		
	} 
	
	$('.listItem:odd').css('margin-right','0');

	
});
$(window).bind("load", function() {	
	//Slideshows
	/*
	$('.loading').hide();
	$('#sliderWrapper').show(1, function() {		
		$('#slider .item .itemContent').eq(0).animate({ left: '0' }, 500, function() {} );			
	});	
	*/
});
/*------- Equal height -----------------------------------------------------------------*/
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$.easing.easeOutBounce = function (x, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};
