$(document).ready(function(){	
	Hash.read();		
	if(Hash.hash.Photo != undefined && Hash.hash.Photo != 0)		
		Portfolio.showPhoto($("#portfolio_thumbs li:nth-child("+Hash.hash.Photo+")").attr("rel"), Hash.hash.Photo);
	else		
		Portfolio.showPhoto($("#portfolio_thumbs li:nth-child(1)").attr("rel"), 1);});
		
	Portfolio = {		
		showPhoto : function(photo, pos)	{		
			$("#portfolio_thumbs li.active").removeClass("active");		
			$("#portfolio_thumbs li[index="+pos+"]").addClass("active");		
			Hash.set("Photo", pos);		
			html = "<img src=\""+Portfolio.BASEPATH+photo+"\" />";		
			$("#portfolio_selected").html(html);		
			Portfolio.centerPhoto(pos);	
		},		
		showText : function(txt)	{
		},		
		centerPhoto : function(id)	{		
			pos = -(120 * id);		
			pos = pos + 350		
			$("#portfolio_thumbs").animate({marginLeft: pos}, "slow");	
		}	
	}
