(function($) {
 $(function() {
       jQuery.preloadImages = function()
       {
              for(var i = 0; i<arguments.length; i++)
              {
                     jQuery("<img>").attr("src", arguments[i]);
              }
       }
       $.preloadImages("img/drawing-hover.jpg", "img/epic-hover.jpg", "img/fresh-hover.jpg", "img/gibsons-hover.jpg",
                       "img/mapart-hover.jpg", "img/photo-hover.jpg", "img/textfields-hover.jpg");
       
       
        $(".section img").hover(function() {
        $(this).attr("src", $(this).attr("src").split(".").join("-hover."));
        $(this).parents("div:first").children().children().filter(".itemtitle").children().filter("a").css("color", "#ff00ff");
    },
    function() {
        $(this).attr("src", $(this).attr("src").split("-hover.").join("."));
        $(".itemtitle a").css("color",null);
    });
                
    $(".itemtitle a").hover(function() {
        $(this).parents("div:first").children().children().filter("img").attr("src",
        $(this).parents("div:first").children().children().filter("img").attr("src").split(".").join("-hover."));
    },
    function(){ 
        $(this).parents("div:first").children().children().filter("img").attr("src",
        $(this).parents("div:first").children().children().filter("img").attr("src").split("-hover.").join("."));
    });
});
})(jQuery);