1var $ = jQuery.noConflict(); 2(function( window, $, undefined ){ 3 4 'use strict'; 5 6 var $event = $.event, 7 dispatchMethod = $.event.handle ? 'handle' : 'dispatch', 8 resizeTimeout; 9 10 $event.special.smartresize = { 11 setup: function() { 12 $(this).bind( "resize", $event.special.smartresize.handler ); 13 }, 14 teardown: function() { 15 $(this).unbind( "resize", $event.special.smartresize.handler ); 16 }, 17 handler: function( event, execAsap ) { 18 // Save the context 19 var context = this, 20 args = arguments; 21 22 // set correct event type 23 event.type = "smartresize"; 24 25 26 if ( resizeTimeout ) { clearTimeout( resizeTimeout ); } 27 resizeTimeout = setTimeout(function() { 28 $event[ dispatchMethod ].apply( context, args ); 29 }, execAsap === "execAsap"? 0 : 100 ); 30 } 31 }; 32 33 $.fn.smartresize = function( fn ) { 34 return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); 35 }; 36 37})( window, jQuery ); 38 39/* --- Parallax Background Function--- */ 40 41jQuery(document).ready(function($){ 42 43 "use strict"; 44 45 var dtParallax=function() { 46 47 "use strict"; 48 var $window = $(window); 49 var minwidthparallax = 768; 50 51 $('body[data-type="background"],section[data-type="background"],div[data-type="background"]').each(function(){ 52 53 var $bgobj = $(this); // assigning the object 54 $window.scroll(function() { 55 56 if ($(this).width()>minwidthparallax) { 57 var position=$bgobj.position(); 58 var yPos = (($(document).scrollTop() - position.top) / $bgobj.data('speed')); 59 // Put together our final background position 60 var coords = '50% '+ yPos + 'px'; 61 62 // Move the background 63 $bgobj.css({ backgroundPosition: coords }); 64 } 65 }); 66 }); 67 68 69 } 70 71 dtParallax(); 72 73 //dtCounter(); 74 75 var setFooterWidget=function(){ 76 77 78 if ($('#footer-right .border-left').length) { 79 80 var $item=$('#footer-right .border-left:first'); 81 var $col=$item.hasClass('col-2')?2:$item.hasClass('col-3')?3:$item.hasClass('col-4')?4:1; 82 var rowHeight=$item.outerHeight(true); 83 84 $('.border-left').matchHeight(); 85 } 86 87 }; 88 89 90 if($('#menusearchform').length){ 91 92 $( ".search_btn" ).click(function() { 93 $(this).parents('form').find(".popup_form").fadeToggle( "fast", "swing" ); 94 return false; 95 }); 96 97 98 $('body').click(function(e){ 99 var $searchform=$('.popup_form'); 100 if(! ($searchform.has(e.target).length || $(e.target).is('.popup_form input'))){ 101 $searchform.fadeOut('fast','swing'); 102 } 103 }); 104 105 } 106 107 if ($('.social-share-link').length) { 108 $('.social-share-link').each(function () { 109 $(this).click(function (event) { 110 event.preventDefault(); 111 var idtobedisplay = $(this).siblings('.list-social-icons').attr('id'); 112 113 $('.list-social-icons').each(function () { 114 if (idtobedisplay!=$(this).attr('id')) { 115 $(this).fadeOut(); 116 } 117 }); 118 119 $(this).siblings('.list-social-icons').toggle(200); 120 }); 121 }); 122 } 123 124 function dtCounto() { 125 if ($('.dt-counto').length) { 126 $('.dt-counto').each(function () { 127 $(this).appear(function () { 128 var $to = $(this).data('to'),$oldvalue=$(this).text(),$from = $(this).data('from'); 129 130 if($oldvalue){ 131 $to =parseFloat($oldvalue); 132 } 133 134 $(this).countTo({ 135 from: $from, 136 to: $to, 137 speed: 1500, 138 refreshInterval: 50, 139 onUpdate:function(value){ 140 $(this).text(value.toFixed(0)); 141 } 142 }); 143 144 }, { 145 accX: 0,
146 accY: -200 147 }) 148 149 }); 150 151 } 152 } 153 154 dtCounto(); 155 156 157 // Equal Heights 158 159 160 try{ 161 162 $('.dt-iconboxes.layout-6').matchHeight(); 163 $('.dt-iconboxes-4.layout-4').matchHeight(); 164 $('.equal-height').matchHeight(); 165 $('.same-height').matchHeight(); 166 $('.dt-partner .partner-item').matchHeight(); 167 } 168 catch(err){} 169 170 171 // Sticky Menu 172 173 174 try{ 175 176 if ($("#head-page.sticky").length) { 177 $("#head-page.adminbar-not-here").sticky({ topSpacing: 0 }); 178 $("#head-page.adminbar-is-here").sticky({ topSpacing: 32 }); 179 } 180 181 } 182 catch(err){} 183 184 185 $(window).smartresize(function(){ 186 187 setFooterWidget(); 188 189 // Full Screen Slider 190 191 $('.slide-bg').css({ 192 marginLeft: - ($(window).width() - $('.slide-frame').outerWidth())/2, 193 height: ($(window).height()), 194 width : ($(window).width()) + 200 195 }); 196 }); 197 198 // Sub Banner Top Padding 199 200 $( window ).smartresize(function() { 201 var topHeadPageHeight = $('.top-bar').height(); 202 var topBarHeight = $('#head-page').height(); 203 204 if ($('#banner-section')) { 205 if (!$('#banner-section.vertical_menu_container')) { 206 $('#banner-section').css('padding-top', topHeadPageHeight + topBarHeight); 207 } 208 } 209 210 }); 211 212 // Set Menu Height on mobile to show scrolling inside menu 213 $(window).smartresize(function() { 214 var windowHeight = $(window).height(); 215 var windowWidth = $(window).width(); 216 if ($('#mobile-header').css('display')!='none') { 217 if (windowWidth<991) { 218 //$('#dt-menu').height(windowHeight); 219 $('#dt-menu').css('height',windowHeight); 220 } 221 } else { 222 //$('#dt-menu').height('auto'); 223 $('#dt-menu').css('height','auto'); 224 } 225 }); 226 227 // Set content position relative to menu 228 $(window).smartresize(function() { 229 var windowWidth = $(window).width(); 230 var topheadHeight = 0; 231 var headpageHeight = 0; 232 233 headpageHeight = $('#head-page').height(); 234 topheadHeight = $('#top-bar').height() + headpageHeight; 235 if (windowWidth<=767) { 236 //krn top-bar tdk ditampilkan di resolusi < 767px maka tinggi top-bar tidak perlu ditambahkan 237 topheadHeight = $('#head-page').height(); 238 } 239 240 var is_Vertical_Menu = ($('.vertical_menu').length==0) ? false : true; 241 var is_PageBar_Menu = ($('.dt-menu-pagebar').length==0) ? false : true; 242 var has_Banner_Section = ($('#banner-section').length==0) ? false : true;
243 var has_Top_Bar = ($('#top-bar').length==0) ? false : true; 244 245 var height_Top_Bar = 0; 246 if (has_Top_Bar) { height_Top_Bar = $('#top-bar').height(); } 247 248 var height_Banner = 0; 249 if (has_Banner_Section) { height_Banner = $('#banner-section').height(); } 250 251 if (has_Top_Bar && has_Banner_Section) { 252 $('#banner-section').css('margin-top',-height_Top_Bar-1); 253 } 254 255 if (is_Vertical_Menu) { 256 $('.top-head ~ .content').css('padding-top',40); 257 } else if (is_PageBar_Menu) { //if (is_Vertical_Menu) { 258 if (has_Banner_Section) { 259 $('#dt_pagebar').css('margin-top',-height_Banner+headpageHeight+height_Top_Bar); 260 } else { 261 $('#dt_pagebar').css('margin-top',headpageHeight); 262 var height_pagebar = $('#dt_pagebar').height(); 263 $('#dt_pagebar ~ .content').css('padding-top',headpageHeight + height_pagebar + 40); 264 } 265 266 var dt_pagebar_menu_height = $('#dt_pagebar').height()/2; 267 $('.dt_pagebar_menu').css('height',dt_pagebar_menu_height); 268 $('.dt_pagebar_wrapper').css('margin-top',-dt_pagebar_menu_height + 2); 269 $('#dt_pagebar').css('z-index',1000); 270 } else { //if (is_Vertical_Menu) { 271 272 if (has_Banner_Section) { 273 $('.top-head ~ .content').css('padding-top',40); 274 } else { //if (has_Banner_Section) 275 if ($('.dt-boxed-container .top-head').length!=0) { 276 $('.top-head ~ .content').css('padding-top',headpageHeight + 20); 277 } else { 278 $('.top-head ~ .content').css('padding-top',topheadHeight + 40); 279 } 280 } //if (has_Banner_Section) 281 282 } //if (is_Vertical_Menu) { 283 284 }); 285 286 $(window).smartresize(function(){ 287 288 if ($('.dt-timeline').length) { 289 $('.dt-timeline').each(function(){ 290 var timeline=$(this),hasleftchild=timeline.find('.time-item').hasClass('left'),hasrightchild=timeline.find('.time-item').hasClass('right'); 291 292 if(hasrightchild && !hasleftchild){ 293 if($(window).outerWidth() > 767){ 294 timeline.css('margin-left','50px'); 295 } 296 timeline.find('.time-item').css('margin-left','0%'); 297 }else if(!hasrightchild && hasleftchild){ 298 299 if($(window).outerWidth() > 767){ 300 timeline.css('margin-right','50px'); 301 } 302 timeline.find('.time-item').css('margin-right','0%'); 303 304 } 305 }); 306 307 } 308 }); 309 310 311 // Blog Social Share hover 312 $(".billio-ss-facebook51").hover(function() { 313 $(this).addClass("billio-ss-facebook52"); 314 $(this).removeClass("billio-ss-facebook51"); 315 },function() { 316 $(this).addClass("billio-ss-facebook51"); 317 $(this).removeClass("billio-ss-facebook52"); 318 } 319 ); 320 321 $(".billio-ss-twitter44").hover(function() { 322 $(this).addClass("billio-ss-twitter43"); 323 $(this).removeClass("billio-ss-twitter44"); 324 },function() { 325 $(this).addClass("billio-ss-twitter44"); 326 $(this).removeClass("billio-ss-twitter43"); 327 } 328 ); 329 330 $(".billio-ss-google115").hover(function() { 331 $(this).addClass("billio-ss-google114"); 332 $(this).removeClass("billio-ss-google115"); 333 },function() { 334 $(this).addClass("billio-ss-google115"); 335 $(this).removeClass("billio-ss-google114"); 336 } 337 ); 338 339 $(".social-share-button-group li a").click(function(event) { 340 if ($(this).attr('href')) { 341 event.preventDefault(); 342 popup_social($(this).attr('href'), {url: $(this).data('url'), u: $(this).data('url')}); 343 } 344 }); 345 346 // Target Parent menu on child hover 347 $(".sub-nav").hover(function() { 348 $(this).closest(".menu-item").toggleClass("hovered") 349 }); 350 351 352 // SCROLLING SIDEBAR 353 354 // Fix issue sticky scrolling bar on Safari Browser. 355 356 $(document).scroll(function() { 357 if ($("#floatMenu").length) { 358 $("#floatMenu").css("left",$("#floatMenu-sticky-wrapper").offset().left); 359 } 360 }); 361 362 363 $("#floatMenu").sticky({topSpacing:150}); 364 365 // /SCROLLING SIDEBAR 366 367 // Cart Popup 368 369 var cartbox = $('.cart-popup'); 370 $(".cart-click").click(function() { 371 if($(window).width() >480 ){ 372 $( ".popup_form" ).fadeOut("fast", "swing"); 373 $('.md-modal').removeClass('md-show'); 374 375 if ($(".dt-menu-left .cart-popup").length>0) { 376 if($(window).width() >767 ){ 377 $(".dt-menu-left .cart-popup").css('right',$(".dt-menu-left").width()-$(".dt-menu-left .bag").position().left-60); 378 } else { 379 $(".dt-menu-left .cart-popup").css('right',0); 380 } 381 } 382 383 if ($(".dt-menu-center .cart-popup").length>0) { 384 if($(window).width() >767 ){ 385 $(".dt-menu-center .cart-popup").css('right',$(".dt-menu-center").width()-$(".dt-menu-center .bag").position().left-60); 386 } else { 387 $(".dt-menu-center .cart-popup").css('right',0); 388 } 389 } 390 391 return false; 392 } 393 }); 394 395 396 $('body').on('added_to_cart',function(){ 397 //var cartTotal=$('body').find('.total .amount:first'),catItemCount=$('.total:first').data('items'); 398 //$('.cart_amounts').html(cartTotal); 399 $('.item_count').html($('#cart_contents_count').html()); 400 }).click(function(event){ 401
402 if (!$(event.target).is(".cart-popup,.cart-popup *,.popup_form, .popup_form *")) { 403 //$( ".cart-popup,.popup_form" ).fadeOut("fast", "swing"); 404 } 405 }); 406 407 // search "read more" on blog article, if find show button "read more" 408 $(".blog .postcontent:has(.more-link)").each(function( index ) { 409 $(this).next(".postmetabottom").children("div").children("div").children("a.btn-readmore").css("display","inline-block"); 410 }); 411 412 // scroll to anchor 413 414 var target, scroll,navbar=$('#head-page'),offset=0; 415 $("a[href*=#]:not([href=#])").on("click", function(e) { 416 417 if($(this).closest('.woocommerce-tabs').length || $(this).data('toggle')=='tab' || $(this).data('toggle')=='collapse' || $(this).data('slide')=='next' || $(this).data('slide')=='prev' 418 || $(this).is('.woocommerce-review-link') || $(this).is('.ui-tabs-anchor') || $(this).closest('.wpb_accordion_section').length || $(this).closest('.nav-tabs').length){ 419 return; 420 } 421 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 422 target = $(this.hash); 423 target = target.length ? target : $("[id=" + this.hash.slice(1) + "]"); 424 scroll = target.offset().top; 425 426 if(navbar.length){ 427 offset=navbar.outerHeight(true)+parseInt($('html').css('margin-top')); 428 } 429 430 if (target.length) { 431 if (typeof document.body.style.transitionProperty === 'string') { 432 433 e.preventDefault(); 434 435 var avail = $(document).height() - $(window).height(); 436 437 if (scroll > avail) { 438 scroll = avail; 439 } 440 441 442 $("body").css({ 443 "margin-top" : ( $(window).scrollTop() - scroll + offset) + "px", 444 "transition" : "1s ease-in-out" 445 }).data("transitioning", true); 446 447 } else { 448 $("html, body").animate({ 449 scrollTop: scroll-offset 450 }, 1000); 451 452 return; 453 } 454 } 455 } 456 457 $("body").on("transitionend webkitTransitionEnd msTransitionEnd oTransitionEnd", function (e) { 458 if (e.target == e.currentTarget && $(this).data("transitioning") === true) { 459 $(this).removeAttr("style").data("transitioning", false); 460 461 462 $("html, body").scrollTop(scroll-offset); 463 return; 464 } 465 }); 466 467 }); 468 469 /* responsive iframe */ 470 471 $(window).smartresize(); 472 $(document).scroll(); 473 474 475}); //jQuery(document).ready 476 477function uncheckboxes(nav){ 478 var navarray = document.getElementsByName(nav); 479 for(var i = 0; i < navarray.length; i++){ 480 navarray[i].checked = false 481 } 482} 483 484(function($) { 485 /* scrolly v0.1 | (c) n33 | n33.co @n33co | MIT */ 486 487 (function(e){var t="click.scrolly";e.fn.scrolly=function(r,i){r||(r=1e3),i||(i=0),e(this).off(t).on(t,function(t){var n,s,o,u=e(this),a=u.attr("href");a.charAt(0)=="#"&&a.length>1&&(n=e(a)).length>0&&(s=n.offset().top,u.hasClass("scrolly-centered")?o=s-(e(window).height()-n.outerHeight())/2:(o=Math.max(s,0),i&&(typeof i=="function"?o-=i():o-=i)),t.preventDefault(),e("body,html").stop().animate({scrollTop:o},r,"swing"))})}})(jQuery); 488 489 $(function() { 490 var $body = $('body'), 491 $window = $(window), 492 $header = $('#head-page'), 493 $banner = $('#banner-section'); 494 $tophead = $('.top-head'); 495 496 // Re-enable animations until we're done loading everything. 497 $window.load(function() { 498 $body.removeClass('loading'); 499 }); 500 501 // Scrolly links. 502 $('.scrolly').scrolly(1000, -10); 503 504 // Header. 505 // If the header is using "alt" styling and #banner is present, use scrollwatch 506 // to revert it back to normal styling once the user scrolls past the banner. 507 // Note: This is disabled on touch devices and whenever the 'n
507ormal' breakpoint is 508 // active (effectively disabling it on 'narrow', 'narrower', and 'mobile' as well). 509 510 if ($header.hasClass('alt') && !$tophead.hasClass('vertical_menu')) { 511 $window.on('load resize', function() { 512 // scrollgress v0.2 | (c) n33 | n33.co @n33co | MIT 513 (function(){var e="scrollwatch",t="length",n="top",r=null,i="scrollgress",s="data",o="scrollwatch-state",u="range",a="anchor",f="unscrollwatch",l="unscrollgress",c="removeData",h="element",p="-id",d="scroll.",v="height",m="scrollTop",g="center",y="bottom",b=$(window),w=$(document),E=1e3;$.fn[e]=function(f){var l,c,h,p;if(this[t]>1){for(l=0;l<this[t];l++)$(this[l])[e](f);return this}return c=$.extend({range:.5,anchor:n,init:r,on:r,off:r,delay:0},f),h=$(this),c.init&&c.init(h),h[s](o,-1)[i](function(e){window.clearTimeout(p),p=window.setTimeout(function(){var t=parseInt(h[s](o));if(t==0||t==-1)if(e>=-1*c[u]&&e<=c[u]){h[s](o,1),c.on&&c.on(h);return}if(t==1||t==-1)if(e<-1*c[u]||e>=c[u]){h[s](o,0),c.off&&c.off(h);return}},c.delay)},{anchor:c[a]},e),h},$.fn[f]=function(){var n,r;if(this[t]>1){for(n=0;n<this[t];n++)$(this[n])[f]();return this}return r=$(this),r[c](o,0)[l](e),r},$.fn[i]=function(e,r,o){var u,f,l,c,S;if(this[t]>1){for(u=0;u<this[t];u++)$(this[u])[i](e,r,o);return this}return o||(o=i),f=$.extend({anchor:n,direction:"both",scope:h,easing:0},r),l=$(this),l[s](o+p)||l[s](o+p,E++),c=l[s](o+p),S=d+o+"-"+c,b.off(S).on(S,function(){var t,r=l.offset()[n],i=l.outerHeight(),s=w[v]();switch(f.scope){default:case h:switch(f[a]){default:case n:t=(r-b[m]())/i*-1;break;case g:t=(r-b[m]()-(b[v]()-i)/2)/i*-1;break;case y:t=(r-b[m]()-(b[v]()-i))/i*-1}break;case"window":switch(f[a]){default:case n:t=(r-b[m]())/b[v]()*-1;break;case g:t=(r-b[m]()-(b[v]()-i)/2)/b[v]()*-1;break;case y:t=(r-b[m]()-(b[v]()-i))/b[v]()*-1}}f.direction=="forwards"?t=Math.max(0,t):f.direction=="backwards"&&(t=Math.min(0,t)),t>0?t=Math.max(0,t-f.easing/100):t<0&&(t=Math.min(0,t+f.easing/100)),e(t,l)}).trigger("scroll"),l},$.fn[l]=function(e){var n,r,o,u;if(this[t]>1){for(n=0;n<this[t];n++)$(this[n])[l](e);return this}return e||(e=i),r=$(this),r[s](e+p)?(o=r[s](e+p),u=d+e+"-"+o,b.off(u),r[c](e+p),r):r}})(); 514 // Apply scrollgress to banner. 515 516 if ($('#banner-section').length>0) { 517 $banner = $('#banner-section'); 518 } else if ($('.mainbanner').length>0) { 519 $banner = $('.mainbanner'); 520 } else if ($('.crellyslider-slider').length>0) { 521 $banner = $('.crellyslider-slider:first'); 522 } else if ($('.rev_slider_wrapper').length>0 && $('.rev_slider_wrapper:first').is(':visible')) { 523 $banner = $('.rev_slider_wrapper:first'); 524 } else if ($('.wpb_revslider_element').length>0) { 525 $banner = $('.wpb_revslider_element:first'); 526 } else if ($('.reveal-area').length>0) { 527 $banner = $('.reveal-area'); 528 } else if ($('.blank-reveal-area').length>0) { 529 $banner = $('.blank-reveal-area'); 530 } 531 532 if ($banner.length > 0) { 533 $banner.scrollwatch({ 534 delay: 0, 535 range: 1, 536 anchor: 'top', 537 on: function() { $header.addClass('alt reveal'); $tophead.removeClass('sticky'); }, 538 off: function() { $header.removeClass('alt'); $tophead.addClass('sticky'); } 539 }); 540 } 541 }); 542 543 } 544 545 }); 546 547})(jQuery); 548 549function popup_social(url, params) { 550 var k, popup, qs, v; 551 552 if (params == null) { 553 params = {}; 554 } 555 popup = { 556 width: 500, 557 height: 350 558 }; 559 560 popup.top = (screen.height / 2) - (popup.height / 2); 561 popup.left = (screen.width / 2) - (popup.width / 2); 562 qs = ((function() { 563 var _results; 564 _results = []; 565 for (k in params) { 566 v = params[k]; 567 _results.push("" + k + "=" + v); 568 } 569 return _results; 570 }).call(this)).join('&'); 571 if (qs) { 572 qs = "?" + qs; 573 } 574 575 return window.open(url + qs, 'targetWindow', "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=" + popup.left + ",top=" + popup.top + ",width="
575+ popup.width + ",height=" + popup.height); 576 577};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.