1/** 2 * jQuery Cookie plugin 3 */ 4jQuery.cookie=function(d,e,b){if(arguments.length>1&&(e===null||typeof e!=="object")){b=jQuery.extend({},b);if(e===null){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}return(document.cookie=[encodeURIComponent(d),"=",b.raw?String(e):encodeURIComponent(String(e)),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null}; 5 6 7/* 8 ### jQuery Star Rating Plugin v3.14 - 2012-01-26 ### 9 * Home: http://www.fyneworks.com/jquery/star-rating/ 10 * Code: http://code.google.com/p/jquery-star-rating-plugin/ 11 * 12 * Dual licensed under the MIT and GPL licenses: 13 * http://www.opensource.org/licenses/mit-license.php 14 * http://www.gnu.org/licenses/gpl.html 15 ### 16*/ 17 18/*# AVOID COLLISIONS #*/ 19; 20if (window.jQuery)(function ($) { 21 /*# AVOID COLLISIONS #*/ 22 23 $.fn.rating = function (b) { 24 if (this.length == 0) { 25 return this 26 } 27 if (typeof arguments[0] == "string") { 28 if (this.length > 1) { 29 var a = arguments; 30 return this.each(function () { 31 $.fn.rating.apply($(this), a) 32 }) 33 } 34 $.fn.rating[arguments[0]].apply(this, $.makeArray(arguments).slice(1) || []); 35 return this 36 } 37 var b = $.extend({}, $.fn.rating.options, b || {}); 38 $.fn.rating.calls++; 39 this.not(".star-rating-applied").addClass("star-rating-applied").each(function () { 40 var f, k = $(this); 41 var c = (this.name || "unnamed-rating").replace(/\[|\]/g, "_").replace(/^\_+|\_+$/g, ""); 42 var d = $(this.form || document.body); 43 var j = d.data("rating"); 44 if (!j || j.call != $.fn.rating.calls) { 45 j = { 46 count: 0, 47 call: $.fn.rating.calls 48 } 49 } 50 var m = j[c]; 51 if (m) { 52 f = m.data("rating") 53 } 54 if (m && f) { 55 f.count++ 56 } else { 57 f = $.extend({}, b || {}, ($.metadata ? k.metadata() : ($.meta ? k.data() : null)) || {}, { 58 count: 0, 59 stars: [], 60 inputs: [] 61 }); 62 f.serial = j.count++; 63 m = $('<span class="star-rating-control"/>'); 64 k.before(m); 65 m.addClass("rating-to-be-drawn"); 66 if (k.attr("disabled") || k.hasClass("disabled")) { 67 f.readOnly = true 68 } 69 if (k.hasClass("required")) { 70 f.required = true 71 } 72 m.append(f.cancel = $('<div class="rating-cancel"><a title="' + f.cancel + '">' + f.cancelValue + "</a></div>").mouseover(function () { 73 $(this).rating("drain"); 74 $(this).addClass("star-rating-hover") 75 }).mouseout(function () { 76 $(this).rating("draw"); 77 $(this).removeClass("star-rating-hover") 78 }).click(function () { 79 $(this).rating("select") 80 }).data("rating", f)) 81 } 82 var i = $('<div class="star-rating rater-' + f.serial + '"><a title="' + (this.title || this.value) + '">' + this.value + "</a></div>"); 83 m.append(i); 84 if (this.id) { 85 i.attr("id", this.id) 86 } 87 if (this.className) { 88 i.addClass(this.className) 89 } 90 if (f.half) { 91 f.split = 2 92 } 93 if (typeof f.split == "number" && f.split > 0) { 94 var h = ($.fn.width ? i.width() : 0) || f.starWidth; 95 var g = (f.count % f.split), 96 l = Math.floor(h / f.split); 97 i.width(l).find("a").css({ 98 "margin-left": "-" + (g * l) + "px" 99 }) 100 } 101 if (f.readOnly) { 102 i.addClass("star-rating-readonly") 103 } else {
104 i.addClass("star-rating-live").mouseover(function () { 105 $(this).rating("fill"); 106 $(this).rating("focus") 107 }).mouseout(function () { 108 $(this).rating("draw"); 109 $(this).rating("blur") 110 }).click(function () { 111 $(this).rating("select") 112 }) 113 } if (this.checked) { 114 f.current = i 115 } 116 if (this.nodeName == "A") { 117 if ($(this).hasClass("selected")) { 118 f.current = i 119 } 120 } 121 k.hide(); 122 k.each(function () { 123 $(this).next("label").hide() 124 }); 125 k.change(function () { 126 $(this).rating("select") 127 }); 128 i.data("rating.input", k.data("rating.star", i)); 129 f.stars[f.stars.length] = i[0]; 130 f.inputs[f.inputs.length] = k[0]; 131 f.rater = j[c] = m; 132 f.context = d; 133 k.data("rating", f); 134 m.data("rating", f); 135 i.data("rating", f); 136 d.data("rating", j) 137 }); 138 $(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"); 139 return this 140 }; 141 $.extend($.fn.rating, { 142 calls: 0, 143 focus: function () { 144 var b = this.data("rating"); 145 if (!b) { 146 return this 147 } 148 if (!b.focus) { 149 return this 150 } 151 var a = $(this).data("rating.input") || $(this.tagName == "INPUT" ? this : null); 152 if (b.focus) { 153 b.focus.apply(a[0], [a.val(), $("a", a.data("rating.star"))[0]]) 154 } 155 }, 156 blur: function () { 157 var b = this.data("rating"); 158 if (!b) { 159 return this 160 } 161 if (!b.blur) { 162 return this 163 } 164 var a = $(this).data("rating.input") || $(this.tagName == "INPUT" ? this : null); 165 if (b.blur) { 166 b.blur.apply(a[0], [a.val(), $("a", a.data("rating.star"))[0]]) 167 } 168 }, 169 fill: function () { 170 var a = this.data("rating"); 171 if (!a) { 172 return this 173 } 174 if (a.readOnly) { 175 return 176 } 177 this.rating("drain"); 178 this.prevAll().andSelf().filter(".rater-" + a.serial).addClass("star-rating-hover") 179 }, 180 drain: function () { 181 var a = this.data("rating"); 182 if (!a) { 183 return this 184 } 185 if (a.readOnly) { 186 return 187 } 188 a.rater.children().filter(".rater-" + a.serial).removeClass("star-rating-on").removeClass("star-rating-hover") 189 }, 190 draw: function () { 191 var a = this.data("rating"); 192 if (!a) { 193 return this 194 } 195 this.rating("drain"); 196 if (a.current) { 197 a.current.data("rating.input").attr("checked", "checked"); 198 a.current.prevAll().andSelf().filter(".rater-" + a.serial).addClass("star-rating-on") 199 } else { 200 $(a.inputs).removeAttr("checked") 201 } 202 a.cancel[a.readOnly || a.required ? "hide" : "show"](); 203 this.siblings()[a.readOnly ? "addClass" : "removeClass"]("star-rating-readonly") 204 }, 205 select: function (b, d) { 206 var c = this.data("rating"); 207 if (!c) { 208 return this 209 } 210 if (c.readOnly) { 211 return 212 } 213 c.current = null; 214 if (typeof b != "undefined") { 215 if (typeof b == "number") { 216 return $(c.stars[b]).rating("select", undefined, d) 217 } 218 if (typeof b == "string") { 219 $.each(c.stars, function () { 220 if ($(this).data("rating.input").val() == b) { 221 $(this).rating("select", undefined, d) 222 } 223 }) 224 } 225 } else { 226 c.current = this[0].tagName == "INPUT" ? this.data("rating.star") : (this.is(".rater-" + c.serial) ? this
226: null) 227 } 228 this.data("rating", c); 229 this.rating("draw"); 230 var a = $(c.current ? c.current.data("rating.input") : null); 231 if ((d || d == undefined) && c.callback) { 232 c.callback.apply(a[0], [a.val(), $("a", c.current)[0]]) 233 } 234 }, 235 readOnly: function (a, b) { 236 var c = this.data("rating"); 237 if (!c) { 238 return this 239 } 240 c.readOnly = a || a == undefined ? true : false; 241 if (b) { 242 $(c.inputs).attr("disabled", "disabled") 243 } else { 244 $(c.inputs).removeAttr("disabled") 245 } 246 this.data("rating", c); 247 this.rating("draw") 248 }, 249 disable: function () { 250 this.rating("readOnly", true, true) 251 }, 252 enable: function () { 253 this.rating("readOnly", false, false) 254 } 255 }); 256 $.fn.rating.options = { 257 cancel: "Cancel Rating", 258 cancelValue: "", 259 split: 0, 260 starWidth: 16 261 }; 262 $(function () { 263 $("input[type=radio].star").rating() 264 }); 265 /*# AVOID COLLISIONS #*/ 266})(jQuery); 267/*# AVOID COLLISIONS #*/
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.