1(function(jQuery) { 2 3 jQuery.fn.kenBurning = function(options) { 4 var defaults = { 5 time: 6000 6 }, 7 settings = jQuery.extend(defaults, options), 8 $container = jQuery(this), 9 animation = "in"; 10 jQuery(function() { 11 $container.addClass("kenburning-container"); 12 jQuery.fn.kenBurning.doIt(); 13 kenBurningplay = setInterval("jQuery.fn.kenBurning.doIt()", settings.time); 14 15 }); 16 17 if(jQuery('.modern-slider-wrap').length){ 18 jQuery.fn.kenBurning.doIt = function() { 19 var $active = $container.find(".item-mod.active"); 20 if ($active.length === 0) { 21 $active = $container.find(".item-mod:last"); 22 } 23 var $next = $active.next().length ? $active.next() : $container.find(".item-mod:first"); 24 $active.addClass("last-active").removeClass("active").find('.img').removeClass('').css("transform",""); 25 if (animation === "in") { 26 $next.css({ 27 left: "0", 28 right: "auto" 29 }).find('.img').addClass("").css("transform", "").parent('.item-mod').addClass("active"); 30 setTimeout(function() { 31 $active.removeClass("last-active"); 32 }, settings.time); 33 animation = "out"; 34 } else { 35 $next.css({ 36 left: "auto", 37 right: "0" 38 }).find('.img').addClass("").css("transform", "").parent('.item-mod').addClass("active"); 39 setTimeout(function() { 40 $active.removeClass("last-active"); 41 }, settings.time); 42 animation = "in"; 43 } 44 }; 45 46 47 48 49 } 50 else if(jQuery('.kenburns-wrap').length){ 51 52 var number = jQuery('.kenburns-wrap').find(".item-ken").length; 53 var count = 2; 54 if ( number % 2 ) { 55 count = 1; 56 } 57 58 jQuery.fn.kenBurning.doIt = function() { 59 var $active = $container.find(".item-ken.active"); 60 if ($active.length === 0) { 61 $active = $container.find(".item-ken:last"); 62 } 63 var $next = $active.next().length ? $active.next() : $container.find(".item-ken:first"); 64 65 $active.addClass("last-active").removeClass("active").find('.img').removeClass('zoomout zoomin').css("transform",""); 66 if (animation === "in") { 67 $next.css({ 68 left: "0", 69 right: "auto" 70 }).find('.img').addClass("zoomin").css("transform", "scale(1.2)").parent('.item-ken').addClass("active"); 71 setTimeout(function() { 72 $active.removeClass("last-active"); 73 if( count === 1){ 74 $active.find('.img').addClass("zoomout").removeClass("zoomin").css("transform", "scale(1)").parent('.item-ken'); 75 } 76 }, settings.time); 77 animation = "out"; 78 } else { 79 $next.css({ 80 left: "auto", 81 right: "0" 82 }).find('.img').addClass("zoomout").css("transform", "scale(1)").parent('.item-ken').addClass("active"); 83 setTimeout(function() { 84 $active.removeClass("last-active") 85 if( count === 1){ 86 $active.find('.img').addClass("zoomin").removeClass("zoomout").css("transform", "scale(1.2)").parent('.item-ken'); 87 } 88 }, settings.time); 89 animation = "in"; 90 } 91 }; 92 } 93 94 95 }; 96 97 98 jQuery(".kenburns-wrap").each(function() { 99 jQuery(this).on("click", function() { 100 101 var time = jQuery(this).find('.kenburns').attr('data-time') ? jQuery(this).find('.kenburns').attr('data-time') : 6000; 102 103 if (jQuery(this).find('.kenburns-play').hasClass("pause")) { 104 clearInterval(kenBurningplay); 105 } else { 106 jQuery.fn.kenBurning.doIt(); 107 kenBurningplay = setInterval("jQuery.fn.kenBurning.doIt()", time ); 108 } 109 jQuery(this).find('.kenburns-play').toggleClass("pause"); 110 jQuery(this).toggleClass("pause"); 111 }); 112 });
113})(jQuery); 114 115 116(function ($, window, document, undefined) { 117 118 if($('.kenburns').length){ 119 $('.kenburns').each(function () { 120 var time = $(this).attr('data-time') ? $(this).attr('data-time') : 6000; 121 $(this).kenBurning({ 122 time : time 123 }); 124 125 }); 126 } 127 128 var _ismobile = navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i); 129 130// for sound bg 131 $('.tur-sound-btn').on('click',function(){ 132 133 var $button = $(this); 134 if ($button.hasClass('play')) { 135 $button.next('audio').trigger('pause'); 136 $button.removeClass('play'); 137 } else { 138 $button.next('audio').trigger('play'); 139 $button.addClass('play'); 140 } 141 142 }); 143 144 function kenburnsHeight() { 145 if($('.kenburns-wrap').length){ 146 $('.kenburns-wrap').each(function () { 147 var headerH = $('.header_top_bg').not('.header_trans-fixed').outerHeight() || 0, 148 footerH = $('#footer').not('.fix-bottom').outerHeight() || 0, 149 sliderH = $(window).height() - (headerH + footerH), 150 bottomplay = $('#footer').hasClass('fix-bottom') ? ($('#footer').outerHeight() + 60) : 30; 151 152 $(this).find('.kenburns-play').css('bottom', bottomplay + 'px'); 153 $(this).find('.tur-sound-btn').css('bottom', bottomplay + 'px'); 154 $(this).find('.but-eye-wrap').css('bottom', bottomplay + 40 + 'px'); 155 156 $(this).css('height', sliderH + 'px'); 157 158 if($(window).width() < 768 && _ismobile){ 159 $(this).find('.tur-sound-btn').css('bottom', bottomplay - 50 + 'px'); 160 $(this).find('.but-eye-wrap').css('bottom', bottomplay - 10 + 'px'); 161 $(this).find('.caption').css('bottom', bottomplay - 30 + 'px'); 162 }else{ 163 $(this).find('.caption').css('bottom', bottomplay - 20 + 'px'); 164 $(this).find('.tur-sound-btn').css('bottom', bottomplay + 'px'); 165 $(this).find('.but-eye-wrap').css('bottom', bottomplay + 40 + 'px'); 166 } 167 168 }); 169 } 170 } 171 172 $('.but-eye-wrap').on('click', function () { 173 var mobWidth = $('.main-wrapper').attr('data-top'); 174 $('.but-eye-wrap').toggleClass('active'); 175 if( $('.but-eye-wrap').hasClass('active')){ 176 $('#topmenu, .kenburns-wrap .caption, #footer, .about-mob-section-wrap, header .logo').show(); 177 178 if($(window).width() > mobWidth){ 179 $('.mob-nav').hide(); 180 }else{ 181 $('.mob-nav').show(); 182 } 183 184 }else{ 185 $('#topmenu, .mob-nav, .kenburns-wrap .caption, #footer, .about-mob-section-wrap').hide(); 186 187 if($(window).width() > mobWidth){ 188 $('header .logo').hide(); 189 }else{ 190 $('header .logo').show(); 191 } 192 } 193 }); 194 195 function playSound() { 196 197 var mobWidth = $('.main-wrapper').attr('data-top'); 198 199 if($('.but-eye-wrap:not(.active)').length){ 200 $('#topmenu, .mob-nav, .kenburns-wrap .caption, #footer, .about-mob-section-wrap').hide(); 201 if($(window).width() > mobWidth){ 202 $('header .logo').hide(); 203 }else{ 204 $('header .logo').show(); 205 } 206 } 207 208 if ($('.tur-sound-btn').length && $('.tur-sound-btn').hasClass('play')) { 209 $('.tur-sound-btn').next('audio').trigger('play'); 210 } 211 } 212 213 $(window).on('load', function () { 214 playSound(); 215 }); 216 217 $(window).on('load resize orientationchange', function () { 218 setTimeout(kenburnsHeight, 0); 219 }); 220 221 222})(jQuery, window, document); 223 224;(function ($, window, document, undefined) { 225 'use strict'; 226 227 if($('.modern-slider-wrap').length){ 228 $('.modern-slider').each(function () { 229 var time = $(this).attr('data-time') ? $(this).attr('data-time') : 6000; 230 $(this).kenBurning({ 231 time : time 232 }); 233 });
234 } 235 236})(jQuery, window, document);
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.