/* Fire when DOM is ready */
$(document).ready(function(){
	$('a.lightbox').lightBox();
	PEPS.rollover.init();
	/* Replace the font on these tags */
	Cufon.replace('h2,h3,h4');
});
/* Rollover Automation */
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]+)/) ) + '-over' + src.match(/(\.[a-z]+)/)[0]; },
	oldimage: function( src ){ return src.replace(/-over/, ''); }
};