PageSourceSearch

https://www.blackbutteranch.com/wp-content/uploads/calendarize-it/…/js/rhc_accordion_widget.js?ver=1.2.5.2

js blackbutteranch.com collected 2026-09-26 02:15:11 UTC 23,581 bytes, 904 lines download raw bytes

1;;
2(function($){
3	var scroll_set_interval;
4	var did_scroll = false;	
5	//---	
6	var methods = {
7		init : function( options ){
8			var settings = $.extend( {
9				'todo':	false,
10				'is_in_viewport': null,
11				'scroll_delay': 100,
12				'scroll_offset_start': 0, //starting
13				'scroll_offset_scrolling' : 0,
14				'accordion' : true
15			}, options);			
16			
17			init_scroll_handler( settings );
18			
19			return this.each(function(){
20				var data = $(this).data('rhcAccordionWidgetItem');
21				if(!data){
22					$(this)
23						.data('rhcAccordionWidgetItem',settings)
24					;			
25					
26					//click header to open body
27					$(this).find('.rhc-widget-header')
28						.unbind('click')
29						.bind('click', function(e){
30							var item = $(this).closest('.rhc-accordion-widget-item');
31							holder = $(this).closest('.supe-item-holder');
32							if( settings.accordion && holder.length > 0 ){								
33								if( ! item.is('.open') ){
34									holder.find('.rhc-accordion-widget-item.open').toggleClass('open');
35								}
36							}
37							item.toggleClass('open');
38							
39							return true;
40						})
41					;
42					
43					//google map icon
44					if( $(this).find('.rhc-gmap').length > 0 ){
45						$(this).find('.rhc-icon-map')
46							.data('container', this)
47							.unbind('click')
48							.bind('click', function(e){
49								return cb_google_map_icon_click( e, $(this).data('container') );					
50							})
51						;					
52					}else{
53						$(this).find('.rhc-icon-map').hide();
54					}
55					
56					//ical icon
57					post_id = parseInt( $(this).data('post_id') );
58					if( post_id > 0 ){
59						$(this).find('.rhc-icon-ical')
60							.data('container', this)
61							.unbind('click')
62							.bind('click', function(e){	
63								return cb_ical_btn_click( e, this, $(this).data('container') );
64							})
65						;					
66					}else{
67						$(this).find('.rhc-icon-ical').hide();
68					}
69
70					//social sharing panel icons (requires addon)					
71					social_sharing_addon( $(this), {
72						title: $(this).find('.rhc-event-title').html()||'',
73						description: $(this).find('.rhc-description').html()||'',
74						url: $(this).find('.rhc-title-link').attr('href')||''
75					});					
76
77					//clear css
78					$('[data-css_clear]').each(function(i,el){
79						arg = $(this).data('css_clear')||'display';				
80						$(this).css( arg, '');
81					});
82					//globally clear? :
83					if( '#rhc_debug'!=window.location.hash ){
84						$('.rhc-supe-loading').removeClass('rhc-supe-loading');	
85					}					
86					//--apply date format
87					//rhc_fc_date_format();
88					//header filling bar animation todo, find some non-harcoded way of doing this.
89					//$(this).find('.rhc-widget-header[data-fc_color!=""]')
90					$(this).find('.rhc-widget-header')
91						.each(function(i,el){							
92							el = $('<div class="rhc-acco-bg"></div>')
93								.prependTo(this)
94							;
95							
96							_color = $(this).data('fc_color');		
97							if( _color ){
98								el.css('background-color',  _color );
99							}
100						})
101					;
102					//--
103					if( el_bottom_is_in_viewport && el_bottom_is_in_viewport( this, settings.scroll_offset_start ) ){
104						$(this).addClass('supe-shown');			
105					}else{
106						$(this).removeClass('supe-shown').addClass('supe-animate');	
107					}					
108				}
109			});
110		}
111	};
112	
113	function init_scroll_handler( s ){
114		//--
115		$(window).off("resize", scroll_handler);
116		$(window).resize(scroll_handler);
117		//---
118		$(window).off("scroll", scroll_handler);
119		$(window).scroll(scroll_handler);
120
121		if( scroll_set_interval ){
122			window.clearInterval(scroll_set_interval);
123		}
124			
125		scroll_set_interval = setInterval(function() {
126			if(did_scroll) {
127				did_scroll = false;
128				$('.rhc-accordion-widget-item:not(.supe-shown)').each(function(i,el){
129					if( is_in_viewport( el, s.scroll_offset_scrolling ) ){
130						$(el).addClass('supe-shown');
131					}
132				});
133			}
134		}, s.scroll_delay);
135	}
136	
137	function el_bottom_is_in_viewport( el, offset ){
138		offset = parseInt(offset||0);
139
140		var $elem = $(el);
141		var $window = $(window);
142
143		var docViewTop = $window.scrollTop();
144		var docViewBottom = docViewTop + $window.height() + offset;
145
146		var elemTop = $elem.offset().top;
147		var elemBottom = elemTop + $elem.outerHeight();
148
149		//return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
150		return (elemBottom <= docViewBottom);//compare against element bottom
151		//return (elemTop <= docViewBottom);//compare against element top		
152	}
153	
154	function is_in_viewport( el, offset ){
155		offset = parseInt(offset||0);
156//console.log('off',offset);
157		var $elem = $(el);
158		var $window = $(window);
159
160		var docViewTop = $window.scrollTop();
161		var docViewBottom = docViewTop + $window.height() + offset;
162
163		var elemTop = $elem.offset().top;
164		var elemBottom = elemTop + $elem.outerHeight();
165
166		//return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
167		//return (elemBottom <= docViewBottom);//compare against element bottom
168		return (elemTop <= docViewBottom);//compare against element top
169		
170	}
171
172	function scroll_handler(){
173		did_scroll = true;
174	}
175	
176	function cb_ical_btn_click( e, btn, container ){	
177		//-- ics download link
178		var local_id = $(container).data('post_id') || 0;
179		if( local_id > 0 ){
180			var url = RHC.ajaxurl;
181			url = _add_param_to_url( url, 'rhc_action', 'get_icalendar_events');
182			url = _add_param_to_url( url, 'ics', '1' );
183			url = _add_param_to_url( url, 'ID', local_id );
184			
185			_target = $(btn).data('target')||'_self';
186			
187			window.open( url, _target );
188		}
189		return false;
190	}
191	
192	function cb_google_map_icon_click( e, container ){
193		gmap = $(container).find('.rhc-gmap');
194		if( gmap.length ){
195			//--toogle--
196			gmap.toggleClass('rhc-gmap-open');
197			//--init map
198			setTimeout(function(){
199				gmap.rhcGmap({});
200			},100);//with an animation running somethings the map does not render.
201		}
202		return true;
203	}
204		
205	function social_sharing_addon( item, ev ){
206		//--setup sharing buttons from social panels
207		if( 'undefined' != typeof rhp_vars ){			
208			if( item.find('.rhc-icon-facebook').length > 0 ){
209				item.find('.rhc-icon-facebook').show().unbind('click').bind('click',function(e){
210					e.preventDefault();
211					
212					FB.init({appId: rhp_vars.fb_appID, status: true, cookie: true, version:'v2.4' });
213					
214					// calling the API ...
215					var obj = {
216					  method: 'share',
217					  href: ev.url,
218					  link: ev.url,
219					  name: ev.title,
220					  caption: ev.title,
221					  description: ev.description
222					};
223				
224					function callback(response) {
225					  //console.log(response);
226					}
227					
228					FB.ui(obj, callback);
229				});
230			}
231			
232			if( item.find('.rhc-icon-twitter').length > 0 ){
233				item.find('.rhc-icon-twitter').show().unbind('click').bind('click',function(e){
234					var articleUrl = encodeURIComponent( ev.url );
235					var articleSummary = encodeURIComponent( ev.description );
236					var goto = 'https://twitter.com/share?' +
237						'&url=' + ev.url +
238						'&text=' + ev.title + 
239						'&counturl=' + ev.url;
240					window.open(goto, 'Twitter', "width=660,height=400,scrollbars=no;resizable=no");
241				});
242			}
243			
244			if( item.find('.rhc-icon-linkedin').length > 0 ){
245				item.find('.rhc-icon-linkedin').show().unbind('click').bind('click',function(e){
246					var articleUrl = encodeURIComponent( ev.url );
247					var articleTitle = encodeURIComponent( ev.title );
248					var articleSummary = encodeURIComponent( ev.description );
249					var articleSource = encodeURIComponent( ev.url );
250					var goto = 'http://www.linkedin.com/shareArticle?mini=true'+
251						 '&url='+articleUrl+
252						 '&title='+articleTitle+
253						 '&summary='+articleSummary+ articleUrl +
254						 '&source='+articleSource;
255
256					window.open(goto, 'LinkedIn', "width=660,height=400,scrollbars=no;resizable=no");
257				});
258			}	
259			
260			if( item.find('.rhc-icon-googleplus').length > 0 ){
261				item.find('.rhc-icon-googleplus').show().unbind('click').bind('click',function(e){
262					var articleUrl = encodeURIComponent( ev.url );
263					var goto = 'https://plus.google.com/share?url=' + articleUrl;
264		
265					window.open(goto, 'Google+', "width=660,height=400,scrollbars=no;resizable=no");
266				});
267			}
268		}
269	}
270
271	$.fn.rhcAccordionWidgetItem = function( method ) {
272		if ( methods[method] ) {
273			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
274		} else if ( typeof method === 'object' || ! method ) {
275			return methods.init.apply( this, arguments );
276		} else {
277			$.error( 'Method ' +  method + ' does not exist on jQuery.rhcAccordionWidget' );
278		}    
279	};
280	
281	$.fn.rhcAccordionWidgetItem.is_in_viewport = is_in_viewport;
282})(jQuery);
283
284(function($){
285	var methods = {
286		init : function( options ){
287			var settings = $.extend( {
288				'todo':	false
289			}, options);			
290			
291			return this.each(function(){
292				var gmap = $(this);
293				//--init map
294				var data = gmap.data('rhc_gmap');
295				if( !data ){
296					gmap.data('rhc_gmap',true);
297				
298					init_gmap( gmap, get_markers( gmap ), 0 );
299					return true;
300				}
301			});
302		}
303	};
304	
305	function get_markers( gmap ){
306		var markers = [];
307		gmap.children().each(function(i,el){		
308			markers.push({
309				name: $(el).html(),
310				lon: $(el).data('glon'),
311				lat: $(el).data('glat'),
312				info: $(el).data('ginfo'),				
313				address: $(el).data('gaddress'),
314				marker_active: $(el).data('marker_active'),
315				marker_inactive: $(el).data('marker_active'),
316				marker_size: $(el).data('marker_size')
317			});
318		});
319		return markers;
320	}
321	
322	function init_gmap( gmap, markers, depth ){
323		depth++;
324		if( depth > 10 ) return false;		
325		if( 'interactive' != gmap.data('type') ) return false;
326		if( markers.length==0 ) return false;
327		//-- markers
328		function make_geocode_callback( markers, a ){
329			var geocodeCallBack = function(results, status) {
330				if (status == google.maps.GeocoderStatus.OK) {
331					latlng = results[0].geometry.location;
332					
333					markers[a].lat = latlng.lat();
334					markers[a].lon = latlng.lng();
335				}
336				return init_gmap( gmap, markers, depth);
337			}
338			return geocodeCallBack;
339		}
340		
341		for( var a=0; a < markers.length ; a++ ){
342			if( !markers[a].lat && !markers[a].lon && markers[a].address ){				
343				var geocoder_map = new google.maps.Geocoder();
344				geocoder_map.geocode( { 'address': markers[a].address}, make_geocode_callback( markers, a ) );	
345				return;			
346			}	
347		}
348
349		/*
350		size = gmap.data('size');
351		size_arr = size.split('x');
352		*/
353		gmap.uniqueId();
354		
355		ratio = gmap.data('ratio');
356		ratio = ''==ratio?'4:3':ratio;
357		ratio_arr = ratio.split(':');
358		
359		h = gmap.width() * ratio_arr[1] / ratio_arr[0] ;
360		gmap.height( h );
361   		//--
362   		maptype = gmap.data('maptype') || 'ROADMAP' ;
363   		//--
364   		settings = {
365   			mapTypeId: google.maps.MapTypeId[maptype],
366   			center: new google.maps.LatLng( markers[0].lat, markers[0].lon )
367   		};
368   		if( gmap.data('zoom') ){
369   			settings.zoom = gmap.data('zoom');
370   		}
371   		
372		var map = new google.maps.Map( gmap.get(0) , settings);
373
374		var bounds = new google.maps.LatLngBounds();
375		var infowindow = new google.maps.InfoWindow();
376		
377		//-- add markers to map
378		$.each( markers, function(i,data){			
379
380			marker = new google.maps.Marker({
381				position: new google.maps.LatLng( data.lat, data.lon ),
382				map: map
383			});
384	
385			bounds.extend(marker.position);			
386			google.maps.event.addListener(marker, 'click', (function(marker, i) {
387				return function() {
388					infowindow.setContent((data.info||data.name||data.address));
389					infowindow.open(map, marker);
390				}
391			})(marker, i));			
392		});
393		
394				
395		if( markers.length > 1 ){
396			map.fitBounds(bounds); 
397			/* resets to original zoom
398			var listener = google.maps.event.addListener(map, "idle", function () {
399				map.setZoom( gmap.data('zoom')||3 );
400				google.maps.event.removeListener(listener);
401			});	
402			*/
403		}
404	}
405		
406	$.fn.rhcGmap = function( method ) {
407		if ( methods[method] ) {
408			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
409		} else if ( typeof method === 'object' || ! method ) {
410			return methods.init.apply( this, arguments );
411		} else {
412			$.error( 'Method ' +  method + ' does not exist on jQuery.rhcGmap' );
413		}    
414	};
415})(jQuery);
416
417;;
418(function($){
419	var t = this;
420	var page = 0;
421	var pagequeue = [];
422	var methods = {
423		init : function( options ){
424			var settings = $.extend( {
425				'multiple' : true,
426				'debug':false,
427				'size':10,
428				'term_post_count':0
429			}, options);		
430
431			return this.each(function(){
432				var data = $(this).data('RHCSupeSimpleNav');
433				if(!data){
434					//--- 				
435					pagequeue.push({
436						id: $(this).attr('id') + $(this).data('atts').taxonomy + $(this).data('atts').terms,
437						page: 0,
438						content: $(this).clone().wrap('<div/>').parent().html()
439					});
440					//---				
441					$(this).data('RHCSupeSimpleNav',settings);
442					page = parseInt( $(this).data('atts').page );
443					initial_render( this );
444				}
445			});
446		}
447	};
448	
449	function initial_render( el ){
450		var settings = $(el).data('RHCSupeSimpleNav');		
451		var holder = $(el);
452		
453		if( 4==parseInt( settings.nav ) ){
454			$nav = $('<div></div>')
455				.addClass('supe-simple-nav')
456				.prependTo(
457					$(el).find('.supe-head')
458				)
459			;		
460		}
461
462		if( 1==parseInt( settings.nav ) || 3==parseInt( settings.nav ) ){
463
464			$nav = $('<div></div>')
465				.addClass('supe-simple-nav')
466				.prependTo(
467					$(el).find('.supe-head')
468				)
469			;
470		
471			btn_left = $('<a class=="supe-prev"></a>')
472				.data('supe', $(el))
473				.appendTo( $nav )
474				.on('click', function(e){
475					return btn_prev_click($(this),e,$(this).data('supe'));
476				})
477			;
478		
479			btn_right = $('<a class=="supe-next"></a>')
480				.data('supe', $(el))
481				.appendTo( $nav )
482				.on('click', function(e){
483					return btn_next_click($(this),e,$(this).data('supe'));
484				})
485			;
486		
487		}
488
489		
490		if( 2==parseInt( settings.nav ) || 3==parseInt( settings.nav ) ){
491
492			$nav2 = $('<div></div>')
493				.addClass('supe-simple-nav')
494				.css('z-index','10')
495				.appendTo(
496					$(el).find('.supe-footer')
497				)
498			;
499		
500			btn_left = $('<a class=="supe-prev"></a>')
501				.data('supe', $(el))
502				.appendTo( $nav2 )
503				.on('click', function(e){
504					return btn_prev_click($(this),e,$(this).data('supe'));
505				})
506			;
507		
508			btn_right = $('<a class=="supe-next"></a>')
509				.data('supe', $(el))
510				.appendTo( $nav2 )
511				.on('click', function(e){
512					return btn_next_click($(this),e,$(this).data('supe'));
513				})
514			;
515		
516		}
517		
518		//
519		head = $(el).find('.supe-head');
520		head.find('.selectpicker.not-inited').each(function(i,el){
521			taxonomy = $(el).data('taxonomy');
522			dropdown = $(el);
523			dropdown.removeClass('not-inited');
524			dropdown.attr('multiple', settings.multiple );
525			dropdown.selectpicker({
526				style: 'btn-small btn-taxfilter btn_tax',
527				size: settings.size
528			});	
529			dropdown.unbind('change', auw_btn_tax).bind('change', {taxonomy:taxonomy,settings:settings,dropdown:dropdown,holder:holder}, auw_btn_tax);
530
531			have_color=false;
532			var dropdown_menu = dropdown.parent().find('.dropdown-menu');	
533			dropdown.find('option').each(function(i,option){
534				count = $(option).attr('data-count')||'';
535				bgcolor = $(option).attr('data-bgcolor')||'transparent';
536
537				if('transparent'!=bgcolor)have_color=true;
538				dropdown_menu.find('li[rel="' + i + '"] a')
539					.prepend( $('<span class="rhc-term-color"></span>').css('background-color',bgcolor).addClass(('transparent'==bgcolor?'rhc-no-color':'')) )
540				;
541				
542				if( settings.term_post_count && parseInt( settings.term_post_count ) ){
543					count = parseInt( count );
544					if( count > 0 ){
545						dropdown_menu.find('li[rel="' + i + '"] a')
546							.append( $('<i class="fbd-term-count">' + parseInt( count ) + '</i>') )
547						;														
548					}
549				}	
550			});
551				
552			if(have_color){
553				dropdown_menu
554					.addClass('rhc-with-tax-color')
555					.addClass('rhc-with-tax-color-accordeon')
556				;
557			}
558		});
559		
560	}
561	
562	function auw_btn_tax(e){		
563		var value = $(this).val();
564		value = null==value ? '' : value;
565		var values = [];
566		
567		if( 'string'==typeof value ){
568			if( ''==value ){
569			
570			}else{
571				values.push(value);
572			}
573		}else{
574			$.each( value, function(i,v){
575				if( ''==v )return true;
576				values.push(v);	
577			});		
578		}
579		//--load atts
580		var atts = e.data.holder.attr('data-atts');	
581		if( 'string' == typeof atts ){	
582			atts = eval("(" + atts + ")");
583		}
584		
585		//--modify atts
586		atts.page = -1;//reset page.
587		
588		var taxonomy = e.data.taxonomy;	
589		if( !atts.tax_filter ) atts.tax_filter = {};
590		atts.tax_filter[taxonomy] = values;
591		
592		taxonomies = [];
593		term_arr = [];
594		for (var taxonomy in atts.tax_filter) {
595			if (atts.tax_filter.hasOwnProperty(taxonomy)) {
596				// do stuff
597				if( atts.tax_filter[taxonomy].length > 0 ){
598					taxonomies.push( taxonomy );
599					term_arr.push.apply( term_arr, atts.tax_filter[taxonomy] );
600				}
601			}
602		}	
603		
604		if( taxonomies.length==0 && term_arr.length==0 ){
605			//all filter cleared - restore default.
606			atts.taxonomy = atts.taxonomy_default;
607			atts.terms = atts.terms_default;					
608		}else{
609			atts.taxonomy = taxonomies.join(',');
610			atts.terms = term_arr.join(',');				
611		}
612
613		//--save atts	
614		e.data.holder.attr('data-atts', JSON.stringify(atts) );	
615		e.data.holder.data('atts', atts );	
616		
617		return btn_click(e.data.dropdown, e, e.data.holder, 1);
618	}
619	
620	function btn_prev_click($btn, e, $supe){
621		return  btn_click($btn, e, $supe, -1);
622	}
623	
624	function btn_next_click($btn, e, $supe) {
625		return  btn_click($btn, e, $supe, 1);
626	}
627	
628	function btn_click($btn, e, $supe, delta){
629//console.log('click');	
630		if( $supe.is('.rhc-supe-lock') ) return false;
631
632		$supe
633			.addClass('rhc-supe-loading')
634			.addClass('rhc-supe-lock')
635		;
636		$btn.addClass('btn-suppe-loading');
637		//---
638		
639		//---
640		fetch_events( $btn, e, $supe, delta, function($btn, e, $supe, delta, data){
641			$btn.removeClass('btn-suppe-loading');
642			$supe
643				.removeClass('rhc-supe-loading')
644				.removeClass('rhc-supe-lock')
645			;
646		});
647		return true;
648	}
649	
650	function handle_render_no_events(  $supe, data  ){
651		var $item_holder = $supe
652			.find('.supe-item-holder')
653			.stop()
654			.fadeOut('normal',function(){
655				$(this).empty().show();
656			})
657		;
658	}
659	
660	function render_events( $supe, data ){
661//console.log( 'render_events' );
662		if( $(data.HTML).find('.rhc-accordion-widget-item').length == 0 ){
663//console.log( 'no events founds');
664			return handle_render_no_events(  $supe, data  );
665		}	
666	
667		var $item_holder = $supe
668			.find('.supe-item-holder')
669				/*.find('.rhc-event-item').each(function(i,old_item){
670					if( !$.fn.rhcAccordionWidgetItem.is_in_viewport(old_item,200) ){
671						$(old_item).remove();
672					}else{
673						$(old_item).addClass('rhc-supe-remove');
674					}
675				}).end()
676				*/
677			.stop()
678			.fadeOut('normal',function(){
679				$(this).empty().show();
680				
681				var $new_supe = $(data.HTML);
682				$supe.data('atts', $new_supe.data('atts') );
683		
684				var $items = $(data.HTML).find('.rhc-accordion-widget-item');
685				$items.each( function( i, item){
686				
687					$(item)
688						.css('opacity',0)
689						
690						.appendTo( $item_holder )
691					;
692					
693					if( $.fn.rhcAccordionWidgetItem.is_in_viewport( item,200) ){
694						$(item)
695							.addClass('supe-shown')
696						;
697					}else{
698					
699					}
700					
701					$(item).css('opacity','');
702				});
703				$supe.find('.rhc-accordion-widget-item')
704					.rhcAccordionWidgetItem()	
705				;
706			})
707		;
708		
709
710
711	}
712	
713	function fetch_events( $btn, e, $supe, delta, cb ){
714		var dev_delay = 1;//to force show loading effects
715		var args = {
716			action: 'supe_get_events',
717			delta: delta,
718			data: $supe.data('atts')
719		};
720	
721		q_page = parseInt( $supe.data('atts').page ) + parseInt( delta );
722
723		in_queue = false;
724		var data = {};		
725		$(pagequeue).each(function(i,q){				
726//return false;//break this look to always query.
727			queue_id = $supe.attr('id') + $supe.data('atts').taxonomy + $supe.data('atts').terms;		
728			if( queue_id==q.id && q_page == q.page ){
729				in_queue = true;
730				data = {
731					R: 'OK',
732					PAGE: q_page,
733					HTML: q.content
734				};
735				render_events( $supe, data );
736				
737				setTimeout( function(a){				
738					if( cb )
739						cb( $btn, e, $supe, delta, data );
740				} , dev_delay );	
741				return false;				
742			}
743			return true;
744		});
745		
746		if( in_queue ){
747			return true;
748		}
749		
750		 $
751			.post( args.data.ajaxurl, args, function(data){		
752				if(data.R=='OK'){	
753				
754					pagequeue.push({
755						id: $supe.attr('id') + $supe.data('atts').taxonomy + $supe.data('atts').terms,
756						page: data.PAGE,
757						content: $(data.HTML).clone().wrap('<div/>').parent().html()
758					});
759									
760					render_events( $supe, data );			
761				}else if(data.R=='ERR'){
762					//alert(data.MSG);					
763				}else{
764					//alert('Unexpected error');
765				}
766			
767				setTimeout( function(){
768					if( cb )
769						cb( $btn, e, $supe, delta, data );
770				} , dev_delay );			
771			
772			}, 'json')
773			.fail(function(){
774				setTimeout( function(){
775					if( cb )
776						cb( $btn, e, $supe, delta, data );
777				} , dev_delay );					
778			})
779		;
780
781	}
782	
783	$.fn.RHCSupeSimpleNav = function( method ) {
784		if ( methods[method] ) {
785			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
786		} else if ( typeof method === 'object' || ! method ) {
787			return methods.init.apply( this, arguments );
788		} else {
789			$.error( 'Method ' +  method + ' does not exist on jQuery.RHCSupeSimpleNav' );
790		}    
791	};
792})(jQuery);
793
794(function($){
795	var methods = {
796		init : function( options ){
797			var settings = $.extend( {
798				'debug':false
799			}, options);		
800
801			return this.each(function(){
802				var data = $(this).data('RHCSupe');
803				if(!data){
804				
805					$(this).data('RHCSupe',settings);
806					
807					init_uew_widget_items( $(this) );		
808					
809					var this_supe = $(this);
810					set_size_class( this_supe );
811					$(window).on('resize',function(e){
812						set_size_class( this_supe );
813					});	
814					//--
815					/*
816					var atts = $(this).data('atts');	
817					atts.taxonomy_default = atts.taxonomy;
818					atts.terms_default = atts.terms;
819					//-- save atts
820					$(this).attr('data-atts', JSON.stringify(atts) );	
821					$(this).data('atts', atts );			
822					*/
823				}
824			});
825		}
826	};
827	
828	function set_size_class( supe ){		
829		var w = supe.width();
830		if( w > 0 ){
831			supe.removeClass (function (index, css) {
832			   return (css.match (/(^|\s)auw_\S+/g) || []).join(' ');
833			});		
834			if( w < 200 ){
835				supe.addClass('auw_200');
836			}else if( w < 500 ){
837				supe.addClass('auw_500');
838			}else if( w < 600 ){
839				supe.addClass('auw_500_600');
840			}else if( w < 768 ){
841				supe.addClass('auw_600_768');
842			}else if( w < 1024 ){
843				supe.addClass('auw_768_1024');
844			}else if( w >= 1024 ){
845				supe.addClass('auw_768_1024');
846			}
847		}
848	}
849	
850	function init_uew_widget_items( supe ){
851		if( supe.find('.rhc-accordion-widget-item').length > 0 ){
852			supe.find('.rhc-accordion-widget-item')
853				.rhcAccordionWidgetItem()
854			;
855		}else{
856			supe.removeClass('rhc-supe-loading');	
857			supe.find('.rhc-supe-no-events').css('opacity','');
858		}
859		
860		atts = supe.data('atts');
861		if( atts && atts.nav ){
862			//-- other nav
863			
864			//--
865			if( parseInt(atts.nav) > 0 ){
866				supe
867					.RHCSupeSimpleNav({
868						'nav': atts.nav,
869						'multiple': parseInt( atts.tax_filter_multiple ) ? true : false,
870						'term_post_count' : ( atts.term_post_count ? atts.term_post_count : 0 )
871					})
872				;				
873			}
874		}
875	}
876	
877	$.fn.RHCSupe = function( method ) {
878		if ( methods[method] ) {
879			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
880		} else if ( typeof method === 'object' || ! method ) {
881			return methods.init.apply( this, arguments );
882		} else {
883			$.error( 'Method ' +  method + ' does not exist on jQuery.RHCSupe' );
884		}    
885	};
886})(jQuery);
887
888
889function init_uew_widgets(){
890jQuery(document).ready(function($){
891	if( $('.rhc-supe').length > 0 ){
892		$('.rhc-supe').RHCSupe({});
893	}else{
894		setTimeout( init_uew_widgets ,500);
895	}	
896});
897}
898
899init_uew_widgets();
900
901jQuery(document).ready(function($){
902	
903});
904

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.