PageSourceSearch

https://www.towsonmdlocksmith.com/wp-content/cache/wpfc-minified/qtr23wpn/h8y28.js

js towsonmdlocksmith.com collected 2026-10-07 05:26:17 UTC 8,093 bytes, 228 lines download raw bytes

1// source --> https://www.towsonmdlocksmith.com/wp-content/themes/parabola/js/frontend.js?ver=2.4.3 
2/*
3 * Parabola theme frontend.js
4 */
5 
6jQuery(document).ready(function() {
7
8	/* Masonry */
9	parabola_activateMasonry();
10
11	/* Standard menu touch support for tablets */
12	var custom_event = ('ontouchstart' in window) ? 'touchstart' : 'click'; /* check touch support */
13	var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent);
14	jQuery( '#access .menu > ul > li a' ).on( 'click', function(e){
15			var link_id = jQuery(this).attr('href');
16			if (jQuery(this).closest('#access').data('clicked') == link_id) { 
17				/* second touch */
18				jQuery(this).closest('#access').data('clicked', null);
19			} else {
20				/* first touch */
21				if (custom_event != 'click' && !ios && (jQuery(this).parent().children('ul').length >0)) { e.preventDefault(); }
22				jQuery(this).closest('#access').data('clicked', link_id);
23				jQuery(this).next('.sub-menu').slideDown();
24			}
25		});
26
27	/* Back to top button animation */
28	jQuery(function() {
29		jQuery(window).on('scroll', function() {
30			var x=jQuery(this).scrollTop();
31			var ver = getInternetExplorerVersion();
32			/* no fade animation (transparency) if IE8 or below */
33			if ( ver > -1 && ver <= 8 ) {
34				if(x != 0) {
35						jQuery('#toTop').show();
36					} else {
37						jQuery('#toTop').hide();
38					}
39			}
40			/* fade animation if not IE8 or below */
41			else {
42			if(x != 0) {
43					jQuery('#toTop').fadeIn(3000);
44				} else {
45					jQuery('#toTop').fadeOut();
46				}
47		}
48		});
49		jQuery('#toTop').on('click', function() { jQuery('body,html').animate({scrollTop:0},800); });
50	});
51
52	/* Menu animation */
53	jQuery("#access > div > ul > li").on( 'mouseenter', function(){
54		if (jQuery(this).find('ul').length > 0) jQuery("#access > div > ul > li > ul").hide();
55	});
56
57	jQuery("#access ul ul").css({display: "none"}); /* Opera Fix */
58	jQuery("#access > .menu ul li > a:not(:only-child)").attr("aria-haspopup","true"); /* IE10 mobile Fix */
59
60	jQuery("#access li").on( 'mouseenter', function(){
61		jQuery(this).find('ul:first').stop();
62		jQuery(this).find('ul:first').css({opacity: "0"}).css({visibility: "visible",display: "none",overflow:"visible"}).slideDown({duration:400}).animate({"opacity":1},{queue:false});
63	}).on( 'mouseleave', function(){
64		jQuery(this).find('ul:first').css({visibility: "visible",display: "block",overflow:"visible"}).slideUp(150);
65	});
66
67	/* Social Icons Animation */
68	jQuery(".socialicons").append('<div class="socials-hover"></div>');
69	jQuery(".socialicons").on('mouseenter', function(){
70			jQuery(this).find(".socials-hover").animate({"bottom":"0"},{queue:false,duration:150});
71		}).on('mouseleave', function() {
72			jQuery(this).find(".socials-hover").animate({"bottom":"100%"},{queue:false,duration:150, complete: function() {
73				jQuery(this).css({bottom:"-100%"});
74				}
75			});
76		}
77	);
78
79	/* Detect and apply custom class for Safari */
80	if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
81		jQuery('body').addClass('safari');
82	}
83
84});
85/* end document.ready */
86
87/* Masonry init, called on both ready and window.load */
88function parabola_activateMasonry(){ 
89	if ( (parabola_settings.masonry==1) && ( typeof jQuery.fn.masonry !== 'undefined' )) {
90			jQuery('body.magazine-layout .content-masonry').masonry({
91				itemSelector: 'article',
92				columnWidth: 'article',
93				percentPosition: true,
94			});
95		}
96}
97
98/* Mobile Menu v2 */
99function parabola_mobilemenu_init() {
100	var state = false;
101	jQuery("#nav-toggle").on('click', function(){
102		jQuery("#access").slideToggle(function(){ if (state) {jQuery(this).removeAttr( 'style' )}; state = ! state; } );
103	});
104}
105
106/* Columns equalizer, used if at least one sidebar has a bg color */
107function parabola_equalizeHeights(){
108    var h1 = jQuery("#primary").height();
109	var h2 = jQuery("#secondary").height();
110	var h3 = jQuery("#content").height();
111    var max = Math.max(h1,h2,h3);
112	if (h1<max) { jQuery("#primary").height(max); };
113	if (h2<max) { jQuery("#secondary").height(max); };
114}
115
116jQuery(window).on('load', function() {
117	/* FitVids & mobile menu */
118	if (parabola_settings.mobile==1) parabola_mobilemenu_init();
119	if (parabola_settings.fitvids==1) jQuery(".entry-content").fitVids();
120	
121	/* Second Masonry, in case elements expand size due to dynamic content; keep after FitVids */
122	parabola_activateMasonry();
123});
124
125/*!
126* FitVids 1.1
127*
128* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
129* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
130* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
131*
132*/
133
134;(function( $ ){
135
136  'use strict';
137
138  $.fn.fitVids = function( options ) {
139    var settings = {
140      customSelector: null,
141      ignore: null
142    };
143
144    if(!document.getElementById('fit-vids-style')) {
145      // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
146      var head = document.head || document.getElementsByTagName('head')[0];
147      var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
148      var div = document.createElement("div");
149      div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
150      head.appendChild(div.childNodes[1]);
151    }
152
153    if ( options ) {
154      $.extend( settings, options );
155    }
156
157    return this.each(function(){
158      var selectors = [
159        'iframe[src*="player.vimeo.com"]',
160        'iframe[src*="youtube.com"]',
161        'iframe[src*="youtube-nocookie.com"]',
162        'iframe[src*="kickstarter.com"][src*="video.html"]',
163        'object',
164        'embed'
165      ];
166
167      if (settings.customSelector) {
168        selectors.push(settings.customSelector);
169      }
170
171      var ignoreList = '.fitvidsignore';
172
173      if(settings.ignore) {
174        ignoreList = ignoreList + ', ' + settings.ignore;
175      }
176
177      var $allVideos = $(this).find(selectors.join(','));
178      $allVideos = $allVideos.not('object object'); // SwfObj conflict patch
179      $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
180
181      $allVideos.each(function(){
182        var $this = $(this);
183        if($this.parents(ignoreList).length > 0) {
184          return; // Disable FitVids on this video.
185        }
186        if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
187        if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
188        {
189          $this.attr('height', 9);
190          $this.attr('width', 16);
191        }
192        var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
193            width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
194            aspectRatio = height / width;
195        if(!$this.attr('name')){
196          var videoName = 'fitvid' + $.fn.fitVids._count;
197          $this.attr('name', videoName);
198          $.fn.fitVids._count++;
199        }
200        $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
201        $this.removeAttr('height').removeAttr('width');
202      });
203    });
204  };
205  
206  // Internal counter for unique video names.
207  $.fn.fitVids._count = 0;
208  
209// Works with either jQuery or Zepto
210})( window.jQuery || window.Zepto );
211
212
213/* Returns the version of Internet Explorer or a -1
214  (indicating the use of another browser). */
215function getInternetExplorerVersion()
216{
217  var rv = -1; /* assume not IE. */
218  if (navigator.appName == 'Microsoft Internet Explorer')
219  {
220    var ua = navigator.userAgent;
221    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
222    if (re.exec(ua) != null)
223      rv = parseFloat( RegExp.$1 );
224  }
225  return rv;
226}
227
228/* FIN */;

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.