$(document).ready(function() {

  //Show the rate bar when mouse is over image
  $('#contractor-gallery .cg-img').hover(
    function(){
      $(this).children('.rate').slideDown();
    },
    function(){
      $(this).children('.rate').slideUp();
    }
  );
  
  //Hover for info
  $('#contractor-gallery .info-img').hover(
   function(){
      $(this).attr('src', $(this).attr('src').replace(/base/, 'hover'));
    },
    function(){
      $(this).attr('src', $(this).attr('src').replace(/hover/, 'base'));      
    }
  );
  $('#contractor-gallery .info-link').hover(
   function(){
      $(this).parent().siblings('.info').show();
    },
    function(){
      $(this).parent().siblings('.info').hide();
    }
  );
  
    //Hover for search
  $('#contractor-gallery .search-img').hover(
   function(){
      $(this).attr('src', $(this).attr('src').replace(/base/, 'hover'));
    },
    function(){
      $(this).attr('src', $(this).attr('src').replace(/hover/, 'base'));      
    }
  );

});
