1var lmp_update_state, load_next_page, lmp_ajax_instance = false, lmp_update_lazyload, lmp_init, lmp_init_buttons; 2(function ($){ 3 $('body').append( $( '<div class="berocket_load_more_preload">' 4 + the_lmp_js_data.load_image 5 + the_lmp_js_data.br_lmp_button_settings_load_image 6 + the_lmp_js_data.br_lmp_button_settings_use_image 7 + the_lmp_js_data.br_lmp_prev_settings_load_image 8 + the_lmp_js_data.br_lmp_prev_settings_use_image 9 + '</div>' ) ); 10 $(document).ready( function () { 11 var lmp_is_loading = false, lmp_loading_style; 12 var lmp_count_start = 0, lmp_count_end = 0, lmp_count_laststart = 0, lmp_count_lastend = 0, lmp_count_text = ''; 13 lmp_init = function() { 14 lmp_is_loading = false, lmp_loading_style, lmp_count_start = 0, lmp_count_end = 0, lmp_count_laststart = 0, lmp_count_lastend = 0, lmp_count_text = ''; 15 $( '.berocket_load_more_preload' ).remove(); 16 if( $( the_lmp_js_data.products ).find( the_lmp_js_data.item ).first().length ) { 17 $( the_lmp_js_data.products ).find( the_lmp_js_data.item ).first().addClass('berocket_lmp_first_on_page').attr('data-url', decodeURIComponent(location.href)); 18 } 19 if( $( the_lmp_js_data.products ).find( '.berocket_lgv_additional_data' ).first().length ) { 20 $( the_lmp_js_data.products ).find( '.berocket_lgv_additional_data' ).first().addClass('berocket_lmp_first_on_page').attr('data-url', decodeURIComponent(location.href)); 21 } 22 if( $('.br_product_result_count').length ) { 23 lmp_count_start = $('.br_product_result_count').data('start'); 24 lmp_count_end = $('.br_product_result_count').data('end'); 25 lmp_count_text = $('.br_product_result_count').data('text'); 26 lmp_count_laststart = lmp_count_start; 27 lmp_count_lastend = lmp_count_end; 28 } 29 } 30 lmp_init_buttons = function() { 31 if ( $( the_lmp_js_data.products ).length <= 0 ) { 32 return; 33 } 34 $( the_lmp_js_data.products ).after( $( the_lmp_js_data.load_more ) ); 35 if( the_lmp_js_data.use_prev_btn ) { 36 $( the_lmp_js_data.products ).before( $( the_lmp_js_data.load_prev ) ); 37 } 38 } 39 $(window).resize( function () { 40 current_style(); 41 }); 42 lmp_init(); 43 lmp_init_buttons(); 44 current_style(); 45 window.addEventListener("popstate", function (event) { 46 if ( lmp_loading_style != 'none' && typeof the_lmp_js_data.update_url != "undefined" && the_lmp_js_data.update_url == 1 ) { 47 var state = event.state; 48 if( typeof(state) != 'undefined' && state != null && typeof(state.blmp) != 'undefined' && state.blmp == 'br_lmp_popstate' ) { 49 if(lmp_loading_style !== 'pagination') { 50 if( ! lmp_is_loading ) { 51 lmp_is_loading = true; 52 if( $('.berocket_lmp_first_on_page[data-url="'+decodeURIComponent(location.href)+'"]').length ) { 53 $('html, body').stop().animate({ 54 scrollTop: $('.berocket_lmp_first_on_page[data-url="'+decodeURIComponent(location.href)+'"]').offset().top 55 }, 500, function(){lmp_is_loading = false;}); 56 } else { 57 location.reload(); 58 } 59 } 60 } else { 61 if( lmp_ajax_instance != false ) { 62 lmp_ajax_instance.abort(); 63 end_ajax_loading(); 64 } 65 load_next_page(true, decodeURIComponent(location.href)); 66 } 67 } 68 } 69 }); 70 var br_load_more_html5_wait; 71 function br_load_more_html5() { 72 clearTimeout(br_load_more_html5_wait); 73 br_load_more_html5_wait = setTimeout(function() { 74 if ( typeof the_lmp_js_data.update_url != "undefined" && the_lmp_js_data.update_url == 1 ) { 75 if( ! lmp_is_loading ) { 76 if(lmp_loading_style !== 'pagination') { 77 var next_page = ''; 78 $('.berocket_lmp_first_on_page').each(function(i, o) { 79 if( ! $(o).is(':visible') ) { 80 return true; 81 } 82 if( $(o).offset().top > $(window).scrollTop()+(window.innerHeight/2) ) { 83 return false; 84 } 85 next_page = $(o).attr('data-url'); 86 }); 87 if( ! next_page ) { 88 next_page = $('.berocket_lmp_first_on_page').first().attr('data-url'); 89 } 90 var current_state = history.state; 91 if( next_page && decodeURIComponent(location.href) != next_page && ( current_state == null || typeof(current_state.link) == 'undefined' || current_state.link != next_page ) ) { 92 var history_data = {blmp:'br_lmp_popstate'}; 93 history.replaceState(history_data, ""); 94 var history_data = {blmp:'br_lmp_popstate', link:next_page}; 95 history.pushState(history_data, "", next_page); 96 history.pathname = next_page; 97 } 98 } 99 } 100 } 101 }, 50); 102 }
103 $(document).on('berocket_ajax_filtering_start', function() { 104 lmp_is_loading = true; 105 }); 106 $(document).on('berocket_ajax_filtering_end', function() { 107 lmp_is_loading = false; 108 }); 109 $(document).on( 'click', '.br_lmp_button_settings .lmp_button', function (event) { 110 event.preventDefault(); 111 load_next_page(); 112 }); 113 $(document).on( 'click', '.br_lmp_prev_settings .lmp_button', function (event) { 114 event.preventDefault(); 115 load_next_page(2, $(this).attr('href')); 116 }); 117 if ( lmp_loading_style !== 'pagination' ) { 118 $(window).scroll ( function () { 119 if( $( the_lmp_js_data.products ).length > 0 && ! lmp_is_loading ) { 120 br_load_more_html5(); 121 if ( lmp_loading_style == 'infinity_scroll' ) { 122 var products_bottom = $( the_lmp_js_data.products ).offset().top + $( the_lmp_js_data.products ).height() - the_lmp_js_data.buffer; 123 var bottom_position = $(window).scrollTop() + window.innerHeight; 124 if ( products_bottom < bottom_position && ! lmp_is_loading ) { 125 lmp_update_state(); 126 load_next_page(); 127 } 128 } 129 } 130 }); 131 } 132 if ( lmp_loading_style != 'none' && (! the_lmp_js_data.is_AAPF || typeof the_ajax_script == 'undefined') ) { 133 $(document).on( 'click', the_lmp_js_data.pagination+' a', function (event) { 134 if( $( the_lmp_js_data.products ).length > 0 ) { 135 event.preventDefault(); 136 var next_page = $(this).attr('href'); 137 if ( typeof the_lmp_js_data.update_url != "undefined" && the_lmp_js_data.update_url == 1 ) { 138 var history_data = {blmp:'br_lmp_popstate'}; 139 history.replaceState(history_data, ""); 140 var history_data = {blmp:'br_lmp_popstate', link: next_page}; 141 history.pushState(history_data, "", next_page); 142 history.pathname = next_page; 143 } 144 load_next_page( true, next_page ); 145 } 146 }); 147 } 148 149 load_next_page = function ( replace, user_next_page ) { 150 if( ! lmp_is_loading ) { 151 if ( typeof( replace ) == 'undefined' ) { 152 user_next_page = false; 153 } 154 if ( typeof( user_next_page ) == 'undefined' ) { 155 user_next_page = false; 156 } 157 var $next_page = jquery_get_next_page(); 158 if ( $next_page.length > 0 || user_next_page !== false ) { 159 start_ajax_loading(replace); 160 var next_page; 161 if( user_next_page !== false ) { 162 next_page = user_next_page; 163 } else { 164 next_page = $next_page.attr('href'); 165 } 166 lmp_ajax_instance = $.ajax({method:"GET", url: next_page, beforeSend: function(xhr) { 167 xhr.setRequestHeader('X-Braapfdisable', '1'); 168 }, success: function( data ) { 169 lmp_ajax_instance = false; 170 var $data = $('<div>'+data+'</div>'); 171 if( the_lmp_js_data.lazy_load_m && $(window).width() <= the_lmp_js_data.mobile_width || the_lmp_js_data.lazy_load && $(window).width() > the_lmp_js_data.mobile_width ) { 172 $data.find( the_lmp_js_data.products+' .lazy,'+the_lmp_js_data.item+', .berocket_lgv_additional_data' ).find( 'img' ).each( function ( i, o ) { 173 $(o).attr( 'data-src', $(o).attr( 'src' ) ).removeAttr( 'src' ); 174 $(o).attr( 'data-srcset', $(o).attr( 'srcset' ) ).removeAttr( 'srcset' ); 175 }); 176 $data.find(the_lmp_js_data.item+', .berocket_lgv_additional_data').addClass('lazy'); 177 } 178 if( $data.find( the_lmp_js_data.products ).find(the_lmp_js_data.item).first().length ) { 179 $data.find( the_lmp_js_data.products ).find(the_lmp_js_data.item).first().addClass('berocket_lmp_first_on_page').attr('data-url', decodeURIComponent(next_page)); 180 } 181 if( $data.find( the_lmp_js_data.products ).find('.berocket_lgv_additional_data').first().length ) { 182 $data.find( the_lmp_js_data.products ).find('.berocket_lgv_additional_data').first().addClass('berocket_lmp_first_on_page').attr('data-url', decodeURIComponent(next_page)); 183 } 184 var $products = $data.find( the_lmp_js_data.products ).html(); 185 if ( replace == 1 ) { 186 $( the_lmp_js_data.products ).html( $products ); 187 } else if( replace == 2 ) { 188 $products = $data.find( the_lmp_js_data.products ); 189 $products.find(the_lmp_js_data.item).addClass('berocket_lmp_hidden'); 190 var count_images = $products.find(the_lmp_js_data.item).find('img').length; 191 $products = $products.html(); 192 $( the_lmp_js_data.products ).prepend( $products ); 193 berocket_show_berocket_lmp_hidden_executed = false; 194 function berocket_show_berocket_lmp_hidden() { 195 if( ! berocket_show_berocket_lmp_hidden_executed ) { 196 berocket_show_berocket_lmp_hidden_executed = true; 197 var object = $( the_lmp_js_data.products ).find(the_lmp_js_data.item+':not(".berocket_lmp_hidden")').first(); 198 var positionOld = object.offset().top; 199 var scrollTop = $(window).scrollTop(); 200 $('.berocket_lmp_hidden').removeClass('berocket_lmp_hidden'); 201 end_ajax_loading(); 202 var positionNew = object.offset().top; 203 $(window).scrollTop(positionNew - (positionOld - scrollTop)); 204 } 205 } 206 $( the_lmp_js_data.products ).find('.berocket_lmp_hidden').find('img').on('load error', function() { 207 count_images--; 208 if( count_images <= 1 ) { 209 berocket_show_berocket_lmp_hidden(); 210 } 211 }); 212 setTimeout(berocket_show_berocket_lmp_hidden, 2500); 213 } else { 214 $( the_lmp_js_data.products ).append( $products ); 215 } 216 lmp_update_lazyload(); 217 if(lmp_loading_style !== 'pagination') 218 { 219 if( $data.find('.br_product_result_count').length && (lmp_count_start || lmp_count_end) ) { 220 lmp_count_text = $data.find('.br_product_result_count').data('text'); 221 if( replace == 2 ) { 222 lmp_count_start = $data.find('.br_product_result_count').data('start'); 223 } else { 224 lmp_count_end = $data.find('.br_product_result_count').data('end'); 225 } 226 lmp_count_lastend = $data.find('.br_product_result_count').data('end'); 227 lmp_count_laststart = $data.find('.br_product_result_count').data('start'); 228 text_count = lmp_count_text; 229 text_count = text_count.replace('-1', lmp_count_start); 230 text_count = text_count.replace('-2', lmp_count_end); 231 $('.woocommerce-result-count').text(text_count); 232 } else { 233 $('.woocommerce-result-count').text($data.find('.woocommerce-result-count:first').text()); 234 } 235 } 236 else 237 { 238 $('.woocommerce-result-count').text($data.find('.woocommerce-result-count:first').text()); 239 } 240 241 var $pagination = $data.find( the_lmp_js_data.pagination ); 242 if( replace == 1 ) { 243 $( the_lmp_js_data.pagination ).html( $pagination.html() ); 244 } else if( the_lmp_js_data.type == 'more_pagination' ) { 245 pagination_replace_partial($data, replace); 246 } else if( replace == 2 ) { 247 var $prev_page = jquery_get_prev_page(
247); 248 var $new_prev_page = jquery_get_prev_page($data); 249 if( $new_prev_page.length ) { 250 $prev_page.replaceWith($new_prev_page); 251 } else { 252 $prev_page.remove(); 253 } 254 } else { 255 var $next_page = jquery_get_next_page(); 256 var $new_next_page = jquery_get_next_page($data); 257 if( $new_next_page.length ) { 258 $next_page.replaceWith($new_next_page); 259 } else { 260 $next_page.remove(); 261 } 262 } 263 current_style(); 264 brloadmore_universal_theme_compatibility(); 265 if( replace != 2 ) { 266 end_ajax_loading(); 267 } 268 }}); 269 } 270 } 271 } 272 function pagination_replace_partial($data, replace) { 273 var $pagination = $( the_lmp_js_data.pagination ); 274 var $new_pagination = $data.find( the_lmp_js_data.pagination );
275 var $prev_page = jquery_get_prev_page(); 276 var $new_prev_page = jquery_get_prev_page($data); 277 var $next_page = jquery_get_next_page(); 278 var $new_next_page = jquery_get_next_page($data); 279 var easy_way = true; 280 if( ($pagination.find(the_lmp_js_data.next_page).length || $pagination.find(the_lmp_js_data.prev_page).length) && $pagination.find('.current').length ) { 281 if( replace == 2 ) { 282 var $current = $pagination.find('.current').last(); 283 var $new_current = $new_pagination.find('.current').last(); 284 } else { 285 var $current = $pagination.find('.current').first(); 286 var $new_current = $new_pagination.find('.current').first(); 287 } 288 var $current_block = get_current_page_last_block($current); 289 var $new_current_block = get_current_page_last_block($new_current); 290 var html_between_current = ''; 291 if( the_lmp_js_data.html_between_current ) { 292 html_between_current = the_lmp_js_data.html_between_current; 293 } 294 if( $current_block !== false && $new_current_block !== false ) { 295 easy_way = false; 296 if( replace == 2 ) { 297 $current_block.prevAll().remove(); 298 while($new_current_block.prevAll().length) { 299 $current_block.before($new_current_block.prevAll().last()); 300 } 301 $current_block.before($new_current_block); 302 if( html_between_current ) { 303 $current_block.before($(html_between_current)); 304 } 305 } else { 306 $current_block.nextAll().remove(); 307 $current_block.after($new_current_block.nextAll()); 308 $current_block.after($new_current_block); 309 if( html_between_current ) { 310 $current_block.after($(html_between_current)); 311 } 312 } 313 } 314 } 315 if(easy_way) { 316 if( replace == 2 ) { 317 if( $next_page.length ) { 318 $new_next_page.replaceWith($next_page.first()); 319 } else { 320 $new_next_page.remove(); 321 } 322 } else { 323 if( $prev_page.length ) { 324 $new_prev_page.replaceWith($prev_page.first()); 325 } else { 326 $new_prev_page.remove(); 327 } 328 } 329 $pagination.html( $new_pagination.html() ); 330 } 331 } 332 function get_current_page_last_block($current) { 333 var $i = 10; 334 var $needed_block 335 do { 336 $i--; 337 $needed_block = $current; 338 $current = $current.parent(); 339 } while( $i > 0 && !(($current.find(the_lmp_js_data.next_page).length || $current.find(the_lmp_js_data.prev_page).length) && $current.find('.current').length) ); 340 if( $i <= 0 ) { 341 return false; 342 } else { 343 return $needed_block; 344 } 345 } 346 function woocommerce_result_count_update() { 347 if(lmp_loading_style !== 'pagination') { 348 if( $('.br_product_result_count').length ) { 349 lmp_count_start = $('.br_product_result_count').data('start'); 350 lmp_count_end = $('.br_product_result_count').data('end'); 351 lmp_count_text = $('.br_product_result_count').data('text'); 352 lmp_count_lastend = lmp_count_end; 353 lmp_count_laststart = lmp_count_start; 354 text_count = lmp_count_text; 355 text_count = text_count.replace('-1', lmp_count_start); 356 text_count = text_count.replace('-2', lmp_count_end); 357 $('.woocommerce-result-count').text(text_count); 358 } 359 } 360 } 361 function start_ajax_loading(replace) { 362 lmp_is_loading = true; 363 jQuery('body').addClass('berocket_lmp_ajax_loading'); 364 lmp_execute_func( the_lmp_js_data.javascript.before_update ); 365 $(document).trigger('berocket_lmp_start'); 366 if( replace == 2 ) { 367 $( the_lmp_js_data.products ).before( $( the_lmp_js_data.load_image ) ); 368 $(document).trigger('berocket_lmp_start_prev'); 369 } else { 370 $( the_lmp_js_data.products ).after( $( the_lmp_js_data.load_image ) ); 371 $(document).trigger('berocket_lmp_start_next'); 372 } 373 } 374 function end_ajax_loading() { 375 if( typeof($(the_lmp_js_data.products).isotope) == 'function' && $(the_lmp_js_data.products).data('isotope') ) { 376 $(the_lmp_js_data.products).isotope( 'reloadItems' ); 377 $(the_lmp_js_data.products).isotope(); 378 } 379 $( the_lmp_js_data.load_img_class ).remove();
380 $(document).trigger('berocket_ajax_products_infinite_loaded'); 381 $(document).trigger('berocket_lmp_end'); 382 lmp_execute_func( the_lmp_js_data.javascript.after_update ); 383 jQuery('body').removeClass('berocket_lmp_ajax_loading'); 384 lmp_is_loading = false; 385 var $next_page = jquery_get_next_page(); 386 if( ( lmp_loading_style == 'infinity_scroll' || lmp_loading_style == 'more_button' ) && $next_page.length <= 0 ) { 387 $( the_lmp_js_data.products ).append( $( the_lmp_js_data.end_text ) ); 388 } 389 br_load_more_html5(); 390 } 391 function current_style() { 392 if ( $( the_lmp_js_data.products ).length <= 0 ) { 393 return; 394 } 395 var $next_page = jquery_get_next_page(); 396 if( $next_page.length > 0 ) { 397 $('.br_lmp_button_settings .lmp_button').attr('href', $next_page.attr('href')); 398 } 399 var $prev_page = jquery_get_prev_page(
399); 400 if( $prev_page.length > 0 ) { 401 $('.br_lmp_prev_settings .lmp_button').attr('href', $prev_page.attr('href')); 402 } 403 if ( the_lmp_js_data.use_mobile && $(window).width() <= the_lmp_js_data.mobile_width ) { 404 set_style( the_lmp_js_data.mobile_type ); 405 } else { 406 set_style( the_lmp_js_data.type ); 407 } 408 } 409 var Timeout_test_prev_page = false; 410 function set_style( style ) { 411 $( '.lmp_load_more_button' ).hide(); 412 if( style != 'none' ) { 413 var $next_page = jquery_get_next_page(); 414 $( the_lmp_js_data.pagination ).hide(); 415 if ( style == 'more_button' ) { 416 if ( $next_page.length > 0 ) { 417 $( '.lmp_load_more_button.br_lmp_button_settings' ).show(); 418 } else { 419 setTimeout( test_next_page, 4000 ); 420 } 421 } else if ( style == 'pagination' ) { 422 $( the_lmp_js_data.pagination ).show(); 423 } else if ( style == 'more_pagination' ) { 424 $( the_lmp_js_data.pagination ).show(); 425 if ( $next_page.length > 0 ) { 426 $( '.lmp_load_more_button.br_lmp_button_settings' ).show(); 427 } else { 428 setTimeout( test_next_page, 4000 ); 429 } 430 }
431 var $prev_page = jquery_get_prev_page(); 432 if ( $prev_page.length > 0 ) { 433 $( '.lmp_load_more_button.br_lmp_prev_settings' ).show(); 434 } else { 435 if( Timeout_test_prev_page != false ) { 436 clearTimeout(Timeout_test_prev_page); 437 } 438 Timeout_test_prev_page = setTimeout( test_prev_page, 4000 ); 439 } 440 } 441 lmp_loading_style = style; 442 } 443 function test_next_page() { 444 var $next_page = jquery_get_next_page(); 445 if ( $next_page.length > 0 ) { 446 current_style(); 447 } else { 448 setTimeout( test_next_page, 4000 ); 449 } 450 } 451 function test_prev_page() { 452 var $prev_page = jquery_get_prev_page(); 453 if ( $prev_page.length > 0 ) { 454 current_style(); 455 } else { 456 if( Timeout_test_prev_page != false ) { 457 clearTimeout(Timeout_test_prev_page); 458 } 459 Timeout_test_prev_page = setTimeout( test_prev_page, 4000 ); 460 } 461 } 462 function jquery_get_next_page($parent) { 463 if( typeof($parent) == 'undefined' ) { 464 $parent = $(document); 465 } 466 var $pagination = $parent.find(the_lmp_js_data.pagination); 467 if( $pagination.find(the_lmp_js_data.next_page).length > 0 ) { 468 $next_page = $pagination.find(the_lmp_js_data.next_page); 469 } else { 470 $next_page = $parent.find( the_lmp_js_data.next_page ); 471 } 472 return $next_page; 473 } 474 function jquery_get_prev_page($parent) { 475 if( typeof($parent) == 'undefined' ) { 476 $parent = $(document); 477 } 478 var $pagination = $parent.find(the_lmp_js_data.pagination); 479 if( $pagination.find(the_lmp_js_data.prev_page).length > 0 ) { 480 $prev_page = $pagination.find(the_lmp_js_data.prev_page); 481 } else { 482 $prev_page = $parent.find( the_lmp_js_data.prev_page ); 483 } 484 return $prev_page; 485 } 486 lmp_update_state = function(reset_count) { 487 if( typeof reset_count == 'undefined' ) { 488 reset_count = false; 489 } 490 if( ! $( the_lmp_js_data.products ).find( the_lmp_js_data.item ).first().is('.berocket_lmp_first_on_page') ) { 491 $( the_lmp_js_data.products ).find( the_lmp_js_data.item ).first().addClass('berocket_lmp_first_on_page').attr('data-url', decodeURIComponent(location.href)); 492 } 493 current_style(); 494 if( reset_count ) { 495 woocommerce_result_count_update(); 496 } 497 } 498 $(document).on('berocket_ajax_products_loaded', function(){ 499 lmp_update_state(true); 500 if( typeof $(window).lazyLoadXT != 'undefined' ) { 501 if( the_lmp_js_data.lazy_load_m && $(window).width() <= the_lmp_js_data.mobile_width || the_lmp_js_data.lazy_load && $(window).width() > the_lmp_js_data.mobile_width ) { 502 jQuery(the_lmp_js_data.item+', .berocket_lgv_additional_data').addClass('lazy').find( 'img' ).each( 503 function ( i, o ) { 504 jQuery(o) 505 .attr( 'data-src', jQuery(o).attr( 'src' ) ).removeAttr( 'src' ) 506 .attr( 'data-srcset', jQuery(o).attr( 'srcset' ) ).removeAttr( 'srcset' ); 507 } 508 ).lazyLoadXT(); 509 } 510 } 511 lmp_update_lazyload(); 512 }); 513 $(document).on('berocket_lgv_after_style_set', function() { 514 jQuery(window).scrollTop(jQuery(window).scrollTop() + 1).scrollTop(jQuery(window).scrollTop() - 1); 515 jQuery( the_lmp_js_data.item+'.animated').trigger('lazyshow'); 516 }); 517 lmp_update_lazyload = function() { 518 if( typeof $(window).lazyLoadXT != 'undefined' ) { 519 if( the_lmp_js_data.lazy_load_m && $(window).width() <= the_lmp_js_data.mobile_width || the_lmp_js_data.lazy_load && $(window).width() > the_lmp_js_data.mobile_width ) { 520 $( the_lmp_js_data.products+' .lazy' ).find( 'img' ).lazyLoadXT(); 521 $( the_lmp_js_data.products ).find('.lazy').on( 'lazyshow', function () { 522 $(this).removeClass('lazy').addClass('animated').addClass(the_lmp_js_data.LLanimation); 523 if( $(this).is('img') ) { 524 $(this).attr('srcset', $(this).data('srcset')); 525 } else { 526 $(this).find('img').each( function ( i, o ) { 527 $(o).attr('srcset', $(o).data('srcset')); 528 }); 529 } 530 if( ! $(this).is('.berocket_lgv_additional_data') ) { 531 $(this).next( '.berocket_lgv_additional_data' ).removeClass('lazy').addClass('animated').addClass(the_lmp_js_data.LLanimation); 532 } 533 }); 534 } 535 } 536 } 537 brloadmore_universal_theme_compatibility = function() { 538 $(window).trigger('resize'); 539 //UNCODE theme 540 try {if( berocket_apply_filters('uncode_theme_compatibility', (typeof(UNCODE) == 'object' && typeof(UNCODE.init) == 'function' ) ) ) { 541 UNCODE.init(); 542 }} catch (e) {} 543 //Flatsome theme 544 try {if( berocket_apply_filters('flatsome_theme_compatibility', (typeof(Flatsome) == 'object' && typeof(Flatsome.attach) == 'function' && jQuery(the_lmp_js_data.products).length ) ) ) { 545 Flatsome.attach(jQuery(the_lmp_js_data.products)); 546 }} catch (e) {} 547 //Woodmart theme 548 try {if( berocket_apply_filters('woodmart_theme_compatibility', (typeof(woodmartThemeModule) == 'object' && typeof(woodmartThemeModule.init) == 'function' ) ) ) { 549 woodmartThemeModule.wooInit(); 550 woodmartThemeModule.lazyLoading(); 551 woodmartThemeModule.productsLoadMore(); 552 }} catch (e) {} 553 //Divi theme 554 try {if( berocket_apply_filters('divi_theme_compatibility', (typeof(et_reinit_waypoint_modules) == 'function' ) ) ) { 555 et_reinit_waypoint_modules();
556 }} catch (e) {} 557 //reyTheme theme 558 try {if( berocket_apply_filters('rey_theme_compatibility', (typeof(jQuery.reyTheme) == 'object' && typeof(jQuery.reyTheme.init) == 'function' ) ) ) { 559 jQuery.reyTheme.init(); 560 }} catch (e) {} 561 //layzyLoadImage script 562 try {if( berocket_apply_filters('layzyloadimage_script_compatibility', (typeof(layzyLoadImage) == 'function' ) ) ) { 563 layzyLoadImage(); 564 }} catch (e) {} 565 //jetpackLazyImagesModule script 566 try {if( berocket_apply_filters('jetpacklazyimages_script_compatibility', (typeof(jetpackLazyImagesModule) == 'function' ) ) ) { 567 jetpackLazyImagesModule(); 568 }} catch (e) {} 569 try { 570 jQuery('img.jetpack-lazy-image').each(function() { 571 jQuery(this).removeClass('jetpack-lazy-image').attr('src', jQuery(this).data('lazy-src')); 572 jQuery(this).removeClass('jetpack-lazy-image').attr('srcset', ''); 573 }); 574 } catch (e) {} 575 //SWIFT script 576 try {if( berocket_apply_filters('swift_script_compatibility', (typeof(SWIFT) == 'object' && typeof(SWIFT.woocommerce) == 'object' && typeof(SWIFT.woocommerce.init) == 'function' ) ) ) { 577 SWIFT.woocommerce.init(); 578 }} catch (e) {} 579 try {if( typeof(baapfGet_wprocketInstance) != 'undefined' ) { 580 baapfGet_wprocketInstance.update(); 581 }} catch (e) {} 582 try { 583 jQuery(document).trigger('facetwp-loaded'); 584 } catch (e) {} 585 try {if( berocket_apply_filters('etTheme_compatibility', (typeof(etTheme) == 'object' && typeof(etTheme.global_image_lazy) == 'function' ) ) ) { 586 etTheme.global_image_lazy(); 587 }} catch (e) {} 588 try { if( typeof(InfiniteScroll) == 'function' ) { 589 var infScroll = InfiniteScroll.data( '.shop-container .products' ); 590 if( typeof(infScroll) == 'object' && infScroll.options ) { 591 var infOptionsStore = infScroll.options; 592 infScroll.destroy(); 593 jQuery('.shop-container .products').data('infiniteScroll', '').infiniteScroll(infOptionsStore); 594 } 595 }} catch (e) {} 596 try { if( jQuery('.shop-container .products').length && typeof(jQuery('.shop-container .products').data('packery')) == 'object' ) { 597 jQuery('.shop-container .products').packery('reloadItems').packery('layout'); 598 }} catch (e) {} 599 } 600 }); 601})(jQuery); 602function lmp_execute_func ( func ) { 603 if( the_lmp_js_data.javascript != 'undefined' 604 && the_lmp_js_data.javascript != null 605 && typeof func != 'undefined' 606 && func.length > 0 ) { 607 try{ 608 eval( func ); 609 } catch(err){ 610 alert('You have some incorrect JavaScript code (Load More Products)'); 611 } 612 } 613} 614
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.