var butoane =function buttons()
{

$(".but").click(function(){
  
  var id=$(this).attr("id");
  
  $("#content").animate(
					   { height: getPageHeight() },
					   700,
					   function()
					        {
							$("#content_"+ id).css({display: "block"});
							$("#content_"+ id).animate({opacity:1},500);
							}
						)

  
  return false;

})


$(".close").click(function(){
 
   $(".content").animate({opacity:0},500, function(){
						$("#content").animate({ height: 0 }, 700 , function() {$(".content").hide();});
						
						})
   
   return false;

})


$(".portfolio_list span").click(function(){
  
  var id=$(this).attr("id");
  
  $(".portfolio_list span").removeClass("active");
  $("#" + id).addClass("active");
  
  $(".lucrare").animate({opacity:0},1000,function() 
									{
									$(".lucrare").hide();
									$("#lucrare_"+ id).show().animate({opacity:1},500);
									});

  
  return false;

})


}
$( window ).load( butoane );

function getPageHeight() 
{
	var windowHeight;

	if( self.innerHeight )
		windowHeight = self.innerHeight;

	else if( document.documentElement && document.documentElement.clientHeight )
		windowHeight = document.documentElement.clientHeight;

	else if( document.body )
		windowHeight = document.body.clientHeight;

	return windowHeight;
}
