$(document).ready(function() {
	slidePortfolioIndex(5000, 678); // Please define delay between the automatic slider, and the full width of the current items. 
	slidePortfolioCaption();
	//slidingButton();
	//imageLoader();
	//resetField('.search_input');
	slidePortfolio('.portfolio_image a');
	//fadeOthers('.portfolio_item');
	//$("a[rel^='prettyPhoto']").prettyPhoto();
});


function slidePortfolioIndex($time,$full_image_width){$addCustom=$(".index_port_item.current").length;if($addCustom==0){$(".index_port_item:first").addClass("current")}$totalPortfolio=($(".index_port_item").length)-1;$widthDivide=935-$full_image_width;$tileWidth=parseInt($widthDivide/$totalPortfolio);$caption_width=$full_image_width-63;$caption_width=$caption_width+'px';$full_image_width=$full_image_width+'px';$(".index_port_item").css("width",$tileWidth);$(".index_port_item.current").css("width",$full_image_width);$(".caption").css({width:$caption_width,opacity:0});if(typeof(isClicked)=='undefined'){var isClicked=0}$(".index_port_item").click(function(){isClicked=1;var classClicked=$(this).attr('class');if(classClicked!=='index_port_item current'){$(".index_port_item.current").removeClass("current").addClass("prev").stop().animate({width:$tileWidth},630);$(this).addClass("current").css("width",$tileWidth).stop().animate({width:$full_image_width},730);$(".index_port_item.prev").removeClass("prev")}});if(typeof(isHovered)=='undefined'){var isHovered=0}$(".index_port_item").hover(function(){isHovered=1},function(){isHovered=0});setInterval(function(){if(isHovered==0&&isClicked==0){nextPortfolioItem('678px',$tileWidth)}},$time)}function nextPortfolioItem($full_image_width,$tile_width){$current=$(".index_port_item.current");$next=$(".index_port_item.current").next();if($next.attr('class')==undefined){$next=$(".index_port_item:first")}else{}$current.removeClass("current").css("width",$full_image_width).stop().animate({width:$tile_width},630);$next.addClass("current").css("width",$tile_width).stop().animate({width:$full_image_width},730)}function slidePortfolioCaption(){$(".index_port_item").children('a').hover(function(){$(this).parents().children('.caption').stop().animate({opacity:1},730)},function(){$(this).parents().children('.caption').stop().animate({opacity:0},630)})}function slidePortfolio($class){$($class).hover(function(){$(this).children('.over').stop().animate({top:'-120px'},300)},function(){$(this).children('.over').stop().animate({top:'0'},150)})}
