$(function(){set_fade("fade_pc",6000);set_fade("fade_smt",6000);$(".info_box").hide();$(".info_box").eq(0).show();$(".info_tab li").on("click",function(){if(!$(this).hasClass("on")){$(this).parent().find("li").removeClass("on");$(this).addClass("on");$(".info_box").hide();$(".info_box").eq($(this).index()).fadeIn(300);}});blog_facebook();$(".blog_tab li").on("click",function(){if(!$(this).hasClass("on")){$(this).parent().find("li").removeClass("on");$(this).addClass("on");$(".blog_fb > div").hide();$(".blog_fb > div").eq($(this).index()).fadeIn(300);}});$(".window_set").each(function(i){$LI=$(this).find("li");for(j=0;j<$LI.length;j++){if($LI.eq(j).hasClass("on"))nowLI[i]=j;$(this).find("div").html($(this).find("div").html()+" ");}$(this).find(".next").on("click",function(){LI_next(i);});$(this).find(".prev").on("click",function(){LI_prev(i);});LIID[i]=setTimeout("LI_next("+i+");",6000);});$(".banner_slides").each(function(i){bannerCount[i]=$(this).find("li").length;bannerNow[i]=0;bannerHTML[i]=$(this).find("ul").html();$ele=$(this);setBanner(i);if($(window).width<800){$ele.find("ul").html(bannerHTML[i]+bannerHTML[i]);$ele.find("li").css("width",(50/bannerCount[i])+"%");}$(window).resize(function(){setBanner(i);if($(window).width<800){$ele.find("ul").html(bannerHTML[i]+bannerHTML[i]);$ele.find("li").css("width",(50/bannerCount[i])+"%");}else{$ele.find("ul").html(bannerHTML[i]);$ele.find("li").css("width","50%");}});for(j=0;j ");}$(this).find(".icons a").eq(0).addClass("on");$(this).find(".next").on("click",function(){bannerNext(i);});$(this).find(".prev").on("click",function(){bannerPrev(i);});});$(window).resize(function(){$(".banner_slides").each(function(i){setBanner(i);});blog_facebook();});});nowLI=new Array();LIID=new Array();function LI_move(ele,NUM){clearTimeout(LIID[ele]);$(".window_set").eq(ele).find("li").removeClass("on");$(".window_set").eq(ele).find("li").eq(NUM).addClass("on");$(".window_set").eq(ele).find("div").find("a").removeClass("on");$(".window_set").eq(ele).find("div").find("a").eq(NUM).addClass("on");nowLI[ele]=NUM;LIID[ele]=setTimeout("LI_next("+ele+")",6000);}function LI_next(ele){if(nowLI[ele]>=$(".window_set").eq(ele).find("li").length-1){LI_move(ele,0);}else{LI_move(ele,(nowLI[ele]+1));}}function LI_prev(ele){if(nowLI[ele]<=0){LI_move(ele,$(".window_set").eq(ele).find("li").length-1);}else{LI_move(ele,(nowLI[ele]-1));}}bannerCount=new Array();bannerNow=new Array();bannerHTML=new Array();function setBanner(NUM){if($(window).width()>=800){bannerWidth=50;$(".banner_slides").eq(NUM).find(".icons, .next, .prev").hide();$(".banner_slides").eq(NUM).find("ul").css({width:"auto",marginLeft:"0"});$(".banner_slides").eq(NUM).find("li").css({width:"50%"});}else{bannerWidth=100;if(bannerCount[NUM]>1){$(".banner_slides").eq(NUM).find(".icons, .next, .prev").show();}else{$(".banner_slides").eq(NUM).find(".icons, .next, .prev").hide();}$(".banner_slides").eq(NUM).find("ul").css({width:(bannerWidth*bannerCount[NUM]*2)+"%",marginLeft:-(bannerWidth*bannerNow[NUM]*2)+"%"});$(".banner_slides").eq(NUM).find("li").css({width:(50/bannerCount[NUM])+"%"});}}function bannerSlide(ele,NUM){bannerNow[ele]=NUM;$(".banner_slides").eq(ele).find("ul").animate({marginLeft:-(bannerWidth*NUM)+"%"},500);$(".banner_slides").eq(ele).find(".icons a").removeClass("on");$(".banner_slides").eq(ele).find(".icons a").eq(NUM).addClass("on");}function bannerNext(ele){if(bannerNow[ele]>=bannerCount[ele]-1){bannerSlide(ele,0);}else{bannerSlide(ele,bannerNow[ele]+1);}}function bannerPrev(ele){if(bannerNow[ele]<=0){bannerSlide(ele,bannerCount[ele]-1);}else{bannerSlide(ele,bannerNow[ele]-1);}}function blog_facebook(){$(".blog_tab li").each(function(i){if($(this).hasClass("on"))nowBlogTab=i;});if($(window).width()>=800){$(".blog_fb > div").show();}else{$(".blog_fb > div").hide();$(".blog_fb > div").eq(nowBlogTab).show();}}