/* === FAQs section START == */ $(document).ready(function(){ $(".faq-wrapper .filter-button").click(function(){ var c=$(this).attr("data-filter"); if(c==""){ $(".faq-wrapper .filter").show("1000") }else{ $(".faq-wrapper .filter").not("."+c).hide("3000");$(".faq-wrapper .filter").filter("."+c).show("3000") } }); /*$('#promo_page').click(function(){ $('#notice-tab').parent().addClass('active').siblings().removeClass('active'); $('#notice').addClass('in active show').siblings().removeClass('in active show'); $('body,html').animate({scrollTop:0},1000); });*/ }); /* === FAQs section END == */ // Batch 5 START $(document).ready(function(e) { var url = window.location.href; var hash = url.substring(url.indexOf("#")+1); if(url.indexOf("#") !== -1){ var nailed = "#" + hash; $('.tabdesk li').removeClass('active'); $('.tab-pane').removeClass('active'); $("#landswap .en").attr('href',$("#landswap .en").attr('href')+nailed); $("#landswap .tc").attr('href',$("#landswap .tc").attr('href')+nailed); $("#landswap .sc").attr('href',$("#landswap .sc").attr('href')+nailed); switch(hash) { case "home": $('.tabdesk li').eq(0).addClass('active'); $("#home").addClass('active in'); $("#home").show(); $("#promote").hide(); $("#demo").hide(); $("#faqs").hide(); break; case "promote": $('.tabdesk li').eq(1).addClass('active'); $("#promote").addClass('active in'); $("#home").hide(); $("#promote").show(); $("#demo").hide(); $("#faqs").hide(); break; case "demo": $('.tabdesk li').eq(2).addClass('active'); $("#demo").addClass('active in'); $("#home").hide(); $("#promote").hide(); $("#demo").show(); $("#faqs").hide(); break; case "faqs": $('.tabdesk li').eq(3).addClass('active'); $("#faqs").addClass('active in'); $("#home").hide(); $("#promote").hide(); $("#demo").hide(); $("#faqs").show(); break; } } else { $('.tabdesk li').eq(0).addClass('active'); $("#home").addClass('active in'); $("#home").show(); $("#promote").hide(); $("#demo").hide(); $("#faqs").hide(); } // tab shown event $(document).on('shown.bs.tab', '.tabdesk a[data-toggle="tab"]', function (e) { $(".tabdesk > li.active").each(function(){ var tabactivehref = $(this).find('a').attr('href'); var originalENpath = "../en/index.html"; var originalTCpath = "../tc/index.html"; var originalSCpath = "../sc/index.html"; $("#landswap > a").each(function(){ var temppath = $(this).attr('href'); var tokenn; var tempstoreEN; var tempstoreTC; var tempstoreSC; switch(tabactivehref) { case "#home": tokenn = "#home"; $("#home").show(); $("#promote").hide(); $("#demo").hide(); $("#faqs").hide(); break; case "#promote": tokenn = "#promote"; $("#home").hide(); $("#promote").show(); $("#demo").hide(); $("#faqs").hide(); break; case "#demo": tokenn = "#demo"; $("#home").hide(); $("#promote").hide(); $("#demo").show(); $("#faqs").hide(); break; case "#faqs": tokenn = "#faqs"; $("#home").hide(); $("#promote").hide(); $("#demo").hide(); $("#faqs").show(); break; } tempstoreEN = originalENpath + tokenn; $("#landswap > .en").attr('href',tempstoreEN); tempstoreTC = originalTCpath + tokenn; $("#landswap > .tc").attr('href',tempstoreTC); tempstoreSC = originalSCpath + tokenn; $("#landswap > .sc").attr('href',tempstoreSC); }); }); }); }); // Batch 5 END