$(document).ready(function() {
						
	$('a[rel*=facebox]').facebox();
		

	PEPS.rollover.init();

		
});



PEPS = {};

PEPS.rollover =
{
   init: function()
   {
      this.preload();
     
      $(".ro").hover(
         function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); },
         function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
      );
   },

   preload: function()
   {
      $(window).bind('load', function() {
         $('.ro').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(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\./, '.');
   }
};

function preventBehaviour() {
if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; }
}



function resize(size, current, elem) {
	if (current <= size) {
		i = current + 5;
		document.getElementById(elem).style.height = i;
		t = window.setTimeout("resize(100, "+i+")", 100);
		}
	}
	


