1(function($) { 2 3 4 5 if (device.desktop() && $('.standalone-header-vid').length){ 6 $('.standalone-header-vid').YTPlayer({ 7 fitToBackground: true, 8 videoId: standalone_header_vid, 9 // start: standalone_header_vid_sec, 10 callback: function() { 11 $('.standalone-header-vid').removeClass("hide"); 12 } 13 }); 14 } 15 16 17 $(document).ready(function() { 18 19 // var animations = [ 20 // { 21 // time:100, 22 // step:"animated fadeInUp", 23 // selector:'.animateme1' 24 // }, 25 // { 26 // time:200, 27 // step:"animated fadeInUp", 28 // selector:'.animateme2' 29 // }, 30 // { 31 // time:300, 32 // step:"animated fadeInUp", 33 // selector:'.animateme3' 34 // }, 35 // { 36 // time:400, 37 // step:"animated fadeInUp", 38 // selector:'.animateme4' 39 // }, 40 // { 41 // time:500, 42 // step:"animated fadeInUp", 43 // selector:'.animateme5' 44 // } 45 // ]; 46 47 // function runAnimation(i, timeline){ 48 // setTimeout(function(){$(animations[i].selector).addClass(animations[i].step); 49 // }, timeline); 50 // } 51 52 // var timeline = 0; 53 // for(var i=0; i<animations.length; i++){ 54 // timeline = parseInt(animations[i].time, 10) + parseInt(timeline, 10); 55 // runAnimation(i, timeline); 56 // } 57 58 59 $('.hero_under_scroll').on('click', function(event) { 60 61 var target = $(this.getAttribute('href')); 62 63 if( target.length ) { 64 event.preventDefault(); 65 $('html, body').stop().animate({ 66 scrollTop: target.offset().top 67 }, 1000); 68 } 69 70 }); 71 72 // $('.android-nav').click(function() { 73 // $(".android-notibar a i.fa").addClass("fa-battery-three-quarters").delay(1000).queue(function(next){ 74 // $(this).removeClass("fa-battery-full").addClass("fa-battery-half bkz-on"); 75 // }); 76 // }); 77 78 //carousel 79 80 $(".is-ias-carousel").each(function(){ 81 var carousel_id = $(this).attr('id'); 82 var auto_play = $(this).data('autoplay'); 83 var auto_height = $(this).data('autoheight'); 84 var items = $(this).data('items'); 85 var navigation = $(this).data('navigation'); 86 if($(this).hasClass('ias-features-carousel')){ //features carousel 87 var feature_id = $(this).data('features-id'); 88 $(this).owlCarousel({ 89 singleItem:true, 90 stopOnHover:true, 91 autoHeight: auto_height, 92 autoPlay: auto_play, 93 addClassActive : true, 94 afterInit: function(i){ 95 $('.iapp-showcase-'+feature_id+' .features-control-item-0').addClass('active'); 96 }, 97 afterMove: function(i){ 98 var current = this.currentItem; 99 $('.iapp-showcase-'+feature_id+' .features-control-item').removeClass('active'); 100 $('.iapp-showcase-'+feature_id+' .features-control-item-'+current).addClass('active'); 101 }, 102 }); 103 }else if($(this).hasClass('single-carousel')){ //single style 104 $(this).owlCarousel({ 105 singleItem:true, 106 stopOnHover:true, 107 autoHeight: auto_height, 108 autoPlay: auto_play, 109 addClassActive : true 110 }); 111 }else{ 112 $(this).owlCarousel({ 113 autoPlay: auto_play, 114 stopOnHover:true, 115 items: items?items:3, 116 itemsDesktop: items?false:3, 117 itemsDesktopSmall: items?(items>3?3:false):3, 118 singleItem: items==1?true:false, 119 navigation: navigation?true:false, 120 navigationText:["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"], 121 slideSpeed: 500, 122 addClassActive : true 123 }); 124 } 125 }); 126 $('.ias-devide').each(function(index, element) { 127 var parent_width = $(this).parent('.ias-devide-wrap').width(); 128 var devide_width = $('.device',this).outerWidth(); 129 var scale = parent_width/devide_width; 130 if(scale>1){ scale = 1;} 131 var css = '-webkit-transform: scale('+ scale + '); transform: scale('+ scale + ');'; 132 $('.device',this).attr('style', css); 133 $(this).height($('.device',this).outerHeight()*scale); 134 135 }); 136 $('.showcase-style-features').each(function(index, element) { 137 var $this_feature = $(this); 138 var $this_feature_owl = $(".ias-features-carousel",this).data('owlCarousel'); 139 $('.features-control-item',this).click(function(e) { 140 $this_feature_owl.goTo($(this).data('features-item')); 141 }); 142 }); 143 }); 144 145 146 147 //document ready 148 /*$(window).resize(function(e) { 149 ias_devide_resize(); 150 setTimeout(function(){ 151 ias_devide_resize(); 152 }, 300); 153 });*/ 154 var resize_timeout; 155 window.onresize = function(){ 156 clearTimeout(resize_timeout); 157 resize_timeout = setTimeout(ias_devide_resize, 300); 158 }; 159 160 function ias_devide_resize(){ 161 $('.ias-devide').each(function(index, element) { 162 var parent_width = $(this).parent('.ias-devide-wrap').width(); 163 var devide_width = $('.device',this).outerWidth(); 164 //var max_scale = $(this).data('scale')?$(this).data('scale'):1; 165 var scale = parent_width/devide_width; 166 if(scale>1){ scale = 1;} 167 var css = '-webkit-transform: scale('+ scale + '); transform: scale('+ scale + ');'; 168 $('.device',this).attr('style', css); 169 $(this).height($('.device',this).outerHeight()*scale); 170 }); 171 } 172 173 174 175 176 177function isMobile() { 178 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 179} 180if (!isMobile()) { 181 var modal = document.querySelector(".modal"); 182 var headroom = new Headroom(modal); 183 headroom.init(); 184} 185 186 187 188 189 190 $(".navbar-toggle").bind("click", (function () { 191 $('body').toggleClass("menued"); 192 })); 193 194 window.onload = function() { 195 196 $("#hero_carousel").carousel(); 197 198 // $('.carousel').carousel({ 199 // interval: false 200 // }) 201 202 // $('.carousel').on('slid.bs.carousel', function() { 203 // console.log($(this).attr("id")); 204 // var idx = $(this).find('.carousel-inner div.active').index(); 205 // $(this).find("ol li.active").removeClass('active'); 206 207 // console.log(idx);
208 // $(this).find('ol.carousel-steps li[data-slide-to="' + idx + '"]').addClass('active'); 209 // }); 210 211 // $('ol.carousel-steps li').on("click", function() { 212 // $(this).siblings('.active').removeClass("active"); 213 // $(this).addClass("active"); 214 // }); 215 }; 216 217 218 219})(jQuery);
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.