1/*** Kale - JS ***/ 2jQuery(document).ready(function($){ 3 4 if (jQuery('.single-content iframe, .page-content iframe').length) { 5 kale_responsive_videos(); 6 } 7 8 $("#toggle-main_search").on("click", function (event) { 9 var x = setTimeout('jQuery(".main_search .form-control").focus()', 700); 10 }); 11 12 fluidBox(); 13 $(window).load(function(){fluidBox();}) 14 $(window).resize(function(){fluidBox();}); 15 $('body').addClass('js'); 16 $(".owl-carousel").owlCarousel({ 17 lazyContent:true, 18 loop:true, 19 nav:true, 20 dots:false, 21 autoplay: true, 22 items:1, 23 animateOut: 'fadeOut', 24 animateIn: 'fadeIn' 25 }); 26 $("select.form-control").selectpicker(); 27 $(".header-row-1-toggle").click(function(){ 28 $(this).toggleClass('open'); 29 $('.header-row-1').toggleClass('open'); 30 return false; 31 }); 32 $('.checkbox label,.checkbox-inline label,.radio label,.radio-inline label').click(function(){ 33 setupLabel(); 34 }); 35 setupLabel(); 36 37 $('.search-trigger').on( 'click', function() { 38 $(this).siblings('form').find('.search-field').toggleClass('visible').focus(); 39 }); 40 41 if ( $('.header-row-1 .widget_nav_menu li').hasClass( 'menu-item-has-children' ) ) { 42 $('.header-row-1 .menu-item-has-children').addClass('dropdown') 43 .find('> a').addClass('dropdown-toggle has-submenu') 44 .append('<span class="caret 0"></span>'); 45 } 46}); 47function setupLabel() { 48 if (jQuery('.checkbox,.checkbox-inline').length) { 49 jQuery('.checkbox label,.checkbox-inline label').each(function(){ 50 jQuery(this).removeClass('on'); 51 }); 52 jQuery('.checkbox input:checked,.checkbox-inline input:checked').each(function(){ 53 jQuery(this).parent('label').addClass('on'); 54 }); 55 }; 56 if (jQuery('.radio,.radio-inline').length) { 57 jQuery('.radio label,.radio-inline label').each(function(){ 58 jQuery(this).removeClass('on'); 59 }); 60 jQuery('.radio input:checked,.radio-inline input:checked').each(function(){ 61 jQuery(this).parent('label').addClass('on'); 62 }); 63 }; 64}; 65 66function fluidBox(){ 67 if(jQuery('[data-fluid]').length>0){ 68 jQuery('[data-fluid]').each(function(){ 69 var data = jQuery(this).attr('data-fluid'); 70 var dataFloat = jQuery(this).attr('data-float'); 71 var _container = jQuery(this); 72 var dataSplit = data.split(','); 73 if(_container.hasClass('carousel')){ 74 _container.find('.item').addClass('show'); 75 } 76 for(i=0;i<dataSplit.length;i++){ 77 if(dataSplit[i]!=''){ 78 if(jQuery(dataSplit[i],_container).length>0){ 79 jQuery(dataSplit[i],_container).css('min-height','inherit'); 80 if( dataFloat=='true' && jQuery(dataSplit[i],_container).parent().css('float')!='none' ){ 81 var newH = 0; 82 if(jQuery(dataSplit[i],_container).length>0){ 83 jQuery(dataSplit[i],_container).each(function(){ 84 var thisH = jQuery(this).innerHeight(); 85 if( newH<thisH ) newH = thisH; 86 }); 87 jQuery(dataSplit[i],_container).css('min-height',newH); 88 } 89 }else if(dataFloat!='true'){ 90 var newH = 0; 91 if(jQuery(dataSplit[i],_container).length>0){ 92 jQuery(dataSplit[i],_container).each(function(){ 93 var thisH = jQuery(this).innerHeight(); 94 if( newH<thisH ) newH = thisH; 95 }); 96 jQuery(dataSplit[i],_container).css('min-height',newH); 97 } 98 } 99 } 100 } 101 } 102 if(_container.hasClass('carousel')){ 103 _container.find('.item').removeClass('show'); 104 } 105 }); 106 } 107} 108 109//http://www.skipser.com/p/2/p/auto-resize-youtube-videos-in-responsive-layout.html 110function kale_responsive_videos(){ 111 YOUTUBE_VIDEO_MARGIN = 5; 112 jQuery('.single-content iframe, .page-content iframe').each(function(index,item) { 113 if(jQuery(this)[0].hasAttribute("src") && jQuery(item).attr('src').match(/(https?:)?\/\/www\.youtube\.com/)) { 114 var w=jQuery(item).attr('width'); 115 var h=jQuery(item).attr('height'); 116 var ar = h/w*100; 117 ar=ar.toFixed(2); 118 //Style iframe 119 jQuery(item).css('position','absolute'); 120 jQuery(item).css('top','0'); 121 jQuery(item).css('left','0'); 122 jQuery(item).css('width','100%'); 123 jQuery(item).css('height','100%'); 124 jQuery(item).css('max-width',w+'px'); 125 jQuery(item).css('max-height', h+'px'); 126 jQuery(item).wrap('<div style="max-width:'+w+'px;margin:0 auto; padding:'+YOUTUBE_VIDEO_MARGIN+'px;" />'); 127 jQuery(item).wrap('<div style="position: relative;padding-bottom: '+ar+'%; height: 0; overflow: hidden;" />'); 128 } 129 }); 130}
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.