PageSourceSearch

https://autotrackerng.com/wp-content/themes/besmart/js/main.js

js autotrackerng.com collected 2026-10-06 20:54:03 UTC 36,366 bytes, 1,118 lines download raw bytes

1/* global jQuery:false, window, Modernizr */
2
3(function($) {
4    "use strict";
5
6	$(window).load(function(){
7		// Initialize after images are loaded
8		var wrap              = $('body'),
9			wt_loader         = wrap.hasClass('wt_loader');
10		
11		if (wt_loader) {
12			$(".wt_loader_html").delay(200).fadeOut();
13			$("#wt_loader").delay(500).fadeOut("slow");
14		}			
15		
16		wt_functions_call_on_load();		
17		
18	});
19	
20	$(document).ready(function() {
21		var win = $(window);
22				
23		wt_functions_call();
24		
25		// activates the nice scrolll function
26		var $niceScroll = $('body').attr('data-nice-scrolling');
27		if ( $niceScroll == 1 && win.width() > 690 ){ niceScrollInit(); }
28		
29		$("#wt_wrapper").fitVids();
30				
31		$('.no_link').click(function(){
32			return false;		
33		});
34		
35		$('.wt_search_form').each(function(){
36			this.reset();
37		});
38									
39		if ($.fn.elastic) { $('#commentform textarea, .wt_contact_form textarea').elastic(); }
40				
41		if ($.fn.mb_YTPlayer) { 
42		 var onMobile = false;
43		 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { onMobile = true; }
44		 if( ( onMobile === false ) ) {
45			$(".wt_youtube_player").mb_YTPlayer();
46			$('.wt_bg_video_mobile').hide();
47		  } else {
48			/* hide player and video volume button */
49			$(".wt_youtube_player").hide();
50			$(".video-volume").hide();
51		  }
52		}
53																			
54		html5_video();	
55		wt_scroll_top();	
56		
57	});	
58	
59	/* ----- Scrolling Effect ----- */
60	$(window).scroll(function(container) {
61		if(typeof container === 'undefined') {
62			container = 'body';
63		}
64		var wrapp = $(container);
65		
66		if($.fn.wt_scroll_effect)
67		wrapp.wt_scroll_effect();
68		
69		var b = $(window).scrollTop();
70		
71		if( b > 0 ){		
72			$("#wt_header").addClass("scroll-fixed-navbar");	
73		} else {
74			$("#wt_header").removeClass("scroll-fixed-navbar");
75		}
76		
77	});
78		
79	function wt_functions_call_on_load(container) {
80		if(typeof container == 'undefined'){ container = 'body';}
81		var wrapp = $(container);	
82		
83		// admin bar sticky header
84		if($.fn.wt_wp_admin_bar)	
85		wrapp.wt_wp_admin_bar();	
86	}
87	
88	function wt_functions_call(container){
89		if(typeof container == 'undefined'){ container = 'body';}
90		var wrapp = $(container);
91				
92		// adding mobile class on smaller screens
93		if($.fn.is_smallerScreen)
94		wrapp.is_smallerScreen();	
95		
96		// Hiding your email addresses from spam harvesters
97		if($.fn.mailto)
98		$('.nospam').mailto();	
99				
100		// navigation
101		if($.fn.wt_navigation)
102		wrapp.wt_navigation(); // used for normal navigation
103		
104		if($.fn.wt_one_page_nav)
105		wrapp.wt_one_page_nav(); // used for one page navigation			
106		
107		// responsive navigation
108		if($.fn.wt_responsive_nav)
109		wrapp.wt_responsive_nav();	
110			
111		// add 'firstItem' / 'lastItem' classes to menus
112		if($.fn.wt_menu)
113		$("#nav ul, .widget_nav_menu ul", container).wt_menu();
114		
115		// add markers and classes to parent lists
116		if($.fn.wt_menu_markers)	
117		$("#nav li:has(ul.sub-menu), .widget_subnav li:has(ul)", container).wt_menu_markers();		
118		
119		// fullscreen slider
120		if($.fn.wt_fullscreen_slider)
121		$(".wt_fullscreen_slider", container).wt_fullscreen_slider();
122												
123		// side navigation effect
124		if($.fn.wt_side_nav)	
125		$(".wt_side-nav li", container).wt_side_nav();		
126		
127		// parallax effect
128		if($.fn.wt_parallax)
129		wrapp.wt_parallax();
130		
131		// prettyPhoto lightbox
132		if($.fn.wt_lightbox)	
133		wrapp.wt_lightbox();		
134		
135		// google maps
136		if($.fn.wt_sc_googleMaps)
137		$('.wt_g_map', container).wt_sc_googleMaps();							
138		
139	}	
140	
141	/* ----- Check If Exists ----- */
142	$.fn.exists = function () {
143		return this.length !== 0;
144	}; // Usage: $("#notAnElement").exists();
145	
146	/* Navigation
147	   --------------------------------------------------------- */	
148	   
149	(function($) {
150		$.fn.wt_navigation = function() {
151			var menu        = $('#nav.wt_nav_top > ul'),
152				nav_side    = $('#nav.wt_nav_side > ul');
153				//first_level_items = menu.eq(0).find('>li a');
154				
155			menu.nav({
156				child: {
157					beforeFirstRender: function() {
158					}
159				},
160				root: {
161					effect: 'fade',
162					beforeHoverIn: function() {
163					},
164					beforeHoverOut: function() {
165					},					
166					afterHoverIn: function() {
167						$(this).trigger('wt_menuopen');
168					},					
169					afterHoverOut: function() {
170						$(this).trigger('wt_menuclose');
171					},
172				}
173			});
174			
175			// Side Navigation
176			nav_side.append('<a href="#" class="nav-button"><span>Menu</span></a><div class="nav-overlay"></div>');
177			$('.nav-button').on('touchstart click', function(e){
178				e.stopPropagation();
179				e.preventDefault();
180				if ( nav_side.hasClass('open') ) {
181					nav_side.removeClass('open');
182				} else {
183					nav_side.addClass('open');
184					$('.nav-overlay').on('touchstart click', function(){
185						nav_side.removeClass('open');
186					});
187				}
188			});
189			// End Slide Navigation Menu
190						
191		};
192	})(jQuery);
193	
194	/* One Page Navigation
195	   --------------------------------------------------------- */	
196	   
197	(function($) {
198		$.fn.wt_one_page_nav = function() {
199			var stickyH = $("#wt_wrapper").is('.wt_stickyHeader');
200			/* --- One page navigation --- */
201			$('#nav ul a[href*="#"], .wt_scroll').click(function() {
202				if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
203					var $target = $(this.hash); // Check the section area id
204					$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
205					if ($target.length) {
206						var targetOffset = $target.offset().top; // the top of the section area
207						if (stickyH) {
208							$('html,body').animate({
209								scrollTop : targetOffset - $('.wt_nav_top #wt_header').outerHeight() // adding sticky header height
210							}, 1100, 'easeInOutExpo');
211						} else {
212							$('html,body').animate({
213								scrollTop : targetOffset
214							}, 1100, 'easeInOutExpo');
215						}
216						return false;
217					}
218				}
219			});
220			
221			/* --- Highlight menu links when scrolling --- */
222			$(document).scroll(function() {
223				var pos = $(this).scrollTop();
224				$(".wt_section_area").each(function() {
225					var id_slide          = $(this).attr("id"),
226						element_menu      = $('#nav ul li a[href$="#' + id_slide + '"]:first'),						
227						resp_element_menu = $('#wt-responsive-nav li a[href$="#' + id_slide + '"]:first');
228						
229					if ($(this).offset().top <= pos + $('.wt_nav_top #wt_header').outerHeight() + 1 && element_menu.length > 0) {
230						$("#nav ul li").removeClass("current_page_item");
231						element_menu.parent().addClass("current_page_item");
232						
233						$("#wt-responsive-nav li").removeClass("current_page_item");
234						resp_element_menu.parent().addClass("current_page_item");
235					}
236				});
237			});
238		};
239		
240	})(jQuery);
241	
242	/* Responsive Navigation
243	   --------------------------------------------------------- */	
244	   
245	(function($) {
246		$.fn.wt_responsive_nav = function() {
247			var win = $(window), header = $('.responsive #wt_header');
248	
249			if(!header.length) {
250				return;
251			}
252	
253			var menu              = header.find('#nav ul:eq(0)'),
254				first_level_items = menu.find('>li').length,
255				switchWidth;
256			
257			if ( header.hasClass('wt_resp_nav_under_991') ) { 
258				switchWidth = 975;
259			} else if ( header.hasClass('wt_resp_nav_under_767') ) {
260				switchWidth = 751;
261			} else {
262				switchWidth = 751;
263			}
264	
265			if(first_level_items > 8) {
266				switchWidth = 975;
267			}
268			// if there is no menu selected
269			if(header.is('.drop_down_nav')) {
270				menu.mobileMenu({
271					switchWidth: switchWidth,
272					topOptionText: $('#nav').data('select-name'), // first option text
273					indentString: 'ontouchstart' in document.documentElement ? '- ' : "&nbsp;&nbsp;&nbsp;"  // string for indenting nested items
274				});
275			} else {
276				var container           = $('#wt_wrapper'),
277					header_wrapper      = container.find('#wt_headerWrapper'),
278					responsive_nav_wrap	= $('<div id="wt_responsive_nav_wrap"><div class="container"><div class="row"></div></div></div>'),
279					responsiveNavWrap	= responsive_nav_wrap.find('.row'),
280					show_menu		    = $('<a id="responsive_nav_open" href="#" class=""><i class="entypo-menu"></i></a>'),
281					show_menu_icon  	= show_menu.find('i'),
282					
283					stickyH             = container.is('.wt_stickyHeader'),
284					no_stickyH_onSS     = container.is('.wt_noSticky_on_ss'),
285					nav_side            = container.is('.wt_nav_side'),
286					
287					responsive_nav      = menu.clone().attr({id:"wt-responsive-nav", "class":""}),
288					menu_added          = false;
289									
290					responsive_nav.find('ul').removeAttr("style");
291					responsive_nav.find('.notMobile').remove();
292					
293					if (stickyH && !no_stickyH_onSS) {
294						header.append(responsive_nav_wrap);
295					} else {
296						responsive_nav_wrap.insertAfter(header_wrapper);
297					}	
298						
299					// hiding all sub-menus		
300					responsive_nav.find('li').each(function(){
301						var el = $(this);
302						if(el.find('> ul').length > 0) {
303                             el.find('> a').append('<i class="wt_has_child fa-angle-down"></i>');
304						}
305					});
306	
307					responsive_nav.find('li:has(">ul") > a > i.wt_has_child').click(function(){
308						var el        = $(this),     // the right angle icon
309							el_link   = el.parent(), // the link <a> which wrap the icon
310							el_parent = el_link.parent().find('> ul');						
311							
312						el_link.toggleClass('active');
313						el_parent.stop(true,true).slideToggle();
314						
315						if ( el_link.hasClass('active') ) {
316							el.removeClass('fa-angle-down').addClass('fa-angle-up');
317						} else {
318							el.removeClass('fa-angle-up').addClass('fa-angle-down');							
319						}
320						
321						return false;
322					});
323					// end hiding all sub-menus						
324										
325					show_menu.click(function(){		
326						if(container.is('.show_responsive_nav')) {
327							container.removeClass('show_responsive_nav');
328							show_menu_icon.removeClass('entypo-cancel-circled').addClass('entypo-menu');
329						} else {
330							container.addClass('show_responsive_nav');
331							show_menu_icon.removeClass('entypo-menu').addClass('entypo-cancel-circled');
332						}
333						
334						responsive_nav_wrap.stop(true,true).slideToggle(500);
335						return false;
336					});					
337					
338					// start responsive one page navigation	
339					
340					var $resp_menu_items = responsive_nav.find('a[class^="level-"]'),
341						respNav;
342					
343					if( $resp_menu_items.length ) {
344						respNav = function initRespNav( respMenuItems ) {
345							respMenuItems.each(function() {
346								var $this         = $(this),
347									isOnePageItem = $this.attr('href').match("^#") ? true : false;
348									
349								// if responsive navigation is opened and the link from menu is not external
350								if (isOnePageItem) {
351									$this.click(function() {	
352										if (container.is('.show_responsive_nav')) {
353											// Hiding the responsive navigation
354											container.removeClass('show_responsive_nav');
355											show_menu_icon.removeClass('entypo-cancel-circled').addClass('entypo-menu');
356											responsive_nav_wrap.stop(true,true).slideToggle(500);
357											// End hiding the responsive navigation
358											
359											if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
360												var $target = $(this.hash); // Check the section area id
361												$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
362												if ($target.length) {
363													
364													var targetOffset = $target.offset().top; // the top of the section area
365													
366													if (nav_side && stickyH && !no_stickyH_onSS) {
367														$('html,body').animate({ // adding sticky header height
368															scrollTop : targetOffset - $('.wt_nav_side #wt_header').outerHeight() + responsive_nav_wrap.height()
369														}, 1100, 'easeInOutExpo');
370													} else if (stickyH && !no_stickyH_onSS) {
371														$('html,body').animate({ // adding sticky header height
372															scrollTop : targetOffset - $('.wt_nav_top #wt_header').outerHeight() + responsive_nav_wrap.height()
373														}, 1100, 'easeInOutExpo');
374													} else {
375														$('html,body').animate({ // adding responsive menu relative height
376															scrollTop : targetOffset - responsive_nav_wrap.height()
377														}, 1100, 'easeInOutExpo');
378													}
379																								
380													return false; // doesn't show the "#id_section_name" in the url
381												}
382											}		
383																				
384										}
385									});	
386								}
387							});
388						};
389						respNav( $resp_menu_items );				
390					}
391					// end responsive one page navigation	
392						
393					var set_visibility = function() {
394						if(win.width() >= switchWidth) {
395							responsive_nav_wrap.css("display","none");
396							show_menu.css("display","none");
397							show_menu_icon.removeClass('entypo-cancel-circled').addClass('entypo-menu');							
398							header.removeClass('small_device_active');
399							container.removeClass('show_responsive_nav');
400							if (stickyH && no_stickyH_onSS) {
401								container.removeClass('wt_noSticky_on_ss');
402							}
403						} else {
404							header.addClass('small_device_active');
405							show_menu.css("display","block");
406							if(!menu_added) {
407								var before_menu = header.find('#nav');
408								show_menu.insertBefore(before_menu);
409								responsive_nav.prependTo(responsiveNavWrap);
410								menu_added = true;							
411								
412								// init google maps after menu was cloned								
413								if(menu_added && $('#wt-responsive-nav .wt_g_map').length && $.fn.wt_sc_googleMaps) {
414									$('.wt_g_map', $('#wt-responsive-nav')).wt_sc_googleMaps();
415									// console.log('responsive menu contains maps');
416								}								
417							}							
418							if (stickyH && no_stickyH_onSS) {
419								container.addClass('wt_noSticky_on_ss');
420							}	
421						}
422					};
423	
424					win.on("smartresize", set_visibility);
425					set_visibility();
426			}	
427		};
428			 
429	})(jQuery);
430		
431	/* Add 'firstItem' / 'lastItem' Classes To Menu Lists
432	   --------------------------------------------------------- */	
433	   
434	(function($) {
435		$.fn.wt_menu = function() {
436			$(this).each(function(){
437				$(this).find('li:first-child').addClass('firstItem');
438				$(this).find('li:last-child').addClass('lastItem');
439			});
440			$(this).contents("a").removeAttr('title');	
441		};
442	})(jQuery);
443		
444	/* Add Markers & Classes To Parent Lists
445	   --------------------------------------------------------- */	
446	   
447	(function($) {
448		$.fn.wt_menu_markers = function() {
449			$(this).each(function(){
450				var $isMegaMenu = $(this).parents('.wt_megamenu:first'),
451					$isSideNav  = $(this).parents('.wt_side-nav:first');
452				$(this).addClass("hasChild");
453				if (!$isMegaMenu.length && !$isSideNav.length ) {
454					$(this).find("> a").append('<span class="marker">+</span>');
455				}
456			});
457			$(".widget_subnav li:has(ul)").find(">:eq(1)").prepend('<span class="marker">+</span>');
458		};
459	})(jQuery);	
460		
461	/* Side Navigation Effects For Menu Widget
462	   --------------------------------------------------------- */	
463	   
464	(function($) {
465		$.fn.wt_side_nav = function() {
466			$(this).each(function(){
467				$(this).hoverIntent({
468					over: function() {
469						if($(this).find('> .children').length >= 1) {
470							$(this).find('> .children').stop(true, true).slideDown('slow');
471						}
472					},
473					out: function() {
474						if(!$(this).find('.current_page_item').length) {
475							$(this).find('.children').stop(true, true).slideUp('slow');
476						}
477					},
478					timeout: 500
479				});
480			});	
481		};
482	})(jQuery);	
483	
484	/* Admin bar sticky header
485	================================================== */	
486	(function($) {
487		$.fn.wt_wp_admin_bar = function() {
488			var win           = $(window),
489				isSticky      = $('.wt_stickyHeader'),
490				header        = isSticky.find('#wt_header'),		
491				sticky_header = function() {
492					if (jQuery('#wpadminbar').length > 0 && win.width() >= 783) {
493						header.css({'top' : 28 });
494					}else if (jQuery('#wpadminbar').length > 0 && win.width() < 783) {
495						header.css({'top' : 46 });
496						jQuery('#wpadminbar').css({'position' : 'fixed' });
497					}else {
498						header.css({'top' : 0 });}
499				};			
500			
501			if (isSticky.length) {
502				isSticky.imagesLoaded(function() {			
503					sticky_header();
504					win.smartresize(function(){
505						sticky_header();
506					});
507				});
508				
509			}
510											
511		};
512	})(jQuery);
513
514	
515	/* Parallax
516	   --------------------------------------------------------- */	
517	   
518	(function($) {
519		$.fn.wt_parallax = function() {	
520			var testMobile,
521				is_mobile = new IsMobile();
522				
523			$(window).bind('load', function () {
524				parallaxInit();
525			});
526			//parallaxInit();	
527			
528			function parallaxInit() {
529				testMobile = is_mobile.any();
530				if (testMobile === null) {					
531					$('.wt_parallax').each(function(){	
532						$(this).parallax("50%", "0.5");	
533					});
534				}
535			}
536		};
537	})(jQuery);
538		
539	/* Scrolling Effect
540	   --------------------------------------------------------- */	
541	   
542	(function($) {
543		$.fn.wt_scroll_effect = function() {
544			var win              = $(window),
545				win_height       = $(window).height(),
546				wt_scroll        = win.scrollTop(),
547				container        = $('#home'),
548				container_height = container.outerHeight(),
549				separator        = $('.wt_separator'),
550				el               = separator.find('.quotes_box'),
551				scroll_effect    = function() {			
552					if (win.width() > 767 ) {
553						container.find('.home_box').css({'opacity' : 1 - (wt_scroll / container_height)});
554						el.each(function(){
555							var $this           = $(this),		
556								el_height       = $this.outerHeight(),
557								el_offset       = $this.offset().top;
558													
559							$this.css({'opacity' : 1 - ( (wt_scroll+win_height-el_offset) / (el_offset+el_height) ) });
560						});
561					} else {
562						container.find('.home_box').css({'opacity' : 1 });
563						el.css({'opacity' : 1 });
564					}
565				};
566				win.on("smartresize", scroll_effect);
567				scroll_effect();
568		};
569	})(jQuery);
570		
571	/* Adding Mobile ( "is_smallScreen" ) Class
572	   --------------------------------------------------------- */	
573	   
574	(function($) {
575		$.fn.is_smallerScreen = function() {
576			var win               = $(window),
577				container         = $('html'),
578				isResponsiveMode  = container.hasClass('responsive'),	
579				check_screen      = function() {
580					
581					if( win.width() < 975 && isResponsiveMode ){
582						container.addClass('is_smallScreen');
583					} else {
584						container.removeClass('is_smallScreen');
585					}
586				};
587				win.on("smartresize", check_screen);
588				check_screen();
589		};
590	})(jQuery);
591	
592	/* Detects Mobiles
593	   --------------------------------------------------------- */	
594	   
595	function IsMobile(options) {
596		var isMobile = {
597			Android: function() {
598				return navigator.userAgent.match(/Android/i);
599			},
600			BlackBerry: function() {
601				return navigator.userAgent.match(/BlackBerry/i);
602			},
603			iOS: function() {
604				return navigator.userAgent.match(/iPhone|iPad|iPod/i);
605			},
606			Opera: function() {
607				return navigator.userAgent.match(/Opera Mini/i);
608			},
609			Windows: function() {
610				return navigator.userAgent.match(/IEMobile/i);
611			},
612			any: function() {
613				return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
614			}
615		};
616		options = $.extend(isMobile, options);
617		return options;
618	}
619		
620	/* Hiding Your Email Addresses From Spam Harvesters
621	   --------------------------------------------------------- */	
622	   
623	$.fn.mailto = function() {
624		return this.each(function(){
625			var email = $(this).html().replace(/\s*\(.+\)\s*/, "@");
626			$(this).before('<a href="mailto:' + email + '" rel="nofollow" title="Email ' + email + '">' + email + '</a>').remove();
627		});
628	};
629	
630	/* Fade Custom Elements
631	   --------------------------------------------------------- */	
632	   	
633	$.fn.fadeElement = function() {
634		return this.each(function(){			
635			$(this).animate({opacity:0.7},"fast");
636			$(this).hover(function(){
637				$(this).animate({opacity:1.0},"fast");
638				},function(){
639				$(this).animate({opacity:0.7},"fast");
640			});			
641		});
642	};				
643		
644	/* PrettyPhoto Lightbox
645	   --------------------------------------------------------- */	
646	   
647	(function($) {
648		$.fn.wt_lightbox = function() {
649			$('a[data-rel]').each(function() {                
650				$(this).attr('rel', $(this).data('rel'));             
651			});
652			
653			var win       = $(window),				
654				lightbox  = function($attributes) {				
655					$($attributes).prettyPhoto({
656						"theme": 'pp_default' /* light_square / light_rounded / dark_square / dark_rounded / facebook */ ,
657						"deeplinking": false,
658						"social_tools": false																
659					});
660				};				
661			
662			lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox'], a[rel^='wt_lightbox']");
663			win.on( "smartresize", lightbox("a[rel^='prettyPhoto'], a[rel^='lightbox'], a[rel^='wt_lightbox']") );									
664		};
665	})(jQuery);	
666	
667	/* Scrolling To Top
668	   --------------------------------------------------------- */	
669	   
670	function wt_scroll_top(){
671			
672		if ($('body').is('.wt-top')) {
673			$('body').append('<a href="#top" id="wt-top"><i class="fa-angle-up"></i></a>');
674		}
675		
676		var win           = $(window),
677        	scroll_top    = $('#wt-top'),
678			
679        	set_status    = function() {
680				var wt_st = win.scrollTop();
681				
682				if(wt_st < 200) {
683					scroll_top.removeClass('wt_top_btn');
684				} else if (!scroll_top.is('.wt_top_btn')) {
685					scroll_top.addClass('wt_top_btn');
686				}
687			};
688			
689		win.scroll(set_status);
690		set_status();
691		
692		// scrolling to top
693		$('#wt-top, .wt_top').click(function() {
694			var $delay = win.scrollTop();
695			$('body,html').animate({
696				scrollTop: 0
697			}, 1000 * Math.atan($delay / 3000), 'easeInOutExpo');
698			return false;
699		});
700	}	
701	
702	/* Full Screen Slider
703	   --------------------------------------------------------- */	
704	
705	$.fn.wt_fullscreen_slider = function() {
706		return this.each(function() {
707			var container = $(this),
708				i         = 0,
709				data      = container.data('images'),
710				slides    = [];
711				
712			if($().supersized) { // if supersized library is called	
713			
714				while( i < data.length ) {
715					slides.push({image: data[i]});
716					i++;
717				}
718				
719				container.supersized({
720					autoplay         : container.data('autoplay') != 'undefined' ? container.data('autoplay') : true,
721					slide_interval   : container.data('slideinterval') != 'undefined' ? container.data('slideinterval') : 6000,		// Length between transitions
722					transition       : container.data('transition') != 'undefined' ? container.data('transition') : 1, 		// 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
723					transition_speed : container.data('transitionspeed') != 'undefined' ? container.data('transitionspeed') : 1000,		// Speed of transition
724			        slides           : slides,
725					fit_portrait	 : false,
726				});
727				
728			}
729		});
730	};
731	
732	/* Google Maps
733	   --------------------------------------------------------- */	
734	   
735	$.fn.wt_sc_googleMaps = function() {
736		return this.each(function() {
737			var container           = $(this),
738				mapControls         = false,
739				dataId              = container.data('id'),
740				dataLocation        = container.data('location'),
741				dataZoom            = container.data('zoom'),
742				dataMapType         = container.data('map_type'),
743				dataScrollWheel     = container.data('scrollwheel'),
744				dataDraggable       = container.data('draggable'),
745				dataDoubleClickZoom = container.data('doubleclickzoom'),
746				dataControls        = container.data('controls'), 
747				dataStyling         = container.data('styling'),
748				dataFeatureType     = container.data('feature_type'), 
749				dataElementType     = container.data('element_type'), 
750				dataVisibility      = container.data('visibility'), 
751				dataInvertLightness = container.data('invert_lightness'),  
752				dataColor           = container.data('color'), 
753				dataHue             = container.data('hue'), 
754				dataSaturation      = container.data('saturation'), 
755				dataLightness       = container.data('lightness'),
756				dataGamma           = container.data('gamma'),
757				dataMarkers         = container.data('markers');
758						
759			if (dataControls) {
760				mapControls = window['mapControls_' + dataId];
761				// console.log('controls = ' + true);
762				// console.log(mapControls);
763			} else {
764				// console.log('controls = ' + false);
765			}
766				
767			// console.log('styling         = ' + dataStyling);			
768			// console.log('location        = ' + dataLocation);			
769			// console.log('zoom            = ' + dataZoom);			
770			// console.log('mapType         = ' + dataMapType);			
771			// console.log('scrollWheel     = ' + dataScrollWheel);			
772			// console.log('draggable       = ' + dataDraggable);			
773			// console.log('doubleClickZoom = ' + dataDoubleClickZoom);
774						
775			if (dataMarkers) { // If there are any markers. It returns the undefined value when the data does not exists.
776				var	dataCustomMarkers = container.data('custom_markers'),
777					mapMarkers  = 'mapMarkers_' + dataId;
778					
779				// console.log(window[mapMarkers]);			
780				// console.log('dataCustomMarkers = ' + dataCustomMarkers);
781				
782				if (dataStyling) {
783					container.mapmarker({	
784						center           : dataLocation,
785						zoom             : dataZoom,
786						controls         : mapControls,
787						mapType          : dataMapType, // styling should be false to work
788						scrollwheel      : dataScrollWheel,
789						draggable        : dataDraggable,
790						doubleclickzoom  : dataDoubleClickZoom,
791						customMarkers    : dataCustomMarkers,
792						markers          : window[mapMarkers],
793						// if map is different styled
794						styling          : 1,
795						featureType      : dataFeatureType,
796						elementType      : dataElementType,
797						visibility       : dataVisibility,
798                        invert_lightness : dataInvertLightness,
799						color            : dataColor,
800						hue              : dataHue,
801						saturation       : dataSaturation,
802						lightness        : dataLightness,
803						gamma            : dataGamma
804					});
805				} else {
806					container.mapmarker({
807						center           : dataLocation,
808						zoom             : dataZoom,
809						controls         : mapControls,
810						mapType          : dataMapType, // styling should be false to work
811						scrollwheel      : dataScrollWheel,
812						draggable        : dataDraggable,
813						doubleclickzoom  : dataDoubleClickZoom,
814						customMarkers    : dataCustomMarkers,
815						markers          : window[mapMarkers]
816					});
817				}				
818			} else { // If there are no markers
819				if (dataStyling) {
820					container.mapmarker({
821						center           : dataLocation,	
822						zoom             : dataZoom,
823						controls         : mapControls,
824						mapType          : dataMapType, // styling should be false to work
825						scrollwheel      : dataScrollWheel,
826						draggable        : dataDraggable,
827						doubleclickzoom  : dataDoubleClickZoom,
828						// if map is different styled
829						styling          : 1,
830						featureType      : dataFeatureType,
831						elementType      : dataElementType,
832						visibility       : dataVisibility,
833                        invert_lightness : dataInvertLightness,
834						color            : dataColor,
835						hue              : dataHue,
836						saturation       : dataSaturation,
837						lightness        : dataLightness,
838						gamma            : dataGamma
839					});
840				} else {
841					container.mapmarker({
842						center           : dataLocation,	
843						zoom             : dataZoom,
844						controls         : mapControls,
845						mapType          : dataMapType, // styling should be false to work
846						scrollwheel      : dataScrollWheel,
847						draggable        : dataDraggable,
848						doubleclickzoom  : dataDoubleClickZoom
849					});
850				}
851			}
852		});
853	};
854			
855	/* Html5 Video Players
856	   --------------------------------------------------------- */	
857	   
858	function html5_video(){
859	
860		var $video_player = $('.html5_video'),
861			initVideo;
862		
863		if( $video_player.length ) {			
864			initVideo = function initVideoPlayer( video_players ) {
865							video_players.each(function() {
866								var $this  = $(this);						
867								$this.mediaelementplayer();			
868							});
869						};
870			initVideo( $video_player );				
871		}
872	}
873	
874	/* Html5 Audio Players
875	   --------------------------------------------------------- */	
876	   		
877	(function($) {
878
879		var $audio_player = $('.html5_audio'),
880			_initAudioPlayer;
881
882		if( $audio_player.length ) {
883
884			_initAudioPlayer = function initAudioPlayer( audio_players ) {
885				audio_players.each(function() {
886					var $this  = $(this);	
887					var $audioLoop = $this.data('html5_audio_loop');			
888					var toggle = $this.parents(".toggle");
889					
890					$this.bind("initMediaelement",function(){
891						$this.mediaelementplayer({loop: $audioLoop});
892						$this.data("mediaelementInited",true);
893					}).data("mediaelementInited",false);
894
895					if(toggle.size()!== 0){
896						toggle.find(".toggle_title").click(function() {
897							if($this.data("mediaelementInited")===false){
898								$this.trigger("initMediaelement");
899							}
900						});
901					}else{
902						$this.trigger("initMediaelement");
903					}
904				});
905			};
906			_initAudioPlayer( $audio_player );		
907		}
908	})(jQuery);	
909		
910	/* Sliders & Carousels 
911	   --------------------------------------------------------- */	
912	
913	/* ----- Flex Slider ----- */
914	
915	(function($) {
916		var $slider = $('.flexslider_wrap'),
917			_initSlider;
918
919		if( $slider.length ) {
920			_initSlider = function initSlider( sliders ) {
921				sliders.each(function() {					
922					var $this  = $(this);				
923					var $thumbsCarousel = '#'+$this.data('flex_sync');
924					var $thumbs = $this.data('flex_controlnavthumbs');
925					var $thumbsSlider = $this.data('flex_controlnavthumbsslider');						
926					var $use_css = Modernizr.touch ? true : false;
927										
928					var $effect = $this.data('flex_animation');
929					if ($effect === "fade") {
930						$effect = Modernizr.touch ? "slide" : "fade";
931					}
932					
933					if ($thumbsSlider) {
934						$($thumbsCarousel).flexslider({
935							animation: "slide",
936							controlNav: false,
937							animationLoop: false,
938							slideshow: false,
939							itemWidth: $($thumbsCarousel).parents().is('#intro') ? 190 : ($($thumbsCarousel).parents().hasClass('fullWidth') ? 183 : 123),
940							itemMargin: 5,
941							asNavFor: $this
942						});	
943					}			
944						$this.flexslider({
945							animation        : $effect,
946							easing           : $effect==="slide" ? $this.data('flex_easing') : '',
947							useCSS           : $use_css,
948							direction        : $this.data('flex_direction'), 
949							animationSpeed   : $this.data('flex_animationspeed'),
950							slideshowSpeed   : $this.data('flex_slideshowspeed'),
951							directionNav     : $this.data('flex_directionnav'), 
952							controlNav       : $thumbs && !$thumbsSlider ? 'thumbnails' : $this.data('flex_controlnav'), 
953							pauseOnAction    : $this.data('flex_pauseonaction'),
954							pauseOnHover     : $this.data('flex_pauseonhover'),
955							slideshow        : $this.data('flex_slideshow'),
956							animationLoop    : $this.data('flex_animationloop'),
957							sync             : $thumbsCarousel,
958							before : function(){
959								if ($effect==="slide") { 
960									$this.find('.flex-caption').slideUp(400, 'easeOutExpo');
961								} else { 
962									return;
963								}
964							},
965							after : function(){
966								if ($effect==="slide") { 
967									$this.find('.flex-caption').slideDown(100, 'easeInExpo');
968								} else { 
969									return;
970								}
971							}
972						});
973					//});
974						
975				});
976			};
977			_initSlider( $slider );		
978		}
979	})(jQuery);
980		
981	/* ----- Nivo Slider ----- */
982	
983	(function($) {
984
985		var $slider = $('.nivoslider_wrap'),
986			_initSlider;
987
988		if( $slider.length ) {
989			_initSlider = function initSlider( sliders ) {
990				sliders.each(function() {
991					var $this  = $(this);									
992					var $effect = Modernizr.touch ? "slideInLeft" : $this.data('nivo_effect');
993																
994					$this.nivoSlider({
995						effect           : $effect,
996						slices           : $this.data('nivo_slices'), 
997						boxCols          : $this.data('nivo_boxcols'), 
998						boxRows          : $this.data('nivo_boxrows'), 
999						animSpeed        : $this.data('nivo_animspeed'),
1000						pauseTime        : $this.data('nivo_pausetime'),
1001						randomStart      : $this.data('nivo_randomstart'),
1002						directionNav     : $this.data('nivo_directionnav'), 
1003						controlNav       : $this.data('nivo_controlnav'), 
1004						controlNavThumbs : $this.data('nivo_controlnavthumbs'), 
1005						pauseOnHover     : $this.data('nivo_pauseonhover'),
1006						manualAdvance    : $this.data('nivo_manualadvance'),
1007						lastSlide        : function(){
1008							if($this.data('nivo_stopatend')){
1009								$this.data('nivoslider').stop();
1010							}
1011						}
1012					});
1013					if( Modernizr.touch ) {							
1014						$this.bind( 'swipeleft', function( e ) {
1015							$('a.nivo-nextNav').trigger('click');
1016							e.stopImmediatePropagation();
1017							return false;
1018						});  
1019					
1020						$this.bind( 'swiperight', function( e ) {
1021							$('a.nivo-prevNav').trigger('click');
1022							e.stopImmediatePropagation();
1023							return false;
1024						}); 
1025					}
1026				});
1027			};
1028			_initSlider( $slider );		
1029		}		
1030	})(jQuery);
1031		
1032	/* ----- Tweets Cycle ----- */
1033			
1034	(function($) {
1035		
1036		var $twitter = $('.cycle_tweets'),
1037			_initTwitter;
1038
1039		if( $twitter.length ) {
1040			_initTwitter = function initTwitter( tweets ) {
1041				tweets.each(function() {
1042					var win = $(window);
1043					var container = $(this);
1044					var cycle_nav = container.find('.cycle_nav');
1045					var $this  = $(this).find('ul');									
1046					var $prev = cycle_nav.children(".cycle_prev");		
1047					var $next = cycle_nav.children(".cycle_next");
1048															
1049					function twitter() {									
1050						$this.cycle({
1051							slides        : '> li',
1052							autoHeight    : 'container',
1053							fx            : Modernizr.touch ? 'scrollHorz' : 'fade',
1054							timeout       : 5000,
1055							pauseOnHover  : true,
1056							prev          : $prev,
1057							next          : $next
1058						});
1059					}
1060					
1061					twitter();
1062					win.bind('smartresize', twitter);
1063				});
1064			};
1065			_initTwitter ( $twitter );		
1066		}		
1067	})(jQuery);
1068				
1069	/* ----- Owl Rotator ----- */
1070		
1071	if($().owlCarousel) {
1072		(function($) {
1073	
1074			var $owl = $('.wt_owl_rotator'),
1075				_initOwl;
1076	
1077			if( $owl.length ) {
1078				_initOwl = function initOwl( owls ) {
1079					owls.each(function() {
1080						var $this  = $(this);
1081						
1082						function owl() {									
1083							$this.owlCarousel({
1084								autoPlay          : $this.data('owl-autoplay'), 
1085								stopOnHover       : $this.data('owl-stoponhover'),
1086								navigation        : $this.data('owl-navigation'),
1087								pagination        : $this.data('owl-pagination'),
1088								slideSpeed        : $this.data('owl-slidespeed') ? $this.data('owl-slidespeed') : 800,
1089								paginationSpeed   : $this.data('owl-pagspeed') ? $this.data('owl-pagspeed') : 800,
1090								singleItem        : true,
1091								autoHeight        : $this.data('owl-autoheight'),
1092								goToFirstSpeed    : 2000,
1093								navigationText    : false,
1094								transitionStyle   :"fade"
1095							});
1096						}
1097						
1098						owl();
1099					});
1100				};
1101				_initOwl( $owl );		
1102			}		
1103		})(jQuery);
1104	}
1105			
1106	/* ----- Nice Scroll ----- */	
1107	function niceScrollInit(){
1108		$("body").niceScroll({
1109			cursorcolor        : "#1A1E23",
1110			cursorwidth        : 10,
1111			cursorborder       : 0,
1112			cursorborderradius : 0,
1113			zindex             : 2000,
1114			horizrailenabled   :false
1115		});
1116	}
1117	
1118})(jQuery); // End

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.