jQuery(document).ready(function(){
	
	// open new window
	jQuery(function() {
		//jQuery('a[href^="http://"]').not('a[href^="http://jigsaw.w3.org/"]').not('a[href^="http://validator.w3.org/"]').click(function() {
		jQuery('a[href^="http://"]').click(function() {
			if (!(location.hostname == this.hostname)) {
				this.target = "_blank";
				//window.open(this.href, '');
				//return false;
			}
		});
		jQuery('a[href^="pdf/"]', 'a[href^="../pdf"]').click(function() {
			window.open(this.href, '');
			return false;
		});
		jQuery('a[href^="blog/"]', 'a[href^="../blog"]').click(function() {
			window.open(this.href, '');
			return false;
		});
	});

	// easing
	jQuery(function() {
		jQuery('area[href*=#], a[href*=#]').click(function() {
			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
				var target = jQuery(this.hash);
				target = target.length && target;

				if (target.length) {
					var sclpos = 6;	//スクロール後のtopからの距離　初期値：30
					var scldurat = 2400;	//スクロールスピードの調整ミリ秒　初期値：1200
					var targetOffset = target.offset().top - sclpos;
					jQuery(jQuery.browser.opera ? jQuery.support.boxModel == false ? 'body' : 'html' :'html,body')
						.animate({scrollTop: targetOffset});
					return false;
				}
			}
		});
	});

});
