1var $ = jQuery.noConflict(); 2 3$(document).ready(function($) { 4 "use strict"; 5 6 //Preloader 7 /*$(window).load(function(){ 8 $('.preloader').fadeOut('slow',function(){$(this).remove();}); 9 });*/ 10 11 /*********************************************************/ 12 /* PRELOADER */ 13 /*********************************************************/ 14 // makes sure the whole site is loaded 15 $(window).load(function() { 16 // will first fade out the loading animation 17 $(".bubblingG").fadeOut(); 18 //then background color will fade out slowly 19 $(".spinner-wrapper").delay(200).fadeOut("slow"); 20 }); 21 22 //language Select 23 $('.language-dropdown').on('click', '.language-change a', function(ev) { 24 if ("#" === $(this).attr('href')) { 25 ev.preventDefault(); 26 var parent = $(this).parents('.language-dropdown'); 27 parent.find('.change-text').html($(this).html()); 28 } 29 }); 30 31 // Search 32 $('.fa-search').on('click', function() { 33 $('.field-toggle').slideToggle(200); 34 }); 35 36 // Slider Height 37 //var slideHeight = $(window).height(); 38 var slideHeight = 700; 39 $('#main-carousel .item').css('height',slideHeight); 40 41 $(window).resize(function(){'use strict', 42 $('#main-carousel .item').css('height',slideHeight); 43 }); 44 45 // re configures mail links 46 $('a[href^="mailto:"]').each(function() { 47 var mail = $(this).attr('href').replace('mailto:', ''), 48 replaced = mail.replace('/at/', '@'); 49 $(this).attr('href', 'mailto:' + replaced); 50 if ($(this).text() == mail) { 51 $(this).text(replaced); 52 } 53 }); 54 55 //Menu Toggle 56 function menuToggle() 57 { 58 var windowWidth = $(window).width(); 59 60 if(windowWidth > 767 ){ 61 $(window).on('scroll', function(){ 62 if( $(window).scrollTop()>405 ){ 63 $('.navbar').addClass('navbar-fixed-top animated fadeIn'); 64 $('.navbar').removeClass('main-nav'); 65 } else { 66 $('.navbar').removeClass('navbar-fixed-top'); 67 $('.navbar').addClass('main-nav'); 68 } 69 }); 70 }else{ 71 $('.navbar').addClass('navbar-fixed-top'); 72 $('.navbar').removeClass('main-nav'); 73 }; 74 if(windowWidth > 767 ){ 75 $(window).on('scroll', function(){ 76 if( $(window).scrollTop()>405 ){ 77 $('.top-bar').addClass('top-bar-hide'); 78 } else { 79 $('.top-bar').removeClass('top-bar-hide'); 80 } 81 }); 82 }else{ 83 $('.top-bar').addClass(this); 84 }; 85 86 } 87 88 menuToggle(); 89 90 //Menu Scrolling 91 $('.navbar-nav').onePageNav({ 92 currentClass: 'active', 93 filter: ':not(.exclude)', 94 }); 95 96 $('.navbar-nav li a, #featured a').on('click', function(){ 97 $('html, body').animate({scrollTop: $(this.hash).offset().top -40}, 500); 98 return false; 99 }); 100 101 //Scrolling 102 $('#tohash, #tohash1, #tohash2, #tohas3').on('click', function(){ 103 $('html, body').animate({scrollTop: $(this.hash).offset().top -75}, 1000); 104 return false; 105 }); 106 107 //Parallax Scrolling 108 $(window).bind('load', function () {
109 parallaxInit(); 110 }); 111 function parallaxInit() { 112 $("#video-section").parallax("50%", 0.3); 113 $("#donations").parallax("50%", 0.3); 114 $("#word-for-humanity").parallax("50%", 0.3); 115 } 116 parallaxInit(); 117 118 // Progress Bar 119 $.each($('div.progress-bar'),function(){ 120 $(this).css('width', $(this).attr('data-transition')+'%'); 121 }); 122 123 //Pretty Photo 124 $("a[data-gallery^='prettyPhoto']").prettyPhoto({ 125 social_tools: false 126 }); 127 128 129 130 //Event Carousel 131 $('#event-carousel.carousel').carousel({ 132 interval: 8000 133 }); 134 135 // Pagination 136 $('body').on('click','.jazz-search-results ul.pagination li a',function(e){ 137 e.preventDefault(); 138 var URL = $(this).attr('href'); 139 $("div.jazz-search-results").html('<h3 class="text-center mt60"><i class="fa fa-spinner fa-spin"></i> Searching for events...</h3>'); 140 $.post( URL, function(html) { 141 var response = $(html).find('div.webapp-search-results'); 142 $("div.jazz-search-results").html(response); 143 formatPagination(); 144 }); 145 $("html, body").animate({ scrollTop: 0 }, "slow"); 146 }); 147 148 function formatPagination(){ 149 $('.pag-number').remove(); 150 $('.pag-next a').text('next >'); 151 $('.pag-prev a').text('< prev'); 152 $('.pag-current').text('Page ' + $('.pag-current').text()); 153 } 154 155 $(document).ready(function () { 156 $(".navbar-nav li a").click(function(event) { 157 $(".navbar-collapse").collapse('hide'); 158 }); 159 160 // magnificPopup Photo 161 /*$('#gallery-item').magnificPopup({ 162 type: 'image', 163 gallery:{ 164 enabled:true 165 } 166 });*/ 167 $('.jazz-search-results, #photo-gallery .gallery-content').magnificPopup({ 168 delegate: 'a.gallery-item', // child items selector, by clicking on it popup will open 169 type: 'image', 170 gallery:{ 171 enabled:true 172 } 173 // other options 174 }); 175 }); 176 177 //style-chooser 178 var presets = $('.style-chooser ul li'); 179 180 $('.style-chooser .toggler').on('click', function(event){ 181 event.preventDefault(); 182 $(this).closest('.style-chooser').toggleClass('opened'); 183 }); 184 185 $('.style-chooser ul li a').on('click', function(event){ 186 event.preventDefault(); 187 presets.removeClass('active'); 188 $(this).parent().addClass('active'); 189 $('#css-preset').removeAttr('href').attr('href', 'css/presets/preset' + $(this).parent().data('preset') + '.css'); 190 }) 191 192 193}); 194 195/***************************************************************************/ 196/* NAVIGATION VISIBLE ON SCROLL */ 197/***************************************************************************/ 198/*$(document).ready(function () { 199 mainNav(); 200}); 201 202$(window).scroll(function () { 203 mainNav(); 204});*/ 205 206/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */ 207 208window.matchMedia || (window.matchMedia = function() { 209 "use strict"; 210 211 // For browsers that support matchMedium api such as IE 9 and webkit 212 var styleMedia = (window.styleMedia || window.media); 213 214 // For those that don't support matchMedium 215 if (!styleMedia) { 216 var style = document.createElement('style'), 217 script = document.getElementsByTagName('script')[0], 218 info = null; 219 220 style.type = 'text/css'; 221 style.id = 'matchmediajs-test'; 222 223 script.parentNode.insertBefore(style, script); 224 225 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 226 info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle; 227 228 styleMedia = { 229 matchMedium: function(media) { 230 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }'; 231 232 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 233 if (style.styleSheet) { 234 style.styleSheet.cssText = text; 235 } else { 236 style.textContent = text; 237 } 238 239 // Test if media query is true or false 240 return info.width === '1px'; 241 } 242 }; 243 } 244 245 return function(media) { 246 return { 247 matches: styleMedia.matchMedium(media || 'all'), 248 media: media || 'all'
249 }; 250 }; 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.