1function get_sticky_header(){ 2 3 // For admin bar 4 if( bizberg_object.admin_bar_status == 1 && jQuery(window).scrollTop() > 50 && jQuery(window).width() > 639 && bizberg_object.primary_header_layout != 'center' ){ 5 jQuery('nav.navbar-default').css({ "top": jQuery('#wpadminbar').height() + 'px' }); 6 } else { 7 jQuery('nav.navbar-default').css({ "top": "0px" }); 8 } 9 10 var slide_in_animation_class = bizberg_object.slide_in_animation ? ' animated slideInDown' : ''; 11 12 // Add sticky class 13 if ( jQuery(window).scrollTop() > 50 && bizberg_object.primary_header_layout != 'center' ) { 14 jQuery('nav.navbar-default').addClass('sticky ' + slide_in_animation_class); 15 add_remove_body_sticky_class( 'remove' ); 16 } 17 else if( bizberg_object.primary_header_layout == 'center' && jQuery(window).scrollTop() > jQuery('.primary_header_2_wrapper').outerHeight() ){ 18 jQuery('nav.navbar-default').css({ "top": jQuery('#wpadminbar').height() + 'px' }); 19 jQuery('nav.navbar-default').addClass('sticky ' + slide_in_animation_class); 20 add_remove_body_sticky_class( 'remove' ); 21 } 22 else { 23 jQuery('nav.navbar-default').removeClass('sticky ' + slide_in_animation_class); 24 add_remove_body_sticky_class( 'add' ); 25 } 26 27 /* For Transparent Header */ 28 if( bizberg_object.is_transparent_header == 'true' && jQuery(window).scrollTop() > 50 ){ 29 jQuery('nav.navbar-default').addClass( 'transparent_header_sticky'); 30 } else { 31 jQuery('nav.navbar-default').removeClass( 'transparent_header_sticky'); 32 } 33 34 // For transparent header 35 if( bizberg_object.admin_bar_status == 1 && jQuery('body.bizberg_transparent_header').hasClass('bizberg_sticky_header_enabled') ){ 36 jQuery('body.bizberg_transparent_header.bizberg_sticky_header_enabled header').attr({ 37 'style' : 'margin-top:' + jQuery('#wpadminbar').height() + 'px' 38 }) 39 } else { 40 jQuery('body.bizberg_transparent_header.bizberg_sticky_header_disabled header').removeAttr( 'style' ); 41 } 42 43} 44 45function add_remove_body_sticky_class( status ){ 46 47 if( bizberg_object.is_transparent_header == 'true' ){ 48 49 if( status == 'add' ){ 50 jQuery('body').addClass('bizberg_sticky_header_enabled'); 51 jQuery('body').removeClass('bizberg_sticky_header_disabled'); 52 } else { 53 jQuery('body').removeClass('bizberg_sticky_header_enabled'); 54 jQuery('body').addClass('bizberg_sticky_header_disabled'); 55 } 56 57 } 58 59} 60 61(function($){ 62 63 "use strict"; 64 65 var $window = $(window); 66 $window.on( 'load', function () { 67 68 $("#status").fadeOut(); 69 $("#preloader").delay(350).fadeOut("slow"); 70 $("body").delay(350).css({ "overflow": "visible" }); 71 72 /* Preloader */ 73 74 $("#status").fadeOut(); 75 $("#preloader").delay(350).fadeOut("slow"); 76 77 /* END of Preloader */ 78 79 }); 80 81 // Add class if menu has desctiption 82 jQuery('#responsive-menu li').each(function(){ 83 84 if( jQuery('nav #navbar').hasClass( 'has-menu-description' ) ){ 85 return false; 86 } 87 88 if( jQuery(this).find('a span').hasClass('sub') ){ 89 jQuery('nav #navbar').addClass( 'has-menu-description' ); 90 jQuery('nav #navbar').removeClass( 'has-no-menu-description' ); 91 } else { 92 jQuery('nav #navbar').addClass('has-no-menu-description'); 93 } 94 95 }); 96 97 var $main_header = $('.main_h'); 98 99 // If parent menu has submenu then add down arrow 100 jQuery('#responsive-menu > li').each(function(){ 101 if( jQuery(this).find('ul').hasClass('sub-menu') ){ 102 jQuery(this).find('ul:first').prev('a').find('.eb_menu_title').append('<i class="has_sub_menu_parent fa fa-angle-down"></i>'); 103 } 104 }); 105 106 $(window).on( 'scroll load resize' , function(event) { 107 event.preventDefault(); 108 109 if( bizberg_object.sticky_header_status == 'false' ){ 110 return; 111 } 112 113 // IF page template is sticky 114 get_sticky_header(); 115 116 });
117 118 // Mobile Navigation 119 $('.mobile-toggle').on( 'click' , function(event) { 120 event.preventDefault(); 121 if ($main_header.hasClass('open-nav')) { 122 $main_header.removeClass('open-nav'); 123 } 124 else { 125 $main_header.addClass('open-nav'); 126 } 127 }); 128 129 $('.main_h li a').on( 'click' , function(event) { 130 event.preventDefault(); 131 if ($main_header.hasClass('open-nav')) { 132 $('.navigation').removeClass('open-nav'); 133 $main_header.removeClass('open-nav'); 134 } 135 }); 136 137 // contact form 138 $(document).on( 'submit' , '#main-contact-form1', function(e){ 139 e.preventDefault(); 140 $.ajax({ 141 url: "mail/contact.php", 142 type: 'POST', 143 data: $('#main-contact-form1').serialize(), 144 success: function(msg){ 145 $( '#mail_success_message' ).empty().html( msg ).show(); 146 }, 147 }); 148 return; 149 }); 150 151 $(' #da-thumbs > li ').each( function() { 152 $(this).hoverdir(); 153 }); 154 155 /** 156 * Slicknav - a Mobile Menu 157 */ 158 var $slicknav_label; 159 $('#responsive-menu').slicknav({ 160 duration: 500, 161 closedSymbol: '<i class="fa fa-plus"></i>', 162 openedSymbol: '<i class="fa fa-minus"></i>', 163 prependTo: '#slicknav-mobile', 164 allowParentLinks: true, 165 nestedParentLinks : false, 166 label:"" 167 }); 168 169 // Mouse-enter dropdown 170 $('#navbar li').on("mouseenter focusin", function() { 171 if( $(this).hasClass('bizberg_shop_browse_cat') && $(this).hasClass('show') && $('body').hasClass('page-template-home') ){ 172 return; 173 } 174 $(this).find('ul').first().stop(true, true).delay(10).slideDown(500); 175 }); 176 // Mouse-leave dropdown 177 $('#navbar li').on("mouseleave focusout", function() { 178 if( $(this).hasClass('bizberg_shop_browse_cat') && $(this).hasClass('show') && $('body').hasClass('page-template-home') ){ 179 return; 180 } 181 $(this).find('ul').first().stop(true, true).delay(10).slideUp(150); 182 }); 183 184 /** 185 * Arrow for Menu has sub-menu 186 */ 187 if ($(window).width() > 992) { 188 $(".navbar-arrow ul ul > li").has("ul").children("a").append("<i class='arrow-indicator fa fa-angle-right'></i>"); 189 } 190 191 $(document).ready(function() { 192 $('.progress .progress-bar').css("width", 193 function() { 194 return $(this).attr("aria-valuenow") + "%"; 195 } 196 ) 197 }); 198 199 $(window).on( 'scroll' , function(){ 200 if($(window).scrollTop() > 500){ 201 $("#back-to-top").fadeIn(200); 202 } else{ 203 $("#back-to-top").fadeOut(200); 204 } 205 }); 206 207 $(document).on("click",'#back-to-top a',function() { 208 $('html, body').animate({ scrollTop:0 },'slow'); 209 return false; 210 }); 211 212 setTimeout(function(){ 213 214 var $grid = jQuery('.blog-nosidebar-1 #content').masonry({ 215 itemSelector: '.blog-listing' 216 }); 217 218 var $grid = jQuery('.blog-nosidebar #content').masonry({ 219 itemSelector: '.blog-listing' 220 }); 221 222 $grid.imagesLoaded().progress( function() { 223 $grid.masonry('layout'); 224 }); 225 226 }, 1000); 227 228 setTimeout(function(){ 229 230 var $grid1 = jQuery('.business_event_popular_posts_wrapper').masonry({ 231 itemSelector: '.business_event_popular_posts_wrapper .pop_wrapper' 232 }); 233 234 $grid1.imagesLoaded().progress( function() { 235 $grid1.masonry('layout'); 236 }); 237 238 }, 1000); 239 240 bizberg_post_slider(); 241 242 jQuery("body").prognroll({ 243 color: "#f75691" 244 }); 245 246 jQuery('.prognroll-bar').appendTo('nav.navbar-default'); 247 248 if( bizberg_object.sticky_sidebar_status == true ){ 249 250 var wpadminbar_height = parseInt( jQuery('#wpadminbar').height() ); 251 var sticky_sidebar_margin_top_status = parseInt( bizberg_object.sticky_sidebar_margin_top_status ); 252 253 jQuery('.bizberg_blog_content,.bizberg_sidebar').theiaStickySidebar({ 254 additionalMarginTop : bizberg_object.admin_bar_status == 1 ? ( wpadminbar_height + sticky_sidebar_margin_top_status ) : bizberg_object.sticky_sidebar_margin_top_status, 255 additionalMarginBottom : bizberg_object.sticky_sidebar_margin_bottom_status, 256 minWidth : 900 257 }); 258 259 } 260 261})(jQuery); 262 263function bizberg_post_slider(){ 264 265 // swiper slider 266 267 var interleaveOffset = 0.5; 268 var swiperOptions = { 269 loop: bizberg_object.slider_loop, 270 speed: parseInt( bizberg_object.slider_speed ) * 1000, 271 grabCursor: bizberg_object.slider_grab_n_slider, 272 SlidesPerView: 1, 273 watchSlidesProgress: true, 274 mousewheelControl: false, 275 keyboardControl: false,
276 allowTouchMove: bizberg_object.slider_grab_n_slider, 277 watchOverflow: true, 278 pagination: { 279 el: '.swiper-pagination', 280 clickable: true, 281 }, 282 navigation: { 283 nextEl: ".swiper-button-next", 284 prevEl: ".swiper-button-prev" 285 }, 286 autoplay: { 287 delay: parseInt( bizberg_object.autoplay_delay ) * 1000, 288 }, 289 fadeEffect: { 290 crossFade: true 291 }, 292 on: { 293 progress: function() { 294 295 // Ignore for rtl 296 if( bizberg_object.rtl == true ){ 297 return; 298 } 299 300 // Ignore for firefox 301 if (navigator.userAgent.indexOf("Firefox") <= 0) { 302 303 var swiper = this; 304 for (var i = 0; i < swiper.slides.length; i++) { 305 var slideProgress = swiper.slides[i].progress; 306 var innerOffset = swiper.width * interleaveOffset; 307 var innerTranslate = slideProgress * innerOffset; 308 swiper.slides[i].querySelector(".slide-inner").style.transform = "translate3d(" + innerTranslate + "px, 0, 0)"; 309 } 310 311 } 312 313 }, 314 touchStart: function() { 315 316 // Ignore for rtl 317 if( bizberg_object.rtl == true ){ 318 return; 319 } 320 321 // Ignore for firefox 322 if (navigator.userAgent.indexOf("Firefox") <= 0) { 323 324 var swiper = this; 325 for (var i = 0; i < swiper.slides.length; i++) { 326 swiper.slides[i].style.transition = ""; 327 } 328 329 } 330 331 }, 332 setTransition: function(speed) { 333 334 // Ignore for rtl 335 if( bizberg_object.rtl == true ){ 336 return; 337 } 338 339 // Ignore for firefox 340 if (navigator.userAgent.indexOf("Firefox") <= 0) { 341 342 var swiper = this; 343 for (var i = 0; i < swiper.slides.length; i++) { 344 swiper.slides[i].style.transition = speed + "ms"; 345 swiper.slides[i].querySelector(".slide-inner").style.transition = speed + "ms"; 346 } 347 348 } 349 } 350 } 351 }; 352 353 var swiper = new Swiper(".swiper-container-bizberg", swiperOptions); 354 355} 356 357// Photo gallery instagram style 358 359jQuery(function($) { 360 361 var updateArrows = function(){ 362 $('.carouselGallery-right').removeClass('disabled'); 363 $('.carouselGallery-left').removeClass('disabled'); 364 var curIndex = $('.carouselGallery-carousel.active').data('index'); 365 updateArrows.nbrOfItems = updateArrows.nbrOfItems || $('.carouselGallery-carousel').length -1; 366 367 curIndex === updateArrows.nbrOfItems && $('.carouselGallery-right').addClass('disabled'); 368 curIndex === 0 && $('.carouselGallery-left').addClass('disabled'); 369 } 370 $('.carouselGallery-carousel').on('click', function(e){ 371 scrollTo = $('body').scrollTop(); 372 $('body').addClass('noscroll'); 373 $('body').css('position', 'fixed'); 374 $('.carouselGallery-col-1, .carouselGallery-col-2').removeClass('active'); 375 $(this).addClass('active'); 376 showModal($(this)); 377 updateArrows(); 378 }); 379 380 $('body').on('click', '.carouselGallery-right, .carouselGallery-left', function(e){ 381 if($(this).hasClass('disabled')) return; 382 var curIndex = $('.carouselGallery-carousel.active').data('index'); 383 var nextItemIndex = parseInt(curIndex+1); 384 if($(this).hasClass('carouselGallery-left')){ 385 nextItemIndex-=2; 386 } 387 var nextItem = $('.carouselGallery-carousel[data-index='+nextItemIndex+']'); 388 389 if(nextItem.length > 0){ 390 $('.carouselGallery-col-1, .carouselGallery-col-2').removeClass('active'); 391 $('body').find('.carouselGallery-wrapper').remove(); 392 showModal($(nextItem.get(0))); 393 nextItem.first().addClass('active'); 394 } 395 updateArrows(); 396 });
397 398 var modalHtml = ''; 399 showModal = function(that){ 400 401 var username = that.data('username'), 402 location = that.data('location'), 403 imagetext = that.data('imagetext'), 404 likes = that.data('likes'), 405 imagepath = that.data('imagepath'), 406 carouselGalleryUrl = that.data('url'); 407 postURL = that.data('posturl'); 408 409 maxHeight = $(window).height()-100; 410 411 if ($('.carouselGallery-wrapper').length === 0) { 412 if(typeof imagepath !== 'undefined') { 413 modalHtml = "<div class='carouselGallery-wrapper'>"; 414 modalHtml += "<div class='carouselGallery-modal'><span class='carouselGallery-left'><span class='icons icon-arrow-left6'></span></span><span class='carouselGallery-right'><span class='icons icon-arrow-right6'></span></span>"; 415 modalHtml += "<div class='container'>"; 416 modalHtml += "<span class='icons iconscircle-cross close-icon'></span>"; 417 modalHtml += "<div class='carouselGallery-scrollbox' style='max-height:"+maxHeight+"px'><div class='carouselGallery-modal-image'>"; 418 modalHtml += "<img src='"+imagepath+"' alt='carouselGallery image'>"; 419 modalHtml += "</div>"; 420 modalHtml += "<div class='carouselGallery-modal-text'>"; 421 modalHtml += "<span class='carouselGallery-modal-username'><a href='javascript:void(0)'>"+username+"</a> </span>" 422 modalHtml += "<span class='carouselGallery-modal-location'>"+location+"</span>"; 423 modalHtml += "<span class='carouselGallery-modal-imagetext'>"; 424 modalHtml += "<p>"+imagetext+"</p>"; 425 modalHtml += "</span></div></div></div></div></div>"; 426 $('body').append(modalHtml).fadeIn(2500); 427 } 428 } 429 }; 430 431 $('body').on( 'click','.carouselGallery-wrapper', function(e) { 432 if($(e.target).hasClass('.carouselGallery-wrapper')){ 433 removeModal(); 434 } 435 }); 436 $('body').on('click', '.carouselGallery-modal .iconscircle-cross', function(e){ 437 removeModal(); 438 }); 439 440 var removeModal = function(){ 441 $('body').find('.carouselGallery-wrapper').remove(); 442 $('body').removeClass('noscroll'); 443 $('body').css('position', 'static'); 444 $('body').animate({scrollTop: scrollTo}, 0); 445 }; 446 447 // Avoid break on small devices 448 var carouselGalleryScrollMaxHeight = function() { 449 if ($('.carouselGallery-scrollbox').length) { 450 maxHeight = $(window).height()-100; 451 $('.carouselGallery-scrollbox').css('max-height',maxHeight+'px'); 452 } 453 } 454 $(window).resize(function() { // set event on resize 455 clearTimeout(this.id); 456 this.id = setTimeout(carouselGalleryScrollMaxHeight, 100); 457 }); 458 document.onkeydown = function(evt) { 459 evt = evt || window.event; 460 if (evt.keyCode == 27) { 461 removeModal(); 462 } 463 }; 464 465 // $('.blog-listing').matchHeight(); 466 $('.comment-reply-link').addClass('btn-sm btn btn-primary'); 467 468}); 469 470function getTestimonialScrollbar( selector ){ 471 var custom = new scrollbot( selector ); 472 setScrollStyles(custom); 473} 474 475function setScrollStyles(custom3){ 476 477 custom3.setStyle({height:2}); 478 var onscrollfollower = document.createElement("div"); 479 onscrollfollower.style.width = "100%"; 480 onscrollfollower.style.height = "100%"; 481 onscrollfollower.style.backgroundColor = "#222222"; 482 onscrollfollower.style.position = "absolute"; 483 onscrollfollower.style.bottom = "100%"; 484 onscrollfollower.style.right = 0; 485 custom3.scrollBarHolder.appendChild(onscrollfollower); 486 custom3.onScroll(function(){onscrollfollower.style.bottom = 100 - parseFloat(this.scrollBar.style.top) + "%";}) 487 488} 489 490// Search in header. 491jQuery(document).on('click','.search-icon,.mobile_search_icon', function(e){ 492 e.preventDefault(); 493 jQuery('.full-screen-search').slideToggle(); 494 jQuery( ".search-field" ).focus(); 495}); 496 497// Close search screen 498jQuery(document).on('click','.full-screen-search .close',function(){ 499 jQuery('.full-screen-search').slideToggle('fast'); 500}) 501 502// Close search on esc 503jQuery(document).keyup(function(e) { 504 505 if ( e.keyCode == 27 || e.keyCode == 9 ) { 506 if( jQuery('.full-screen-search').is(':visible') ){ 507 jQuery( ".search-icon" ).focus(); 508 }
509 jQuery('.full-screen-search').slideUp('fast'); 510 } 511 512 if( e.keyCode == 27 ){ 513 jQuery('#responsive-menu').slicknav('close'); 514 } 515 516}); 517 518jQuery(".navbar .slicknav_nav > li:last-child").keydown(function(e) { 519 520 if (e.which == 9 && e.shiftKey) { 521 // do nothing 522 } else if (e.which == 9) { 523 jQuery('#responsive-menu').slicknav('close'); 524 } 525 526}); 527 528// jQuery(document).on('click', 'a[href^="#"]', function (event) { 529 530// event.preventDefault(); 531 532// if( jQuery.attr(this, 'href') == '#' ){ 533// return; 534// } 535 536// var position = jQuery(jQuery.attr(this, 'href')).offset(); 537 538// jQuery('html, body').animate({ 539// scrollTop: position.top - 175 540// }, 500); 541 542// }); 543 544jQuery(window).on( 'scroll load resize', function() { 545 546 /** 547 * Fixed mobile menu 548 */ 549 550 setTimeout(function(){ 551 552 var scrollTop = jQuery('header > nav.navbar').outerHeight(); 553 var width = parseInt( screen.width ); 554 555 jQuery('ul.slicknav_nav').css({ 556 'top' : scrollTop + 'px' 557 }); 558 559 }, 100); 560 561}); 562 563jQuery(document).on( 564 'focusin', 565 '.navbar-nav > li', 566 function(){ 567 var selector_li_id = jQuery(this).attr('id'); 568 jQuery( 'head' ).append('<span class="navbar_li_background"><style>.navbar-default .navbar-nav > li#' + selector_li_id + '{background:' + bizberg_object.header_menu_color_hover + '} .navbar-default .navbar-nav > li#' + selector_li_id + ' > a{ color:#fff; }' + '</style></span>'); 569 } 570).on( 571 'focusout', 572 '.navbar-nav > li', 573 function(){ 574 jQuery('.navbar_li_background').remove(); 575 } 576); 577 578jQuery(document).on( 579 'mouseenter focusin', 580 'header .navbar-default .navbar-nav li a', 581 function(){ 582 // Remove Border 583 var selector_li_id = jQuery(this).closest('li.parent_menu_bizberg').prev('li').attr('id'); 584 jQuery( 'head' ).append('<span class="hide_prev_menu_separator"><style>.navbar-default .navbar-nav > li#' + selector_li_id + ' > a:after{display:none}</style></span>'); 585 } 586).on( 587 'mouseleave focusout', 588 'header .navbar-default .navbar-nav li a', 589 function(){ 590 jQuery('.hide_prev_menu_separator').remove(); 591 } 592); 593 594jQuery(document).on( 595 'mouseenter focusin', 596 'header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > a,header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > ul > li > a,header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > ul > li > ul > li > a', 597 function(){ 598 599 var selector = jQuery(this).parents('ul.sub-menu').last().closest('li').find('a:first'); 600 var selector_li_id = jQuery(this).parents('ul.sub-menu').last().closest('li').attr('id'); 601 602 if( bizberg_object.is_transparent_header == 'true' ){ 603 selector.attr( 604 'style' , 'border-color:' + bizberg_object.header_menu_color_hover 605 ); 606 } else if( jQuery('.navbar-default').hasClass('sticky') ){ // Normal sticky menu 607 selector.attr( 608 'style' , 'border-color:' + bizberg_color_luminance( bizberg_object.header_menu_color_hover_sticky , -0.2 ) 609 ); 610 } else { // No sticky menu 611 selector.attr( 612 'style' , 'border-color:' + bizberg_color_luminance( bizberg_object.header_menu_color_hover , -0.2 ) 613 ); 614 } 615 616 jQuery( 'head' ).append('<span class="hide_menu_separator"><style>.navbar-default .navbar-nav > li#' + selector_li_id + ' > a:after{display:none}</style></span>'); 617 618}).on( 619'mouseleave focusout', 620'header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > a,header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > ul > li > a,header .navbar-default:not(.transparent_header_sticky) .navbar-nav > li > ul > li > ul > li > ul > li > a', 621function(){ 622 623 var selector = jQuery(this).parents('ul.sub-menu').last().closest('li').find('a:first'); 624 selector.removeAttr('style'); 625 jQuery('.hide_menu_separator').remove(); 626 627}); 628 629function bizberg_color_luminance(hex, lum) { 630 // validate hex string 631 hex = String(hex).replace(/[^0-9a-f]/gi, ''); 632 if (hex.length < 6) { 633 hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 634 } 635 lum = lum || 0; 636 // convert to decimal and change luminosity 637 var rgb = "#", c, i; 638 for (i = 0; i < 3; i++) { 639 c = parseInt(hex.substr(i*2,2), 16); 640 c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); 641 rgb += ("00"+c).substr(c.length); 642 } 643 return rgb; 644}
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.