
var animationSpeed = 500;

/**
 * Crossfade the given element from the existing source to the new source
 * @param elementID
 * @param newSrc
 */
function crossfade(elementID, newSrc) {
    $("#" + elementID).fadeOut(animationSpeed, function () 
        {$("#" + elementID).attr("src", imgs[newSrc].src);}
    );
        
    $("#" + elementID).fadeIn(animationSpeed);
}
