1// counterUP 2(function( $ ){ 3 "use strict"; 4 5 $.fn.counterUp = function( options ) { 6 7 // Defaults 8 var settings = $.extend({ 9 'time': 400, 10 'delay': 10 11 }, options); 12 13 return this.each(function(){ 14 15 // Store the object 16 var $this = $(this); 17 var $settings = settings; 18 19 var counterUpper = function() { 20 var nums = []; 21 var divisions = $settings.time / $settings.delay; 22 var num = $this.text(); 23 var isComma = /[0-9]+,[0-9]+/.test(num); 24 num = num.replace(/,/g, ''); 25 var isInt = /^[0-9]+$/.test(num); 26 var isFloat = /^[0-9]+\.[0-9]+$/.test(num); 27 var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; 28 29 // Generate list of incremental numbers to display 30 for (var i = divisions; i >= 1; i--) { 31 32 // Preserve as int if input was int 33 var newNum = parseInt(num / divisions * i); 34 35 // Preserve float if input was float 36 if (isFloat) { 37 newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); 38 } 39 40 // Preserve commas if input had commas 41 if (isComma) { 42 while (/(\d+)(\d{3})/.test(newNum.toString())) { 43 newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); 44 } 45 } 46 47 nums.unshift(newNum); 48 } 49 50 $this.data('counterup-nums', nums); 51 $this.text('0'); 52 53 // Updates the number until we're done 54 var f = function() { 55 $this.text($this.data('counterup-nums').shift()); 56 if ($this.data('counterup-nums').length) { 57 setTimeout($this.data('counterup-func'), $settings.delay); 58 } else { 59 delete $this.data('counterup-nums'); 60 $this.data('counterup-nums', null); 61 $this.data('counterup-func', null); 62 } 63 }; 64 $this.data('counterup-func', f); 65 66 // Start the count up 67 setTimeout($this.data('counterup-func'), $settings.delay); 68 }; 69 70 // Perform counts when the element gets into view 71 $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true }); 72 }); 73 74 }; 75 76})( jQuery ); 77 78jQuery(document).ready(function($) { 79 80 var s=$(".magee-feature-box.style2"); 81 for(i=0;i<s.length;i++) { 82 var t=$(s[i]).find(".icon-box").outerWidth(); 83 if($(s[i]).find("img.feature-box-icon").length){ 84 var t=$(s[i]).find("img.feature-box-icon").outerWidth(); 85 } 86 t+=15; 87 t+="px"; 88 $(s[i]).css({"padding-left":t}); 89 } 90 var s=$(".magee-feature-box.style2.reverse"); 91 for(i=0;i<s.length;i++) { 92 var t=$(s[i]).find(".icon-box").outerWidth(); 93 if($(s[i]).find("img.feature-box-icon").length) 94 var t=$(s[i]).find("img.feature-box-icon").outerWidth(); 95 96 t+=15; 97 t+="px"; 98 $(s[i]).css({"padding-left":0,"padding-right":t}); 99 } 100 var s=$(".magee-feature-box.style3"); 101 for(i=0;i<s.length;i++) { 102 var t=$(s[i]).find(".icon-box").outerWidth(); 103 if($(s[i]).find("img.feature-box-icon").length) 104 var t=$(s[i]).find("img.feature-box-icon").outerWidth(); 105 t+="px"; 106 $(s[i]).find("h3").css({"line-height":t}); 107 } 108 var s=$(".magee-feature-box.style4"); 109 for(i=0;i<s.length;i++) { 110 var t=$(s[i]).find(".icon-box").outerWidth(); 111 if($(s[i]).find("img.feature-box-icon").length) 112 var t=$(s[i]).find("img.feature-box-icon").outerWidth(); 113 t=t/2; 114 t1=-t; 115 t+="px"; 116 t1+="px"; 117 $(s[i]).css({"padding-top":t,"margin-top":t}); 118 $(s[i]).find(".icon-box").css({"top":t1,"margin-left":t
1181}); 119 $(s[i]).find("img.feature-box-icon").css({"top":t1,"margin-left":t1}); 120 } 121 122 // 123 124 $(".wow").each(function(){ 125 var duration = $(this).data("animationduration"); 126 if( typeof duration !== "undefined"){ 127 $(this).css({"-webkit-animation-duration":duration+"s","animation-duration":duration+"s"}); 128 } 129 }); 130 // 131 132 133 134 135 function DY_scroll(wraper,prev,next,img,speed,or) 136 { 137 var wraper = $(wraper); 138 var prev = $(prev); 139 var next = $(next); 140 var img = $(img).find('ul'); 141 var w = img.find('li').outerWidth(true); 142 var s = speed; 143 144 next.click(function() 145 { 146 img.animate({'margin-left':-w},function() 147 { 148 img.find('li').eq(0).appendTo(img); 149 img.css({'margin-left':0}); 150 }); 151 }); 152 153 prev.click(function() 154 { 155 img.find('li:last').prependTo(img); 156 img.css({'margin-left':-w}); 157 img.animate({'margin-left':0}); 158 }); 159 160 if (or == true) 161 { 162 ad = setInterval(function() { next.click();},s*1000); 163 wraper.hover(function(){clearInterval(ad);},function(){ad = setInterval(function() { next.click();},s*1000);}); 164 } 165 166 } 167 168 DY_scroll('.multi-carousel','.multi-carousel-nav-prev','.multi-carousel-nav-next','.multi-carousel-inner',3,false); 169 170 $('[data-toggle="tooltip"]').tooltip(); 171 $('[data-toggle="popover"]').popover(); 172 $("[data-animation]").mouseover(function(){ 173 var anmiationName=$(this).attr("data-animation"); 174 $(this).addClass("animated").addClass(anmiationName); 175 }); 176 $("[data-animation]").mouseout(function(){ 177 var anmiationName=$(this).attr("data-animation"); 178 $(this).removeClass("animated").removeClass(anmiationName); 179 }); 180 181 ////flipbox 182 183 $('.magee-flipbox-wrap').each(function(){ 184 var front_height = $(this).find('.flipbox-front').outerHeight(); 185 var back_height = $(this).find('.flipbox-back').outerHeight(); 186 var height = front_height>back_height?front_height:back_height; 187 $(this).css({'height':height}); 188 }); 189 190 // counter up 191 192 $('.magee-counter-box .counter-num').counterUp({ 193 delay: 10, 194 time: 1000 195 }); 196 197 /* ------------------------------------------------------------------------ */ 198/* animation */ 199/* ------------------------------------------------------------------------ */ 200 201 $('.magee-animated').each(function(){ 202 if($(this).data('imageanimation')==="yes"){ 203 $(this).find("img,i.fa").css("visibility","hidden"); 204 } 205 else{ 206 $(this).css("visibility","hidden"); 207 } 208 209 }); 210 211 if(jQuery().waypoint) { 212 $('.magee-animated').waypoint(function() { 213 214 $(this).css({'visibility':'visible'}); 215 $(this).find("img,i.fa").css({'visibility':'visible'}); 216 217 218 // this code is executed for each appeared element 219 var animation_type = $(this).data('animationtype'); 220 var animation_duration = $(this).data('animationduration'); 221 var image_animation = $(this).data('imageanimation'); 222 if(image_animation === "yes"){ 223 224 $(this).find("img,i.fa").addClass("animated "+animation_type); 225 226 if(animation_duration) { 227 $(this).find("img,i.fa").css('-moz-animation-duration', animation_duration+'s'); 228 $(this).find("img,i.fa").css('-webkit-animation-duration', animation_duration+'s'); 229 $(this).find("img,i.fa").css('-ms-animation-duration', animation_duration+'s'); 230 $(this).find("img,i.fa").css('-o-animation-duration', animation_duration+'s'); 231 $(this).find("img,i.fa").css('animation-duration', animation_duration+'s'); 232 } 233 234 235 }else{ 236 $(this).addClass("animated "+animation_type); 237 238 if(animation_duration) { 239 $(this).css('-moz-animation-duration', animation_duration+'s'); 240 $(this).css('-webkit-animation-duration', animation_duration+'s'); 241 $(this).css('-ms-animation-duration', animation_duration+'s'); 242 $(this).css('-o-animation-duration', animation_duration+'s'); 243 $(this).css('animation-duration', animation_duration+'s'); 244 } 245 } 246 247 248 },{ triggerOnce: true, offset: '90%' }); 249 } 250 $("a[rel^='prettyPhoto']").prettyPhoto(); 251 });
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.