pageurl = document.location.href+'';

//alert(page);
    
$(document).ready(function(){
    
    $("a[rel='external']").click(function(){
        window.open(this.href);
        return false;
    })
    
    page = "home";
    suffix = "over";
    if (pageurl.indexOf('?page=')!=-1){
        urlparts = pageurl.split('?page=');
        page = urlparts[1]; 
    }
    $("a :img.menuitem").mouseover(function(){
        
        imgsrc = this.src+"";     
        newsrc = imgsrc.replace(".gif","_"+suffix+".gif");
        $(this).attr('src',newsrc); 
    });
    
    $("a :img.menuitem").mouseout(function(){
        imgsrc = this.src+"";     
        newsrc = imgsrc.replace("_"+suffix,"");
        $(this).attr('src',newsrc);  
    });

});
