PageSourceSearch

https://rasptut.co.uk/rw_common/themes/kuler_react/jquery/kuler.js

js rasptut.co.uk collected 2026-10-04 14:13:07 UTC 8,459 bytes, 283 lines download raw bytes

1/*/////////////////////////////////////////////////////////////////////////////////////////////////////*/
2/* rwtessential.js.min */
3/* @group rwtSetHeight plugin v1.0.0 05-13-10 14:27 modified from seyDoggy (Adam Merrifield) */
4(function(jQuery) { jQuery.fn.rwtSetHeight = function() { var tallest = 0; jQuery(this).each(function(){ if (jQuery(this).outerHeight(true) > tallest) tallest = jQuery(this).outerHeight(true); }); jQuery(this).height(tallest); }; })(jQuery);/* @end */
5/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
6jQuery(document).ready(function($){
7		$('.filesharing-item').wrapAll('<div class="portfolio col-3" />');
8		$('.filesharing-item').rwtSetHeight();
9		$('.movie-thumbnail-frame').rwtSetHeight();
10
11		// custom classes added to fileshare and movie index items to allow for rounded corners 
12		$('.filesharing-item').addClass('portfolio-item one-third column');
13		
14		$('.movie-thumbnail-frame').addClass('css3');/* add rounded corners to movie index items */
15		// custom classes added to the blog page
16		$("ul.blog-tag-cloud li:first-child").addClass("first");
17		
18		
19		$('#main-nav ul li ul').addClass('navSub');
20		$('#main-nav ul > li > ul').parents('li').attr("class", "parent");
21		$('#main-nav ul > li.parent').prepend('<span class="subIndicator"></span>');
22		$("#main-nav ul li ul li .subIndicator").remove();
23		$('#main-nav ul > li.parent').hover(function() {
24		  $('.subIndicator').addClass('pretty-hover');
25		}, function() {
26		  $('.subIndicator').removeClass('pretty-hover');
27		});
28
29	});
30jQuery(document).ready(function(jQuery){	
31	if (jQuery('#myExtraContent4').length){
32		jQuery('#extraContainer4').addClass('show4'); 		
33	}	
34	else if (jQuery('#extraContainer4').length)
35	{
36		jQuery('.footer-upper').remove();
37			
38	}
39
40	
41});
42
43	
44jQuery(document).ready(function($){
45
46		
47	/* DROP PANEL */
48	$('#panelReveal, #panelCloser').click(function(e){
49		e.preventDefault();
50		$('#myExtraContent1').slideToggle();
51		$('#panelCloser').toggleClass('reveal');		
52	});	
53		
54		
55	
56	jQuery(document).ready(function($){
57	$("#panelCloser").prependTo("#extraContainer1 .container");
58	$(".footerUpper").prependTo(".footer-upper");
59	
60	});
61	
62	jQuery(document).ready(function($){
63	var parentHeight = $('#masthead').height();
64	var childHeight = $('#main-nav').height();
65	$('#main-nav').css('margin-top', (parentHeight - childHeight) / 2);
66	
67	});
68	jQuery(document).ready(function($){
69	jQuery('img.imageStyle').each(function(){
70	    jQuery(this).addClass('scale-with-grid');
71	});
72	});
73	
74	
75	/* Style for JS-enabled */
76	
77	$('body').addClass('js-enabled');
78	
79	
80	/* Keep track of the width for use in mobile browser displays */
81	var currentWindowWidth = $(window).width();
82	$(window).resize(function(){
83		currentWindowWidth = $(window).width();
84	});
85	
86	
87	
88	/* FLEX SLIDER */
89	var $flexSlider = $('.flexslider');
90	$flexSlider.flexslider({
91		animation: "slide",
92		controlsContainer: ".flex-container",
93		prevText: "&larr;",
94		nextText: "&rarr;",
95		pausePlay:true,
96		pauseOnHover:true,
97		before:	function($slider){
98			$slider.find('.flex-caption').fadeOut('fast');			
99		},
100		after: function($slider){
101			$slider.find('.flex-caption').fadeIn();			
102		}
103	});
104	$('.height-expand').each(function(){
105		$(this).height($(this).prev().height());
106	});
107	
108	
109	
110	/* PRETTY PHOTO */
111	$("a[data-rel^='prettyPhoto']").prettyPhoto({
112		social_tools: '',
113		overlay_gallery: false
114	});
115	$("a[rel^='prettyPhoto']").prettyPhoto({
116		overlay_gallery: false
117	});
118	
119	/* MOBILE MENU */
120    $('.mobileNavTab').click(function(e){
121    	e.preventDefault();
122    	var $menu = $($(this).attr('href'));
123    	$menu.toggleClass('menu-open'); //toggle()
124    	
125    	if(typeof $navClose !== 'undefined' && !$menu.hasClass('menu-open') ){
126    		console.log('hide');
127    		$navClose.hide();
128    	}
129    });
130	
131
132	
133    
134    //IPHONE, IPAD, IPOD
135    var deviceAgent = navigator.userAgent.toLowerCase();    
136	var is_iOS = deviceAgent.match(/(iphone|ipod|ipad)/);
137	
138	if (is_iOS) {
139        
140        $('#main-nav').prepend('<a href="#" class="nav-close">&times;</a>'); // Close Submenu
141        
142        var $navClose = $('.nav-close');
143        $navClose.hide().click(function(e){
144        	e.preventDefault();
145        	if(currentWindowWidth >= 767){
146        		$(this).hide();
147        	}
148        });
149		
150        $('#main-nav > ul > li').hover(function(e){
151        	e.preventDefault();
152        	if(currentWindowWidth < 767){
153        		$navClose.css({ 
154        			top : $(this).position().top + 33,
155        			left : '',
156        			right : 0
157        		}).show();
158        	}
159        	else{
160        		$navClose.css({
161        			left : $(this).position().left + parseInt($(this).css('marginLeft')),
162        			top : '',
163        			right : 'auto'
164        		}).show();
165        	}
166        });
167              
168	}
169	
170	
171	//NON-IOS
172	if(!is_iOS){
173		//iOS doesn't like CSS3 transitioning preloader, so don't use it
174		$('.preload').preloadImages({
175	        showSpeed: 200   // length of fade-in animation, should be .2 in CSS transition
176	    });	   
177		$('.video-container').addClass('video-flex');
178	}
179	
180	
181	//ANDROID
182	var is_Android = deviceAgent.match(/(android)/);
183	if(is_Android){
184		//Do something special with Android
185	}
186    
187	
188	//HTML5 Fallbacks
189	if(!Modernizr.input.placeholder){
190		$('.fallback').show();
191	}
192		
193});
194
195
196
197//Image Preloader
198jQuery.fn.preloadImages = function(options){
199
200    var defaults = {
201        showSpeed: 200
202    };
203
204    var options = jQuery.extend(defaults, options);
205
206	return this.each(function(){
207		var $container = jQuery(this);
208		var $image = $container.find('img');
209
210		$image.addClass('loading');	//hide image while loading
211         
212		$image.bind('load error', function(){
213			$image.removeClass('loading'); //allow image to display (will fade in with CSS3 trans)
214			
215			setTimeout(function(){ 
216				$container.removeClass('preload'); //remove the preloading class to swap the bkg
217			}, options.showSpeed);
218			
219		});
220		
221		if($image[0].complete || (jQuery.browser.msie )) { 
222			$image.trigger('load');	//IE has glitchy load triggers, so trigger it automatically
223		}
224    });
225}
226var imgSizer = {
227     Config : {
228          imgCache : []
229          ,spacer : "/path/to/your/spacer.gif"
230     }
231     ,collate : function(aScope) {
232          var isOldIE = (document.all && !window.opera && !window.XDomainRequest) ? 1 : 0;
233          if (isOldIE && document.getElementsByTagName) {
234               var c = imgSizer;
235               var imgCache = c.Config.imgCache;
236               var images = (aScope && aScope.length) ? aScope : document.getElementsByTagName("img");
237               for (var i = 0; i < images.length; i++) {
238                    images.origWidth = images.offsetWidth;
239                    images.origHeight = images.offsetHeight;
240                    imgCache.push(images);
241                    c.ieAlpha(images);
242                    images.style.width = "100%";
243               }
244               if (imgCache.length) {
245                    c.resize(function() {
246                         for (var i = 0; i < imgCache.length; i++) {
247                              var ratio = (imgCache.offsetWidth / imgCache.origWidth);
248                              imgCache.style.height = (imgCache.origHeight * ratio) + "px";
249                         }
250                    });
251               }
252          }
253     }
254     ,ieAlpha : function(img) {
255          var c = imgSizer;
256          if (img.oldSrc) {
257               img.src = img.oldSrc;
258          }
259          var src = img.src;
260          img.style.width = img.offsetWidth + "px";
261          img.style.height = img.offsetHeight + "px";
262          img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
263          img.oldSrc = src;
264          img.src = c.Config.spacer;
265     }
266     // Ghettomodified version of Simon Willison's addLoadEvent() -- http://simonwillison.net/2004/May/26/addLoadEvent/
267     ,resize : function(func) {
268          var oldonresize = window.onresize;
269          if (typeof window.onresize != 'function') {
270               window.onresize = func;
271          } else {
272               window.onresize = function() {
273                    if (oldonresize) {
274                         oldonresize();
275                    }
276                    func();
277               }
278          }
279     }
280}
281
282
283

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.