(function($) {
	$.fn.boxToggle = function () {
		return this.each(function() {			
			$(this).bind('click', function() {
				var target = $(this).attr('href');
				$(target).animate({height: 'toggle', opacity: 'toggle'}, 500);
				
				return false;
			});
		});
	}
})(jQuery);

$(document).ready(function(){
	$('#carousel').cycle({fx:'scrollLeft', timeout: 5000});
	//$('#fader').cycle({fx:'fade', timeout: 10000});
	
	$('a[rel=toggle]').boxToggle();
});

jQuery.extend(jQuery.easing, {
	swing: function(x, t, b, c, d){
		return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; //Override default ease with easeOutExpo from http://gsgd.co.uk/sandbox/jquery/easing/
	}
});
