
	
$(document).ready(function(){
  $('#slider').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		next:   '#next2', 
 	    prev:   '#prev2' 
	});

 $("#social img").hover(function() {
                $(this).animate({ backgroundColor: "#e2dbc9"  }, 600);
        },function() {
                $(this).animate({ backgroundColor: "#cbc3b0"  }, 400);
        });

 $("#recentwork img").hover(function() {
                $(this).animate({ backgroundColor: "#e2dbc9"  }, 600);
        },function() {
                $(this).animate({ backgroundColor: "#cbc3b0"  }, 400);
        });



 $(".post img").hover(function() {
                $(this).animate({ backgroundColor: "#e2dbc9"  }, 600);
        },function() {
                $(this).animate({ backgroundColor: "#cbc3b0"  }, 400);
        });

 $("#footer-container img").hover(function() {
                $(this).animate({ marginTop : "5px" }, 150);
        },function() {
                 $(this).animate({ marginTop : "0px" }, 110);
        });


 
$("ul#portfolio-thumbs li").hover(function() { 

		var thumbOver = $(this).find("img").attr("src"); 

		
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		
		$(this).find("span").stop().animate({opacity: 0}, 300);

	} , function() { 

		
		$(this).find("span").stop().animate({opacity: 1}, 300);

	});

/*		$("#cssgallery").click(function(){
										
		$(this).animate({ opacity: "show" }, 500, "");
		
		});
*/


  

  $('#portfolio-thumbs').each(function () {
    var $links = $(this).find('a'),
      panelIds = $links.map(function() { return this.hash; }).get().join(","),
      $panels = $(panelIds),
      $panelwrapper = $panels.filter(':first').parent(),
      delay = 500,
      heightOffset = 40; // we could add margin-top + margin-bottom + padding-top + padding-bottom of $panelwrapper
      
    $panels.hide();
    
    $links.click(function () {
      var link = this, 
        $link = $(this);
      
      // ignore if already visible
      if ($link.is('.selected')) {
        return false;
      }
      
      $links.removeClass('selected');
      $link.addClass('selected');
      
      document.title = $link.text() + ' - Portfolio - Iacob Ionut ';
              
      if ($.support.opacity) {
        $panels.stop().animate({opacity: 0 }, delay);
      }
      
      $panelwrapper.stop().animate({
        height: 0
      }, delay, function () {
        var height = $panels.hide().filter(link.hash).css('opacity', 1).show().height() + heightOffset;
        
        $panelwrapper.animate({
          height: height
        }, delay);
      });
    });
    
    $links.filter(window.location.hash ? '[hash=' + window.location.hash + ']' : ':first').click();
  });



});

		
  