PageSourceSearch

https://www.farmserver.com/wp-content/themes/lane/js/main.js

js farmserver.com collected 2026-10-02 13:38:52 UTC 31,638 bytes, 992 lines download raw bytes

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