+
Default options:
+
+
+
+
+ $('#star').raty();
+
+ <div id="star"></div>
+
+
+
Started with a score and read only value:
+
+
+
+ $('#star').raty({
+ readOnly : true,
+ score : 2
+ });
+
+ <div id="star"></div>
+
+
+
Starting with a callback:
+
+
+
+ $('#score').raty({
+ score: function() {
+ return $(this).attr('data-rating');
+ }
+ });
+
+ <div id="star" data-rating="3"></div>
+
+
+
A hint for no rated elements when it's read-only:
+
+
+
+ $('#star').raty({
+ readOnly : true,
+ noRatedMsg : 'anyone rated this product yet!'
+ });
+
+ <div id="star"></div>
+
+
+
Custom score name and a number of stars:
+
+
+
+ $('#star').raty({
+ scoreName : 'entity.score',
+ number : 10
+ });
+
+ <div id="star"></div>
+
+
+
Using click function:
+
+
+
+ $('#star').raty({
+ click: function(score, evt) {
+ alert('ID: ' + $(this).attr('id') + '\nscore: ' + score + '\nevent: ' + evt);
+ }
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Default cancel button:
+
+
+
+ $('#star').raty({
+ cancel: true
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Custom cancel button:
+
+
+
+ $('#star').raty({
+ cancel : true,
+ cancelHint : 'remove my rating!',
+ cancelPlace : 'right',
+ click : function(score, evt) {
+ alert('score: ' + score);
+ }
+ });
+
+ <div id="star"></div>
+
+
+
Half star voting:
+
+
+
+ $('#star').raty({
+ half : true,
+ score : 3.3
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Custom round option:
+
+
+
+ $('#star').raty({
+ score : 1.26,
+ round : { down: .25, full: .6, up: .76 }
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Custom hint and icons:
+
+
+
+ $('#star').raty({
+ hints : ['a', '', null, 'd', '5'],
+ starOn : 'medal-on.png',
+ starOff : 'medal-off.png'
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Range of custom icons:
+
+
+
+ $('#star').raty({
+ iconRange: [
+ { range: 2, on: 'face-a.png', off: 'face-a-off.png' },
+ { range: 3, on: 'face-b.png', off: 'face-b-off.png' },
+ { range: 4, on: 'face-c.png', off: 'face-c-off.png' },
+ { range: 5, on: 'face-d.png', off: 'face-d-off.png' }
+ ]
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Bigger icon:
+
+
+
+ $('#star').raty({
+ cancel : true,
+ cancelOff : 'cancel-off-big.png',
+ cancelOn : 'cancel-on-big.png',
+ half : true,
+ size : 24,
+ starHalf : 'star-half-big.png',
+ starOff : 'star-off-big.png',
+ starOn : 'star-on-big.png'
+ });
+
+ <div id="star"></div>
+
+
+
+
+
Group of elements:
+
+
+
+
+
+ $('.star').raty();
+
+ <div class="star"></div>
+ <div class="star"></div>
+ <div class="star"></div>
+
+
+
+
+
Displaying hint in a target element:
+
+
+
+
+
+ $('#star').raty({
+ cancel : true,
+ cancelHint : 'none',
+ target : '#hint'
+ });
+
+ <div id="star"></div>
+ <div id="target"></div>
+
+
+
Displaying and keeping the score in a target element:
+
+
+
+
+
+
+ $('#star').raty({
+ cancel : true,
+ target : '#score',
+ targetKeep : true,
+ targetType : 'number'
+ });
+
+ <select id="target">
+ <option value="">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ </select>
+
+
+
+
+
Setting default value to the target on mouseout:
+
+
+
+
+
+ $('#star').raty({
+ target : '#hint',
+ targetText : '--'
+ });
+
+ <div id="star"></div>
+ <div id="target"></div>
+
+
+
Displaying hint with format template:
+
+
+
+
+
+ $('#star').raty({
+ cancel : true,
+ cancelHint : 'Sure?',
+ target : '#hint',
+ targetFormat : 'your score: {score}',
+ targetText : 'none',
+ targetKeep : true
+ });
+
+ <div id="star"></div>
+ <div id="target"></div>
+
+
+
Using mouseover callback:
+
+
+
+
+
+ $('#star').raty({
+ cancel : true,
+ mouseover : function(score, evt) {
+ var target = $('#mouseover-target');
+
+ if (score === null) {
+ target.html('Boring!');
+ } else if (score === undefined) {
+ target.empty();
+ } else {
+ target.html('score: ' + score);
+ }
+ }
+ });
+
+ <div id="star"></div>
+ <div id="target"></div>
+
+
+
+
+
Half star voting precision:
+
+
+
+
+
+ $('#star').raty({
+ half : true,
+ precision : true,
+ size : 24,
+ starHalf : 'star-half-big.png',
+ starOff : 'star-off-big.png',
+ starOn : 'star-on-big.png'
+ target : '#precision-target'
+ targetType : 'number'
+ });
+
+ <div id="star"></div>
+ <div id="target"></div>
+
+
+
Without space between stars:
+
+
+
+
+ $('#star').raty({
+ space: false
+ });
+
+ <div id="star"></div>
+
+
+
Single icon:
+
+
+
+
+ $('#star').raty({
+ single: true
+ });
+
+ <div id="star"></div>
+
+
+
Directed actions with public functions:
+
+ love:
+
+
+ happy:
+
+
+ your last rate:
+
+
+
+ $('.star').raty({
+ half : true,
+ click : function(score, evt) {
+ $(this).raty('cancel');
+ $('#result').raty('score', score);
+ }
+ });
+
+ <div class="star"></div>
+ <div class="star"></div>
+ <div id="result"></div>
+
+
+
+
+
Functions Demo:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Changing the settings globally:
+
+
+ $.fn.raty.defaults.starOn = 'star-on.gif';
+ $.fn.raty.defaults.starOff = 'star-off.gif';
+
+
+
+
+
Default options:
+
+
cancel: false
+
+
+
+
+
cancelHint: 'cancel this rating!'
+
+
+
+
+
cancelHint: 'cancel this rating!'
+
+
+
+
+
cancelOff: 'cancel-off.png'
+
+
+
+
+
cancelOn: 'cancel-on.png'
+
+
+
+
+
cancelPlace: 'left'
+
+
+
+
+
click: undefined
+
+
+
+
+
half: false
+
+
+
+
+
halfShow: true
+
+
+
+
+
hints: ['bad', 'poor', 'regular', 'good', 'gorgeous']
+
+
+
+
+
iconRange: undefined
+
+
+
+
+
noRatedMsg: 'not rated yet'
+
+
+
+
+
number: 5
+
+
+
+
+
path: 'img/'
+
+
+
+
+
precision: false
+
+
+
+
+
readOnly: false
+
+
+
+
+
round: { down: .25, full: .6, up: .76 }
+
+
+
+
+
score: undefined
+
+
+
+
+
scoreName: 'score'
+
+
+
+
+
single: false
+
+
+
+
+
space: true
+
+
+
+
+
size: 16
+
+
+
+
+
starHalf: 'star-half.png'
+
+
+
+
+
starOff: 'star-off.png'
+
+
+
+
+
starOn: 'star-on.png'
+
+
+
+
+
target: undefined
+
+
+
+
+
targetFormat: '{score}'
+
+
+
+
+
targetKeep: false
+
+
+
+
+
targetText: ''
+
+
+
+
+
targetType: 'hint'
+
+
+
+
+
width : undefined
+
+
+
Functions:
+
+
$('#star').raty('score');
+
+
+
$('#star').raty('score', 3);
+
+
+
$('#star').raty('click', 2);
+
+
+
$('.star').raty('readOnly', true);
+
+
+
$('#star').raty('cancel', true);
+
+
+
$('#star').raty('reload');
+
+
+
$('#star').raty('set', { number: 10 });
+
+
+
+
+
+
+
+
Index: /trunk/prototype/plugins/jq-raty/README.md
===================================================================
--- /trunk/prototype/plugins/jq-raty/README.md (revision 6528)
+++ /trunk/prototype/plugins/jq-raty/README.md (revision 6528)
@@ -0,0 +1,108 @@
+# jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty
+
+jQuery Raty is a plugin that generates a customizable star rating.
+
+## Version
+
+ @version 2.4.5
+ @since 2010.06.11
+ @author Washington Botelho
+ @documentation wbotelhos.com/raty
+ @twitter twitter.com/wbotelhos
+
+## Required Files
+
++ jquery.raty.min.js
++ star-on.png
++ star-off.png
+
+## Default values
+
+ cancel : false // Show a button to cancel the rating or not.
+ cancelHint : 'cancel this rating!' // The hint information.
+ cancelOff : 'cancel-off.png' // Name of the cancel image off.
+ cancelOn : 'cancel-on.png' // Name of the cancel image on.
+ cancelPlace : 'left' // Position of the cancel button.
+ click : undefined // Callback for click actions.
+ half : false // Active the half star.
+ halfShow : true // Enables half star display.
+ hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'] // A hint information for default 5 stars.
+ iconRange : undefined // Object list representing each icon with position and names.
+ mouseover : undefined // Callback for mouseover actions.
+ noRatedMsg : 'not rated yet' // A hint for no rated elements when it's read-only.
+ number : 5 // Number of star.
+ path : 'img // Path of images.
+ precision : false // Enables the selection of a precision score.
+ readOnly : false // read-only or not.
+ round : { down: .25, full: .6, up: .76 } // Configuration to set the round rules.
+ score : undefined // Initial score value.
+ scoreName : 'score' // The name of target score.
+ single : false // Enables the single star selection.
+ size : 16 // The icons size.
+ space : true // Puts space between the stars.
+ starHalf : 'star-half.png' // The image of the half star.
+ starOff : 'star-off.png' // Name of the star image off.
+ starOn : 'star-on.png' // Name of the star image on.
+ target : undefined // Element selector where the rating will be displayed.
+ targetFormat : '{score}' // Template to interpolate the score with some thing.
+ targetKeep : false // If the last choose value will be keeped on mouseout.
+ targetText : '' // Default value when there's no score or targetKeep is off.
+ targetType : 'hint' // What display on target element: hint or number.
+ width : undefined // The container width of the stars.
+
+## Usage
+
+ $('#star').raty();
+
+
+
+ $('.star').raty();
+
+
+
+
+
+## Functions
+
+ $('#star').raty('score'); // Recovers the current score or undefined for no rated. Class returns an array of score.
+
+ $('#star').raty('score', 3); // Set the score to 3 stars.
+
+ $('#star').raty('click', 2); // Click on the second star.
+
+ $('.star').raty('readOnly', true); // Adjusts all elements with class called 'star' for read-only.
+
+ $('#star').raty('cancel', true); // Cancel the rating. The second optional parameter enables the callback.
+
+ $('#star').raty('reload'); // Reload the rating with the current configuration.
+
+ $('#star').raty('set', { number: 10 }); // Reload the rating applying new configurations.
+
+## Contributors
+
++ Andreas Köberle
++ Daniel Faria
++ Eric Wendelin
++ Francisco Souza
++ Gabriel Benz
++ hpgihan
++ janapol
++ jeongee
++ Olle Jonsson
++ packowitz
+
+## Licence
+
+The MIT License
+
+Copyright (c) 2010 Washington Botelho
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+## Buy me a coffee
+
+You can do it by [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X8HEP2878NDEG&item_name=jQuery%20Raty). Thanks! (:
Index: /trunk/prototype/plugins/jq-raty/js/jquery.raty.js
===================================================================
--- /trunk/prototype/plugins/jq-raty/js/jquery.raty.js (revision 6528)
+++ /trunk/prototype/plugins/jq-raty/js/jquery.raty.js (revision 6528)
@@ -0,0 +1,460 @@
+/*!
+ * jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty
+ * -------------------------------------------------------------------
+ *
+ * jQuery Raty is a plugin that generates a customizable star rating.
+ *
+ * Licensed under The MIT License
+ *
+ * @version 2.4.5
+ * @since 2010.06.11
+ * @author Washington Botelho
+ * @documentation wbotelhos.com/raty
+ * @twitter twitter.com/wbotelhos
+ *
+ * Usage:
+ * -------------------------------------------------------------------
+ * $('#star').raty();
+ *
+ *
+ *
+ */
+
+;(function($) {
+
+ var methods = {
+ init: function(settings) {
+ return this.each(function() {
+ var self = this,
+ $this = $(self).empty();
+
+ self.opt = $.extend(true, {}, $.fn.raty.defaults, settings);
+
+ $this.data('settings', self.opt);
+
+ self.opt.number = methods.between(self.opt.number, 0, 20);
+
+ if (self.opt.path.substring(self.opt.path.length - 1, self.opt.path.length) != '/') {
+ self.opt.path += '/';
+ }
+
+ if (typeof self.opt.score == 'function') {
+ self.opt.score = self.opt.score.call(self);
+ }
+
+ if (self.opt.score) {
+ self.opt.score = methods.between(self.opt.score, 0, self.opt.number);
+ }
+
+ for (var i = 1; i <= self.opt.number; i++) {
+ $('
', {
+ src : self.opt.path + ((!self.opt.score || self.opt.score < i) ? self.opt.starOff : self.opt.starOn),
+ alt : i,
+ title : (i <= self.opt.hints.length && self.opt.hints[i - 1] !== null) ? self.opt.hints[i - 1] : i
+ }).appendTo(self);
+
+ if (self.opt.space) {
+ $this.append((i < self.opt.number) ? ' ' : '');
+ }
+ }
+
+ self.stars = $this.children('img:not(".raty-cancel")');
+ self.score = $('
', { type: 'hidden', name: self.opt.scoreName }).appendTo(self);
+
+ if (self.opt.score && self.opt.score > 0) {
+ self.score.val(self.opt.score);
+ methods.roundStar.call(self, self.opt.score);
+ }
+
+ if (self.opt.iconRange) {
+ methods.fill.call(self, self.opt.score);
+ }
+
+ methods.setTarget.call(self, self.opt.score, self.opt.targetKeep);
+
+ var space = self.opt.space ? 4 : 0,
+ width = self.opt.width || (self.opt.number * self.opt.size + self.opt.number * space);
+
+ if (self.opt.cancel) {
+ self.cancel = $('
', { src: self.opt.path + self.opt.cancelOff, alt: 'x', title: self.opt.cancelHint, 'class': 'raty-cancel' });
+
+ if (self.opt.cancelPlace == 'left') {
+ $this.prepend(' ').prepend(self.cancel);
+ } else {
+ $this.append(' ').append(self.cancel);
+ }
+
+ width += (self.opt.size + space);
+ }
+
+ if (self.opt.readOnly) {
+ methods.fixHint.call(self);
+
+ if (self.cancel) {
+ self.cancel.hide();
+ }
+ } else {
+ $this.css('cursor', 'pointer');
+
+ methods.bindAction.call(self);
+ }
+
+ $this.css('width', width);
+ });
+ }, between: function(value, min, max) {
+ return Math.min(Math.max(parseFloat(value), min), max);
+ }, bindAction: function() {
+ var self = this,
+ $this = $(self);
+
+ $this.mouseleave(function() {
+ var score = self.score.val() || undefined;
+
+ methods.initialize.call(self, score);
+ methods.setTarget.call(self, score, self.opt.targetKeep);
+
+ if (self.opt.mouseover) {
+ self.opt.mouseover.call(self, score);
+ }
+ });
+
+ var action = self.opt.half ? 'mousemove' : 'mouseover';
+
+ if (self.opt.cancel) {
+ self.cancel.mouseenter(function() {
+ $(this).attr('src', self.opt.path + self.opt.cancelOn);
+
+ self.stars.attr('src', self.opt.path + self.opt.starOff);
+
+ methods.setTarget.call(self, null, true);
+
+ if (self.opt.mouseover) {
+ self.opt.mouseover.call(self, null);
+ }
+ }).mouseleave(function() {
+ $(this).attr('src', self.opt.path + self.opt.cancelOff);
+
+ if (self.opt.mouseover) {
+ self.opt.mouseover.call(self, self.score.val() || null);
+ }
+ }).click(function(evt) {
+ self.score.removeAttr('value');
+
+ if (self.opt.click) {
+ self.opt.click.call(self, null, evt);
+ }
+ });
+ }
+
+ self.stars.bind(action, function(evt) {
+ var value = parseInt(this.alt, 10);
+
+ if (self.opt.half) {
+ var position = parseFloat((evt.pageX - $(this).offset().left) / self.opt.size),
+ diff = (position > .5) ? 1 : .5;
+
+ value = parseFloat(this.alt) - 1 + diff;
+
+ methods.fill.call(self, value);
+
+ if (self.opt.precision) {
+ value = value - diff + position;
+ }
+
+ methods.showHalf.call(self, value);
+ } else {
+ methods.fill.call(self, value);
+ }
+
+ $this.data('score', value);
+
+ methods.setTarget.call(self, value, true);
+
+ if (self.opt.mouseover) {
+ self.opt.mouseover.call(self, value, evt);
+ }
+ }).click(function(evt) {
+ self.score.val((self.opt.half || self.opt.precision) ? $this.data('score') : this.alt);
+
+ if (self.opt.click) {
+ self.opt.click.call(self, self.score.val(), evt);
+ }
+ });
+ }, cancel: function(isClick) {
+ return $(this).each(function() {
+ var self = this,
+ $this = $(self);
+
+ if ($this.data('readonly') === true) {
+ return this;
+ }
+
+ if (isClick) {
+ methods.click.call(self, null);
+ } else {
+ methods.score.call(self, null);
+ }
+
+ self.score.removeAttr('value');
+ });
+ }, click: function(score) {
+ return $(this).each(function() {
+ if ($(this).data('readonly') === true) {
+ return this;
+ }
+
+ methods.initialize.call(this, score);
+
+ if (this.opt.click) {
+ this.opt.click.call(this, score);
+ } else {
+ methods.error.call(this, 'you must add the "click: function(score, evt) { }" callback.');
+ }
+
+ methods.setTarget.call(this, score, true);
+ });
+ }, error: function(message) {
+ $(this).html(message);
+
+ $.error(message);
+ }, fill: function(score) {
+ var self = this,
+ number = self.stars.length,
+ count = 0,
+ $star ,
+ star ,
+ icon ;
+
+ for (var i = 1; i <= number; i++) {
+ $star = self.stars.eq(i - 1);
+
+ if (self.opt.iconRange && self.opt.iconRange.length > count) {
+ star = self.opt.iconRange[count];
+
+ if (self.opt.single) {
+ icon = (i == score) ? (star.on || self.opt.starOn) : (star.off || self.opt.starOff);
+ } else {
+ icon = (i <= score) ? (star.on || self.opt.starOn) : (star.off || self.opt.starOff);
+ }
+
+ if (i <= star.range) {
+ $star.attr('src', self.opt.path + icon);
+ }
+
+ if (i == star.range) {
+ count++;
+ }
+ } else {
+ if (self.opt.single) {
+ icon = (i == score) ? self.opt.starOn : self.opt.starOff;
+ } else {
+ icon = (i <= score) ? self.opt.starOn : self.opt.starOff;
+ }
+
+ $star.attr('src', self.opt.path + icon);
+ }
+ }
+ }, fixHint: function() {
+ var $this = $(this),
+ score = parseInt(this.score.val(), 10),
+ hint = this.opt.noRatedMsg;
+
+ if (!isNaN(score) && score > 0) {
+ hint = (score <= this.opt.hints.length && this.opt.hints[score - 1] !== null) ? this.opt.hints[score - 1] : score;
+ }
+
+ $this.data('readonly', true).css('cursor', 'default').attr('title', hint);
+
+ this.score.attr('readonly', 'readonly');
+ this.stars.attr('title', hint);
+ }, getScore: function() {
+ var score = [],
+ value ;
+
+ $(this).each(function() {
+ value = this.score.val();
+
+ score.push(value ? parseFloat(value) : undefined);
+ });
+
+ return (score.length > 1) ? score : score[0];
+ }, readOnly: function(isReadOnly) {
+ return this.each(function() {
+ var $this = $(this);
+
+ if ($this.data('readonly') === isReadOnly) {
+ return this;
+ }
+
+ if (this.cancel) {
+ if (isReadOnly) {
+ this.cancel.hide();
+ } else {
+ this.cancel.show();
+ }
+ }
+
+ if (isReadOnly) {
+ $this.unbind();
+
+ $this.children('img').unbind();
+
+ methods.fixHint.call(this);
+ } else {
+ methods.bindAction.call(this);
+ methods.unfixHint.call(this);
+ }
+
+ $this.data('readonly', isReadOnly);
+ });
+ }, reload: function() {
+ return methods.set.call(this, {});
+ }, roundStar: function(score) {
+ var diff = (score - Math.floor(score)).toFixed(2);
+
+ if (diff > this.opt.round.down) {
+ var icon = this.opt.starOn; // Full up: [x.76 .. x.99]
+
+ if (diff < this.opt.round.up && this.opt.halfShow) { // Half: [x.26 .. x.75]
+ icon = this.opt.starHalf;
+ } else if (diff < this.opt.round.full) { // Full down: [x.00 .. x.5]
+ icon = this.opt.starOff;
+ }
+
+ this.stars.eq(Math.ceil(score) - 1).attr('src', this.opt.path + icon);
+ } // Full down: [x.00 .. x.25]
+ }, score: function() {
+ return arguments.length ? methods.setScore.apply(this, arguments) : methods.getScore.call(this);
+ }, set: function(settings) {
+ this.each(function() {
+ var $this = $(this),
+ actual = $this.data('settings'),
+ clone = $this.clone().removeAttr('style').insertBefore($this);
+
+ $this.remove();
+
+ clone.raty($.extend(actual, settings));
+ });
+
+ return $(this.selector);
+ }, setScore: function(score) {
+ return $(this).each(function() {
+ if ($(this).data('readonly') === true) {
+ return this;
+ }
+
+ methods.initialize.call(this, score);
+ methods.setTarget.call(this, score, true);
+ });
+ }, setTarget: function(value, isKeep) {
+ if (this.opt.target) {
+ var $target = $(this.opt.target);
+
+ if ($target.length == 0) {
+ methods.error.call(this, 'target selector invalid or missing!');
+ }
+
+ var score = value;
+
+ if (!isKeep || score === undefined) {
+ score = this.opt.targetText;
+ } else {
+ if (this.opt.targetType == 'hint') {
+ score = (score === null && this.opt.cancel)
+ ? this.opt.cancelHint
+ : this.opt.hints[Math.ceil(score - 1)];
+ } else {
+ score = this.opt.precision
+ ? parseFloat(score).toFixed(1)
+ : parseInt(score, 10);
+ }
+ }
+
+ if (this.opt.targetFormat.indexOf('{score}') < 0) {
+ methods.error.call(this, 'template "{score}" missing!');
+ }
+
+ if (value !== null) {
+ score = this.opt.targetFormat.toString().replace('{score}', score);
+ }
+
+ if ($target.is(':input')) {
+ $target.val(score);
+ } else {
+ $target.html(score);
+ }
+ }
+ }, showHalf: function(score) {
+ var diff = (score - Math.floor(score)).toFixed(1);
+
+ if (diff > 0 && diff < .6) {
+ this.stars.eq(Math.ceil(score) - 1).attr('src', this.opt.path + this.opt.starHalf);
+ }
+ }, initialize: function(score) {
+ score = !score ? 0 : methods.between(score, 0, this.opt.number);
+
+ methods.fill.call(this, score);
+
+ if (score > 0) {
+ if (this.opt.halfShow) {
+ methods.roundStar.call(this, score);
+ }
+
+ this.score.val(score);
+ }
+ }, unfixHint: function() {
+ for (var i = 0; i < this.opt.number; i++) {
+ this.stars.eq(i).attr('title', (i < this.opt.hints.length && this.opt.hints[i] !== null) ? this.opt.hints[i] : i);
+ }
+
+ $(this).data('readonly', false).css('cursor', 'pointer').removeAttr('title');
+
+ this.score.attr('readonly', 'readonly');
+ }
+ };
+
+ $.fn.raty = function(method) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || !method) {
+ return methods.init.apply(this, arguments);
+ } else {
+ $.error('Method ' + method + ' does not exist!');
+ }
+ };
+
+ $.fn.raty.defaults = {
+ cancel : false,
+ cancelHint : 'cancel this rating!',
+ cancelOff : 'cancel-off.png',
+ cancelOn : 'cancel-on.png',
+ cancelPlace : 'left',
+ click : undefined,
+ half : false,
+ halfShow : true,
+ hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'],
+ iconRange : undefined,
+ mouseover : undefined,
+ noRatedMsg : 'not rated yet',
+ number : 5,
+ path : 'img/',
+ precision : false,
+ round : { down: .25, full: .6, up: .76 },
+ readOnly : false,
+ score : undefined,
+ scoreName : 'score',
+ single : false,
+ size : 16,
+ space : true,
+ starHalf : 'star-half.png',
+ starOff : 'star-off.png',
+ starOn : 'star-on.png',
+ target : undefined,
+ targetFormat : '{score}',
+ targetKeep : false,
+ targetText : '',
+ targetType : 'hint',
+ width : undefined
+ };
+
+})(jQuery);
Index: /trunk/prototype/plugins/jq-raty/js/jquery.raty.min.js
===================================================================
--- /trunk/prototype/plugins/jq-raty/js/jquery.raty.min.js (revision 6528)
+++ /trunk/prototype/plugins/jq-raty/js/jquery.raty.min.js (revision 6528)
@@ -0,0 +1,12 @@
+/*!
+ * jQuery Raty - A Star Rating Plugin
+ *
+ * Licensed under The MIT License
+ *
+ * @version 2.4.5
+ * @author Washington Botelho
+ * @documentation wbotelhos.com/raty
+ *
+ */
+
+;(function(b){var a={init:function(c){return this.each(function(){var d=this,h=b(d).empty();d.opt=b.extend(true,{},b.fn.raty.defaults,c);h.data("settings",d.opt);d.opt.number=a.between(d.opt.number,0,20);if(d.opt.path.substring(d.opt.path.length-1,d.opt.path.length)!="/"){d.opt.path+="/";}if(typeof d.opt.score=="function"){d.opt.score=d.opt.score.call(d);}if(d.opt.score){d.opt.score=a.between(d.opt.score,0,d.opt.number);}for(var e=1;e<=d.opt.number;e++){b("
",{src:d.opt.path+((!d.opt.score||d.opt.score
",{type:"hidden",name:d.opt.scoreName}).appendTo(d);if(d.opt.score&&d.opt.score>0){d.score.val(d.opt.score);a.roundStar.call(d,d.opt.score);}if(d.opt.iconRange){a.fill.call(d,d.opt.score);}a.setTarget.call(d,d.opt.score,d.opt.targetKeep);var g=d.opt.space?4:0,f=d.opt.width||(d.opt.number*d.opt.size+d.opt.number*g);if(d.opt.cancel){d.cancel=b("
",{src:d.opt.path+d.opt.cancelOff,alt:"x",title:d.opt.cancelHint,"class":"raty-cancel"});if(d.opt.cancelPlace=="left"){h.prepend(" ").prepend(d.cancel);}else{h.append(" ").append(d.cancel);}f+=(d.opt.size+g);}if(d.opt.readOnly){a.fixHint.call(d);if(d.cancel){d.cancel.hide();}}else{h.css("cursor","pointer");a.bindAction.call(d);}h.css("width",f);});},between:function(e,d,c){return Math.min(Math.max(parseFloat(e),d),c);},bindAction:function(){var c=this,e=b(c);e.mouseleave(function(){var f=c.score.val()||undefined;a.initialize.call(c,f);a.setTarget.call(c,f,c.opt.targetKeep);if(c.opt.mouseover){c.opt.mouseover.call(c,f);}});var d=c.opt.half?"mousemove":"mouseover";if(c.opt.cancel){c.cancel.mouseenter(function(){b(this).attr("src",c.opt.path+c.opt.cancelOn);c.stars.attr("src",c.opt.path+c.opt.starOff);a.setTarget.call(c,null,true);if(c.opt.mouseover){c.opt.mouseover.call(c,null);}}).mouseleave(function(){b(this).attr("src",c.opt.path+c.opt.cancelOff);if(c.opt.mouseover){c.opt.mouseover.call(c,c.score.val()||null);}}).click(function(f){c.score.removeAttr("value");if(c.opt.click){c.opt.click.call(c,null,f);}});}c.stars.bind(d,function(g){var h=parseInt(this.alt,10);if(c.opt.half){var f=parseFloat((g.pageX-b(this).offset().left)/c.opt.size),i=(f>0.5)?1:0.5;h=parseFloat(this.alt)-1+i;a.fill.call(c,h);if(c.opt.precision){h=h-i+f;}a.showHalf.call(c,h);}else{a.fill.call(c,h);}e.data("score",h);a.setTarget.call(c,h,true);if(c.opt.mouseover){c.opt.mouseover.call(c,h,g);}}).click(function(f){c.score.val((c.opt.half||c.opt.precision)?e.data("score"):this.alt);if(c.opt.click){c.opt.click.call(c,c.score.val(),f);}});},cancel:function(c){return b(this).each(function(){var d=this,e=b(d);if(e.data("readonly")===true){return this;}if(c){a.click.call(d,null);}else{a.score.call(d,null);}d.score.removeAttr("value");});},click:function(c){return b(this).each(function(){if(b(this).data("readonly")===true){return this;}a.initialize.call(this,c);if(this.opt.click){this.opt.click.call(this,c);}else{a.error.call(this,'you must add the "click: function(score, evt) { }" callback.');}a.setTarget.call(this,c,true);});},error:function(c){b(this).html(c);b.error(c);},fill:function(k){var c=this,h=c.stars.length,g=0,d,j,f;for(var e=1;e<=h;e++){d=c.stars.eq(e-1);if(c.opt.iconRange&&c.opt.iconRange.length>g){j=c.opt.iconRange[g];if(c.opt.single){f=(e==k)?(j.on||c.opt.starOn):(j.off||c.opt.starOff);}else{f=(e<=k)?(j.on||c.opt.starOn):(j.off||c.opt.starOff);}if(e<=j.range){d.attr("src",c.opt.path+f);}if(e==j.range){g++;}}else{if(c.opt.single){f=(e==k)?c.opt.starOn:c.opt.starOff;}else{f=(e<=k)?c.opt.starOn:c.opt.starOff;}d.attr("src",c.opt.path+f);}}},fixHint:function(){var c=b(this),e=parseInt(this.score.val(),10),d=this.opt.noRatedMsg;if(!isNaN(e)&&e>0){d=(e<=this.opt.hints.length&&this.opt.hints[e-1]!==null)?this.opt.hints[e-1]:e;}c.data("readonly",true).css("cursor","default").attr("title",d);this.score.attr("readonly","readonly");this.stars.attr("title",d);},getScore:function(){var d=[],c;b(this).each(function(){c=this.score.val();d.push(c?parseFloat(c):undefined);});return(d.length>1)?d:d[0];},readOnly:function(c){return this.each(function(){var d=b(this);if(d.data("readonly")===c){return this;}if(this.cancel){if(c){this.cancel.hide();}else{this.cancel.show();}}if(c){d.unbind();d.children("img").unbind();a.fixHint.call(this);}else{a.bindAction.call(this);a.unfixHint.call(this);}d.data("readonly",c);});},reload:function(){return a.set.call(this,{});},roundStar:function(e){var d=(e-Math.floor(e)).toFixed(2);if(d>this.opt.round.down){var c=this.opt.starOn;if(d
0&&c<0.6){this.stars.eq(Math.ceil(d)-1).attr("src",this.opt.path+this.opt.starHalf);}},initialize:function(c){c=!c?0:a.between(c,0,this.opt.number);a.fill.call(this,c);if(c>0){if(this.opt.halfShow){a.roundStar.call(this,c);}this.score.val(c);}},unfixHint:function(){for(var c=0;c)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase();},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this;}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this;}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this;}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null];}else{b2=bY.exec(b0);}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true);}else{b0=[b6.createElement(b1[1])];}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes;}return bF.merge(this,b0);}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0);}this.length=1;this[0]=b5;}this.context=av;this.selector=b0;return this;}}else{if(!b4||b4.jquery){return(b4||b3).find(b0);}else{return this.constructor(b4).find(b0);}}}else{if(bF.isFunction(b0)){return b3.ready(b0);}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context;}return bF.makeArray(b0,this);},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length;},toArray:function(){return bK.call(this,0);},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0]);},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1);}else{bF.merge(b2,b1);}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0;}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")";}}return b2;},each:function(b1,b0){return bF.each(this,b1,b0);},ready:function(b0){bF.bindReady();bC.add(b0);return this;},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","));},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2);}));},end:function(){return this.prevObject||this.constructor(null);},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2;}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={};}if(b3===b4){b5=this;--b4;}for(;b40){return;}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready");}}},bindReady:function(){if(bC){return;}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1);}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bd.addEventListener("load",bF.ready,false);}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bd.attachEvent("onload",bF.ready);var b0=false;try{b0=bd.frameElement==null;}catch(b1){}if(av.documentElement.doScroll&&b0){bw();}}}},isFunction:function(b0){return bF.type(b0)==="function";},isArray:Array.isArray||function(b0){return bF.type(b0)==="array";},isWindow:function(b0){return b0!=null&&b0==b0.window;},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0);},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object";},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false;}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false;}}catch(b1){return false;}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0);},isEmptyObject:function(b1){for(var b0 in b1){return false;}return true;},error:function(b0){throw new Error(b0);},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null;}b0=bF.trim(b0);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(b0);}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))();}bF.error("Invalid JSON: "+b0);},parseXML:function(b2){if(typeof b2!=="string"||!b2){return null;}var b0,b1;try{if(bd.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml");}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2);}}catch(b3){b0=L;}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2);}return b0;},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bd.execScript||function(b1){bd["eval"].call(bd,b1);})(b0);}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT);},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase();},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break;}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aK.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx);}};}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aK.call(arguments,0):bG;bC.notifyWith(bE,bB);};}if(e>1){for(;bva";bH=bv.getElementsByTagName("*");bE=bv.getElementsByTagName("a")[0];if(!bH||!bH.length||!bE){return{};}bF=av.createElement("select");bx=bF.appendChild(av.createElement("option"));bD=bv.getElementsByTagName("input")[0];bI={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bE.getAttribute("style")),hrefNormalized:(bE.getAttribute("href")==="/a"),opacity:/^0.55/.test(bE.style.opacity),cssFloat:!!bE.style.cssFloat,checkOn:(bD.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};b.boxModel=bI.boxModel=(av.compatMode==="CSS1Compat");bD.checked=true;bI.noCloneChecked=bD.cloneNode(true).checked;bF.disabled=true;bI.optDisabled=!bx.disabled;try{delete bv.test;}catch(bB){bI.deleteExpando=false;}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bI.noCloneEvent=false;});bv.cloneNode(true).fireEvent("onclick");}bD=av.createElement("input");bD.value="t";bD.setAttribute("type","radio");bI.radioValue=bD.value==="t";bD.setAttribute("checked","checked");bD.setAttribute("name","t");bv.appendChild(bD);bC=av.createDocumentFragment();bC.appendChild(bv.lastChild);bI.checkClone=bC.cloneNode(true).cloneNode(true).lastChild.checked;bI.appendChecked=bD.checked;bC.removeChild(bD);bC.appendChild(bv);if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bA="on"+by;bw=(bA in bv);if(!bw){bv.setAttribute(bA,"return;");bw=(typeof bv[bA]==="function");}bI[by+"Bubbles"]=bw;}}bC.removeChild(bv);bC=bF=bx=bv=bD=null;b(function(){var bM,bV,bW,bU,bO,bP,bR,bL,bK,bQ,bN,e,bT,bS=av.getElementsByTagName("body")[0];if(!bS){return;}bL=1;bT="padding:0;margin:0;border:";bN="position:absolute;top:0;left:0;width:1px;height:1px;";e=bT+"0;visibility:hidden;";bK="style='"+bN+bT+"5px solid #000;";bQ="";bM=av.createElement("div");bM.style.cssText=e+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bS.insertBefore(bM,bS.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bI.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);if(bd.getComputedStyle){bv.innerHTML="";bR=av.createElement("div");bR.style.width="0";bR.style.marginRight="0";bv.style.width="2px";bv.appendChild(bR);bI.reliableMarginRight=(parseInt((bd.getComputedStyle(bR,null)||{marginRight:0}).marginRight,10)||0)===0;}if(typeof bv.style.zoom!=="undefined"){bv.innerHTML="";bv.style.width=bv.style.padding="1px";bv.style.border=0;bv.style.overflow="hidden";bv.style.display="inline";bv.style.zoom=1;bI.inlineBlockNeedsLayout=(bv.offsetWidth===3);bv.style.display="block";bv.style.overflow="visible";bv.innerHTML="";bI.shrinkWrapBlocks=(bv.offsetWidth!==3);}bv.style.cssText=bN+e;bv.innerHTML=bQ;bV=bv.firstChild;bW=bV.firstChild;bO=bV.nextSibling.firstChild.firstChild;bP={doesNotAddBorder:(bW.offsetTop!==5),doesAddBorderForTableAndCells:(bO.offsetTop===5)};bW.style.position="fixed";bW.style.top="20px";bP.fixedPosition=(bW.offsetTop===20||bW.offsetTop===15);bW.style.position=bW.style.top="";bV.style.overflow="hidden";bV.style.position="relative";bP.subtractsBorderForOverflowNotVisible=(bW.offsetTop===-5);bP.doesNotIncludeMarginInBodyOffset=(bS.offsetTop!==bL);if(bd.getComputedStyle){bv.style.marginTop="1%";bI.pixelMargin=(bd.getComputedStyle(bv,null)||{marginTop:0}).marginTop!=="1%";}if(typeof bM.style.zoom!=="undefined"){bM.style.zoom=1;}bS.removeChild(bM);bR=bv=bM=null;b.extend(bI,bP);});return bI;})();var aT=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e);},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return;}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return;}if(!bw){if(bF){bx[bE]=bw=++b.uuid;}else{bw=bE;}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop;}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv);}else{e[bw].data=b.extend(e[bw].data,bv);}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={};}bA=bA.data;}if(bz!==L){bA[b.camelCase(bv)]=bz;}if(bB&&!bA[bv]){return bG.events;}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)];}}else{bD=bA;}return bD;},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return;}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return;}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv];}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv];}else{bv=bv.split(" ");}}}for(bA=0,bz=bv.length;bA1,null,false);},removeData:function(e){return this.each(function(){b.removeData(this,e);});}});function a6(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?+by:aT.test(by)?b.parseJSON(by):by;}catch(bz){}b.data(bx,bw,by);}else{by=L;}}return by;}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue;}if(e!=="toJSON"){return false;}}return true;}function bj(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire();}},0);}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1);}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false;}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw);}else{b.removeData(bx,e,true);bj(bx,bv,"mark");}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx));}else{bw.push(bx);}}return bw||[];}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift();}if(bw){if(bx==="fx"){bv.unshift("inprogress");}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx);},e);}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bj(by,bx,"queue");}}});b.fn.extend({queue:function(e,bv){var bw=2;if(typeof e!=="string"){bv=e;e="fx";bw--;}if(arguments.length1);},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e);});},prop:function(e,bv){return b.access(this,b.prop,e,bv,arguments.length>1);},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e];}catch(bv){}});},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className));});}if(by&&typeof by==="string"){bA=by.split(ag);for(bw=0,bv=this.length;bw-1){return true;}}return false;},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.type]||b.valHooks[bw.nodeName.toLowerCase()];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv;}bv=bw.value;return typeof bv==="string"?bv.replace(aV,""):bv==null?"":bv;}return;}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return;}if(by){bB=bx.call(this,bA,bz.val());}else{bB=bx;}if(bB==null){bB="";}else{if(typeof bB==="number"){bB+="";}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+"";});}}}e=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB;}});}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text;}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null;}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0;});if(!e.length){bv.selectedIndex=-1;}return e;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return;}if(bz&&bx in b.attrFn){return b(bA)[bx](bB);}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB);}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aZ:bf);}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return;}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw;}else{bA.setAttribute(bx,""+bB);return bB;}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw;}else{bw=bA.getAttribute(bx);return bw===null?L:bw;}}},removeAttr:function(by,bA){var bz,bB,bw,e,bv,bx=0;if(bA&&by.nodeType===1){bB=bA.toLowerCase().split(ag);e=bB.length;for(;bx=0);}}});});var be=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/(?:^|\s)hover(\.\S+)?\b/,aP=/^key/,bg=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)");}return bv;},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)));},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1");};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return;}if(bJ.handler){bv=bJ;bJ=bv.handler;by=bv.selector;}if(!bJ.guid){bJ.guid=b.guid++;}bK=bD.events;if(!bK){bD.events=bK={};}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L;};bB.elem=bx;}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true;}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort();}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return;}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true);}}return;}bv.result=L;if(!bv.target){bv.target=bA;}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return;}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH;}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bd,bI]);}}for(bC=0;bCbC){bv.push({elem:this,matches:bD.slice(bC)});}for(bJ=0;bJ0?this.on(e,null,bx,bw):this.trigger(e);};if(b.attrFn){b.attrFn[e]=true;}if(aP.test(e)){b.event.fixHooks[e]=b.event.keyHooks;}if(bg.test(e)){b.event.fixHooks[e]=b.event.mouseHooks;}});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+;(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0;});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[];}if(!bV||typeof bV!=="string"){return bY;}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break;}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ);}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift();}b3=bM(bV,b3,bZ);}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0];}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3);}else{bU=false;}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5="";}else{b4=bW.pop();}if(b4==null){b4=e;}bE.relative[b5](b6,b4,bT);}}else{b6=bW=[];}}if(!b6){b6=b3;}if(!b6){by.error(b5||bV);}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6);}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX]);}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX]);}}}}}else{bF(b6,bY);}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY);}return bY;};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0;};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[];}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV);}}else{if(bS){bR[bU]=false;}}}}return false;},ID:function(e){return e[1].replace(bK,"");},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase();},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0]);}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0;}else{if(e[2]){by.error(e[0]);}}e[0]=bI++;return e;},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT];}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" ";}return bU;},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR);}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT);}return false;}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true;}}return bU;},POS:function(e){e.unshift(true);return e;}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden";},disabled:function(e){return e.disabled===true;},checked:function(e){return e.checked===true;},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex;}return e.selected===true;},parent:function(e){return !!e.firstChild;},empty:function(e){return !e.firstChild;},has:function(bS,bR,e){return !!by(e[3],bS).length;},header:function(e){return(/h\d/i).test(e.nodeName);},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null);},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type;},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type;},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type;},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type;},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type;},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type;},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type;},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button";},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName);},focus:function(e){return e===e.ownerDocument.activeElement;}},setFilters:{first:function(bR,e){return e===0;},last:function(bS,bR,e,bT){return bR===bT.length-1;},even:function(bR,e){return e%2===0;},odd:function(bR,e){return e%2===1;},lt:function(bS,bR,e){return bRe[3]-0;},nth:function(bS,bR,e){return e[3]-0===bR;},eq:function(bS,bR,e){return e[3]-0===bR;}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY);}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0;}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0);}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e;},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e;},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1;},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false;},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV);}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1);};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx));}bE.match.globalPOS=bD;var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e;}return bR;};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType;}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU);}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[];}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT;};}e.removeChild(bR);e=bR=null;})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS]);}}bU=bT;}return bU;};}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2);};}e=null;})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return;}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ);}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ);}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ);}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ);}}else{return bF([],bZ);}}}try{return bF(bV.querySelectorAll(b4),bZ);}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU);}else{bU=bU.replace(/'/g,"\\$&");}if(b5&&b6){bV=bV.parentNode;}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ);}}catch(b1){}finally{if(!bX){bW.removeAttribute("id");}}}}}return e(b4,bV,bZ,b3);};for(var bR in e){by[bR]=e[bR];}bT=null;})();}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle");}catch(bT){bR=true;}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV;}}}catch(bX){}}return by(bY,null,null,[bW]).length>0;};}})();(function(){var e=av.createElement("div");e.innerHTML="";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return;}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return;}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1]);}};e=null;})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break;}}}e=e[bR];}bZ[bT]=bU;}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true);};}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16);};}else{by.contains=function(){return false;};}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false;};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"");}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT
0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0);},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break;}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break;}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by);},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1;}if(typeof e==="string"){return b.inArray(this[0],b(e));}return b.inArray(e.jquery?e[0]:e,this);},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(B(bx[0])||B(bw[0])?bw:b.unique(bw));},andSelf:function(){return this.add(this.prevObject);}});function B(e){return !e||!e.parentNode||e.parentNode.nodeType===11;}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null;},parents:function(e){return b.dir(e,"parentNode");},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw);},next:function(e){return b.nth(e,2,"nextSibling");},prev:function(e){return b.nth(e,2,"previousSibling");},nextAll:function(e){return b.dir(e,"nextSibling");},prevAll:function(e){return b.dir(e,"previousSibling");},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw);},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw);},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e);},children:function(e){return b.sibling(e.firstChild);},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes);}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by;}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx);}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||bb.test(bw))&&aq.test(e)){bx=bx.reverse();}return this.pushStack(bx,e,P.call(arguments).join(","));};});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")";}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e);},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx);}bx=bx[bv];}return e;},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break;}}return by;},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw);}}return e;}});function aH(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e;});}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e;});}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1;});if(bp.test(bw)){return b.filter(bw,bv,!e);}else{bw=b.filter(bw,bv);}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e;});}function a(e){var bw=aS.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop());}}return bv;}var aS="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ah=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,v=/]","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bn=/\/(java|ecma)script/i,aO=/^\s*",""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div","
"];}b.fn.extend({text:function(e){return b.access(this,function(bv){return bv===L?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(bv));},null,e,arguments.length);},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw));});}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0]);}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild;}return bw;}).append(this);}return this;},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv));});}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e);}else{bv.append(e);}});},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e);});},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e);}});},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this);});}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments);}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling);});}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e;}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw]);}if(bw.parentNode){bw.parentNode.removeChild(bw);}}}return this;},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"));}while(bv.firstChild){bv.removeChild(bv.firstChild);}}return this;},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e);});},html:function(e){return b.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===L){return bx.nodeType===1?bx.innerHTML.replace(ah,""):null;}if(typeof by==="string"&&!ae.test(by)&&(b.support.leadingWhitespace||!ar.test(by))&&!ax[(d.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(R,"<$1>$2>");try{for(;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by);}return this.pushStack(bz,e,bC.selector);}};});function bh(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*");}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*");}else{return[];}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked;}}function D(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e);}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az);}}}function am(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild;}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||b.isXMLDoc(by)||!ai.test("<"+by.nodeName+">")?by.cloneNode(true):am(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){aj(by,bz);e=bh(by);bv=bh(bz);for(bx=0;e[bx];++bx){if(bv[bx]){aj(e[bx],bv[bx]);}}}if(bA){s(by,bz);if(bw){e=bh(by);bv=bh(bz);for(bx=0;e[bx];++bx){s(e[bx],bv[bx]);}}}e=bv=null;return bz;},clean:function(bI,bw,bv,bx){var bA,bH,bD,bJ=[];bw=bw||av;if(typeof bw.createElement==="undefined"){bw=bw.ownerDocument||bw[0]&&bw[0].ownerDocument||av;}for(var bE=0,bG;(bG=bI[bE])!=null;bE++){if(typeof bG==="number"){bG+="";}if(!bG){continue;}if(typeof bG==="string"){if(!W.test(bG)){bG=bw.createTextNode(bG);}else{bG=bG.replace(R,"<$1>$2>");var bN=(d.exec(bG)||["",""])[1].toLowerCase(),bz=ax[bN]||ax._default,bK=bz[0],bB=bw.createElement("div"),bL=ac.childNodes,bM;if(bw===av){ac.appendChild(bB);}else{a(bw).appendChild(bB);}bB.innerHTML=bz[1]+bG+bz[2];while(bK--){bB=bB.lastChild;}if(!b.support.tbody){var by=v.test(bG),e=bN==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bz[1]===""&&!by?bB.childNodes:[];for(bD=e.length-1;bD>=0;--bD){if(b.nodeName(e[bD],"tbody")&&!e[bD].childNodes.length){e[bD].parentNode.removeChild(e[bD]);}}}if(!b.support.leadingWhitespace&&ar.test(bG)){bB.insertBefore(bw.createTextNode(ar.exec(bG)[0]),bB.firstChild);}bG=bB.childNodes;if(bB){bB.parentNode.removeChild(bB);if(bL.length>0){bM=bL[bL.length-1];if(bM&&bM.parentNode){bM.parentNode.removeChild(bM);}}}}}var bF;if(!b.support.appendChecked){if(bG[0]&&typeof(bF=bG.length)==="number"){for(bD=0;bD1);};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity");return e===""?"1":e;}else{return bw.style.opacity;}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return;}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number";}if(bD==null||bC==="number"&&isNaN(bD)){return;}if(bC==="number"&&!b.cssNumber[bz]){bD+="px";}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD;}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB;}return bv[bw];}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float";}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw;}else{if(Z){return Z(by,bx);}}},swap:function(by,bx,bz){var e={},bw,bv;for(bv in bx){e[bv]=by.style[bv];by.style[bv]=bx[bv];}bw=bz.call(by);for(bv in bx){by.style[bv]=e[bv];}return bw;}});b.curCSS=b.css;if(av.defaultView&&av.defaultView.getComputedStyle){aJ=function(bA,bw){var bv,bz,e,by,bx=bA.style;bw=bw.replace(y,"-$1").toLowerCase();if((bz=bA.ownerDocument.defaultView)&&(e=bz.getComputedStyle(bA,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(bA.ownerDocument.documentElement,bA)){bv=b.style(bA,bw);}}if(!b.support.pixelMargin&&e&&aE.test(bw)&&a1.test(bv)){by=bx.width;bx.width=bv;bv=e.width;bx.width=by;}return bv;};}if(av.documentElement.currentStyle){aY=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv==null&&bx&&(by=bx[bw])){bv=by;}if(a1.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left;}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e;}}return bv===""?"auto":bv;};}Z=aJ||aY;function af(by,bw,bv){var bz=bw==="width"?by.offsetWidth:by.offsetHeight,bx=bw==="width"?1:0,e=4;if(bz>0){if(bv!=="border"){for(;bx=1&&b.trim(bw.replace(al,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return;}}bx.filter=al.test(bw)?bw.replace(al,e):bw+" "+e;}};}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bv,e){return b.swap(bv,{display:"inline-block"},function(){if(e){return Z(bv,"margin-right");}else{return bv.style.marginRight;}});}};}});if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none");};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e);};}b.each({margin:"",padding:"",border:"Width"},function(e,bv){b.cssHooks[e+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[e+G[bx]+bv]=bz[bx]||bz[bx-2]||bz[0];}return bw;}};});var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,a0=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aN=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aR=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a7=/
+
+
+
+
+