PageSourceSearch

http://www.lasvegas2016.com/js/scripts.js

js lasvegas2016.com collected 2026-10-08 02:15:42 UTC 12,972 bytes, 451 lines download raw bytes

1var   window_height = $(window).height(),
2	  testMobile,
3	  loadingError = '<p class="error">The Content cannot be loaded.</p>',
4      current,
5	  next, 
6	  prev,
7	  target, 
8	  hash,
9	  url,
10	  page,
11	  title,	  	  	  
12	  projectIndex,
13	  scrollPostition,
14	  projectLength,
15	  ajaxLoading = false,
16	  wrapperHeight,
17	  pageRefresh = true,
18	  content =false,
19	  loader = $('div#loader'),
20	  easing = 'easeOutExpo';	
21	    
22	  $.browser.safari = ($.browser.webkit && !(/chrome/.test(navigator.userAgent.toLowerCase())));	 	
23	 
24	  	
25 
26	 if ( $.browser.safari ) {		  
27     $('#home-slider').flexslider({						
28			animation: "fade",
29			direction: "vertical", 
30			slideshow: true,
31			slideshowSpeed: 5000,
32			animationDuration: 700,
33			directionNav: false,
34			controlNav: false,
35			smootheHeight:true,						
36			useCSS: false
37				
38	 });		  
39     }	
40	 	 
41    
42	 if ( $.browser.safari ) {
43		  $('.flexslider').flexslider({						
44			animation: "fade",
45			direction: "horizontal", 
46			slideshow: true,
47			slideshowSpeed: 5000,
48			animationDuration: 500,
49			directionNav: false,
50			controlNav: false,						
51			useCSS: false
52		  });
53	 }
54	 
55	 if ( !$.browser.safari ) {
56		  $('.home-parallax, .home-gradient').find('.home-text-wrapper').children('.container').addClass('no-safari');
57	 }	 
58	 
59	  $(window).resize(function(){
60		  window_height = $(window).height();
61	  });
62	
63	// Scroll Page 1px on Load
64	$(window).load(function(){
65		var y = $(window).scrollTop();  //your current y position on the page
66		$(window).scrollTop(y-1);	
67	});
68
69	var init = function() {	
70	$('nav').animate({'opacity': '1'}, 0);	   
71	 
72/*----------------------------------------------------*/
73/* FULLSCREEN IMAGE HEIGHT
74/*----------------------------------------------------*/	     
75	
76	  function fullscreenImgHeight(){
77
78		  $('#home').css({height:window_height});
79/*		  var headerH = $('nav').outerHeight();
80          $("#home").css('marginBottom',-headerH);*/
81		  
82	  }
83		  
84	  fullscreenImgHeight();
85		  
86		  
87		  	
88	  $(window).resize(function() {
89			$('#home').css({height:$(window).height()});
90		}); 
91	  
92};	
93
94
95/*----------------------------------------------------*/
96/* HOME PARALLAX
97/*----------------------------------------------------*/
98function home_parallax() {
99	        $(window).scroll(function() {
100	            var yPos = -($(window).scrollTop() / 0.7); 
101	             
102	            // Put together our final background position
103	            var coords = '100% '+ yPos + 'px';
104	 
105	            // Move the background
106	            //$('.page-title-wrapper').css({ backgroundPosition: coords });
107	            //$('.home-parallax').css({ backgroundPosition: coords });
108	        
109	        }); 
110}
111
112 home_parallax(); 
113
114
115/*----------------------------------------------------*/
116/* MOBILE DETECT FUNCTION
117/*----------------------------------------------------*/
118
119	var isMobile = {
120        Android: function() {
121            return navigator.userAgent.match(/Android/i);
122        },
123        BlackBerry: function() {
124            return navigator.userAgent.match(/BlackBerry/i);
125        },
126        iOS: function() {
127            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
128        },
129        Opera: function() {
130            return navigator.userAgent.match(/Opera Mini/i);
131        },
132        Windows: function() {
133            return navigator.userAgent.match(/IEMobile/i);
134        },
135        any: function() {
136            return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
137        }
138    };	  
139	  	
140//BEGIN DOCUMENT.READY FUNCTION
141$(document).ready(function() 
142{ 
143  init(); 
144
145/*----------------------------------------------------*/
146// PRELOADER CALLING
147/*----------------------------------------------------*/    
148 if ( !$.browser.msie ) { 
149    $("body.onepage").queryLoader2({
150        barColor: "#FFB454",
151        backgroundColor: "#ffffff",
152        percentage: true,
153        barHeight: 3,
154        completeAnimation: "fade",
155        deepSearch : true,
156    });  
157 }
158
159/*----------------------------------------------------*/
160// MENU SMOOTH SCROLLING
161/*----------------------------------------------------*/  
162/*$('#nav').onePageNav({
163	scrollOffset: 30,
164	currentClass: 'active',
165});	*/
166	  
167/*----------------------------------------------------*/
168// PARALLAX CALLING
169/*----------------------------------------------------*/  
170  	testMobile = isMobile.any();
171	
172	if (testMobile == null)
173	{
174		//$('.parallax .bg1').parallax("50%", 0.1);
175		//$('.parallax .bg2').parallax("50%", 0.1);
176		//$('.parallax .bg3').parallax("50%", 0.1);	
177		//$('.parallax .bg4').parallax("50%", 0.1);
178		
179		$(window).bind('load', function () {
180			parallaxInit();						  
181		});
182		
183			function parallaxInit() {
184				$('#parallax1').parallax("50%", 0.3);
185				$('#parallax2').parallax("50%", 0.3);
186				/*add as necessary*/
187			}	
188				
189	} 
190  
191});
192//END DOCUMENT.READY FUNCTION
193
194
195// BEGIN WINDOW.LOAD FUNCTION		
196$(window).load(function(){
197	
198	$('#load').fadeOut().remove();
199	$(window).trigger( 'hashchange' );
200	$(window).trigger( 'resize' );
201 
202/* ------------------------------------------------------------------------ */
203/* FLEX SLIDER */
204/* ------------------------------------------------------------------------ */    
205	$('.flexslider').flexslider({						
206			animation: "fade",
207			direction: "horizontal", 
208			slideshow: true,
209			slideshowSpeed: 5000,
210			animationDuration: 700,
211			directionNav: false,
212			controlNav: false
213				
214	 });
215 
216/* ------------------------------------------------------------------------ */
217/* STICKY NAVIGATION */
218/* ------------------------------------------------------------------------ */  
219	$(document).scroll(function() {
220	  if ($(document).scrollTop() >= 60) {
221		$('nav').removeClass('bottomFix');
222	  } else {
223		$('nav').addClass('bottomFix');
224	  }
225	});
226	$(document).scroll(function(){
227		if ($(this).scrollTop() >= window_height) {
228		   $('.logo.large').addClass('top');
229		}
230		if ($(this).scrollTop() == 0) {
231		   $('.logo.large').removeClass('top');
232		}
233	});
234	
235	if ($(window).width() > 1200) {	
236		$("nav").sticky({ topSpacing: 0, className: 'sticky', wrapperClassName: 'main-menu-wrapper' });
237	}
238	
239	// Mobile Navigation
240	$(document).ready(function() {
241		// Add Class if Less than 960
242		if ($(window).width() < 1200) {
243			$('nav').removeClass('bottomFix');
244			$('nav').addClass('topFix');
245			$('.logo.large').addClass('top');
246			$('.logo.large').removeClass('bottom');
247			$('#mobileNavLink').css('display', 'block');
248			$('#topNavigation .main-menu').addClass('mobileNav');
249		} else {
250			$('nav').addClass('bottomFix');
251			$('nav').removeClass('topFix');
252			$('.logo.large').removeClass('top');
253			$('.logo.large').addClass('bottom');
254			$('#mobileNavLink').css('display', 'none');
255			$('#topNavigation .main-menu').removeClass('mobileNav');
256		}
257		// Add Class when resized
258		$(window).on('resize', function() {
259				if ($(window).width() < 1200) {
260					$('nav').removeClass('bottomFix');
261					$('nav').addClass('topFix');
262					$('.logo.large').addClass('top');
263					$('.logo.large').removeClass('bottom');
264					$('#mobileNavLink').css('display', 'block');
265					$('#topNavigation .main-menu').addClass('mobileNav');
266				} else {
267					$('nav').addClass('bottomFix');
268					$('nav').removeClass('topFix');
269					$('.logo.large').removeClass('top');
270					$('.logo.large').addClass('bottom');
271					$('#mobileNavLink').css('display', 'none');
272					$('#topNavigation .main-menu').removeClass('mobileNav');
273				}
274		});
275		$('#mobileNavLink').click(function(){
276			$(this).toggleClass('active');
277			$('.mobileNav').slideToggle(250);
278		});
279	});
280
281
282/* ------------------------------------------------------------------------ */
283/* MOBILE SIGNUP FORM */
284/* ------------------------------------------------------------------------ */ 
285	$(document).ready(function() {
286		// Add Class if Less than 960
287		if ($(window).width() < 600) {
288			$('#mobileSignUp').css('display', 'block');
289			$('.navForm').addClass('mobileForm');
290		} else {
291			$('#mobileSignUp').css('display', 'none');
292			$('.navForm').removeClass('mobileForm');
293		}
294		// Add Class when resized
295		$(window).on('resize', function() {
296				if ($(window).width() < 600) {
297					$('#mobileSignUp').css('display', 'block');
298					$('.navForm').addClass('mobileForm');
299				} else {
300					$('#mobileSignUp').css('display', 'none');
301					$('.navForm').removeClass('mobileForm');
302				}
303		});
304		$('#mobileSignUp').click(function(){
305			$(this).toggleClass('active');
306			$('.mobileForm').slideToggle(250);
307		});
308	});
309});
310
311// Smooth Scroll All Anchor Links
312$(function() {
313  $('a[href*=#]:not([href=#])').click(function() {
314    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
315      var target = $(this.hash);
316      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
317      if (target.length) {
318        $('html,body').animate({
319          scrollTop: target.offset().top
320        }, 500);
321        return false;
322      }
323    }
324  });
325});
326
327// END OF WINDOW.LOAD FUNCTION
328 $('#home-slider.flexslider').flexslider({						
329		animation: "fade",
330		direction: "horizontal", 
331		slideshow: true,
332		slideshowSpeed: 5000,
333		animationDuration: 700,
334		directionNav: false,
335		controlNav: false,
336		smootheHeight:true,
337		after: function(slider) {
338		  slider.removeClass('loading');
339		}
340			
341 });
342 
343 
344 
345 
346 (function($) {
347    $.fn.countTo = function(options) {
348        // merge the default plugin settings with the custom options
349        options = $.extend({}, $.fn.countTo.defaults, options || {});
350
351        // how many times to update the value, and how much to increment the value on each update
352        var loops = Math.ceil(options.speed / options.refreshInterval),
353            increment = (options.to - options.from) / loops;
354
355        return $(this).delay(1000).each(function() {
356            var _this = this,
357                loopCount = 0,
358                value = options.from,
359                interval = setInterval(updateTimer, options.refreshInterval);
360
361            function updateTimer() {
362                value += increment;
363                loopCount++;
364                $(_this).html(value.toFixed(options.decimals));
365
366                if (typeof(options.onUpdate) == 'function') {
367                    options.onUpdate.call(_this, value);
368                }
369
370                if (loopCount >= loops) {
371                    clearInterval(interval);
372                    value = options.to;
373
374                    if (typeof(options.onComplete) == 'function') {
375                        options.onComplete.call(_this, value);
376                    }
377                }
378            }
379        });
380    };
381
382    $.fn.countTo.defaults = {
383        from: 0,  // the number the element should start at
384        to: 100,  // the number the element should end at
385        speed: 1000,  // how long it should take to count between the target numbers
386        refreshInterval: 100,  // how often the element should be updated
387        decimals: 0,  // the number of decimal places to show
388        onUpdate: null,  // callback method for every time the element is updated,
389        onComplete: null,  // callback method for when the element finishes updating
390    };
391})(jQuery);
392
393// Check if the Module is in ViewPort
394(function($) {
395  $.fn.visible = function(partial) {
396    
397      var $t            = $(this),
398          $w            = $(window),
399          viewTop       = $w.scrollTop(),
400          viewBottom    = viewTop + $w.height(),
401          _top          = $t.offset().top,
402          _bottom       = _top + $t.height(),
403          compareTop    = partial === true ? _bottom : _top,
404          compareBottom = partial === true ? _top : _bottom;    
405    return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
406  };
407})(jQuery);
408
409// Add Animation Classes
410jQuery(window).scroll(function(event) {
411    // Convention Title
412	if (jQuery('#convention .container .title h1').visible(true)) {
413      jQuery('#convention .container .title h1').addClass('slideInLeft animated'); 
414    } 
415	// Convention Text
416	if (jQuery('#convention .container .title .subtitle').visible(true)) {
417      $('#convention .container .title .subtitle').addClass('slideInLeft animated'); 
418    } 
419	
420	// Convention Arrow
421	if ($('#conventionArrow').visible(true)) {
422      $('#conventionArrow').addClass('come-in animated'); 
423    } 
424	
425	// Accomodations Title
426	if ($('.rightOverlay .title h2').visible(true)) {	
427      $('.rightOverlay .title h2').addClass('slideInRight animated'); 
428    }
429	
430	// Accomodations Text
431	if ($('.rightOverlay .title .subtitle').visible(true)) {
432      $('.rightOverlay .title .subtitle').addClass('slideInRight animated'); 
433    } 
434	
435	// Data Services Text
436	if ($('#data .container .title h2').visible(true)) {
437      $('#data .container .title h2').addClass('fadeInDown animated'); 
438    } 
439	
440  
441  // Data Sections
442  $("#dataBox .col").each(function(i, el) {
443    var el = $(el);
444    if (el.visible(true)) {
445      el.addClass('slideInRight animated'); 
446    } 
447  });
448  
449  
450  
451});

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.