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"]').click(function() {
				this.target = "_blank";
			//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;
				}
			}
		});
	});

	if(jQuery("#Type_B .image2").length){
		jQuery(function() {
			var tallest = 0;
			var thisheight = 0;
			jQuery("#Type_B .image2 ul li").each(function() {
				thisheight = jQuery(this).height();
				if(thisheight > tallest){
					tallest = thisheight;
				}
			});
			jQuery("#Type_B .image2 ul li").height(tallest);
		});
	}

});
