// roll_o_ver.js
// use this file for the sign rollover effect
// and yes, this file is hella clunky, but we
// are beat right now and dog tired of wrestling
// with the css

jQuery(document).ready( function()
{
   PONTZ.rollover.init();
   JUDEA.rollover.init();
   PYXES.rollover.init();
   WENTZ.rollover.init();
});

PONTZ = {};

PONTZ.rollover =
{
  init: function()
  {
    this.preload();

    jQuery(".menu_pic_TL").hover(
      function () { jQuery(this).attr( 'src', PONTZ.rollover.newimage(jQuery(this).attr('src')) ); },
      function () { jQuery(this).attr( 'src', PONTZ.rollover.oldimage(jQuery(this).attr('src')) ); }
    );
 },
   
 preload: function()
 {
   jQuery(window).bind('load', function() {
     jQuery('.menu_pic_TL').each( function( key, elm ) { jQuery('<img>').attr( 'src', PONTZ.rollover.newimage( jQuery(this).attr('src') ) ); });
   });
  },
   
  newimage: function( src ){ return src.substring( 0, src.search(/(\.[a-z]+)/) ) + '_o' + src.match(/(\.[a-z]+)/)[0]; },
  oldimage: function( src ){ return src.replace(/_o/, ''); }
};

JUDEA = {};

JUDEA.rollover =
{
  init: function()
  {
    this.preload();

    jQuery(".menu_pic_TR").hover(
      function () { jQuery(this).attr( 'src', JUDEA.rollover.newimage(jQuery(this).attr('src')) ); },
      function () { jQuery(this).attr( 'src', JUDEA.rollover.oldimage(jQuery(this).attr('src')) ); }
    );
 },
   
 preload: function()
 {
   jQuery(window).bind('load', function() {
     jQuery('.menu_pic_TR').each( function( key, elm ) { jQuery('<img>').attr( 'src', JUDEA.rollover.newimage( jQuery(this).attr('src') ) ); });
   });
  },
   
  newimage: function( src ){ return src.substring( 0, src.search(/(\.[a-z]+)/) ) + '_o' + src.match(/(\.[a-z]+)/)[0]; },
  oldimage: function( src ){ return src.replace(/_o/, ''); }
};

PYXES = {};

PYXES.rollover =
{
  init: function()
  {
    this.preload();

    jQuery(".menu_pic_BL").hover(
      function () { jQuery(this).attr( 'src', PYXES.rollover.newimage(jQuery(this).attr('src')) ); },
      function () { jQuery(this).attr( 'src', PYXES.rollover.oldimage(jQuery(this).attr('src')) ); }
    );
 },
   
 preload: function()
 {
   jQuery(window).bind('load', function() {
     jQuery('.menu_pic_BL').each( function( key, elm ) { jQuery('<img>').attr( 'src', PYXES.rollover.newimage( jQuery(this).attr('src') ) ); });
   });
  },
   
  newimage: function( src ){ return src.substring( 0, src.search(/(\.[a-z]+)/) ) + '_o' + src.match(/(\.[a-z]+)/)[0]; },
  oldimage: function( src ){ return src.replace(/_o/, ''); }
};

WENTZ = {};

WENTZ.rollover =
{
  init: function()
  {
    this.preload();

    jQuery(".menu_pic_BR").hover(
      function () { jQuery(this).attr( 'src', WENTZ.rollover.newimage(jQuery(this).attr('src')) ); },
      function () { jQuery(this).attr( 'src', WENTZ.rollover.oldimage(jQuery(this).attr('src')) ); }
    );
 },
   
 preload: function()
 {
   jQuery(window).bind('load', function() {
     jQuery('.menu_pic_BR').each( function( key, elm ) { jQuery('<img>').attr( 'src', WENTZ.rollover.newimage( jQuery(this).attr('src') ) ); });
   });
  },
   
  newimage: function( src ){ return src.substring( 0, src.search(/(\.[a-z]+)/) ) + '_o' + src.match(/(\.[a-z]+)/)[0]; },
  oldimage: function( src ){ return src.replace(/_o/, ''); }
};
