73 lines
1.6 KiB
JavaScript
73 lines
1.6 KiB
JavaScript
jQuery(document).ready(function(){
|
|
|
|
// 마우스오버시 이미지 변환
|
|
jQuery("img.rollover").mouseover(function(){
|
|
jQuery(this).attr("src",jQuery(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
|
|
}).mouseout(function(){
|
|
jQuery(this).attr("src",jQuery(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
|
|
});
|
|
|
|
|
|
// 텝
|
|
jQuery(".tab-content").hide();
|
|
jQuery("ul.tabs>li:first").addClass("active").show();
|
|
jQuery(".tab-content:first").show();
|
|
|
|
jQuery("ul.tabs>li").click(function(e) {
|
|
e.preventDefault();
|
|
|
|
jQuery("ul.tabs>li").removeClass("active");
|
|
jQuery(this).addClass("active");
|
|
jQuery(".tab-content").hide();
|
|
|
|
jQuery("ul.tabs>li").find('img').attr("src" ,function(iIndex,sSrc){
|
|
return sSrc.replace('_on.gif', '_off.gif');
|
|
});
|
|
|
|
jQuery("ul.tabs>li.active").find('img').attr("src",function(iIndex,sSrc){
|
|
return sSrc.replace('_off.gif', '_on.gif');
|
|
});
|
|
|
|
var activeTab = jQuery(this).find("a").attr("href");
|
|
jQuery(activeTab).fadeIn();
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
|
|
// 비주얼
|
|
jQuery('#visual-slide').bxSlider({
|
|
mode : 'fade',
|
|
speed:1000,
|
|
pause:4000,
|
|
pager:true,
|
|
auto: true,
|
|
controls:false,
|
|
captions: false,
|
|
autoControls: false
|
|
});
|
|
|
|
// top
|
|
if (jQuery('.quick-top').length){
|
|
var $topBtn = $('.quick-top');
|
|
$topBtn.hide();
|
|
jQuery(window).scroll(function(e){
|
|
var $topBtnSp = $(this).scrollTop();
|
|
if($topBtnSp >= 100){
|
|
$topBtn.fadeIn();
|
|
}
|
|
else {
|
|
$topBtn.fadeOut();
|
|
}
|
|
});
|
|
jQuery('.quick-top').on('click', function(){
|
|
$('body,html').animate({scrollTop:0},600);
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}); //End
|
|
|