1jQuery(document).ready(function(){ 2 // OWL Carousel init. 3 cherryPluginCarouselInit(); 4 5 // Full-width block with left-right paddings. 6 jQuery('.content_box.full-width').wrapInner('<div class="full-block-wrap"></div>'); 7 jQuery(window).resize( function(){ 8 contenBoxResizeFunction(); 9 }); 10 11 contenBoxResizeFunction(); 12 function contenBoxResizeFunction(){ 13 var width_of_viewport = jQuery(window).width(), 14 half_width_of_viewport = width_of_viewport / 2, 15 width_of_container = jQuery('.content-holder > .container').width(); 16 17 jQuery('.content_box.full-width').width(width_of_container); 18 jQuery('.content_box.full-width').css({'padding-left': half_width_of_viewport+'px', 'padding-right': half_width_of_viewport+'px', 'margin-left': '-'+half_width_of_viewport+'px'}); 19 jQuery('.full-block-wrap').width(width_of_container); 20 } 21}); 22 23function cherryPluginCarouselInit() { 24 jQuery('div[id^="owl-carousel-"]').each(function(){ 25 var carousel = jQuery(this), 26 auto_play = parseInt(carousel.attr('data-auto-play'))<1 ? false : parseInt(carousel.attr('data-auto-play')), 27 items_count = parseInt(carousel.attr('data-items')), 28 display_navs = carousel.attr('data-nav')=='true' ? true : false, 29 display_pagination = carousel.attr('data-pagination')=='true' ? true : false, 30 auto_height = items_count<=1 ? true : false, 31 keys = Object.keys(items_custom), 32 last_key = keys[keys.length-1]; 33 34 items_custom[last_key] = [items_custom[last_key][0], items_count]; 35 36 jQuery(carousel).owlCarousel({ 37 autoPlay: auto_play, 38 navigation: display_navs, 39 pagination: display_pagination, 40 navigationText: false, 41 autoHeight: auto_height, 42 itemsCustom: items_custom 43 }); 44 }) 45 jQuery('.owl-prev').addClass('icon-chevron-left'); 46 jQuery('.owl-next').addClass('icon-chevron-right'); 47}
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.