PageSourceSearch

https://truby.com/wp-content/themes/modernize/javascript/gdl-scripts.js?ver=1.0

js truby.com collected 2026-10-02 10:10:19 UTC 6,535 bytes, 218 lines download raw bytes

1jQuery(document).ready(function(){
2
3	// Menu Navigation
4	jQuery('#main-superfish-wrapper ul.sf-menu').supersubs({
5		minWidth: 14.5,
6		maxWidth: 27,
7		extraWidth: 1
8	}).superfish({
9		delay: 100,
10		speed: 'fast',
11		animation: {opacity:'show',height:'show'}
12	});
13	
14	// Accordion
15	jQuery("ul.gdl-accordion li").each(function(){
16		//jQuery(this).children(".accordion-content").css('height', function(){ 
17			//return jQuery(this).height(); 
18		//});
19		
20		if(jQuery(this).index() > 0){
21			jQuery(this).children(".accordion-content").css('display','none');
22		}else{
23			jQuery(this).find(".accordion-head-image").addClass('active');
24		}
25		
26		jQuery(this).children(".accordion-head").bind("click", function(){
27			jQuery(this).children().addClass(function(){
28				if(jQuery(this).hasClass("active")) return "";
29				return "active";
30			});
31			jQuery(this).siblings(".accordion-content").slideDown();
32			jQuery(this).parent().siblings("li").children(".accordion-content").slideUp();
33			jQuery(this).parent().siblings("li").find(".active").removeClass("active");
34		});
35	});
36	
37	// Toggle Box
38	jQuery("ul.gdl-toggle-box li").each(function(){
39		//jQuery(this).children(".toggle-box-content").css('height', function(){ 
40			//return jQuery(this).height(); 
41		//});
42		jQuery(this).children(".toggle-box-content").not(".active").css('display','none');
43		
44		jQuery(this).children(".toggle-box-head").bind("click", function(){
45			jQuery(this).children().addClass(function(){
46				if(jQuery(this).hasClass("active")){
47					jQuery(this).removeClass("active");
48					return "";
49				}
50				return "active";
51			});
52			jQuery(this).siblings(".toggle-box-content").slideToggle();
53		});
54	});
55	
56	// Search Movement
57	jQuery(".search-wrapper").filter(":first").find("#searchsubmit").click(function(){
58		if( jQuery(this).siblings("#search-text").width() == 1 ){
59			jQuery(this).siblings("#search-text").children("input[type='text']").val('');
60			jQuery(this).siblings("#search-text").animate({ width: '170px' });
61			jQuery(this).siblings("#search-text").children("input[type='text']").focus();
62			return false;
63		}
64		if( jQuery(this).siblings("#search-text").children("input[type='text']").val() == '' ){
65			return false;
66		}
67	});
68	jQuery("#searchform").click(function(){
69	   if (event.stopPropagation){
70		   event.stopPropagation();
71	   }
72	   else if(window.event){
73		  window.event.cancelBubble=true;
74	   }
75		//event.stopPropagation();
76	});
77	jQuery("html").click(function(){
78		jQuery(this).find(".search-wrapper").filter(":first").find("#search-text").animate({ width: '1px' });
79	});
80	
81	// Social Hover
82	jQuery(".social-icon").hover(function(){
83		jQuery(this).animate({ opacity: 1 }, 150);
84	}, function(){
85		jQuery(this).animate({ opacity: 0.55 }, 150);
86	});
87	
88	// Scroll Top
89	jQuery('div.scroll-top').click(function() {
90		  jQuery('html, body').animate({ scrollTop:0 }, { duration: 600, easing: "easeOutExpo"});
91		  return false;
92	});
93	
94	// Blog Hover
95	jQuery(".blog-thumbnail-image img").hover(function(){
96		jQuery(this).animate({ opacity: 0.55 }, 150);
97	}, function(){
98		jQuery(this).animate({ opacity: 1 }, 150);
99	});
100	
101	// Gallery Hover
102	jQuery(".gallery-thumbnail-image img").hover(function(){
103		jQuery(this).animate({ opacity: 0.55 }, 150);
104	}, function(){
105		jQuery(this).animate({ opacity: 1 }, 150);
106	});
107	
108	// Port Hover
109	jQuery("#portfolio-item-holder .portfolio-thumbnail-image-hover").hover(function(){
110		jQuery(this).animate({ opacity: 0.55 }, 400, 'easeOutExpo');
111		jQuery(this).find('span').animate({ left: '50%'}, 300, 'easeOutExpo');
112	}, function(){
113		jQuery(this).find('span').animate({ left: '150%'}, 300, 'easeInExpo', function(){
114			jQuery(this).css('left','-50%');
115		});
116		jQuery(this).animate({ opacity: 0 }, 400, 'easeInExpo');
117	});
118	
119	// Price Table
120	jQuery(".gdl-price-item").each(function(){
121		var max_height = 0;
122		jQuery(this).find('.price-item').each(function(){
123			if( max_height < jQuery(this).height()){
124				max_height = jQuery(this).height();
125			}
126		});
127		jQuery(this).find('.price-item').height(max_height);
128		
129	});
130
131});
132
133jQuery(window).load(function(){
134
135	// Set Portfolio Max Height
136	var port_item_holder = jQuery('div#portfolio-item-holder');
137	port_item_holder.equalHeights();
138	jQuery(window).resize(function(){
139		port_item_holder.children().css('height','auto');
140		port_item_holder.equalHeights();
141	});
142	
143	// Set Sidebar height
144	var content_wrapper = jQuery('.content-wrapper').filter(':first');
145	var left_sidebar_wrapper = content_wrapper.find('.left-sidebar-wrapper').filter(':first');
146	var right_sidebar_wrapper = content_wrapper.find('.right-sidebar-wrapper').filter(':first');
147	content_wrapper.each(function(){
148		max_height = jQuery(this).height();
149		top_slider_height = jQuery(this).find('.slider-wrapper.fullwidth').height();
150		
151		max_height = max_height - top_slider_height;
152		left_sidebar_wrapper.height(max_height);
153		right_sidebar_wrapper.height(max_height);
154	});
155	
156	jQuery(window).resize(function(){
157		left_sidebar_wrapper.css('height', 'auto');
158		right_sidebar_wrapper.css('height', 'auto');
159		content_wrapper.each(function(){
160			max_height = jQuery(this).height();
161			top_slider_height = jQuery(this).find('.slider-wrapper.fullwidth').height();
162			
163			max_height = max_height - top_slider_height;
164			left_sidebar_wrapper.height(max_height);
165			right_sidebar_wrapper.height(max_height);
166		});	
167	});
168
169});
170
171
172/* Tabs Activiation
173================================================== */
174jQuery(document).ready(function() {
175
176	var tabs = jQuery('ul.tabs');
177
178	tabs.each(function(i) {
179
180		//Get all tabs
181		var tab = jQuery(this).find('> li > a');
182		var tab_content = jQuery(this).next('ul.tabs-content');
183		tab.click(function(e) {
184
185			//Get Location of tab's content
186			var contentLocation = jQuery(this).attr('data-href');
187			
188			//Let go if not a hashed one
189			if(typeof( contentLocation ) != 'undefined') {
190
191				e.preventDefault();
192
193				//Make Tab Active
194				tab.removeClass('active');
195				jQuery(this).addClass('active');
196
197				//Show Tab Content & add active class
198				tab_content.children('li[data-href='+ contentLocation +']').fadeIn(200).addClass('active').siblings().hide().removeClass('active');
199
200			}
201		});
202	});
203});
204
205/* Equal Height Function
206================================================== */
207(function($) {
208	$.fn.equalHeights = function(px) {
209		$(this).each(function(){
210			var currentTallest = 0;
211			$(this).children().each(function(i){
212				if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
213			});
214			$(this).children().css({'height': currentTallest}); 
215		});
216		return this;
217	};
218})(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.