PageSourceSearch

https://www.leftcoastlogic.com/wp-content/themes/dms/js/pl.common.js?ver=1.1.9.1

js leftcoastlogic.com collected 2026-10-07 14:46:41 UTC 5,363 bytes, 296 lines download raw bytes

1!function ($) {
2
3	// --> Initialize
4	$(document).ready(function() {
5		
6		$(document).trigger( 'sectionStart' )
7		
8		$.plCommon.init()
9		$.plMobilizer.init()
10	
11		$(".fitvids").fitVids(); // fit videos
12	
13		$.plAnimate.initAnimation()
14		
15		$.plNavigation.init()
16		
17		$.plParallax.init()
18		
19		$('.pl-credit').show()
20		
21		$.BodyClass.init()
22	})
23	
24	$(window).load(function() {
25		$.plCommon.plVerticalCenter('.pl-centerer', '.pl-centered')
26		$('.pl-section').on('plresize', function(){
27			$.plCommon.plVerticalCenter('.pl-centerer', '.pl-centered')
28		})
29	})
30	
31	$.BodyClass = {
32		init: function(){
33			$(window).resize(function () {
34				$.BodyClass.doResize()
35			})
36			$.BodyClass.doResize()
37		}
38		,	doResize: function(){
39			$(document.body).removeClass('pl-res-phone pl-res-tablet pl-res-desktop')
40			var width = $(window).width()		
41			if( width < 480 ) {
42				$(document.body).addClass('pl-res-phone')
43			} else if( width < 1024 ){
44				$(document.body).addClass('pl-res-tablet')
45			} else {
46				$(document.body).addClass('pl-res-desktop')
47			}
48		} 
49	}
50	
51	$.plNavigation = {
52		init: function(){
53			
54			var that = this
55			
56			that.initDrops()
57		}
58		, initDrops: function(){
59			
60			var a = 1
61			
62			$(".pl-dropdown > li > ul").each(function(){
63
64				var b = ""
65
66				$(this).addClass("dropdown-menu");
67
68				if( $(this).siblings("a").children("i").length===0 ){
69					b = ' <i class="icon-caret-down"></i>'
70				}
71
72				$(this).siblings("a")
73					.addClass("dropdown-toggle")
74					.attr( "href", "#m" + a )
75					.attr("data-toggle","dropdown")
76					.append(b)
77					.parent()
78					.attr( "id", "m" + a++ )
79					.addClass("dropdown")
80
81				$(this)
82					.find('.sub-menu')
83					.addClass("dropdown-menu")
84					.parent()
85					.addClass('dropdown-submenu')
86			})
87
88			$(".dropdown-toggle").dropdown()
89
90		}
91	}
92	
93	$.plParallax = {
94	
95
96		init: function(speed){
97			
98			var that = this
99
100			if( $('.pl-parallax').length >= 1){
101				
102				$('.pl-parallax').each(function(element){
103				$(this).parallax('50%', .3)
104				})
105			}
106			
107			
108
109		}
110	
111	}
112	
113	$.plMobilizer = {
114		
115		init: function(){
116			var that = this
117			
118			that.mobileMenu()
119		}
120		
121		, mobileMenu: function(){
122			var that = this
123			, 	theBody = $('body')
124			, 	menuToggle = $('.mm-toggle')
125			,	siteWrap = $('.site-wrap')
126			, 	mobileMenu = $('.pl-mobile-menu')
127			
128			mobileMenu.css('max-height', siteWrap.height()-10)
129			
130			menuToggle.on('click.mmToggle', function(e){
131				
132				e.stopPropagation()
133				mobileMenu.css('max-height', siteWrap.height())
134				
135				if( !siteWrap.hasClass('show-mm') ){
136					
137					mobileMenu.show()
138					
139					siteWrap
140						.addClass('show-mm')
141					
142					$('.site-wrap, .mm-close').one('click', function(){
143						siteWrap.removeClass('show-mm')
144						setTimeout(function () {
145						    mobileMenu.hide()
146						}, 500)
147					})
148					
149					
150					$('.mm-holder').waypoint(function() {
151						siteWrap.removeClass('show-mm')
152						setTimeout(function () {
153						    mobileMenu.hide()
154						}, 500)
155					}, {
156						offset: function() {
157							return -$(this).height();
158						}
159					})
160					
161				} else {
162					
163					siteWrap.removeClass('show-mm')
164					
165					setTimeout(function () {
166					    mobileMenu.hide()
167					}, 500)
168					
169				}
170			
171			})
172			
173		
174			
175		}
176		
177	}
178
179	$.plAnimate = {
180		
181		initAnimation: function(){
182			
183			var that = this
184						
185			$.plAnimate.plWaypoints()
186		}
187		
188		, plWaypoints: function(selector, options_passed){
189			
190			var defaults = { 
191					offset: '85%' // 'bottom-in-view' 
192					, triggerOnce: true
193				}
194				, options  = $.extend({}, defaults, options_passed)
195				, delay = 150
196				
197			$('.pl-animation-group')
198				.find('.pl-animation')
199				.addClass('pla-group')
200				
201			$('.pl-animation-group').each(function(){
202				
203				var element = $(this)
204
205				element.waypoint(function(direction){
206				 	$(this)
207						.find('.pl-animation')
208						.each( function(i){
209							var element = $(this)
210							
211							setTimeout(
212								function(){ 
213									element.addClass('animation-loaded') 
214								}
215								, (i * 250)
216							);
217						})
218
219				}
220				, { offset: '80%' 
221					, triggerOnce: true
222				})
223			})
224
225			$('.pl-animation:not(.pla-group)').each(function(){
226				
227				var element = $(this)
228
229				element.waypoint(function(direction){
230					
231					 	$(this)
232							.addClass('animation-loaded')
233							.trigger('animation_loaded')
234
235					}
236					, { offset: '85%' 
237					, triggerOnce: true
238				})
239
240			
241			})
242		}
243		
244	}
245
246	$.plCommon = {
247
248		init: function(){
249			var that = this
250			that.setHeight()
251
252			$.resize.delay = 100 // resize throttle
253
254			$('.pl-fixed-top').on('plresize', function(){
255				that.setHeight()
256			})
257			
258			$('.pl-make-link').on('click', function(){
259				var url = $(this).data('href') || '#'
260				, 	newWindow = $(this).attr('target') || false
261				
262				if( newWindow )
263					window.open( url, newWindow )
264				else
265					window.location.href = url
266			
267			})
268
269		}
270
271		, setHeight: function(){
272
273			var height = $('.pl-fixed-top').height()
274
275			$('.fixed-top-pusher').height(height)
276
277		}
278		
279		, plVerticalCenter: function( container, element, offset ) {
280
281			jQuery( container ).each(function(){
282
283				var colHeight = jQuery(this).height()
284				,	centeredElement = jQuery(this).find( element )
285				,	infoHeight = centeredElement.height()
286				, 	offCenter = offset || 0
287
288				centeredElement.css('margin-top', ((colHeight / 2) - (infoHeight / 2 )) + offCenter )
289			})
290
291		}
292		
293
294	}
295
296}(window.jQuery);

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.