PageSourceSearch

https://terra-america.ru/ClientScript/custom_tabs/tabs.js

js terra-america.ru collected 2026-09-24 23:05:24 UTC 22,894 bytes, 777 lines download raw bytes

1var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
2if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
3{
4  let window = _____WB$wombat$assign$function_____("window");
5  let self = _____WB$wombat$assign$function_____("self");
6  let document = _____WB$wombat$assign$function_____("document");
7  let location = _____WB$wombat$assign$function_____("location");
8  let top = _____WB$wombat$assign$function_____("top");
9  let parent = _____WB$wombat$assign$function_____("parent");
10  let frames = _____WB$wombat$assign$function_____("frames");
11  let opener = _____WB$wombat$assign$function_____("opener");
12
13/*
14 * jQuery UI Tabs 1.8.14
15 *
16 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
17 * Dual licensed under the MIT or GPL Version 2 licenses.
18 * http://jquery.org/license
19 *
20 * http://docs.jquery.com/UI/Tabs
21 *
22 * Depends:
23 *	jquery.ui.core.js
24 *	jquery.ui.widget.js
25 */
26(function( $, undefined ) {
27
28var tabId = 0,
29	listId = 0;
30
31function getNextTabId() {
32	return ++tabId;
33}
34
35function getNextListId() {
36	return ++listId;
37}
38
39$.widget( "ui.tabsCustom", {
40	options: {
41		add: null,
42		ajaxOptions: null,
43		cache: false,
44		cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
45		collapsible: false,
46		disable: null,
47		disabled: [],
48		enable: null,
49		event: "click",
50		fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
51		idPrefix: "uic-tabs-",
52		load: null,
53		panelTemplate: "<div></div>",
54		remove: null,
55		select: null,
56		show: null,
57		spinner: "<em>Loading&#8230;</em>",
58		tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
59	},
60
61	_create: function() {
62		this._tabify( true );
63	},
64
65	_setOption: function( key, value ) {
66		if ( key == "selected" ) {
67			if (this.options.collapsible && value == this.options.selected ) {
68				return;
69			}
70			this.select( value );
71		} else {
72			this.options[ key ] = value;
73			this._tabify();
74		}
75	},
76
77	_tabId: function( a ) {
78		return a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) ||
79			this.options.idPrefix + getNextTabId();
80	},
81
82	_sanitizeSelector: function( hash ) {
83		// we need this because an id may contain a ":"
84		return hash.replace( /:/g, "\\:" );
85	},
86
87	_cookie: function() {
88		var cookie = this.cookie ||
89			( this.cookie = this.options.cookie.name || "uic-tabs-" + getNextListId() );
90		return $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) );
91	},
92
93	_ui: function( tab, panel ) {
94		return {
95			tab: tab,
96			panel: panel,
97			index: this.anchors.index( tab )
98		};
99	},
100
101	_cleanup: function() {
102		// restore all former loading tabs labels
103		this.lis.filter( ".uic-state-processing" )
104			.removeClass( "uic-state-processing" )
105			.find( "span:data(label.tabs)" )
106				.each(function() {
107					var el = $( this );
108					el.html( el.data( "label.tabs" ) ).removeData( "label.tabs" );
109				});
110	},
111
112	_tabify: function( init ) {
113		var self = this,
114			o = this.options,
115			fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
116
117		this.list = this.element.find( "ol,ul" ).eq( 0 );
118		this.lis = $( " > li:has(a[href])", this.list );
119		this.anchors = this.lis.map(function() {
120			return $( "a", this )[ 0 ];
121		});
122		this.panels = $( [] );
123
124		this.anchors.each(function( i, a ) {
125			var href = $( a ).attr( "href" );
126			// For dynamically created HTML that contains a hash as href IE < 8 expands
127			// such href to the full page url with hash and then misinterprets tab as ajax.
128			// Same consideration applies for an added tab with a fragment identifier
129			// since a[href=#fragment-identifier] does unexpectedly not match.
130			// Thus normalize href attribute...
131			var hrefBase = href.split( "#" )[ 0 ],
132				baseEl;
133			if ( hrefBase && ( hrefBase === location.toString().split( "#" )[ 0 ] ||
134					( baseEl = $( "base" )[ 0 ]) && hrefBase === baseEl.href ) ) {
135				href = a.hash;
136				a.href = href;
137			}
138
139			// inline tab
140			if ( fragmentId.test( href ) ) {
141				self.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) );
142			// remote tab
143			// prevent loading the page itself if href is just "#"
144			} else if ( href && href !== "#" ) {
145				// required for restore on destroy
146				$.data( a, "href.tabs", href );
147
148				// TODO until #3808 is fixed strip fragment identifier from url
149				// (IE fails to load from such url)
150				$.data( a, "load.tabs", href.replace( /#.*$/, "" ) );
151
152				var id = self._tabId( a );
153				a.href = "#" + id;
154				var $panel = self.element.find( "#" + id );
155				if ( !$panel.length ) {
156					$panel = $( o.panelTemplate )
157						.attr( "id", id )
158						.addClass( "uic-tabs-panel uic-widget-content uic-corner-bottom" )
159						.insertAfter( self.panels[ i - 1 ] || self.list );
160					$panel.data( "destroy.tabs", true );
161				}
162				self.panels = self.panels.add( $panel );
163			// invalid tab href
164			} else {
165				o.disabled.push( i );
166			}
167		});
168
169		// initialization from scratch
170		if ( init ) {
171			// attach necessary classes for styling
172			this.element.addClass( "uic-tabs uic-widget uic-widget-content uic-corner-all" );
173			this.list.addClass( "uic-tabs-nav uic-helper-reset uic-helper-clearfix uic-widget-header uic-corner-top" );
174			this.lis.addClass( "uic-state-default uic-corner-top" );
175			this.panels.addClass( "uic-tabs-panel uic-widget-content uic-corner-bottom" );
176
177			// Selected tab
178			// use "selected" option or try to retrieve:
179			// 1. from fragment identifier in url
180			// 2. from cookie
181			// 3. from selected class attribute on <li>
182			if ( o.selected === undefined ) {
183				if ( location.hash ) {
184					this.anchors.each(function( i, a ) {
185						if ( a.hash == location.hash ) {
186							o.selected = i;
187							return false;
188						}
189					});
190				}
191				if ( typeof o.selected !== "number" && o.cookie ) {
192					o.selected = parseInt( self._cookie(), 10 );
193				}
194				if ( typeof o.selected !== "number" && this.lis.filter( ".uic-tabs-selected" ).length ) {
195					o.selected = this.lis.index( this.lis.filter( ".uic-tabs-selected" ) );
196				}
197				o.selected = o.selected || ( this.lis.length ? 0 : -1 );
198			} else if ( o.selected === null ) { // usage of null is deprecated, TODO remove in next release
199				o.selected = -1;
200			}
201
202			// sanity check - default to first tab...
203			o.selected = ( ( o.selected >= 0 && this.anchors[ o.selected ] ) || o.selected < 0 )
204				? o.selected
205				: 0;
206
207			// Take disabling tabs via class attribute from HTML
208			// into account and update option properly.
209			// A selected tab cannot become disabled.
210			o.disabled = $.unique( o.disabled.concat(
211				$.map( this.lis.filter( ".uic-state-disabled" ), function( n, i ) {
212					return self.lis.index( n );
213				})
214			) ).sort();
215
216			if ( $.inArray( o.selected, o.disabled ) != -1 ) {
217				o.disabled.splice( $.inArray( o.selected, o.disabled ), 1 );
218			}
219
220			// highlight selected tab
221			this.panels.addClass( "uic-tabs-hide" );
222			this.lis.removeClass( "uic-tabs-selected uic-state-active" );
223			// check for length avoids error when initializing empty list
224			if ( o.selected >= 0 && this.anchors.length ) {
225				self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ).removeClass( "uic-tabs-hide" );
226				this.lis.eq( o.selected ).addClass( "uic-tabs-selected uic-state-active" );
227
228				// seems to be expected behavior that the show callback is fired
229				self.element.queue( "tabs", function() {
230					self._trigger( "show", null,
231						self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) );
232				});
233
234				this.load( o.selected );
235			}
236
237			// clean up to avoid memory leaks in certain versions of IE 6
238			// TODO: namespace this event
239			$( window ).bind( "unload", function() {
240				self.lis.add( self.anchors ).unbind( ".tabs" );
241				self.lis = self.anchors = self.panels = null;
242			});
243		// update selected after add/remove
244		} else {
245			o.selected = this.lis.index( this.lis.filter( ".uic-tabs-selected" ) );
246		}
247
248		// update collapsible
249		// TODO: use .toggleClass()
250		this.element[ o.collapsible ? "addClass" : "removeClass" ]( "uic-tabs-collapsible" );
251
252		// set or update cookie after init and add/remove respectively
253		if ( o.cookie ) {
254			this._cookie( o.selected, o.cookie );
255		}
256
257		// disable tabs
258		for ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) {
259			$( li )[ $.inArray( i, o.disabled ) != -1 &&
260				// TODO: use .toggleClass()
261				!$( li ).hasClass( "uic-tabs-selected" ) ? "addClass" : "removeClass" ]( "uic-state-disabled" );
262		}
263
264		// reset cache if switching from cached to not cached
265		if ( o.cache === false ) {
266			this.anchors.removeData( "cache.tabs" );
267		}
268
269		// remove all handlers before, tabify may run on existing tabs after add or option change
270		this.lis.add( this.anchors ).unbind( ".tabs" );
271
272		if ( o.event !== "mouseover" ) {
273			var addState = function( state, el ) {
274				if ( el.is( ":not(.uic-state-disabled)" ) ) {
275					el.addClass( "uic-state-" + state );
276				}
277			};
278			var removeState = function( state, el ) {
279				el.removeClass( "uic-state-" + state );
280			};
281			this.lis.bind( "mouseover.tabs" , function() {
282				addState( "hover", $( this ) );
283			});
284			this.lis.bind( "mouseout.tabs", function() {
285				removeState( "hover", $( this ) );
286			});
287			this.anchors.bind( "focus.tabs", function() {
288				addState( "focus", $( this ).closest( "li" ) );
289			});
290			this.anchors.bind( "blur.tabs", function() {
291				removeState( "focus", $( this ).closest( "li" ) );
292			});
293		}
294
295		// set up animations
296		var hideFx, showFx;
297		if ( o.fx ) {
298			if ( $.isArray( o.fx ) ) {
299				hideFx = o.fx[ 0 ];
300				showFx = o.fx[ 1 ];
301			} else {
302				hideFx = showFx = o.fx;
303			}
304		}
305
306		// Reset certain styles left over from animation
307		// and prevent IE's ClearType bug...
308		function resetStyle( $el, fx ) {
309			$el.css( "display", "" );
310			if ( !$.support.opacity && fx.opacity ) {
311				$el[ 0 ].style.removeAttribute( "filter" );
312			}
313		}
314
315		// Show a tab...
316		var showTab = showFx
317			? function( clicked, $show ) {
318				$( clicked ).closest( "li" ).addClass( "uic-tabs-selected uic-state-active" );
319				$show.hide().removeClass( "uic-tabs-hide" ) // avoid flicker that way
320					.animate( showFx, showFx.duration || "normal", function() {
321						resetStyle( $show, showFx );
322						self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
323					});
324			}
325			: function( clicked, $show ) {
326				$( clicked ).closest( "li" ).addClass( "uic-tabs-selected uic-state-active" );
327				$show.removeClass( "uic-tabs-hide" );
328				self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
329			};
330
331		// Hide a tab, $show is optional...
332		var hideTab = hideFx
333			? function( clicked, $hide ) {
334				$hide.animate( hideFx, hideFx.duration || "normal", function() {
335					self.lis.removeClass( "uic-tabs-selected uic-state-active" );
336					$hide.addClass( "uic-tabs-hide" );
337					resetStyle( $hide, hideFx );
338					self.element.dequeue( "tabs" );
339				});
340			}
341			: function( clicked, $hide, $show ) {
342				self.lis.removeClass( "uic-tabs-selected uic-state-active" );
343				$hide.addClass( "uic-tabs-hide" );
344				self.element.dequeue( "tabs" );
345			};
346
347		// attach tab event handler, unbind to avoid duplicates from former tabifying...
348		this.anchors.bind( o.event + ".tabs", function() {
349			var el = this,
350				$li = $(el).closest( "li" ),
351				$hide = self.panels.filter( ":not(.uic-tabs-hide)" ),
352				$show = self.element.find( self._sanitizeSelector( el.hash ) );
353
354			// If tab is already selected and not collapsible or tab disabled or
355			// or is already loading or click callback returns false stop here.
356			// Check if click handler returns false last so that it is not executed
357			// for a disabled or loading tab!
358			if ( ( $li.hasClass( "uic-tabs-selected" ) && !o.collapsible) ||
359				$li.hasClass( "uic-state-disabled" ) ||
360				$li.hasClass( "uic-state-processing" ) ||
361				self.panels.filter( ":animated" ).length ||
362				self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) {
363				this.blur();
364				return false;
365			}
366
367			o.selected = self.anchors.index( this );
368
369			self.abort();
370
371			// if tab may be closed
372			if ( o.collapsible ) {
373				if ( $li.hasClass( "uic-tabs-selected" ) ) {
374					o.selected = -1;
375
376					if ( o.cookie ) {
377						self._cookie( o.selected, o.cookie );
378					}
379
380					self.element.queue( "tabs", function() {
381						hideTab( el, $hide );
382					}).dequeue( "tabs" );
383
384					this.blur();
385					return false;
386				} else if ( !$hide.length ) {
387					if ( o.cookie ) {
388						self._cookie( o.selected, o.cookie );
389					}
390
391					self.element.queue( "tabs", function() {
392						showTab( el, $show );
393					});
394
395					// TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
396					self.load( self.anchors.index( this ) );
397
398					this.blur();
399					return false;
400				}
401			}
402
403			if ( o.cookie ) {
404				self._cookie( o.selected, o.cookie );
405			}
406
407			// show new tab
408			if ( $show.length ) {
409				if ( $hide.length ) {
410					self.element.queue( "tabs", function() {
411						hideTab( el, $hide );
412					});
413				}
414				self.element.queue( "tabs", function() {
415					showTab( el, $show );
416				});
417
418				self.load( self.anchors.index( this ) );
419			} else {
420				throw "jQuery UI Tabs: Mismatching fragment identifier.";
421			}
422
423			// Prevent IE from keeping other link focussed when using the back button
424			// and remove dotted border from clicked link. This is controlled via CSS
425			// in modern browsers; blur() removes focus from address bar in Firefox
426			// which can become a usability and annoying problem with tabs('rotate').
427			if ( $.browser.msie ) {
428				this.blur();
429			}
430		});
431
432		// disable click in any case
433		this.anchors.bind( "click.tabs", function(){
434			return false;
435		});
436	},
437
438    _getIndex: function( index ) {
439		// meta-function to give users option to provide a href string instead of a numerical index.
440		// also sanitizes numerical indexes to valid values.
441		if ( typeof index == "string" ) {
442			index = this.anchors.index( this.anchors.filter( "[href$=" + index + "]" ) );
443		}
444
445		return index;
446	},
447
448	destroy: function() {
449		var o = this.options;
450
451		this.abort();
452
453		this.element
454			.unbind( ".tabs" )
455			.removeClass( "uic-tabs uic-widget uic-widget-content uic-corner-all uic-tabs-collapsible" )
456			.removeData( "tabs" );
457
458		this.list.removeClass( "uic-tabs-nav uic-helper-reset uic-helper-clearfix uic-widget-header uic-corner-all" );
459
460		this.anchors.each(function() {
461			var href = $.data( this, "href.tabs" );
462			if ( href ) {
463				this.href = href;
464			}
465			var $this = $( this ).unbind( ".tabs" );
466			$.each( [ "href", "load", "cache" ], function( i, prefix ) {
467				$this.removeData( prefix + ".tabs" );
468			});
469		});
470
471		this.lis.unbind( ".tabs" ).add( this.panels ).each(function() {
472			if ( $.data( this, "destroy.tabs" ) ) {
473				$( this ).remove();
474			} else {
475				$( this ).removeClass([
476					"uic-state-default",
477					"uic-corner-top",
478					"uic-tabs-selected",
479					"uic-state-active",
480					"uic-state-hover",
481					"uic-state-focus",
482					"uic-state-disabled",
483					"uic-tabs-panel",
484					"uic-widget-content",
485					"uic-corner-bottom",
486					"uic-tabs-hide"
487				].join( " " ) );
488			}
489		});
490
491		if ( o.cookie ) {
492			this._cookie( null, o.cookie );
493		}
494
495		return this;
496	},
497
498	add: function( url, label, index ) {
499		if ( index === undefined ) {
500			index = this.anchors.length;
501		}
502
503		var self = this,
504			o = this.options,
505			$li = $( o.tabTemplate.replace( /#\{href\}/g, url ).replace( /#\{label\}/g, label ) ),
506			id = !url.indexOf( "#" ) ? url.replace( "#", "" ) : this._tabId( $( "a", $li )[ 0 ] );
507
508		$li.addClass( "uic-state-default uic-corner-top" ).data( "destroy.tabs", true );
509
510		// try to find an existing element before creating a new one
511		var $panel = self.element.find( "#" + id );
512		if ( !$panel.length ) {
513			$panel = $( o.panelTemplate )
514				.attr( "id", id )
515				.data( "destroy.tabs", true );
516		}
517		$panel.addClass( "uic-tabs-panel uic-widget-content uic-corner-bottom uic-tabs-hide" );
518
519		if ( index >= this.lis.length ) {
520			$li.appendTo( this.list );
521			$panel.appendTo( this.list[ 0 ].parentNode );
522		} else {
523			$li.insertBefore( this.lis[ index ] );
524			$panel.insertBefore( this.panels[ index ] );
525		}
526
527		o.disabled = $.map( o.disabled, function( n, i ) {
528			return n >= index ? ++n : n;
529		});
530
531		this._tabify();
532
533		if ( this.anchors.length == 1 ) {
534			o.selected = 0;
535			$li.addClass( "uic-tabs-selected uic-state-active" );
536			$panel.removeClass( "uic-tabs-hide" );
537			this.element.queue( "tabs", function() {
538				self._trigger( "show", null, self._ui( self.anchors[ 0 ], self.panels[ 0 ] ) );
539			});
540
541			this.load( 0 );
542		}
543
544		this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
545		return this;
546	},
547
548	remove: function( index ) {
549		index = this._getIndex( index );
550		var o = this.options,
551			$li = this.lis.eq( index ).remove(),
552			$panel = this.panels.eq( index ).remove();
553
554		// If selected tab was removed focus tab to the right or
555		// in case the last tab was removed the tab to the left.
556		if ( $li.hasClass( "uic-tabs-selected" ) && this.anchors.length > 1) {
557			this.select( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
558		}
559
560		o.disabled = $.map(
561			$.grep( o.disabled, function(n, i) {
562				return n != index;
563			}),
564			function( n, i ) {
565				return n >= index ? --n : n;
566			});
567
568		this._tabify();
569
570		this._trigger( "remove", null, this._ui( $li.find( "a" )[ 0 ], $panel[ 0 ] ) );
571		return this;
572	},
573
574	enable: function( index ) {
575		index = this._getIndex( index );
576		var o = this.options;
577		if ( $.inArray( index, o.disabled ) == -1 ) {
578			return;
579		}
580
581		this.lis.eq( index ).removeClass( "uic-state-disabled" );
582		o.disabled = $.grep( o.disabled, function( n, i ) {
583			return n != index;
584		});
585
586		this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
587		return this;
588	},
589
590	disable: function( index ) {
591		index = this._getIndex( index );
592		var self = this, o = this.options;
593		// cannot disable already selected tab
594		if ( index != o.selected ) {
595			this.lis.eq( index ).addClass( "uic-state-disabled" );
596
597			o.disabled.push( index );
598			o.disabled.sort();
599
600			this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
601		}
602
603		return this;
604	},
605
606	select: function( index ) {
607		index = this._getIndex( index );
608		if ( index == -1 ) {
609			if ( this.options.collapsible && this.options.selected != -1 ) {
610				index = this.options.selected;
611			} else {
612				return this;
613			}
614		}
615		this.anchors.eq( index ).trigger( this.options.event + ".tabs" );
616		return this;
617	},
618
619	load: function( index ) {
620		index = this._getIndex( index );
621		var self = this,
622			o = this.options,
623			a = this.anchors.eq( index )[ 0 ],
624			url = $.data( a, "load.tabs" );
625
626		this.abort();
627
628		// not remote or from cache
629		if ( !url || this.element.queue( "tabs" ).length !== 0 && $.data( a, "cache.tabs" ) ) {
630			this.element.dequeue( "tabs" );
631			return;
632		}
633
634		// load remote from here on
635		this.lis.eq( index ).addClass( "uic-state-processing" );
636
637		if ( o.spinner ) {
638			var span = $( "span", a );
639			span.data( "label.tabs", span.html() ).html( o.spinner );
640		}
641
642		this.xhr = $.ajax( $.extend( {}, o.ajaxOptions, {
643			url: url,
644			success: function( r, s ) {
645				self.element.find( self._sanitizeSelector( a.hash ) ).html( r );
646
647				// take care of tab labels
648				self._cleanup();
649
650				if ( o.cache ) {
651					$.data( a, "cache.tabs", true );
652				}
653
654				self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
655				try {
656					o.ajaxOptions.success( r, s );
657				}
658				catch ( e ) {}
659			},
660			error: function( xhr, s, e ) {
661				// take care of tab labels
662				self._cleanup();
663
664				self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
665				try {
666					// Passing index avoid a race condition when this method is
667					// called after the user has selected another tab.
668					// Pass the anchor that initiated this request allows
669					// loadError to manipulate the tab content panel via $(a.hash)
670					o.ajaxOptions.error( xhr, s, index, a );
671				}
672				catch ( e ) {}
673			}
674		} ) );
675
676		// last, so that load event is fired before show...
677		self.element.dequeue( "tabs" );
678
679		return this;
680	},
681
682	abort: function() {
683		// stop possibly running animations
684		this.element.queue( [] );
685		this.panels.stop( false, true );
686
687		// "tabs" queue must not contain more than two elements,
688		// which are the callbacks for the latest clicked tab...
689		this.element.queue( "tabs", this.element.queue( "tabs" ).splice( -2, 2 ) );
690
691		// terminate pending requests from other tabs
692		if ( this.xhr ) {
693			this.xhr.abort();
694			delete this.xhr;
695		}
696
697		// take care of tab labels
698		this._cleanup();
699		return this;
700	},
701
702	url: function( index, url ) {
703		this.anchors.eq( index ).removeData( "cache.tabs" ).data( "load.tabs", url );
704		return this;
705	},
706
707	length: function() {
708		return this.anchors.length;
709	}
710});
711
712$.extend( $.ui.tabs, {
713	version: "1.8.14"
714});
715
716/*
717 * Tabs Extensions
718 */
719
720/*
721 * Rotate
722 */
723$.extend( $.ui.tabs.prototype, {
724	rotation: null,
725	rotate: function( ms, continuing ) {
726		var self = this,
727			o = this.options;
728
729		var rotate = self._rotate || ( self._rotate = function( e ) {
730			clearTimeout( self.rotation );
731			self.rotation = setTimeout(function() {
732				var t = o.selected;
733				self.select( ++t < self.anchors.length ? t : 0 );
734			}, ms );
735			
736			if ( e ) {
737				e.stopPropagation();
738			}
739		});
740
741		var stop = self._unrotate || ( self._unrotate = !continuing
742			? function(e) {
743				if (e.clientX) { // in case of a true click
744					self.rotate(null);
745				}
746			}
747			: function( e ) {
748				t = o.selected;
749				rotate();
750			});
751
752		// start rotation
753		if ( ms ) {
754			this.element.bind( "tabsshow", rotate );
755			this.anchors.bind( o.event + ".tabs", stop );
756			rotate();
757		// stop rotation
758		} else {
759			clearTimeout( self.rotation );
760			this.element.unbind( "tabsshow", rotate );
761			this.anchors.unbind( o.event + ".tabs", stop );
762			delete this._rotate;
763			delete this._unrotate;
764		}
765
766		return this;
767	}
768});
769
770})( jQuery );
771
772
773}
774/*
775     */
776/*
777*/

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.