$(document).ready(addHoverHandlers);

function addHoverHandlers() {
    $("#content_banner li a").mouseover(swap);
}
function swap(){
	// Image
    $("#content_banner").find("img.show").swapImage('off');
    $("#content_banner").find("img:eq("+ digit($(this).attr('id'))+")").swapImage('on');
    // Module
    $("#bottom_cols .two_col .show").swapImage('off');
    $("#bottom_cols .two_col .wrap:eq("+digit($(this).attr('id'))+")").swapImage('on');
}
function digit(string){
	return string.replace(/^.*?([0-9]+)$/,"$1");
}
$.fn.swapImage = function(mode) {
    var mode = mode || 'off'; // if mode is undefined, use 'off' as default
    this.each(function() {
        switch(mode) {
        case 'on':
            $(this).removeClass("hide");
            $(this).addClass("show");
            break;
        case 'off':
            $(this).removeClass("show");
            $(this).addClass("hide");
            break;
        }
    });
};	