// JavaScript Document

jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};



$(function(){
					 
	//$('.cvbox').corner("5px");
	if(!jQuery.support.opacity){
		$('.cvbox').corner("cc:#5BB5DE keep 5px");
	} else {
		$('.cvbox').corner("5px");
	}

					 
					 
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = jQuery(this.hash);
			$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 1200, 'quart');
				return false;
			}
		}
	});
	
	var blankFlag = true;
	
	$('a[href^="http"]').not('[href*="www.im-kokura.info"]').click(function(){
																																					if (blankFlag){
		 window.open(this.href,'_blank');
		 blankFlag = false;
		 return false;
																																					}
	 });
	
	$('a.blank').click(function(){
															if (blankFlag) { window.open(this.href,'_blank'); blankFlag = false; return false;}
															});
	
	/* Backgroud test */
	if ($.cookie('bg')){
		$("html").css("background-image","url("+$.cookie('bg')+")");
	}
	
	/* Backgroud test */
	

});



