$(function(){

	$('#itemslist a').hover(function(){
		var imgsrc = $(this).find('img').attr('src').replace('.','_o.');
		$(this).find('img').attr('src',imgsrc);
		},function(){
		var imgsrc = $(this).find('img').attr('src').replace('_o.','.');
		$(this).find('img').attr('src',imgsrc);
	});

	$('#Wrapper h1').each(function(){
		$(this).after('<div class="h1div"><!--end of h1--></div>');
	});

	$('#mokichiroom area').hover(function(){
		var num = $("#mokichiroom area").index(this);
		var num = num+1;
		var imgsrc = $('#sroom img').attr('src').replace('swap0','swap'+num);
		$('#sroom img').attr('src',imgsrc);
		},function(){
		var num = $("#mokichiroom area").index(this);
		var num = num+1;
		var imgsrc = $('#sroom img').attr('src').replace('swap'+num,'swap0');
		$('#sroom img').attr('src',imgsrc);
	});

	$('#CenterWrapper img').each(function(){
	if($(this).attr('align')=='left'){
		$(this).css({'margin':'0 10px 10px 0','float':'left'});
		$(this).removeAttr('align');
	}else if($(this).attr('align')=='right'){
		$(this).css({'margin':'0 0 10px 10px','float':'right'});
		$(this).removeAttr('align');
	}else if($(this).attr('align')=='center'){
		$(this).css({'margin':'0 10px 10px 10px'});
	}
	});

$('.cbanners a:has(img)').css({'padding':'0','border':'none'});
$('.topbanners a:has(img)').css({'padding':'0','border':'none'});
$('.topbanners a').addClass('noicon');

$('.topbanners p:eq(4)').css({'clear':'both'}).before('<div class="clear">');
$('.topbanners p:eq(8)').css({'clear':'both'});

});

