$.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
$("<img>").attr("src", arguments[i]);
}
$.preloadImages("http://www.infiniteguitar.com/images/lessonpagetopexpand.png", "http://www.infiniteguitar.com/images/lessonpagetopexpandclose.png", "http://www.infiniteguitar.com/images/lessonpagetopbarend.png");

$(document).ready(function(){
$("#menutop li div").hover(
function(){
var iconName = $(this).children("img").attr("src");
var origen = iconName.split(".png")[0];
$(this).children("img").attr({src: "" + origen + "close.png"});
$(this).css("cursor", "pointer");
$(this).animate({ width: "564px" }, {queue:false, duration: 300} );
$(this).children("span").animate({opacity: "show"}, "fast");
}, 
function(){
var iconName = $(this).children("img").attr("src");
var origen = iconName.split("close.")[0];
$(this).children("img").attr({src: "" + origen + ".png"});			
$(this).animate({ width: "65px" }, {queue:false, duration: 400} );
$(this).children("span").animate({opacity: "show"}, "slow");
});
});
