PageSourceSearch

https://yellowscene.com/wp-content/themes/heydude/js/scripts.js?ver=6.3.2

js yellowscene.com collected 2026-10-02 02:46:56 UTC 5,099 bytes, 226 lines download raw bytes

1(function ($) {
2
3	"use strict";
4
5	$(function() {
6
7		/**
8		 * submenu indicator & fade animation
9		 */
10		var icon_dir = 'right';
11		if (hd.rtl) {
12			icon_dir = 'left';
13		}
14		$('#mainmenu > li:has(ul) > a').addClass('parent').append('<i class="fa fa-caret-down"></i>');
15		$('#mainmenu ul li:has(ul) > a').addClass('parent').append('<i class="fa fa-caret-' + icon_dir + '"></i>');
16		$('#mainmenu li').hover(function() {
17			$(this).children('ul').stop().fadeIn(100);
18		}, function() {
19			$(this).children('ul').stop().fadeOut('fast');
20		});
21
22		/**
23		 * add select menu for mainmenu
24		 */
25		if ($.fn.mobileMenu) {
26			$('#mainmenu').mobileMenu({
27				defaultText: hd.navigate_text,
28				className: 'mainmenu'
29			});
30		}
31
32		/**
33		 * add masonry layout
34		 */
35		var mcontainer = $('.masonry-container');
36		var masonry_rtl = false;
37		if (hd.rtl) {
38			masonry_rtl = true;
39		}
40		mcontainer.each(function() {
41			var mc = $(this);
42			mc.imagesLoaded(function() {
43				mc.masonry({
44					itemSelector: 'article',
45					isAnimated: true,
46					isOriginLeft: !masonry_rtl
47				});
48			})
49		});
50
51		/**
52		 * add prettyPhoto call if plugin included
53		 */
54		if ($.fn.prettyPhoto) {
55			$("a[data-rel^='prettyPhoto']").prettyPhoto({
56				theme: 'light_square',
57				social_tools: false,
58				hook: 'data-rel'
59			});
60		}
61
62		/**
63		 * contact widget validation and submit action
64		 */
65		$('[name="contact_name"], [name="contact_email"], [name="contact_message"]').keyup(function() {
66			if ($(this).val() != '') {
67				$(this).removeClass('err');
68			}
69		});
70		$('.widget_hd_contact form').submit(function(e) {
71			e.preventDefault();
72			var f = $(this);
73			var loading = f.find('.loading');
74			var contact_msg = f.prev('.contact-msg');
75			var contact_name = f.find('[name="contact_name"]');
76			var contact_email = f.find('[name="contact_email"]');
77			var contact_message = f.find('[name="contact_message"]');
78			loading.show();
79			contact_msg.html('');
80			$.ajax({
81				type: 'POST',
82				url: hd.ajaxurl,
83				data: $(this).serialize(),
84				datatype: 'json',
85				timeout: 30000,
86				error: function() {
87					loading.hide();
88				},
89				success: function (response) {
90					loading.hide();
91					switch (response.status) {
92						case 1:
93							contact_msg.html(response.msg);
94							f.hide();
95							break;
96						case 2:
97							contact_msg.html(response.msg);
98							break;
99						case 3:
100							if (typeof response.error.name != 'undefined') {
101								contact_name.addClass('err');
102							}
103							if (typeof response.error.email != 'undefined') {
104								contact_email.addClass('err');
105							}
106							if (typeof response.error.message != 'undefined') {
107								contact_message.addClass('err');
108							}
109							if (typeof response.error.body != 'undefined') {
110								contact_msg.html(response.error.body);
111								f.hide();
112							}
113							break;
114					}
115				}
116			});
117			return false;
118		});
119
120		/**
121		 * add fitvids for video inside content and widgets
122		 */
123		$('.entry-content, .widget').fitVids();
124
125	});
126
127	/**
128	 * add flex slider call if plugin included
129	 */
130	if ($.fn.flexslider) {
131		$(window).load(function() {
132			$('.flexslider').flexslider({
133				animation: hd.slider_animation,
134				slideshowSpeed: parseInt(hd.slider_slideshowSpeed),
135				animationSpeed: parseInt(hd.slider_animationSpeed),
136				pauseOnHover: hd.slider_pauseOnHover,
137				directionNav: true
138			});
139		});
140	}
141	
142	/* search */
143	$( "#header-main-search" ).click(function(e) {
144		e.preventDefault();
145		$(".search_box_1").toggleClass('active');
146	});
147	
148	$( "#header-main-search-mobile" ).click(function(e) {
149		e.preventDefault();
150		$(".search_box_2").toggleClass('active');
151	});
152	
153	
154	
155	/* switch, toogle */
156
157	
158	$('.toggle').click(function(e){
159	  e.preventDefault(); // The flicker is a codepen thing
160
161	  $(this).toggleClass('toggle-on');
162	  
163	  
164	  
165	  $("body").toggleClass('boxed');
166	  $("body").toggleClass('stretched');	  
167	  
168	  //set cookies
169	  if ($("body").hasClass("boxed")) {
170		$.cookie('toogle_number_cookie', 'boxed');
171		}
172	  if ($("body").hasClass("stretched")) {
173		$.cookie('toogle_number_cookie', 'stretched');
174		}
175	  
176	  
177	  	  
178	  
179	  
180	});
181	
182
183
184	
185	//check for cookies
186	var toogle_number_cookie = $.cookie('toogle_number_cookie'); //set cookie var
187	if (toogle_number_cookie == 'boxed') { //if equals this val
188	  $("body").addClass('boxed').removeClass('stretched'); // do this
189	}
190	
191	if (toogle_number_cookie == 'stretched') { //if equals this val
192	  $("body").addClass('stretched').removeClass('boxed'); // do this
193	}
194	if (toogle_number_cookie == null) { //if equals this val
195	// do nothing
196	};
197	
198	
199	
200	/*
201	$('#switch').addClass('test3').removeClass('test2');
202	*/
203	
204	
205	
206	if ($("body").hasClass("boxed")) {
207      $('#switch').addClass('toggle-on');
208	}
209	
210	if ($("body").hasClass("stretched")) {
211      $('#switch').removeClass('toggle-on');
212	}
213
214	
215	jQuery(document).ready(function($) {
216	var newwindow;	
217		
218	/* Share Social Buttons Modal window */
219	 jQuery('.social-share a').on('click', function(){
220        newwindow=window.open($(this).attr('href'),'','height=450,width=700');
221        if (window.focus) {newwindow.focus()}
222        return false;
223    });
224	});
225	
226})(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.