var TO;
function Over(portfolio_id)
{
	clearTimeout(TO);
	jQuery('#tip'+portfolio_id).fadeIn(400);
}
function Out(portfolio_id)
{
	TO=setTimeout('jQuery(\'#tip'+portfolio_id+'\').fadeOut()',0);
}

$(document).ready(function()
{
	$(".clicktoclose").click(function(){
		$(this).hide();
	});
	

    $("img.tooltip[title]").tooltip('#tooltip'); 
	
	
	// enable scrolls. a simple magical one liner 
	$(".scroll").scrollable({easing: 'custom', speed: 1100, size: 1, loop: true}).circular().autoscroll({autoplay: true, interval: 20000});
	
	//$('.mask').fadeOut('slow', function(){
	//});
	
	/*$('a.fade').click(function() {
		
		var url = $(this).attr("href");
		
		$('.mask').fadeIn('slow', function(){
			document.location.href = url;
		});
		
		return false;
	});*/
	
	// custom easing called "custom" 
	$.easing.custom = function (x, t, b, c, d) { 
		var s = 1.70158;  
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 
	}
	//externalLinks();
});