$(function() { // Handler for .ready() called. if (location.hash === '#fdr') { open_pop('.popup'); } $(".eventpart3 .notice + div").show(); $(".eventpart3 .notice").click(toggleNotice); part2_slide(); }); function toggleNotice() { var $arr = $(this).find("img"); $(".eventpart3 .notice + div").slideToggle(function() { var src = $arr.attr("src"); var re1 = /event_arr2/; var re2 = /event_arr3/; if (re2.test(src)) { $arr.attr("src", src.replace(re2, re1.source)); } else { $arr.attr("src", src.replace(re1, re2.source)); } }); } function open_pop(selector) { $(selector).fadeIn(); $("body").addClass("stop-scrolling"); } function close_popup(selector) { $(selector).fadeOut(); $("body").removeClass("stop-scrolling"); } function part2_slide() { $(window).on("resize", function() { var thisCarousel = $(".eventpart2").carousel("instance"); if ($(".eventpart2 .dot").is(":hidden")) { if (thisCarousel != null) { thisCarousel.stop(); thisCarousel.options.items.show().css("display", "inline-block"); thisCarousel.destroy(); } } else { if (thisCarousel == null) { $(".eventpart2").carousel({ interval : 5000, items : $(".eventpart2 .evp2three > div"), indicators : $(".eventpart2 .dot > span"), effect : "fade", swipe : true, cycle : true, create : function(event) { var thisCarousel = $(this).carousel("instance"); thisCarousel.options.items.hide().first().show(); }, }); }/* else { thisCarousel.start(); }*/ } }).triggerHandler("resize"); } function right-btn() { setTimeout(function () { location.href = 'https://m.sinopac.com/m/bank/exchange_fix/m_exchange_fix.aspx#open-browser'; }, 25); location.href = "sinopacaction:{exchangefixadd}{}"; }