var images_before = new Array();
var images_after = new Array();

$(document).ready(function(){
	var i;
	i = 0;
	
	$.each( $('.ro img'), function(){
		$(this).mouseover( function(evt) {
			$(this).attr('src', $(this).attr('src').replace(/(?:_ro)?(\.jpg|\.gif)$/i, '_ro' ) + RegExp.$1 );
		});
		$(this).mouseout( function(evt) {
			$(this).attr('src', $(this).attr('src').replace(/_ro\./i, '.' ));
		});
		images_after[i] = new Image();
		images_after[i].src  = $(this).attr('src').replace(/(?:_ro)?(\.jpg|\.gif)$/i, '_ro' ) + RegExp.$1;
		i++;
	});
	$.each( $('.on img'), function(){
		$(this).attr('src', $(this).attr('src').replace(/(?:_ro)?(\.jpg|\.gif)$/i, '_ro' ) + RegExp.$1 );
	});
//	if( !location.href.match(/[^\/]+\/[^\/\.]+/)){
//		$('#gbn-top img').attr('src', $('#gbn-top img').attr('src').replace(/(?:_ro)?(\.jpg|\.gif)$/i, '_ro' ) + RegExp.$1 );
//	}
	
	$.each( $('a.newwindow'), function(){
		$(this).click( function(evt){
			window.open( this.href );
			return false;
		});
	});
});
