(function($){
$(document).ready(function(){
  
  $(".sidebar ul.menu li a:not(.active)").hover(function() {
    $(this).animate({ backgroundColor: "#32dbc9" }, 600);
  },function() {
    $(this).animate({ backgroundColor: "#eee" }, 400);
  });
  
  $("#block-system-main .node .content a").hover(function() {
    $(this).css('color', "#000000");
    $(this).animate({ backgroundColor: "#ddd" }, 600);
  },function() {
    $(this).css('color', "#0000ff");
    $(this).animate({ backgroundColor: '#fff' }, 400);
  });
  
  $("h2 a").hover(function() {
     $(this).animate({ color: "#297566" }, 600);
   },function() {
     $(this).animate({ color: '#000' }, 400);
   });  

  // slideshow
  var currentSlide = 1;
  var totalSlides = $("body#pid-works .view-id-works div.views-row").length;
  $("body#pid-works .view-id-works .view-header").text(currentSlide + " of " + totalSlides);
  $("body#pid-works .view-id-works div.views-row:not(.views-row-first)").hide();
  $("body#pid-works .view-id-works div.slide").click(function() {
    $(this).parent().fadeOut(1000);
    currentSlide = currentSlide + 1;
    if (currentSlide > totalSlides) {
      currentSlide = 1; 
    } 
    $(".view-id-works div.views-row-" + currentSlide).fadeIn(1000);
    $(".view-id-works .view-header").text(currentSlide + " of " + totalSlides);
  });
    
  
});
})(jQuery);
;

