
$(document).ready(function() {

	$("ul.gallery li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});

});







 $(document).ready(function() {
 	$('.portfolio_box_content').bind('mouseover',function(){
		$(this).find('.portfolio_image').stop().animate({
			top: "-310px"
  		}, 100, function() {});
	}).bind('mouseout',function(){
		$(this).find('.portfolio_image').stop().animate({
			top: "-0px"
  		}, 350, function() {});
	});

	$('.informatie').bind('click',function(){
		if ($(this).parent().prev().find('.portfolio_image').css('display') == 'none'){
			$(this).parent().prev().find('.portfolio_image').css('display','block');
			$(this).parent().prev().find('.portfolio_text').css('display','none'); 
		} else {
			$(this).parent().prev().find('.portfolio_image').css('display','none');
			$(this).parent().prev().find('.portfolio_text').css('display','block'); 
		}
	});
	
	$('.portfolio_text_close').bind('click',function(){
		$(this).parent().parent().find('.portfolio_image').css('display','block');
		$(this).parent().parent().find('.portfolio_text').css('display','none');
	});
	
 });

  $(document).ready(function() {
 	$('.portfolio_box_content_s').bind('mouseover',function(){
		$(this).find('.portfolio_image_s').stop().animate({
			top: "-168px"
  		}, 100, function() {});
	}).bind('mouseout',function(){
		$(this).find('.portfolio_image_s').stop().animate({
			top: "-0px"
  		}, 350, function() {});
	});

	$('.informatie').bind('click',function(){
		if ($(this).parent().prev().find('.portfolio_image_s').css('display') == 'none'){
			$(this).parent().prev().find('.portfolio_image_s').css('display','block');
			$(this).parent().prev().find('.portfolio_text').css('display','none'); 
		} else {
			$(this).parent().prev().find('.portfolio_image_s').css('display','none');
			$(this).parent().prev().find('.portfolio_text').css('display','block'); 
		}
	});
	
	$('.portfolio_text_close').bind('click',function(){
		$(this).parent().parent().find('.portfolio_image_s').css('display','block');
		$(this).parent().parent().find('.portfolio_text').css('display','none');
	});
	
 });
