///////////////////////////////////////////////////////////////////////////
////////////////////////ROLL OVER FUNCTION/////////////////////////////////
///////////////////////////////////////////////////////////////////////////
peps = {};  
peps.rollover = 
{  
   init: function() 
   {  
      this.preload();  
      jQuery(".roll").hover(  
         function () { jQuery(this).attr( 'src', peps.rollover.newimage(jQuery(this).attr('src')) ); },  
         function () { jQuery(this).attr( 'src', peps.rollover.oldimage(jQuery(this).attr('src')) ); }  
   );  
},  
preload: function()
   {  
      jQuery(window).bind('load', function() 
	  {  
         jQuery('.roll').each( function( key, elm ) { jQuery('<img>').attr( 'src', peps.rollover.newimage( jQuery(this).attr('src') ) ); });  
      });  
   },  
   newimage: function( src ) 
   {  
      return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_hover' + src.match(/(\.[a-z]+)$/)[0];  
   },  
   oldimage: function( src )
   {  
      return src.replace(/_hover\./, '.');  
   }  
};
///////////////////////////////////////////////////////////////////////////
////////////////////////FIN ROLL OVER FUNCTION/////////////////////////////
///////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////
///////////DOCUMENT READY DE ROLLOVERS Y REMPLAZO DE TEXTO/////////////////
///////////////////////////////////////////////////////////////////////////

jQuery(document).ready( function() 
{ 
	if(typeof sIFR == "function")
	{
  	  sIFR.replaceElement(named({sSelector:".replacent", sFlashSrc:"swf/swiss.swf", sColor:"#FFFFFF", sLinkColor:"#FFFFFF", sHoverColor:"#000000", sWmode:"transparent"}));
  	}
	if(typeof sIFR == "function")
	{
  	  sIFR.replaceElement(named({sSelector:".header-replacent", sFlashSrc:"swf/swiss.swf", sColor:"#FFFFFF", sLinkColor:"#FFFFFF", sHoverColor:"#666666", sWmode:"transparent"}));
  	}
  if(typeof sIFR == "function")
  	{
  	  sIFR.replaceElement(named({sSelector:".replacent-selected", sFlashSrc:"swf/swiss.swf", sColor:"#990033", sLinkColor:"#990033", sHoverColor:"#000000", sWmode:"transparent"}));
  	}
  if(typeof sIFR == "function")
  	{
  	  sIFR.replaceElement(named({sSelector:".replacent-dos", sFlashSrc:"swf/swiss.swf", sColor:"#FFFFFF", sLinkColor:"#000000", sHoverColor:"#FFFFFF", sWmode:"transparent"}));
  	}
	if(typeof sIFR == "function")
  	{
  	  sIFR.replaceElement(named({sSelector:".replacent-portfolio", sFlashSrc:"swf/swiss-thin.swf", sColor:"#000000", sLinkColor:"#000000", sHoverColor:"#000000", sWmode:"transparent"}));
  	}
   peps.rollover.init();
});  


