/* ****************************************************************** @This javascript Information{ JS File Name:common_form.js } ****************************************************************** */ /*=================================================================== 1:imgover setting ===================================================================*/ if(typeof jQuery != "undefined"){ /* img input */ $(function(){ $('img.imgover,input[type=image].imgover').each(function(){ var imgOut = new Image(); imgOut.src = $(this).attr('src'); var imgOver = new Image(); if(imgOut.src.match(/.gif$/)){ imgOver.src = $(this).attr('src').replace('.gif','_on.gif'); }else if(imgOut.src.match(/.jpg$/)){ imgOver.src = $(this).attr('src').replace('.jpg','_on.jpg'); }else if(imgOut.src.match(/.png$/)){ imgOver.src = $(this).attr('src').replace('.png','_on.png'); } $(this) .mouseover(function(){$(this).attr('src',imgOver.src);}) .mouseout( function(){$(this).attr('src',imgOut.src);}); }); }); /* fade */ $(function(){ $('a img.imgfade,input.imgfade,a.imgfade,#header_inq a').hover( function(){ $(this).fadeTo(100,0.6); }, function(){ $(this).fadeTo(100,1.0); } ); }); } /*=================================================================== 2:scroll setting ===================================================================*/ $(function(){ $('a[href^=#]').click(function(){ var speed = 500; var href= $(this).attr("href"); var target = $(href == "#" || href == "" ? 'html' : href); var position = target.offset().top; $("html, body").animate({scrollTop:position}, speed, "swing"); return false; }); }); /*=================================================================== 3: ===================================================================*/ $(function(){ $('#btn_close_win a').click(function() { $('#conf_win').fadeOut(100); }); $('#btn_submit a').click(function() { $('#conf_win').fadeOut(100); }); }); /*=================================================================== 4: ===================================================================*/ $(function(){ var fbH = $(document).height(); $('#conf_win').css('height', fbH); });