PageSourceSearch

https://zyepro.com/wp-content/themes/minamaze/lib/scripts/main-frontend.js?ver=1.1

js zyepro.com collected 2026-09-24 14:58:19 UTC 11,036 bytes, 263 lines download raw bytes

1/**
2 * Wordpress Front End Enhancements.
3 *
4 * jQuery effects used in theme.
5 */
6
7/* ----------------------------------------------------------------------------------
8	FORMAT FOOTER LAYOUT
9---------------------------------------------------------------------------------- */
10jQuery(document).ready(function(){
11
12jQuery('#footer-core .widget-area:last-child').addClass("last");
13
14/* Footer - Footer Widgets Layout (Options 1 - 6) */
15jQuery('#footer-core.option2 .widget-area').addClass("one_half");
16jQuery('#footer-core.option3 .widget-area').addClass("one_third");
17jQuery('#footer-core.option4 .widget-area').addClass("one_fourth");
18jQuery('#footer-core.option5 .widget-area').addClass("one_fifth");
19jQuery('#footer-core.option6 .widget-area').addClass("one_sixth");
20
21/* Footer - Footer Widgets Layout (Option 7) */
22jQuery('#footer-core.option7 #footer-col1.widget-area').addClass("one_third");
23jQuery('#footer-core.option7 #footer-col2.widget-area').addClass("two_third");
24
25/* Footer - Footer Widgets Layout (Option 8) */
26jQuery('#footer-core.option8 #footer-col1.widget-area').addClass("two_third");
27jQuery('#footer-core.option8 #footer-col2.widget-area').addClass("one_third");
28
29/* Footer - Footer Widgets Layout (Option 9) */
30jQuery('#footer-core.option9 #footer-col1.widget-area').addClass("one_fourth");
31jQuery('#footer-core.option9 #footer-col2.widget-area').addClass("three_fourth");
32
33/* Footer - Footer Widgets Layout (Option 10) */
34jQuery('#footer-core.option10 #footer-col1.widget-area').addClass("three_fourth");
35jQuery('#footer-core.option10 #footer-col2.widget-area').addClass("one_fourth");
36
37/* Footer - Footer Widgets Layout (Option 11) */
38jQuery('#footer-core.option11 #footer-col1.widget-area').addClass("one_fifth");
39jQuery('#footer-core.option11 #footer-col2.widget-area').addClass("four_fifth");
40
41/* Footer - Footer Widgets Layout (Option 12) */
42jQuery('#footer-core.option12 #footer-col1.widget-area').addClass("four_fifth");
43jQuery('#footer-core.option12 #footer-col2.widget-area').addClass("one_fifth");
44
45/* Footer - Footer Widgets Layout (Option 13) */
46jQuery('#footer-core.option13 #footer-col1.widget-area').addClass("one_sixth");
47jQuery('#footer-core.option13 #footer-col2.widget-area').addClass("one_sixth");
48jQuery('#footer-core.option13 #footer-col3.widget-area').addClass("one_sixth");
49jQuery('#footer-core.option13 #footer-col4.widget-area').addClass("one_half");
50
51/* Footer - Footer Widgets Layout (Option 14) */
52jQuery('#footer-core.option14 #footer-col1.widget-area').addClass("one_half");
53jQuery('#footer-core.option14 #footer-col2.widget-area').addClass("one_sixth");
54jQuery('#footer-core.option14 #footer-col3.widget-area').addClass("one_sixth");
55jQuery('#footer-core.option14 #footer-col4.widget-area').addClass("one_sixth");
56
57/* Footer - Footer Widgets Layout (Option 15) */
58jQuery('#footer-core.option15 #footer-col1.widget-area').addClass("one_sixth");
59jQuery('#footer-core.option15 #footer-col2.widget-area').addClass("one_third");
60jQuery('#footer-core.option15 #footer-col3.widget-area').addClass("one_half");
61
62/* Footer - Footer Widgets Layout (Option 16) */
63jQuery('#footer-core.option16 #footer-col1.widget-area').addClass("one_half");
64jQuery('#footer-core.option16 #footer-col2.widget-area').addClass("one_third");
65jQuery('#footer-core.option16 #footer-col3.widget-area').addClass("one_sixth");
66
67/* Footer - Footer Widgets Layout (Option 17) */
68jQuery('#footer-core.option17 #footer-col1.widget-area').addClass("one_fourth");
69jQuery('#footer-core.option17 #footer-col2.widget-area').addClass("one_fourth");
70jQuery('#footer-core.option17 #footer-col3.widget-area').addClass("one_sixth");
71jQuery('#footer-core.option17 #footer-col4.widget-area').addClass("one_sixth");
72jQuery('#footer-core.option17 #footer-col5.widget-area').addClass("one_sixth");
73
74/* Footer - Footer Widgets Layout (Option 18) */
75jQuery('#footer-core.option18 #footer-col1.widget-area').addClass("one_sixth");
76jQuery('#footer-core.option18 #footer-col2.widget-area').addClass("one_sixth");
77jQuery('#footer-core.option18 #footer-col3.widget-area').addClass("one_sixth");
78jQuery('#footer-core.option18 #footer-col4.widget-area').addClass("one_fourth");
79jQuery('#footer-core.option18 #footer-col5.widget-area').addClass("one_fourth");
80});
81
82
83/* ----------------------------------------------------------------------------------
84	FORMAT MAIN HEADER MENU
85---------------------------------------------------------------------------------- */
86function mainmenu(){
87
88	/* Add menu-hover class */
89	jQuery("header .header-links ul.menu > li").hover(function(){
90		jQuery(this).find('ul.sub-menu:first').css({visibility: "visible",display: "none"}).parent().addClass('menu-hover');
91	},function(){
92		jQuery(this).find('ul.sub-menu:first').css({visibility: "hidden",display: "none"}).parent().removeClass('menu-hover');
93	});
94
95	/* Add menu-parent class */
96	jQuery("header .header-links ul.menu > li").each(function(){
97		jQuery(this).find('ul.sub-menu').css({visibility: "visible",display: "none"}).parent().addClass('menu-parent');
98	});
99
100	/* Add smooth dropdown effect */
101	jQuery("header .header-links li").hover(function(){
102		parentWidth = jQuery(this).width();
103		jQuery(this).find('ul:first').css({visibility: "visible",display: "none","min-width": parentWidth}
103).slideToggle(400);
104	},function(){
105		jQuery(this).find('ul:first').css({visibility: "hidden"});
106	});
107
108	/* Add <span> to links in pre-header and header sub menus */
109	jQuery('#pre-header .sub-menu a, #header .sub-menu a').each(function() {
110		jQuery(this).wrapInner("<span></span>");
111	});
112}
113jQuery(document).ready(function(){
114	mainmenu();
115});
116
117/* ----------------------------------------------------------------------------------
118	FLUID MEDIA SIZES (Modified from http://bavotasan.com/2012/better-way-to-resize-video-using-jquery)
119---------------------------------------------------------------------------------- */
120
121/* Videos */
122jQuery(document).ready(function() {
123
124	/* Supported Platforms */
125	var all_videos = jQuery( 'iframe[src*="//player.vimeo.com"], iframe[src*="//www.youtube.com"], iframe[src*="//blip.tv"], iframe[src*="//www.slideshare.net"], iframe[src*="//www.scribd.com"], iframe[src*="//revision3.com"], iframe[src*="//www.hulu.com"], iframe[src*="//www.funnyordie.com"], iframe[src*="//www.dailymotion.com"], embed[src*="//v.wordpress.com"], object, embed' );
126
127	all_videos.each(function() {
128		var el = jQuery(this);
129		el
130			.attr( 'data-aspectRatio', 360 / 640 )
131			.attr( 'data-oldWidth', el.width() );
132	} );
133
134	jQuery(document).ready(function() {
135		all_videos.each( function() {
136		var el = jQuery(this),
137			newWidth = el.parents().width(),
138			oldWidth = el.attr( 'data-oldWidth' );
139
140			el
141				.removeAttr( 'height' )
142				.removeAttr( 'width' )
143				.width( newWidth )
144				.height( newWidth * el.attr( 'data-aspectRatio' ) );
145		});
146	}).resize();
147
148	jQuery(window)
149		.resize( function() {
150			all_videos.each( function() {
151			var el = jQuery(this),
152				newWidth = el.parents().width(),
153				oldWidth = el.attr( 'data-oldWidth' );
154
155				el
156					.removeAttr( 'height' )
157					.removeAttr( 'width' )
158					.width( newWidth )
159		    		.height( newWidth * el.attr( 'data-aspectRatio' ) );
160			});
161		}).resize();
162});
163
164/* SoundCloud */
165jQuery(document).ready(function() {
166
167	/* Supported Platforms */
168	var all_sounds = jQuery( 'iframe[src^="http://w.soundcloud.com"]' );
169
170	all_sounds.each(function() {
171		var el = jQuery(this);
172		el
173			.attr( 'data-aspectRatio', el.attr( 'height' ) / el.attr( 'width' )  )
174			.attr( 'data-oldWidth', el.width() );
175	});
176
177	jQuery(document).ready(function() {
178		all_sounds.each( function() {
179		var el = jQuery(this),
180			newWidth = el.parents().width(),
181			oldWidth = el.attr( 'data-oldWidth' );
182
183			el
184				.removeAttr( 'width' )
185				.width( newWidth )
186		});
187	}).resize();
188
189	jQuery(window)
190		.resize( function() {
191			all_sounds.each( function() {
192			var el = jQuery(this),
193				newWidth = el.parents().width(),
194				oldWidth = el.attr( 'data-oldWidth' );
195
196				el
197					.removeAttr( 'width' )
198					.width( newWidth )
199			});
200		}).resize();
201});
202
203
204/* ----------------------------------------------------------------------------------
205	ADD PRETTYPHOTO TO PORTFOLIO PAGE
206---------------------------------------------------------------------------------- */
207
208jQuery(document).ready(function() {
209	jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').addClass('prettyPhoto');
210	jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').attr('rel','portfolio[gallery]');
211	jQuery('a.prettyPhoto').has('img').attr('rel','portfolio[gallery]');
212	jQuery('a.prettyPhoto').prettyPhoto();
213});
214
215
216
217/* ----------------------------------------------------------------------------------
218	ADD PRETTYPHOTO TO POST IMAGE PAGE
219---------------------------------------------------------------------------------- */
220
221jQuery(document).ready(function() {
222	jQuery('body.attachment .entry-attachment .attachment a').has('img').addClass('prettyPhoto');
223	jQuery('a.prettyPhoto').prettyPhoto();
224});
225
226
227/* ----------------------------------------------------------------------------------
228	WIDGETS
229---------------------------------------------------------------------------------- */
230
231/* Categories */
232jQuery(document).ready(function(){
233	jQuery('.widget.thinkup_widget_categories .cat-item a').prepend('<i class="icon-caret-right icon-large"></i>');
234});
235
236
237/* ----------------------------------------------------------------------------------
238	ADD _BLANK TO OUTGOING LINKS
239---------------------------------------------------------------------------------- */
240
241jQuery(document).ready(function(){
242	jQuery('.thinkup_widget_flickr a[href^="http://"], .thinkup_widget_flickr a[href^="https://"]').attr('target','_blank');
243	jQuery('.thinkup_widget_socialshare a[href^="http://"], .thinkup_widget_socialshare a[href^="https://"]').attr('target','_blank');
244	jQuery('.thinkup_widget_socialprofiles a[href^="http://"], .thinkup_widget_socialprofiles a[href^="https://"]').attr('target','_blank');
245	jQuery('#pre-header-social a[href^="http://"], #pre-header-social a[href^="https://"]').attr('target','_blank');
246	jQuery('#shareicons a[href^="http://"], #shareicons a[href^="https://"]').attr('target','_blank');
247});
248
249
250/* ----------------------------------------------------------------------------------
251	SHORTCODES - PREMIUM FEATURE
252---------------------------------------------------------------------------------- */
253
254jQuery(document).ready(function() {
255
256	/* Tooltip - Activate Bootstrap */
257	jQuery('[data-tip]').each( function() {jQuery(this).tooltip({ placement: jQuery(this).data('tip') }); });
258});
259
260
261/* ----------------------------------------------------------------------------------
262	SHORTCODES - WAYPOINTS ANIMATION - PREMIUM FEATURE
263---------------------------------------------------------------------------------- */

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.