$(document).ready(function () {
	var $container = $('#work');
	
	$('#work').load('work.php?i=0',function(){
		/*$container.infinitescroll({
			navSelector  : '#page_nav',    // selector for the paged navigation 
        	nextSelector : '#page_nav a',  // selector for the NEXT link (to page 2)
			itemSelector : '.item',     // selector for all items you'll retrieve
			dabug      	 : true,
			animate      : false,
			loadingImg   : "images/logo_hollow.png",
			loadingText  : "tetten",
			donetext     : "tetten",
			extraScrollPx: 230,
			bufferPx     : 0  
			},
			// call Isotope as a callback
			function( newElements ) {
			}
		  );*/
		  
		 $(".item").hover(function (){
			$(this).find(".cover").hide();
			$(this).find(".hide").show();
		}, function () {
			$(this).find(".cover").show();
			$(this).find(".hide").hide();
		});

		
		$(".item[rel!='']").click(function (){
			window.location.href = $(this).attr('rel');
		});
		
		$(".item[rel!='']").mouseover(function () {
			$(this).css('cursor', 'pointer');
		});
		
		$container.masonry({
			itemSelector : '.item'/*,
			isAnimated: true,
			animationOptions: {
				duration: 200
			  }*/
			
		  });
		  
		$(".animation").each(function (i) {
			$(this).iskip({images:$(this).attr('arr').split(","), method:$(this).attr('method'), speed:$(this).attr('speed'), 'cycle':1});
		});
		
		
		/*$('#logoimg').hover(function () {
			this.src = 'images/logo_hollow_hover.png';
		}, function () {
			this.src = 'images/logo_hollow.png';
		});*/
	});
	
	$("#contactimg").hover(function(){
			$("#contactimg").attr("src","images/contact_blue.png");
		},function(){
			$("#contactimg").attr("src","images/contact_black.png");
		}
	);
	
	
});

