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