/*スパム対策*/
<!--
function vspam(im,domain) {
  maddress = "mailto:" + im + "@" + domain;
  window.location.href = maddress;
}
// -->



$(document).ready(function(){
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
   			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
   			if ($target.length) {
  				var targetOffset = $target.offset().top;
  				$('html,body')
  				.animate({scrollTop: targetOffset}, 1000);
    			return false;
			}
		}
 	});
	
	$(function(){
    	$("img.over").mouseover(function(){
        	$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
    	}).mouseout(function(){
        	$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
    	}).each(function(){
        	$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
    	})
	})

});


$(function(){
	$("#breadList li:last").addClass("last");
	
	//読み込み画像
	preload([
    	'imgs/shared/pagetop_on.png'
	]);

	load_file("newsBox","news.html");

	//$('#newsArea ul').jScrollPane({showArrows:true,scrollbarWidth:10});

});

//画像preload
function preload(arrayOfImages) {
    $(arrayOfImages).each(function(){
        $('<img/>')[0].src = this;
        // Alternatively you could use:
        // (new Image()).src = this;
    });
}

//ファイル読み込み
function load_file(divName,fileURL) {
	$("#"+divName).load(fileURL);
}
		
function popupWin(url,wx,wy,wName){
	st = "scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no";
	if(wy == ''){
		wy = screen.height - (screen.height*0.15);
	}
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open(url,wName,"left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}
