// USE THIS <--------------------------------->
//  togglediv is the class to signal this thing toggles stuff
//  hidediv-xxxx is the class where xxxx is the thing to hide
//  showdiv-xxxx is the class where the xxxx is the thing to show
jQuery(function(){ 
    jQuery('.togglediv').each(function(){
        var hideid = jQuery(this).attr('class').match(/(.*)hidediv-(\w+)/)[2];
        var showid = jQuery(this).attr('class').match(/(.*)showdiv-(\w+)/)[2];
        jQuery(this).click(function(){
            jQuery('.toggle_selected').each(function(){jQuery(this).removeClass('toggle_selected')});
            jQuery(this).addClass('toggle_selected');
            jQuery('#'+hideid).hide();
            jQuery('#'+showid).show();
            return false;
        });
        jQuery(this).hover(function(){jQuery(this).addClass('hover');},function(){jQuery(this).removeClass('hover');})
    });
});
// <------------------------------------------>

