(function(){ if(isFrontEnv()){ new WOW().init(); } $('a[href-data="top"]').on('click',function(){ $('html, body').animate({scrollTop: 0}, 'slow'); return false; }); })(); (function() { $(".bannerBox div[style*='background'].jpInnerBannerBg").each(function() { var bgStyle = $(this).css("backgroundImage"); console.log(bgStyle); var bgStyleNum = bgStyle.indexOf("repository"); var subBgUrl = bgStyle.substring(bgStyleNum).split('")'); var bgUrlAppend = "background:url(/" + subBgUrl[0] + ") no-repeat;"; $(this).attr("style", bgUrlAppend); }); })();