// scroll
jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};
 
/*-------------------------------------
 loading
-------------------------------------*/
jQuery(document).ready(function(){
    jQuery('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;
            }
        }
    });
 
});

/* table add even */
$(document).ready(function(){
  $("table").each(function(){
    jQuery(this).find("tr:even").addClass("even");
  });
});

/* input file */
$(function(){  
     $("form .file").change(function(){ 
     $(this).next().children(".targetInput").val($(this).val());  
     });  
});  

/* agreebox */
$(function(){  
     $("form .agree #agree").click(function() {
	        if($(this).is(":checked")) {
	            $("form #checkBtn").removeAttr("disabled");
	        } else {
	            $("form #checkBtn").attr('disabled','disabled');
	        }
	 });
});  

