﻿(function(b) { b.fn.superfish = function(k) { var g = b.fn.superfish, j = g.c, f = b(['<span class="', j.arrowClass, '"> &#187;</span>'].join("")), i = function() { var c = b(this), l = d(c); clearTimeout(l.sfTimer); c.showSuperfishUl().siblings().hideSuperfishUl() }, e = function() { var c = b(this), m = d(c), l = g.op; clearTimeout(m.sfTimer); m.sfTimer = setTimeout(function() { l.retainPath = (b.inArray(c[0], l.$path) > -1); c.hideSuperfishUl(); if (l.$path.length && c.parents(["li.", l.hoverClass].join("")).length < 1) { i.call(l.$path) } }, l.delay) }, d = function(c) { var l = c.parents(["ul.", j.menuClass, ":first"].join(""))[0]; g.op = g.o[l.serial]; return l }, h = function(c) { c.addClass(j.anchorClass).append(f.clone()) }; return this.each(function() { var c = this.serial = g.o.length; var m = b.extend({}, g.defaults, k); m.$path = b("li." + m.pathClass, this).slice(0, m.pathLevels).each(function() { b(this).addClass([m.hoverClass, j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass) }); g.o[c] = g.op = m; b("li:has(ul)", this)[(b.fn.hoverIntent && !m.disableHI) ? "hoverIntent" : "hover"](i, e).each(function() { if (m.autoArrows) { h(b(">a:first-child", this)) } }).not("." + j.bcClass).hideSuperfishUl(); var l = b("a", this); l.each(function(n) { var o = l.eq(n).parents("li"); l.eq(n).focus(function() { i.call(o) }).blur(function() { e.call(o) }) }); m.onInit.call(this) }).each(function() { var c = [j.menuClass]; if (g.op.dropShadows && !(b.browser.msie && b.browser.version < 7)) { c.push(j.shadowClass) } b(this).addClass(c.join(" ")) }) }; var a = b.fn.superfish; a.o = []; a.op = {}; a.IE7fix = function() { var c = a.op; if (b.browser.msie && b.browser.version > 6 && c.dropShadows && c.animation.opacity != undefined) { this.toggleClass(a.c.shadowClass + "-off") } }; a.c = { bcClass: "sf-breadcrumb", menuClass: "sf-js-enabled", anchorClass: "sf-with-ul", arrowClass: "sf-sub-indicator", shadowClass: "sf-shadow" }; a.defaults = { hoverClass: "sfHover", pathClass: "overideThisToUse", pathLevels: 1, delay: 800, animation: { opacity: "show" }, speed: "normal", autoArrows: true, dropShadows: true, disableHI: false, onInit: function() { }, onBeforeShow: function() { }, onShow: function() { }, onHide: function() { } }; b.fn.extend({ hideSuperfishUl: function() { var e = a.op, d = (e.retainPath === true) ? e.$path : ""; e.retainPath = false; var c = b(["li.", e.hoverClass].join(""), this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility", "hidden"); e.onHide.call(c); return this }, showSuperfishUl: function() { var e = a.op, d = a.c.shadowClass + "-off", c = this.addClass(e.hoverClass).find(">ul:hidden").css("visibility", "visible"); a.IE7fix.call(c); e.onBeforeShow.call(c); c.animate(e.animation, e.speed, function() { a.IE7fix.call(c); e.onShow.call(c) }); return this } }) })(jQuery); (function(a) { a.fn.hoverIntent = function(k, j) { var l = { sensitivity: 7, interval: 100, timeout: 0 }; l = a.extend(l, j ? { over: k, out: j} : k); var n, m, h, d; var e = function(f) { n = f.pageX; m = f.pageY }; var c = function(g, f) { f.hoverIntent_t = clearTimeout(f.hoverIntent_t); if ((Math.abs(h - n) + Math.abs(d - m)) < l.sensitivity) { a(f).unbind("mousemove", e); f.hoverIntent_s = 1; return l.over.apply(f, [g]) } else { h = n; d = m; f.hoverIntent_t = setTimeout(function() { c(g, f) }, l.interval) } }; var i = function(g, f) { f.hoverIntent_t = clearTimeout(f.hoverIntent_t); f.hoverIntent_s = 0; return l.out.apply(f, [g]) }; var b = function(q) { var o = (q.type == "mouseover" ? q.fromElement : q.toElement) || q.relatedTarget; while (o && o != this) { try { o = o.parentNode } catch (q) { o = this } } if (o == this) { return false } var g = jQuery.extend({}, q); var f = this; if (f.hoverIntent_t) { f.hoverIntent_t = clearTimeout(f.hoverIntent_t) } if (q.type == "mouseover") { h = g.pageX; d = g.pageY; a(f).bind("mousemove", e); if (f.hoverIntent_s != 1) { f.hoverIntent_t = setTimeout(function() { c(g, f) }, l.interval) } } else { a(f).unbind("mousemove", e); if (f.hoverIntent_s == 1) { f.hoverIntent_t = setTimeout(function() { i(g, f) }, l.timeout) } } }; return this.mouseover(b).mouseout(b) } })(jQuery); jQuery.cookie = function(b, j, m) { if (typeof j != "undefined") { m = m || {}; if (j === null) { j = ""; m.expires = -1 } var e = ""; if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) { var f; if (typeof m.expires == "number") { f = new Date(); f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000)) } else { f = m.expires } e = "; expires=" + f.toUTCString() } var l = m.path ? "; path=" + (m.path) : ""; var g = m.domain ? "; domain=" + (m.domain) : ""; var a = m.secure ? "; secure" : ""; document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("") } else { var d = null; if (document.cookie && document.cookie != "") { var k = document.cookie.split(";"); for (var h = 0; h < k.length; h++) { var c = jQuery.trim(k[h]); if (c.substring(0, b.length + 1) == (b + "=")) { d = decodeURIComponent(c.substring(b.length + 1)); break } } } return d } }; (function(a) { a.pop = function(b) { var c = { pop_class: ".pop", pop_toggle_text: "" }; function d() { a(c.pop_class).each(function() { var g = a(this).attr("class"); a(this).addClass("pop_menu"); a(this).wrap("<div class='" + g + "'></div>"); a(".pop_menu").attr("class", "pop_menu"); a(this).before("           <div class='pop_toggle'>" + c.pop_toggle_text + "</div>           ") }) } d(); var f = a(c.pop_class).size() + 1000; a(c.pop_class).each(function(h) { var g = f - h; a(this).css({ zIndex: g }) }); activePop = null; function e() { a(c.pop_class).each(function(g) { if (a(this).hasClass("active") && g != activePop) { a(this).removeClass("active") } }); return false } a(c.pop_class).mouseover(function() { activePop = a(c.pop_class).index(this) }); a(c.pop_class).mouseout(function() { activePop = null }); a(document.body).click(function() { e() }); a(".pop_toggle").click(function() { a(this).parent(c.pop_class).toggleClass("active") }) } })(jQuery); (function(b) { b.fn.jcarousel = function(d) { return this.each(function() { new a(this, d) }) }; var c = { vertical: false, start: 1, offset: 1, size: null, scroll: 3, visible: null, animation: "normal", easing: "swing", auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: "<div></div>", buttonPrevHTML: "<div></div>", buttonNextEvent: "click", buttonPrevEvent: "click", buttonNextCallback: null, buttonPrevCallback: null }; b.jcarousel = function(h, f) { this.options = b.extend({}, c, f || {}); this.locked = false; this.container = null; this.clip = null; this.list = null; this.buttonNext = null; this.buttonPrev = null; this.wh = !this.options.vertical ? "width" : "height"; this.lt = !this.options.vertical ? "left" : "top"; var m = "", k = h.className.split(" "); for (var g = 0; g < k.length; g++) { if (k[g].indexOf("jcarousel-skin") != -1) { b(h).removeClass(k[g]); var m = k[g]; break } } if (h.nodeName == "UL" || h.nodeName == "OL") { this.list = b(h); this.container = this.list.parent(); if (this.container.hasClass("jcarousel-clip")) { if (!this.container.parent().hasClass("jcarousel-container")) { this.container = this.container.wrap("<div></div>") } this.container = this.container.parent() } else { if (!this.container.hasClass("jcarousel-container")) { this.container = this.list.wrap("<div></div>").parent() } } } else { this.container = b(h); this.list = b(h).find(">ul,>ol,div>ul,div>ol") } if (m != "" && this.container.parent()[0].className.indexOf("jcarousel-skin") == -1) { this.container.wrap('<div class=" ' + m + '"></div>') } this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass("jcarousel-clip")) { this.clip = this.list.wrap("<div></div>").parent() } this.buttonPrev = b(".jcarousel-prev", this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) { this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev() } this.buttonPrev.addClass(this.className("jcarousel-prev")); this.buttonNext = b(".jcarousel-next", this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) { this.buttonNext = this.clip.before(this.options.buttonNextHTML).prev() } this.buttonNext.addClass(this.className("jcarousel-next")); this.clip.addClass(this.className("jcarousel-clip")); this.list.addClass(this.className("jcarousel-list")); this.container.addClass(this.className("jcarousel-container")); var j = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var l = this.list.children("li"); var n = this; if (l.size() > 0) { var d = 0, g = this.options.offset; l.each(function() { n.format(this, g++); d += n.dimension(this, j) }); this.list.css(this.wh, d + "px"); if (!f || f.size === undefined) { this.options.size = l.size() } } this.container.css("display", "block"); this.buttonNext.css("display", "block"); this.buttonPrev.css("display", "block"); this.funcNext = function() { n.next() }; this.funcPrev = function() { n.prev() }; this.funcResize = function() { n.reload() }; if (this.options.initCallback != null) { this.options.initCallback(this, "init") } if (b.browser.safari) { this.buttons(false, false); b(window).bind("load", function() { n.setup() }) } else { this.setup() } }; var a = b.jcarousel; a.fn = a.prototype = { jcarousel: "0.2.3" }; a.fn.extend = a.extend = b.extend; a.fn.extend({ setup: function() { this.first = null; this.last = null; this.prevFirst = null; this.prevLast = null; this.animating = false; this.timer = null; this.tail = null; this.inTail = false; if (this.locked) { return } this.list.css(this.lt, this.pos(this.options.offset) + "px"); var d = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(d, false); b(window).unbind("resize", this.funcResize).bind("resize", this.funcResize) }, reset: function() { this.list.empty(); this.list.css(this.lt, "0px"); this.list.css(this.wh, "10px"); if (this.options.initCallback != null) { this.options.initCallback(this, "reset") } this.setup() }, reload: function() { if (this.tail != null && this.inTail) { this.list.css(this.lt, a.intval(this.list.css(this.lt)) + this.tail) } this.tail = null; this.inTail = false; if (this.options.reloadCallback != null) { this.options.reloadCallback(this) } if (this.options.visible != null) { var f = this; var g = Math.ceil(this.clipping() / this.options.visible), e = 0, d = 0; b("li", this.list).each(function(h) { e += f.dimension(this, g); if (h + 1 < f.first) { d = e } }); this.list.css(this.wh, e + "px"); this.list.css(this.lt, -d + "px") } this.scroll(this.first, false) }, lock: function() { this.locked = true; this.buttons() }, unlock: function() { this.locked = false; this.buttons() }, size: function(d) { if (d != undefined) { this.options.size = d; if (!this.locked) { this.buttons() } } return this.options.size }, has: function(f, g) { if (g == undefined || !g) { g = f } if (this.options.size !== null && g > this.options.size) { g = this.options.size } for (var d = f; d <= g; d++) { var h = this.get(d); if (!h.length || h.hasClass("jcarousel-item-placeholder")) { return false } } return true }, get: function(d) { return b(".jcarousel-item-" + d, this.list) }, add: function(h, o) { var k = this.get(h), f = 0, n = 0; if (k.length == 0) { var m, k = this.create(h), g = a.intval(h); while (m = this.get(--g)) { if (g <= 0 || m.length) { g <= 0 ? this.list.prepend(k) : m.after(k); break } } } else { f = this.dimension(k) } k.removeClass(this.className("jcarousel-item-placeholder")); typeof o == "string" ? k.html(o) : k.empty().append(o); var l = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var d = this.dimension(k, l) - f; if (h > 0 && h < this.first) { this.list.css(this.lt, a.intval(this.list.css(this.lt)) - d + "px") } this.list.css(this.wh, a.intval(this.list.css(this.wh)) + d + "px"); return k }, remove: function(f) { var g = this.get(f); if (!g.length || (f >= this.first && f <= this.last)) { return } var h = this.dimension(g); if (f < this.first) { this.list.css(this.lt, a.intval(this.list.css(this.lt)) + h + "px") } g.remove(); this.list.css(this.wh, a.intval(this.list.css(this.wh)) - h + "px") }, next: function() { this.stopAuto(); if (this.tail != null && !this.inTail) { this.scrollTail(false) } else { this.scroll(((this.options.wrap == "both" || this.options.wrap == "last") && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll) } }, prev: function() { this.stopAuto(); if (this.tail != null && this.inTail) { this.scrollTail(true) } else { this.scroll(((this.options.wrap == "both" || this.options.wrap == "first") && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll) } }, scrollTail: function(d) { if (this.locked || this.animating || !this.tail) { return } var e = a.intval(this.list.css(this.lt)); !d ? e -= this.tail : e += this.tail; this.inTail = !d; this.prevFirst = this.first; this.prevLast = this.last; this.animate(e) }, scroll: function(e, d) { if (this.locked || this.animating) { return } this.animate(this.pos(e), d) }, pos: function(A) { if (this.locked || this.animating) { return } if (this.options.wrap != "circular") { A = A < 1 ? 1 : (this.options.size && A > this.options.size ? this.options.size : A) } var w = this.first > A; var h = a.intval(this.list.css(this.lt)); var B = this.options.wrap != "circular" && this.first <= 1 ? 1 : this.first; var E = w ? this.get(B) : this.get(this.last); var z = w ? B : B - 1; var C = null, y = 0, t = false, D = 0; while (w ? --z >= A : ++z < A) { C = this.get(z); t = !C.length; if (C.length == 0) { C = this.create(z).addClass(this.className("jcarousel-item-placeholder")); E[w ? "before" : "after"](C) } E = C; D = this.dimension(C); if (t) { y += D } if (this.first != null && (this.options.wrap == "circular" || (z >= 1 && (this.options.size == null || z <= this.options.size)))) { h = w ? h + D : h - D } } var q = this.clipping(); var s = []; var g = 0, z = A, r = 0; var E = this.get(A - 1); while (++g) { C = this.get(z); t = !C.length; if (C.length == 0) { C = this.create(z).addClass(this.className("jcarousel-item-placeholder")); E.length == 0 ? this.list.prepend(C) : E[w ? "before" : "after"](C) } E = C; var D = this.dimension(C); if (D == 0) { return 0 } if (this.options.wrap != "circular" && this.options.size !== null && z > this.options.size) { s.push(C) } else { if (t) { y += D } } r += D; if (r >= q) { break } z++ } for (var o = 0; o < s.length; o++) { s[o].remove() } if (y > 0) { this.list.css(this.wh, this.dimension(this.list) + y + "px"); if (w) { h -= y; this.list.css(this.lt, a.intval(this.list.css(this.lt)) - y + "px") } } var n = A + g - 1; if (this.options.wrap != "circular" && this.options.size && n > this.options.size) { n = this.options.size } if (z > n) { g = 0, z = n, r = 0; while (++g) { var C = this.get(z--); if (!C.length) { break } r += this.dimension(C); if (r >= q) { break } } } var k = n - g + 1; if (this.options.wrap != "circular" && k < 1) { k = 1 } if (this.inTail && w) { h += this.tail; this.inTail = false } this.tail = null; if (this.options.wrap != "circular" && n == this.options.size && (n - g + 1) >= 1) { var u = a.margin(this.get(n), !this.options.vertical ? "marginRight" : "marginBottom"); if ((r - u) > q) { this.tail = r - q - u } } while (A-- > k) { h += this.dimension(this.get(A)) } this.prevFirst = this.first; this.prevLast = this.last; this.first = k; this.last = n; return h }, animate: function(g, d) { if (this.locked || this.animating) { return } this.animating = true; var e = this; var f = function() { e.animating = false; if (g == 0) { e.list.css(e.lt, 0) } if (e.options.wrap == "both" || e.options.wrap == "last" || e.options.size == null || e.last < e.options.size) { e.startAuto() } e.buttons(); e.notify("onAfterAnimation") }; this.notify("onBeforeAnimation"); if (!this.options.animation || d == false) { this.list.css(this.lt, g + "px"); f() } else { var h = !this.options.vertical ? { left: g} : { top: g }; this.list.animate(h, this.options.animation, this.options.easing, f) } }, startAuto: function(e) { if (e != undefined) { this.options.auto = e } if (this.options.auto == 0) { return this.stopAuto() } if (this.timer != null) { return } var d = this; this.timer = setTimeout(function() { d.next() }, this.options.auto * 1000) }, stopAuto: function() { if (this.timer == null) { return } clearTimeout(this.timer); this.timer = null }, buttons: function(f, e) { if (f == undefined || f == null) { var f = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != "first") || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == "first") && this.options.size != null && this.last >= this.options.size) { f = this.tail != null && !this.inTail } } if (e == undefined || e == null) { var e = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != "last") || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == "last") && this.options.size != null && this.first == 1) { e = this.tail != null && this.inTail } } var d = this; this.buttonNext[f ? "bind" : "unbind"](this.options.buttonNextEvent, this.funcNext)[f ? "removeClass" : "addClass"](this.className("jcarousel-next-disabled")).attr("disabled", f ? false : true); this.buttonPrev[e ? "bind" : "unbind"](this.options.buttonPrevEvent, this.funcPrev)[e ? "removeClass" : "addClass"](this.className("jcarousel-prev-disabled")).attr("disabled", e ? false : true); if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != f) && this.options.buttonNextCallback != null) { this.buttonNext.each(function() { d.options.buttonNextCallback(d, this, f) }); this.buttonNext[0].jcarouselstate = f } if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != e) && this.options.buttonPrevCallback != null) { this.buttonPrev.each(function() { d.options.buttonPrevCallback(d, this, e) }); this.buttonPrev[0].jcarouselstate = e } }, notify: function(d) { var e = this.prevFirst == null ? "init" : (this.prevFirst < this.first ? "next" : "prev"); this.callback("itemLoadCallback", d, e); if (this.prevFirst !== this.first) { this.callback("itemFirstInCallback", d, e, this.first); this.callback("itemFirstOutCallback", d, e, this.prevFirst) } if (this.prevLast !== this.last) { this.callback("itemLastInCallback", d, e, this.last); this.callback("itemLastOutCallback", d, e, this.prevLast) } this.callback("itemVisibleInCallback", d, e, this.first, this.last, this.prevFirst, this.prevLast); this.callback("itemVisibleOutCallback", d, e, this.prevFirst, this.prevLast, this.first, this.last) }, callback: function(h, l, d, j, g, f, e) { if (this.options[h] == undefined || (typeof this.options[h] != "object" && l != "onAfterAnimation")) { return } var m = typeof this.options[h] == "object" ? this.options[h][l] : this.options[h]; if (!b.isFunction(m)) { return } var n = this; if (j === undefined) { m(n, d, l) } else { if (g === undefined) { this.get(j).each(function() { m(n, this, j, d, l) }) } else { for (var k = j; k <= g; k++) { if (k !== null && !(k >= f && k <= e)) { this.get(k).each(function() { m(n, this, k, d, l) }) } } } } }, create: function(d) { return this.format("<li></li>", d) }, format: function(g, f) { var d = b(g).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-" + f)); d.attr("jcarouselindex", f); return d }, className: function(d) { return d + " " + d + (!this.options.vertical ? "-horizontal" : "-vertical") }, dimension: function(i, j) { var h = i.jquery != undefined ? i[0] : i; var g = !this.options.vertical ? h.offsetWidth + a.margin(h, "marginLeft") + a.margin(h, "marginRight") : h.offsetHeight + a.margin(h, "marginTop") + a.margin(h, "marginBottom"); if (j == undefined || g == j) { return g } var f = !this.options.vertical ? j - a.margin(h, "marginLeft") - a.margin(h, "marginRight") : j - a.margin(h, "marginTop") - a.margin(h, "marginBottom"); b(h).css(this.wh, f + "px"); return this.dimension(h) }, clipping: function() { return !this.options.vertical ? this.clip[0].offsetWidth - a.intval(this.clip.css("borderLeftWidth")) - a.intval(this.clip.css("borderRightWidth")) : this.clip[0].offsetHeight - a.intval(this.clip.css("borderTopWidth")) - a.intval(this.clip.css("borderBottomWidth")) }, index: function(d, e) { if (e == undefined) { e = this.options.size } return Math.round((((d - 1) / e) - Math.floor((d - 1) / e)) * e) + 1 } }); a.extend({ defaults: function(e) { return b.extend(c, e || {}) }, margin: function(i, h) { if (!i) { return 0 } var g = i.jquery != undefined ? i[0] : i; if (h == "marginRight" && b.browser.safari) { var f = { display: "block", "float": "none", width: "auto" }, d, j; b.swap(g, f, function() { d = g.offsetWidth }); f.marginRight = 0; b.swap(g, f, function() { j = g.offsetWidth }); return j - d } return a.intval(b.css(g, h)) }, intval: function(d) { d = parseInt(d); return isNaN(d) ? 0 : d } }) })(jQuery); if (window.jQuery) { (function(a) { if (a.browser.msie) { try { document.execCommand("BackgroundImageCache", false, true) } catch (b) { } } a.fn.rating = function(d) { if (this.length == 0) { return this } if (typeof arguments[0] == "string") { if (this.length > 1) { var c = arguments; return this.each(function() { a.fn.rating.apply(a(this), c) }) } a.fn.rating[arguments[0]].apply(this, a.makeArray(arguments).slice(1) || []); return this } var d = a.extend({}, a.fn.rating.options, d || {}); a.fn.rating.calls++; this.not(".star-rating-applied").addClass("star-rating-applied").each(function() { var g, l = a(this); var e = (this.name || "unnamed-rating").replace(/\[|\]/g, "_").replace(/^\_+|\_+$/g, ""); var f = a(this.form || document.body); var k = f.data("rating"); if (!k || k.call != a.fn.rating.calls) { k = { count: 0, call: a.fn.rating.calls} } var n = k[e]; if (n) { g = n.data("rating") } if (n && g) { g.count++ } else { g = a.extend({}, d || {}, (a.metadata ? l.metadata() : (a.meta ? l.data() : null)) || {}, { count: 0, stars: [], inputs: [] }); g.serial = k.count++; n = a('<span class="star-rating-control"/>'); l.before(n); n.addClass("rating-to-be-drawn"); if (l.attr("disabled")) { g.readOnly = true } n.append(g.cancel = a('<div class="rating-cancel"><a title="' + g.cancel + '">' + g.cancelValue + "</a></div>").mouseover(function() { a(this).rating("drain"); a(this).addClass("star-rating-hover") }).mouseout(function() { a(this).rating("draw"); a(this).removeClass("star-rating-hover") }).click(function() { a(this).rating("select") }).data("rating", g)) } var j = a('<div class="star-rating rater-' + g.serial + '"><a title="' + (this.title || this.value) + '">' + this.value + "</a></div>"); n.append(j); if (this.id) { j.attr("id", this.id) } if (this.className) { j.addClass(this.className) } if (g.half) { g.split = 2 } if (typeof g.split == "number" && g.split > 0) { var i = (a.fn.width ? j.width() : 0) || g.starWidth; var h = (g.count % g.split), m = Math.floor(i / g.split); j.width(m).find("a").css({ "margin-left": "-" + (h * m) + "px" }) } if (g.readOnly) { j.addClass("star-rating-readonly") } else { j.addClass("star-rating-live").mouseover(function() { a(this).rating("fill"); a(this).rating("focus") }).mouseout(function() { a(this).rating("draw"); a(this).rating("blur") }).click(function() { a(this).rating("select") }) } if (this.checked) { g.current = j } l.hide(); l.change(function() { a(this).rating("select") }); j.data("rating.input", l.data("rating.star", j)); g.stars[g.stars.length] = j[0]; g.inputs[g.inputs.length] = l[0]; g.rater = k[e] = n; g.context = f; l.data("rating", g); n.data("rating", g); j.data("rating", g); f.data("rating", k) }); a(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"); return this }; a.extend(a.fn.rating, { calls: 0, focus: function() { var d = this.data("rating"); if (!d) { return this } if (!d.focus) { return this } var c = a(this).data("rating.input") || a(this.tagName == "INPUT" ? this : null); if (d.focus) { d.focus.apply(c[0], [c.val(), a("a", c.data("rating.star"))[0]]) } }, blur: function() { var d = this.data("rating"); if (!d) { return this } if (!d.blur) { return this } var c = a(this).data("rating.input") || a(this.tagName == "INPUT" ? this : null); if (d.blur) { d.blur.apply(c[0], [c.val(), a("a", c.data("rating.star"))[0]]) } }, fill: function() { var c = this.data("rating"); if (!c) { return this } if (c.readOnly) { return } this.rating("drain"); this.prevAll().andSelf().filter(".rater-" + c.serial).addClass("star-rating-hover") }, drain: function() { var c = this.data("rating"); if (!c) { return this } if (c.readOnly) { return } c.rater.children().filter(".rater-" + c.serial).removeClass("star-rating-on").removeClass("star-rating-hover") }, draw: function() { var c = this.data("rating"); if (!c) { return this } this.rating("drain"); if (c.current) { c.current.data("rating.input").attr("checked", "checked"); c.current.prevAll().andSelf().filter(".rater-" + c.serial).addClass("star-rating-on") } else { a(c.inputs).removeAttr("checked") } c.cancel[c.readOnly || c.required ? "hide" : "show"](); this.siblings()[c.readOnly ? "addClass" : "removeClass"]("star-rating-readonly") }, select: function(d) { var e = this.data("rating"); if (!e) { return this } if (e.readOnly) { return } e.current = null; if (typeof d != "undefined") { if (typeof d == "number") { return a(e.stars[d]).rating("select") } if (typeof d == "string") { a.each(e.stars, function() { if (a(this).data("rating.input").val() == d) { a(this).rating("select") } }) } } else { e.current = this[0].tagName == "INPUT" ? this.data("rating.star") : (this.is(".rater-" + e.serial) ? this : null) } this.data("rating", e); this.rating("draw"); var c = a(e.current ? e.current.data("rating.input") : null); if (e.callback) { e.callback.apply(c[0], [c.val(), a("a", e.current)[0]]) } }, readOnly: function(c, d) { var e = this.data("rating"); if (!e) { return this } e.readOnly = c || c == undefined ? true : false; if (d) { a(e.inputs).attr("disabled", "disabled") } else { a(e.inputs).removeAttr("disabled") } this.data("rating", e); this.rating("draw") }, disable: function() { this.rating("readOnly", true, true) }, enable: function() { this.rating("readOnly", false, false) } }); a.fn.rating.options = { cancel: "Cancel Rating", cancelValue: "", split: 0, starWidth: 16 }; a(function() { a("input[type=radio].star").rating() }) })(jQuery) } (function(c) { var a = c.scrollTo = function(f, e, d) { c(window).scrollTo(f, e, d) }; a.defaults = { axis: "xy", duration: parseFloat(c.fn.jquery) >= 1.3 ? 0 : 1 }; a.window = function(d) { return c(window).scrollable() }; c.fn.scrollable = function() { return this.map(function() { var e = this, d = !e.nodeName || c.inArray(e.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]) != -1; if (!d) { return e } var f = (e.contentWindow || e).document || e.ownerDocument || e; return c.browser.safari || f.compatMode == "BackCompat" ? f.body : f.documentElement }) }; c.fn.scrollTo = function(f, e, d) { if (typeof e == "object") { d = e; e = 0 } if (typeof d == "function") { d = { onAfter: d} } if (f == "max") { f = 9000000000 } d = c.extend({}, a.defaults, d); e = e || d.speed || d.duration; d.queue = d.queue && d.axis.length > 1; if (d.queue) { e /= 2 } d.offset = b(d.offset); d.over = b(d.over); return this.scrollable().each(function() { var m = this, k = c(m), l = f, j, h = {}, n = k.is("html,body"); switch (typeof l) { case "number": case "string": if (/^([+-]=)?\d+(\.\d+)?(px)?$/.test(l)) { l = b(l); break } l = c(l, this); case "object": if (l.is || l.style) { j = (l = c(l)).offset() } } c.each(d.axis.split(""), function(r, s) { var t = s == "x" ? "Left" : "Top", u = t.toLowerCase(), q = "scroll" + t, o = m[q], p = s == "x" ? "Width" : "Height"; if (j) { h[q] = j[u] + (n ? 0 : o - k.offset()[u]); if (d.margin) { h[q] -= parseInt(l.css("margin" + t)) || 0; h[q] -= parseInt(l.css("border" + t + "Width")) || 0 } h[q] += d.offset[u] || 0; if (d.over[u]) { h[q] += l[p.toLowerCase()]() * d.over[u] } } else { h[q] = l[u] } if (/^\d+$/.test(h[q])) { h[q] = h[q] <= 0 ? 0 : Math.min(h[q], g(p)) } if (!r && d.queue) { if (o != h[q]) { i(d.onAfterFirst) } delete h[q] } }); i(d.onAfter); function i(o) { k.animate(h, e, d.easing, o && function() { o.call(this, f, d) }) } function g(s) { var p = "scroll" + s; if (!n) { return m[p] } var r = "client" + s, q = m.ownerDocument.documentElement, o = m.ownerDocument.body; return Math.max(q[p], o[p]) - Math.min(q[r], o[r]) } }).end() }; function b(d) { return typeof d == "object" ? d : { top: d, left: d} } })(jQuery);