$(document).ready(function(){
	
	$('#sj').cycle({ 
	    fx:     'fade', 
	    speed:  300, 
	    timeout: 3000,
	    pause: 0
	}); 

	$('.p_entry').each(function() { 
		var prevArrow = $('<a href="#" class="barrow arrow b1"></a>').appendTo(this); 
		var nextArrow = $('<a href="#" class="farrow arrow a1"></a>').appendTo(this);	 

		var this_slider = $(this).find('.p_thumbs');

		$(this_slider).cycle({ 
			fx: 'fade',	 
			speed:  500, 
			timeout: 0, 
			prev: prevArrow, 
			next: nextArrow
		}); 
	});

	/*$(".work a").stop().hover(
		  function () {
		    $(this).fadeTo(200, 0);
		  },
		  function () {
		    $(this).fadeTo(200, 1);
		  }
	);*/

	/*$(".work").stop().hover(
		  function () {
		    $(this).find('a').animate({top: '95%' },200);
		  },
		  function () {
		      $(this).find('a').delay(200).animate({top: '0%' },190);
		  }
	);*/

		$(".work").hover(
		  function () {
		    $(this).find('.aframe').stop().animate({top: '95%' },200);
		  },
		  function () {
		      $(this).find('.aframe').delay(200).animate({top: '0%' },190);
		  }
	);

	$(".aframe").click(function (e) {
			  e.preventDefault();	
		      $(this).stop().animate({top: '95%' },500, function() {
		      	$(this).delay(4000).animate({top: '0%'}, 490)
		      });
		  }
	);


});



