1jQuery(document).ready(function($){ 2 var at_window = $(window); 3 var at_body = $('body'); 4 function at_ticker() { 5 var ticker = $('.news-notice-content'), 6 ticker_first = ticker.children(':first'); 7 8 if( ticker_first.length ){ 9 setInterval(function() { 10 if ( !ticker_first.is(":hover") ){ 11 ticker_first.fadeOut(function() { 12 ticker_first.appendTo(ticker); 13 ticker_first = ticker.children(':first'); 14 ticker_first.fadeIn(); 15 }); 16 } 17 },3000); 18 } 19 } 20 21 at_ticker(); 22 23 function homeFullScreen() { 24 25 var homeSection = $('#at-banner-slider'); 26 var windowHeight = at_window.outerHeight(); 27 28 if (homeSection.hasClass('home-fullscreen')) { 29 30 $('.home-fullscreen').css('height', windowHeight); 31 } 32 } 33 //make slider full width 34 homeFullScreen(); 35 36 //window resize 37 at_window.resize(function () { 38 homeFullScreen(); 39 }); 40 41 at_window.on("load", function() { 42 //function goes here 43 }); 44 /*slick*/ 45 $('.acme-slick-carausel').each(function() { 46 var at_featured_img_slider = $(this); 47 48 var slidesToShow = parseInt(at_featured_img_slider.data('column')); 49 var slidesToScroll = parseInt(at_featured_img_slider.data('column')); 50 var prevArrow =at_featured_img_slider.closest('.widget').find('.at-action-wrapper > .prev'); 51 var nextArrow =at_featured_img_slider.closest('.widget').find('.at-action-wrapper > .next'); 52 at_featured_img_slider.css('visibility', 'visible').slick({ 53 slidesToShow: slidesToShow, 54 slidesToScroll: slidesToScroll, 55 autoplay: true, 56 adaptiveHeight: true, 57 cssEase: 'linear', 58 arrows: true, 59 prevArrow: prevArrow, 60 nextArrow: nextArrow, 61 responsive: [ 62 { 63 breakpoint: 768, 64 settings: { 65 slidesToShow: ( slidesToShow > 1 ? slidesToShow - 1 : slidesToShow ), 66 slidesToScroll: ( slidesToScroll > 1 ? slidesToScroll - 1 : slidesToScroll ) 67 } 68 }, 69 { 70 breakpoint: 480, 71 settings: { 72 slidesToShow: ( slidesToShow > 2 ? slidesToShow - 2 : slidesToShow ), 73 slidesToScroll: ( slidesToScroll > 2 ? slidesToScroll - 2 : slidesToScroll ) 74 } 75 } 76 ] 77 }); 78 }); 79 80 $('.featured-slider').show().slick({ 81 autoplay: true, 82 adaptiveHeight: true, 83 autoplaySpeed: 3000, 84 speed: 700, 85 cssEase: 'linear', 86 fade: true, 87 prevArrow: '<i class="prev fa fa-angle-left"></i>', 88 nextArrow: '<i class="next fa fa-angle-right"></i>' 89 }); 90 /*parallax scolling*/ 91 $('a[href*="\\#"]').click(function(event){ 92 var at_offset= $.attr(this, 'href'); 93 var id = at_offset.substring(1, at_offset.length); 94 if ( ! document.getElementById( id ) ) { 95 return; 96 } 97 if( $( at_offset ).offset() ){ 98 $('html, body').animate({ 99 scrollTop: $( at_offset ).offset().top-$('.at-navbar').height() 100 }, 1000); 101 } 102 103 }); 104 /*bootstrap sroolpy*/ 105 at_body.scrollspy({target: ".at-sticky", offset: $('.at-navbar').height()+50 } ); 106 107 /*featured slider*/ 108 $('.acme-gallery').each(function(){ 109 var $masonry_boxes = $(this); 110 var $container = $masonry_boxes.find('.fullwidth-row'); 111 $container.imagesLoaded( function(){ 112 $masonry_boxes.fadeIn( 'slow' ); 113 $container.masonry({ 114 itemSelector : '.at-gallery-item' 115 }); 116 }); 117 /*widget*/ 118 $masonry_boxes.find('.image-gallery-widget').magnificPopup({ 119 type: 'image', 120 closeBtnInside: false, 121 gallery: { 122 enabled: true 123 },
124 fixedContentPos: false 125 126 }); 127 $masonry_boxes.find('.single-image-widget').magnificPopup({ 128 type: 'image', 129 closeBtnInside: false, 130 fixedContentPos: false 131 }); 132 }); 133 134 /*widget slider*/ 135 $('.acme-widget-carausel').show().slick({ 136 autoplay: true, 137 autoplaySpeed: 3000, 138 speed: 700, 139 cssEase: 'linear', 140 fade: true, 141 prevArrow: '<i class="prev fa fa-angle-left"></i>', 142 nextArrow: '<i class="next fa fa-angle-right"></i>' 143 }); 144 145 function stickyMenu() { 146 147 var scrollTop = at_window.scrollTop(); 148 if ( scrollTop > 250 ) { 149 $('.event-star-sticky').addClass('at-sticky'); 150 $('.sm-up-container').show(); 151 } 152 else { 153 $('.event-star-sticky').removeClass('at-sticky'); 154 $('.sm-up-container').hide(); 155 } 156 } 157 //What happen on window scroll 158 stickyMenu(); 159 at_window.on("scroll", function (e) { 160 setTimeout(function () { 161 stickyMenu(); 162 }, 300) 163 }); 164 165 /*schedule tab*/ 166 function schedule_tab() { 167 // Runs when the image button is clicked. 168 at_body.on('click','.schedule-title a', function(e){ 169 var $this = $(this), 170 schedule_wrap = $this.closest('.at-schedule'), 171 schedule_tab_id = $this.data('id'), 172 schedule_title = schedule_wrap.find('.schedule-title'), 173 schedule_content_wrap = schedule_wrap.find('.schedule-item-content'); 174 175 schedule_title.removeClass('active'); 176 $this.parent().addClass('active'); 177 schedule_content_wrap.removeClass('active'); 178 179 schedule_content_wrap.each(function () { 180 if( $(this).data('id') === schedule_tab_id ){ 181 $(this).addClass('active') 182 } 183 }); 184 185 e.preventDefault(); 186 }); 187 } 188 function accordion() { 189 // Runs when the image button is clicked. 190 at_body.on('click','.accordion-title', function(e){ 191 var $this = $(this), 192 accordion_content = $this.closest('.accordion-content'), 193 accordion_item = $this.closest('.accordion-item'), 194 accordion_details = accordion_item.find('.accordion-details'), 195 accordion_all_items = accordion_content.find('.accordion-item'), 196 accordion_icon = accordion_content.find('.accordion-icon'); 197 198 accordion_icon.each(function () { 199 $(this).addClass('fa-plus'); 200 $(this).removeClass('fa-minus'); 201 }); 202 accordion_all_items.each(function () { 203 $(this).find('.accordion-details').slideUp(); 204 }); 205 206 if( accordion_details.is(":visible")){ 207 accordion_details.slideUp(); 208 $this.find('.accordion-icon').addClass('fa-plus'); 209 $this.find('.accordion-icon').removeClass('fa-minus'); 210 } 211 else{ 212 accordion_details.slideDown(); 213 $this.find('.accordion-icon').addClass('fa-minus'); 214 $this.find('.accordion-icon').removeClass('fa-plus'); 215 } 216 e.preventDefault(); 217 }); 218 } 219 function at_site_origin_grid() { 220 $('.panel-grid').each(function(){ 221 var count = $(this).children('.panel-grid-cell').length; 222 if( count < 1 ){ 223 count = $(this).children('.panel-grid').length; 224 } 225 if( count > 1 ){ 226 $(this).addClass('at-grid-full-width'); 227 } 228 }); 229 } 230 accordion(); 231 schedule_tab(); 232 at_site_origin_grid(); 233 234 function count_down() { 235 236 $('.feature-event').each(function () { 237 // Set the date we're counting down to 238 239 var at_this = $(this), 240 at_day = at_this.find('.day'), 241 at_hour = at_this.find('.hour'), 242 at_min = at_this.find('.min'), 243 at_sec = at_this.find('.sec'), 244 245 at_year_value = parseInt( at_this.data('year') ), 246 at_month_value = parseInt( at_this.data('month') ) -1, 247 at_day_value = parseInt( at_this.data('day') ), 248 at_hour_value = parseInt( at_this.data('hour') ), 249 at_minutes_value = parseInt( at_this.data('minutes') ), 250 countDownDate = new Date( at_year_value, at_month_value, at_day_value, at_hour_value, at_minutes_value, 0, 0 ).getTime(); 251 252 // Update the count down every 1 second 253 var x = setInterval(function() { 254 255 // Get todays date and time 256 var now = new Date().getTime(); 257 258 // Find the distance between now an the count down date 259 var distance = countDownDate - now; 260 261 // Time calculations for days, hours, minutes and seconds 262 var days = Math.floor(distance / (1000 * 60 * 60 * 24)); 263 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 264 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); 265 var seconds = Math.floor((distance % (1000 * 60)) / 1000); 266 267 // Display the result in the element with id="demo" 268 at_day.html( days ); 269 at_hour.html( hours ); 270 at_min.html( minutes ); 271 at_sec.html( seconds ); 272 // If the count down is finished, write some text 273 if (distance < 0) { 274 clearInterval(x); 275 at_this.html( event_star_ajax.event_expire_text ); 276 } 277 }, 1000); 278 }) 279 280 } 281 count_down(); 282}); 283 284/*animation with wow*/ 285if(typeof WOW !== 'undefined'){ 286 eb_wow = new WOW({ 287 boxClass: 'init-animate' 288 } 289 ); 290 eb_wow.init(); 291} 292 293/** 294 * Skip link focus fixed 295 */ 296( function() { 297 var isIe = /(trident|msie)/i.test( navigator.userAgent ); 298 299 if ( isIe && document.getElementById && window.addEventListener ) { 300 window.addEventListener( 301 'hashchange', 302 function() { 303 var id = location.hash.substring( 1 ), 304 element; 305 306 if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { 307 return; 308 } 309 310 element = document.getElementById( id ); 311 312 if ( element ) { 313 if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { 314 element.tabIndex = -1; 315 } 316 317 element.focus(); 318 } 319 }, 320 false 321 ); 322 } 323}() );
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.