PageSourceSearch

https://www.airqualitysolutions.ca/wp-content/themes/venture/js/custom.js?ver=71db29b587ab16c367bf67966dca77e7

js airqualitysolutions.ca collected 2026-09-26 09:45:10 UTC 5,924 bytes, 190 lines download raw bytes

1jQuery(function( $ ) {
2  
3	$('.single-portfolio .aside').jScroll({speed:0});
4
5 	$(".single-nav a").tipsy({ gravity: "s" });
6	$(".social a").tipsy({ gravity: "s" });
7
8
9	if ( $('.wpzoom-portfolio-slider-tabs').length > 0 ) {
10		$('.wpzoom-portfolio-slider-tabs .pst-nav li').click(function(){
11			$(this).addClass('current').siblings().removeClass('current');
12			$(this).parent().parent().find('.pst-slider').removeClass('current').filter('.' + $(this).attr('data-value')).addClass('current');
13		});
14
15		$('.pst-slider').flexslider({
16			selector: 'ul > li',
17			controlNav: false,
18			directionNav: true,
19			animationLoop: false,
20			animation: 'slide',
21			slideshow: false,
22			useCSS: false,
23			smoothHeight: false,
24			animationSpeed: 600
25		});
26	}
27
28    var $folioitems = $('#portfolio #portfolio-items');
29	if ( typeof wpz_currPage != 'undefined' && wpz_currPage < wpz_maxPages ) {
30		$('.navigation').after('<a id="load-more" href="#">Load More&hellip;</a>').remove();
31		$('#load-more').click(function(){
32			if ( wpz_currPage < wpz_maxPages ) {
33				$(this).text('Loading...');
34				wpz_currPage++;
35				$.get(wpz_pagingURL + wpz_currPage + '/', function(data){
36					$newItems = $('#portfolio-items li', data).addClass('hidden').hide();
37					$folioitems.append($newItems);
38					$folioitems.find('li.hidden').show('slow').removeClass('hidden');
39
40 					if ( (wpz_currPage+1) <= wpz_maxPages ) {
41
42						$('#load-more').text('Load More\u2026');
43					} else {
44						$('#load-more').animate({height:'hide', opacity:'hide'}, 'slow', function(){$(this).remove();});
45					}
46				});
47			}
48			return false;
49		});
50	}
51
52	if ( $('#respond input, #respond textarea').length > 0 && 'placeholder' in $('#respond input, #respond textarea')[0] ) {
53		$('#respond').find('#commentform p label').hide();
54	}
55});
56
57function wpz_sliderTextAnimate(slider) {
58 	var $currentSlide = jQuery('#slider .slides li').not('.clone').eq(slider.animatingTo),
59	    $otherSlides = jQuery('#slider .slides li').not($currentSlide);
60
61	$otherSlides.find('h3').animate({'margin-top': 0, 'opacity': 0}, 800);
62	$otherSlides.find('.excerpt').animate({'left': '-680px', 'opacity': 0}, 800);
63	$currentSlide.find('h3').animate({'margin-top': '130px', 'opacity': 1}, 800);
64	$currentSlide.find('.excerpt').animate({'left': 0, 'opacity': 1}, 800);
65}
66
67(function($) {
68 
69jQuery.fn.sorted = function(customOptions) {
70		var options = {
71			reversed: false,
72			by: function(a) {
73				return a.text();
74			}
75		};
76		jQuery.extend(options, customOptions);
77	
78		$data = jQuery(this);
79        var arr = $data.get();
80		arr.sort(function(a, b) {
81			
82		   	var valA = options.by(jQuery(a));
83		   	var valB = options.by(jQuery(b));
84			if (options.reversed) {
85				return (valA < valB) ? 1 : (valA > valB) ? -1 : 0;				
86			} else {		
87				return (valA < valB) ? -1 : (valA > valB) ? 1 : 0;	
88			}
89		});
90		return jQuery(arr);
91	};
92
93})(jQuery);
94
95jQuery(function() {
96  
97  var read_button = function(class_names) {
98    var r = {
99      selected: false,
100      type: 0
101    };
102    for (var i=0; i < class_names.length; i++) {
103      if (class_names[i].indexOf('active') == 0) {
104        r.selected = true;
105      }
106      if (class_names[i].indexOf('segment-') == 0) {
107        r.segment = class_names[i].split('-')[1];
108      }
109    };
110    return r;
111  };
112  
113  var determine_sort = function($buttons) {
114    var $selected = $buttons.parent().filter('[class*="active"]');
115    return $selected.find('a').attr('data-value');
116  };
117  
118  var determine_kind = function($buttons) {
119    var $selected = $buttons.parent().filter('[class*="active"]');
120    return $selected.find('a').attr('data-value');
121  };
122  
123  var $preferences = {
124    duration: 400,    
125    adjustHeight: 'dynamic',
126	useScaling: true
127  };
128  
129  var $list = jQuery('#portfolio-items');
130  var $data = $list.clone();
131  
132  var $controls = jQuery('#portfolio-tags');
133  
134  $controls.each(function(i) {
135    
136    var $control = jQuery(this);
137    var $buttons = $control.find('a');
138    
139    $buttons.bind('click', function(e) {
140      
141      var $button = jQuery(this);
142      var $button_container = $button.parent();
143      var button_properties = read_button($button_container.attr('class').split(' '));      
144      var selected = button_properties.selected;
145      var button_segment = button_properties.segment;
146
147      if (!selected) {
148
149        $buttons.parent().removeClass('active');
150        $button_container.addClass('active');
151        
152        var sorting_type = determine_sort($controls.eq(1).find('a'));
153        var sorting_kind = determine_kind($controls.eq(0).find('a'));
154        
155        if (sorting_kind == 'all') {
156          var $filtered_data = $data.find('li');
157        } else {
158          var $filtered_data = $data.find('li.' + sorting_kind);
159        }
160        
161        if (sorting_type == 'size') {
162          var $sorted_data = $filtered_data.sorted({
163            by: function(v) {
164              return parseFloat(jQuery(v).find('span').text());
165            }
166          });
167        } else {
168          var $sorted_data = $filtered_data.sorted({
169            by: function(v) {
170              return jQuery(v).find('strong').text().toLowerCase();
171            }
172          });
173        }
174        
175        $list.quicksand($sorted_data, $preferences);
176        
177      }
178      
179      e.preventDefault();
180    });
181    
182  }); 
183
184 
185});
186
187
188
189// jScroll 1.1 - William Duffy - http://www.wduffy.co.uk/jScroll
190(function($){$.fn.jScroll=function(e){var f=$.extend({},$.fn.jScroll.defaults,e);return this.each(function(){var a=$(this);var b=$(window);var c=new location(a);b.scroll(function(){a.stop().animate(c.getMargin(b),f.speed)})});function location(d){this.min=d.offset().top;this.originalMargin=parseInt(d.css("margin-top"),10)||0;this.getMargin=function(a){var b=d.parent().height()-d.outerHeight();var c=this.originalMargin;if(a.scrollTop()>
190=this.min)c=c+f.top+a.scrollTop()-this.min;if(c>b)c=b;return({"marginTop":c+'px'})}}};$.fn.jScroll.defaults={speed:"slow",top:10}})(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.