/*!
 * Modernizr JavaScript library 1.5
 * http://www.modernizr.com/
 *
 * Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/
 * Dual-licensed under the BSD and MIT licenses.
 * http://www.modernizr.com/license/
 *
 * Featuring major contributions by
 * Paul Irish  - http://paulirish.com
 */
window.Modernizr = function (i, e, I) { function C(a, b) { for (var c in a) if (m[a[c]] !== I && (!b || b(a[c], D))) return true } function r(a, b) { var c = a.charAt(0).toUpperCase() + a.substr(1); return !!C([a, "Webkit" + c, "Moz" + c, "O" + c, "ms" + c, "Khtml" + c], b) } function P() { j[E] = function (a) { for (var b = 0, c = a.length; b < c; b++) J[a[b]] = !!(a[b] in n); return J } ("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")); j[Q] = function (a) { for (var b = 0, c, h = a.length; b < h; b++) { n.setAttribute("type", a[b]); if (c = n.type !== "text") { n.value = K; /tel|search/.test(n.type) || (c = /url|email/.test(n.type) ? n.checkValidity && n.checkValidity() === false : n.value != K) } L[a[b]] = !!c } return L } ("search tel url email datetime date month week time datetime-local number range color".split(" ")) } var j = {}, s = e.documentElement, D = e.createElement("modernizr"), m = D.style, n = e.createElement("input"), E = "input", Q = E + "types", K = ":)", M = Object.prototype.toString, y = " -o- -moz- -ms- -webkit- -khtml- ".split(" "), d = {}, L = {}, J = {}, N = [], u = function () { var a = { select: "input", change: "input", submit: "form", reset: "form", error: "img", load: "img", abort: "img" }, b = {}; return function (c, h) { var t = arguments.length == 1; if (t && b[c]) return b[c]; h = h || document.createElement(a[c] || "div"); c = "on" + c; var g = c in h; if (!g && h.setAttribute) { h.setAttribute(c, "return;"); g = typeof h[c] == "function" } h = null; return t ? (b[c] = g) : g } } (), F = {}.hasOwnProperty, O; O = typeof F !== "undefined" && typeof F.call !== "undefined" ? function (a, b) { return F.call(a, b) } : function (a, b) { return b in a && typeof a.constructor.prototype[b] === "undefined" }; d.canvas = function () { return !!e.createElement("canvas").getContext }; d.canvastext = function () { return !!(d.canvas() && typeof e.createElement("canvas").getContext("2d").fillText == "function") }; d.geolocation = function () { return !!navigator.geolocation }; d.crosswindowmessaging = function () { return !!i.postMessage }; d.websqldatabase = function () { var a = !!i.openDatabase; if (a) try { a = !!openDatabase("testdb", "1.0", "html5 test db", 2E5) } catch (b) { a = false } return a }; d.indexedDB = function () { return !!i.indexedDB }; d.hashchange = function () { return u("hashchange", i) && (document.documentMode === I || document.documentMode > 7) }; d.historymanagement = function () { return !!(i.history && history.pushState) }; d.draganddrop = function () { return u("drag") && u("dragstart") && u("dragenter") && u("dragover") && u("dragleave") && u("dragend") && u("drop") }; d.websockets = function () { return "WebSocket" in i }; d.rgba = function () { m.cssText = "background-color:rgba(150,255,150,.5)"; return ("" + m.backgroundColor).indexOf("rgba") !== -1 }; d.hsla = function () { m.cssText = "background-color:hsla(120,40%,100%,.5)"; return ("" + m.backgroundColor).indexOf("rgba") !== -1 }; d.multiplebgs = function () { m.cssText = "background:url(//:),url(//:),red url(//:)"; return /(url\s*\(.*?){3}/.test(m.background) }; d.backgroundsize = function () { return r("backgroundSize") }; d.borderimage = function () { return r("borderImage") }; d.borderradius = function () { return r("borderRadius", "", function (a) { return ("" + a).indexOf("orderRadius") !== -1 }) }; d.boxshadow = function () { return r("boxShadow") }; d.opacity = function () { var a = y.join("opacity:.5;") + ""; m.cssText = a; return ("" + m.opacity).indexOf("0.5") !== -1 }; d.cssanimations = function () { return r("animationName") }; d.csscolumns = function () { return r("columnCount") }; d.cssgradients = function () { var a = ("background-image:" + y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:") + y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0, -17); m.cssText = a; return ("" + m.backgroundImage).indexOf("gradient") !== -1 }; d.cssreflections = function () { return r("boxReflect") }; d.csstransforms = function () { return !!C(["transformProperty", "WebkitTransform", "MozTransform", "OTransform", "msTransform"]) }; d.csstransforms3d = function () { var a = !!C(["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]); if (a) { var b = document.createElement("style"), c = e.createElement("div"); b.textContent = "@media (" + y.join("transform-3d),(") + "modernizr){#modernizr{height:3px}}"; e.getElementsByTagName("head")[0].appendChild(b); c.id = "modernizr"; s.appendChild(c); a = c.offsetHeight === 3; b.parentNode.removeChild(b); c.parentNode.removeChild(c) } return a }; d.csstransitions = function () { return r("transitionProperty") }; d.fontface = function () { var a; if (/*@cc_on@if(@_jscript_version>=5)!@end@*/0) a = true; else { var b = e.createElement("style"), c = e.createElement("span"), h, t = false, g = e.body, o, w; b.textContent = "@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}"; e.getElementsByTagName("head")[0].appendChild(b); c.setAttribute("style", "font:99px _,arial,helvetica;position:absolute;visibility:hidden"); if (!g) { g = s.appendChild(e.createElement("fontface")); t = true } c.innerHTML = "........"; c.id = "fonttest"; g.appendChild(c); h = c.offsetWidth * c.offsetHeight; c.style.font = "99px testfont,_,arial,helvetica"; a = h !== c.offsetWidth * c.offsetHeight; var v = function () { if (g.parentNode) { a = j.fontface = h !== c.offsetWidth * c.offsetHeight; s.className = s.className.replace(/(no-)?fontface\b/, "") + (a ? " " : " no-") + "fontface" } }; setTimeout(v, 75); setTimeout(v, 150); addEventListener("load", function () { v(); (w = true) && o && o(a); setTimeout(function () { t || (g = c); g.parentNode.removeChild(g); b.parentNode.removeChild(b) }, 50) }, false) } j._fontfaceready = function (p) { w || a ? p(a) : (o = p) }; return a || h !== c.offsetWidth }; d.video = function () { var a = e.createElement("video"), b = !!a.canPlayType; if (b) { b = new Boolean(b); b.ogg = a.canPlayType('video/ogg; codecs="theora"'); b.h264 = a.canPlayType('video/mp4; codecs="avc1.42E01E"'); b.webm = a.canPlayType('video/webm; codecs="vp8, vorbis"') } return b }; d.audio = function () { var a = e.createElement("audio"), b = !!a.canPlayType; if (b) { b = new Boolean(b); b.ogg = a.canPlayType('audio/ogg; codecs="vorbis"'); b.mp3 = a.canPlayType("audio/mpeg;"); b.wav = a.canPlayType('audio/wav; codecs="1"'); b.m4a = a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;") } return b }; d.localStorage = function () { return "localStorage" in i && i.localStorage !== null }; d.sessionStorage = function () { try { return "sessionStorage" in i && i.sessionStorage !== null } catch (a) { return false } }; d.webworkers = function () { return !!i.Worker }; d.applicationCache = function () { var a = i.applicationCache; return !!(a && typeof a.status != "undefined" && typeof a.update == "function" && typeof a.swapCache == "function") }; d.svg = function () { return !!e.createElementNS && !!e.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect }; d.smil = function () { return !!e.createElementNS && /SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", "animate"))) }; d.svgclippaths = function () { return !!e.createElementNS && /SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg", "clipPath"))) }; for (var z in d) if (O(d, z)) N.push(((j[z.toLowerCase()] = d[z]()) ? "" : "no-") + z.toLowerCase()); j[E] || P(); j.addTest = function (a, b) { a = a.toLowerCase(); if (!j[a]) { b = !!b(); s.className += " " + (b ? "" : "no-") + a; j[a] = b; return j } }; m.cssText = ""; D = n = null; (function () { var a = e.createElement("div"); a.innerHTML = "<elem></elem>"; return a.childNodes.length !== 1 })() && function (a, b) { function c(f, k) { if (o[f]) o[f].styleSheet.cssText += k; else { var l = t[G], q = b[A]("style"); q.media = f; l.insertBefore(q, l[G]); o[f] = q; c(f, k) } } function h(f, k) { for (var l = new RegExp("\\b(" + w + ")\\b(?!.*[;}])", "gi"), q = function (B) { return ".iepp_" + B }, x = -1; ++x < f.length; ) { k = f[x].media || k; h(f[x].imports, k); c(k, f[x].cssText.replace(l, q)) } } for (var t = b.documentElement, g = b.createDocumentFragment(), o = {}, w = "abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video", v = w.split("|"), p = [], H = -1, G = "firstChild", A = "createElement"; ++H < v.length; ) { b[A](v[H]); g[A](v[H]) } g = g.appendChild(b[A]("div")); a.attachEvent("onbeforeprint", function () { for (var f, k = b.getElementsByTagName("*"), l, q, x = new RegExp("^" + w + "$", "i"), B = -1; ++B < k.length; ) if ((f = k[B]) && (q = f.nodeName.match(x))) { l = new RegExp("^\\s*<" + q + "(.*)\\/" + q + ">\\s*$", "i"); g.innerHTML = f.outerHTML.replace(/\r|\n/g, " ").replace(l, f.currentStyle.display == "block" ? "<div$1/div>" : "<span$1/span>"); l = g.childNodes[0]; l.className += " iepp_" + q; l = p[p.length] = [f, l]; f.parentNode.replaceChild(l[1], l[0]) } h(b.styleSheets, "all") }); a.attachEvent("onafterprint", function () { for (var f = -1, k; ++f < p.length; ) p[f][1].parentNode.replaceChild(p[f][0], p[f][1]); for (k in o) t[G].removeChild(o[k]); o = {}; p = [] }) } (this, e); j._enableHTML5 = true; j._version = "1.5"; s.className = s.className.replace(/\bno-js\b/, "") + " js"; s.className += " " + N.join(" "); return j } (this, this.document);

/*
selectivizr v1.0.0 - (c) 2009 by Keith Clark, freely distributable under the terms of the MIT license.
selectivizr.com
*/
(function (x) { function K(a) { return a.replace(L, o).replace(M, function (b, e, c) { b = c.split(","); c = 0; for (var g = b.length; c < g; c++) { var j = N(b[c].replace(O, o).replace(P, o)) + t, f = []; b[c] = j.replace(Q, function (d, k, l, i, h) { if (k) { if (f.length > 0) { d = f; var u; h = j.substring(0, h).replace(R, n); if (h == n || h.charAt(h.length - 1) == t) h += "*"; try { u = v(h) } catch (da) { } if (u) { h = 0; for (l = u.length; h < l; h++) { i = u[h]; for (var y = i.className, z = 0, S = d.length; z < S; z++) { var q = d[z]; if (!RegExp("(^|\\s)" + q.className + "(\\s|$)").test(i.className)) if (q.b && (q.b === true || q.b(i) === true)) y = A(y, q.className, true) } i.className = y } } f = [] } return k } else { if (k = l ? T(l) : !B || B.test(i) ? { className: C(i), b: true} : null) { f.push(k); return "." + k.className } return d } }) } return e + b.join(",") }) } function T(a) { var b = true, e = C(a.slice(1)), c = a.substring(0, 5) == ":not(", g, j; if (c) a = a.slice(5, -1); var f = a.indexOf("("); if (f > -1) a = a.substring(0, f); if (a.charAt(0) == ":") switch (a.slice(1)) { case "root": b = function (d) { return c ? d != D : d == D }; break; case "target": if (p == 8) { b = function (d) { function k() { var l = location.hash, i = l.slice(1); return c ? l == "" || d.id != i : l != "" && d.id == i } x.attachEvent("onhashchange", function () { r(d, e, k()) }); return k() }; break } return false; case "checked": b = function (d) { U.test(d.type) && d.attachEvent("onpropertychange", function () { event.propertyName == "checked" && r(d, e, d.checked !== c) }); return d.checked !== c }; break; case "disabled": c = !c; case "enabled": b = function (d) { if (V.test(d.tagName)) { d.attachEvent("onpropertychange", function () { event.propertyName == "$disabled" && r(d, e, d.a === c) }); w.push(d); d.a = d.disabled; return d.disabled === c } return a == ":enabled" ? c : !c }; break; case "focus": g = "focus"; j = "blur"; case "hover": if (!g) { g = "mouseenter"; j = "mouseleave" } b = function (d) { d.attachEvent("on" + (c ? j : g), function () { r(d, e, true) }); d.attachEvent("on" + (c ? g : j), function () { r(d, e, false) }); return c }; break; default: if (!W.test(a)) return false; break } return { className: e, b: b} } function C(a) { return E + "-" + (p == 6 && X ? Y++ : a.replace(Z, function (b) { return b.charCodeAt(0) })) } function N(a) { return a.replace(F, o).replace($, t) } function r(a, b, e) { var c = a.className; b = A(c, b, e); if (b != c) { a.className = b; a.parentNode.className += n } } function A(a, b, e) { var c = RegExp("(^|\\s)" + b + "(\\s|$)"), g = c.test(a); return e ? g ? a : a + t + b : g ? a.replace(c, o).replace(F, o) : a } function G(a, b) { if (/^https?:\/\//i.test(a)) return b.substring(0, b.indexOf("/", 8)) == a.substring(0, a.indexOf("/", 8)) ? a : null; if (a.charAt(0) == "/") return b.substring(0, b.indexOf("/", 8)) + a; var e = b.split("?")[0]; if (a.charAt(0) != "?" && e.charAt(e.length - 1) != "/") e = e.substring(0, e.lastIndexOf("/") + 1); return e + a } function H(a) { if (a) { s.open("GET", a, false); s.send(); return (s.status == 200 ? s.responseText : n).replace(aa, n).replace(ba, function (b, e, c) { return H(G(c, a)) }) } return n } function ca() { var a, b; a = m.getElementsByTagName("BASE"); for (var e = a.length > 0 ? a[0].href : m.location.href, c = 0; c < m.styleSheets.length; c++) { b = m.styleSheets[c]; if (b.href != n) if (a = G(b.href, e)) b.cssText = K(H(a)) } w.length > 0 && setInterval(function () { for (var g = 0, j = w.length; g < j; g++) { var f = w[g]; if (f.disabled !== f.a) if (f.disabled) { f.disabled = false; f.a = true; f.disabled = true } else f.a = f.disabled } }, 250) } if (!/*@cc_on!@*/true) { var m = document, D = m.documentElement, s = function () { if (x.XMLHttpRequest) return new XMLHttpRequest; try { return new ActiveXObject("Microsoft.XMLHTTP") } catch (a) { return null } } (), p = /MSIE ([\d])/.exec(navigator.userAgent)[1]; if (!(m.compatMode != "CSS1Compat" || p < 6 || p > 8 || !s)) { var I = { NW: "*.Dom.select", DOMAssistant: "*.$", Prototype: "$$", YAHOO: "*.util.Selector.query", MooTools: "$$", Sizzle: "*", jQuery: "*", dojo: "*.query" }, v, w = [], Y = 0, X = true, E = "slvzr", J = E + "DOMReady", aa = /(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g, ba = /@import\s*url\(\s*(["'])?(.*?)\1\s*\)[\w\W]*?;/g, W = /^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/, L = /:(:first-(?:line|letter))/g, M = /(^|})\s*([^\{]*?[\[:][^{]+)/g, Q = /([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g, R = /(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g, Z = /[^\w-]/g, V = /^(INPUT|SELECT|TEXTAREA|BUTTON)$/, U = /^(checkbox|radio)$/, B = p == 8 ? /[\$\^]=(['"])\1/ : p == 7 ? /[\$\^*]=(['"])\1/ : null, O = /([(\[+~])\s+/g, P = /\s+([)\]+~])/g, $ = /\s+/g, F = /^\s*((?:[\S\s]*\S)?)\s*$/, n = "", t = " ", o = "$1"; m.write("<script id=" + J + " defer src='//:'><\/script>"); m.getElementById(J).onreadystatechange = function () { if (this.readyState == "complete") { a: { var a; for (var b in I) if (x[b] && (a = eval(I[b].replace("*", b)))) { v = a; break a } v = false } if (v) { ca(); this.parentNode.removeChild(this) } } } } } })(this);

/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };

/**
* jQuery.ScrollTo - Easy element scrolling using jQuery.
* Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 9/11/2008
* @author Ariel Flesler
* @version 1.4
*
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
; (function(h) { var m = h.scrollTo = function(b, c, g) { h(window).scrollTo(b, c, g) }; m.defaults = { axis: 'y', duration: 1 }; m.window = function(b) { return h(window).scrollable() }; h.fn.scrollable = function() { return this.map(function() { var b = this.parentWindow || this.defaultView, c = this.nodeName == '#document' ? b.frameElement || b : this, g = c.contentDocument || (c.contentWindow || c).document, i = c.setInterval; return c.nodeName == 'IFRAME' || i && h.browser.safari ? g.body : i ? g.documentElement : this }) }; h.fn.scrollTo = function(r, j, a) { if (typeof j == 'object') { a = j; j = 0 } if (typeof a == 'function') a = { onAfter: a }; a = h.extend({}, m.defaults, a); j = j || a.speed || a.duration; a.queue = a.queue && a.axis.length > 1; if (a.queue) j /= 2; a.offset = n(a.offset); a.over = n(a.over); return this.scrollable().each(function() { var k = this, o = h(k), d = r, l, e = {}, p = o.is('html,body'); switch (typeof d) { case 'number': case 'string': if (/^([+-]=)?\d+(px)?$/.test(d)) { d = n(d); break } d = h(d, this); case 'object': if (d.is || d.style) l = (d = h(d)).offset() } h.each(a.axis.split(''), function(b, c) { var g = c == 'x' ? 'Left' : 'Top', i = g.toLowerCase(), f = 'scroll' + g, s = k[f], t = c == 'x' ? 'Width' : 'Height', v = t.toLowerCase(); if (l) { e[f] = l[i] + (p ? 0 : s - o.offset()[i]); if (a.margin) { e[f] -= parseInt(d.css('margin' + g)) || 0; e[f] -= parseInt(d.css('border' + g + 'Width')) || 0 } e[f] += a.offset[i] || 0; if (a.over[i]) e[f] += d[v]() * a.over[i] } else e[f] = d[i]; if (/^\d+$/.test(e[f])) e[f] = e[f] <= 0 ? 0 : Math.min(e[f], u(t)); if (!b && a.queue) { if (s != e[f]) q(a.onAfterFirst); delete e[f] } }); q(a.onAfter); function q(b) { o.animate(e, j, a.easing, b && function() { b.call(this, r, a) }) }; function u(b) { var c = 'scroll' + b, g = k.ownerDocument; return p ? Math.max(g.documentElement[c], g.body[c]) : k[c] } }).end() }; function n(b) { return typeof b == 'object' ? b : { top: b, left: b} } })(jQuery);

/**
* jQuery.LocalScroll - Animated scrolling navigation, using anchors.
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 3/11/2009
* @author Ariel Flesler
* @version 1.2.7
**/
; (function ($) { var l = location.href.replace(/#.*/, ''); var g = $.localScroll = function (a) { $('body').localScroll(a) }; g.defaults = { duration: 1e3, axis: 'y', event: 'click', stop: true, target: window, reset: true }; g.hash = function (a) { if (location.hash) { a = $.extend({}, g.defaults, a); a.hash = false; if (a.reset) { var e = a.duration; delete a.duration; $(a.target).scrollTo(0, a); a.duration = e } i(0, location, a) } }; $.fn.localScroll = function (b) { b = $.extend({}, g.defaults, b); return b.lazy ? this.bind(b.event, function (a) { var e = $([a.target, a.target.parentNode]).filter(d)[0]; if (e) i(a, e, b) }) : this.find('a,area').filter(d).bind(b.event, function (a) { i(a, this, b) }).end().end(); function d() { return !!this.href && !!this.hash && this.href.replace(this.hash, '') == l && (!b.filter || $(this).is(b.filter)) } }; function i(a, e, b) { var d = e.hash.slice(1), f = document.getElementById(d) || document.getElementsByName(d)[0]; if (!f) return; if (a) a.preventDefault(); var h = $(b.target); if (b.lock && h.is(':animated') || b.onBefore && b.onBefore.call(b, a, f, h) === false) return; if (b.stop) h.stop(true); if (b.hash) { var j = f.id == d ? 'id' : 'name', k = $('<a> </a>').attr(j, d).css({ position: 'absolute', top: $(window).scrollTop(), left: $(window).scrollLeft() }); f[j] = ''; $('body').prepend(k); location = e.hash; k.remove(); f[j] = d } h.scrollTo(f, b).trigger('notify.serialScroll', [f]) } })(jQuery);

/*
* jQuery Tools 1.2.4 - The missing UI library for the Web
* 
* [tabs, tabs.slideshow, tooltip, tooltip.slide, tooltip.dynamic, overlay, overlay.apple, toolbox.flashembed]
* 
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
* 
* http://flowplayer.org/tools/
* 
* File generated: Wed Sep 01 11:12:33 GMT 2010
*/
(function (e) { function b(p, c, g) { var o = this, f = p.add(this), n = p.find(g.tabs), m = c.jquery ? c : p.children(c), k; n.length || (n = p.children()); m.length || (m = p.parent().find(c)); m.length || (m = e(c)); e.extend(this, { click: function (j, i) { var h = n.eq(j); if (typeof j == "string" && j.replace("#", "")) { h = n.filter("[href*=" + j.replace("#", "") + "]"); j = Math.max(n.index(h), 0) } if (g.rotate) { var l = n.length - 1; if (j < 0) { return o.click(l, i) } if (j > l) { return o.click(0, i) } } if (!h.length) { if (k >= 0) { return o } j = g.initialIndex; h = n.eq(j) } if (j === k) { return o } i = i || e.Event(); i.type = "onBeforeClick"; f.trigger(i, [j]); if (!i.isDefaultPrevented()) { d[g.effect].call(o, j, function () { i.type = "onClick"; f.trigger(i, [j]) }); k = j; n.removeClass(g.current); h.addClass(g.current); return o } }, getConf: function () { return g }, getTabs: function () { return n }, getPanes: function () { return m }, getCurrentPane: function () { return m.eq(k) }, getCurrentTab: function () { return n.eq(k) }, getIndex: function () { return k }, next: function () { return o.click(k + 1) }, prev: function () { return o.click(k - 1) }, destroy: function () { n.unbind(g.event).removeClass(g.current); m.find("a[href^=#]").unbind("click.T"); return o } }); e.each("onBeforeClick,onClick".split(","), function (i, h) { e.isFunction(g[h]) && e(o).bind(h, g[h]); o[h] = function (j) { j && e(o).bind(h, j); return o } }); if (g.history && e.fn.history) { e.tools.history.init(n); g.event = "history" } n.each(function (h) { e(this).bind(g.event, function (i) { o.click(h, i); return i.preventDefault() }) }); m.find("a[href^=#]").bind("click.T", function (h) { o.click(e(this).attr("href"), h) }); if (location.hash && g.tabs === "a" && p.find(g.tabs + location.hash).length) { o.click(location.hash) } else { if (g.initialIndex === 0 || g.initialIndex > 0) { o.click(g.initialIndex) } } } e.tools = e.tools || { version: "1.2.4" }; e.tools.tabs = { conf: { tabs: "a", current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", rotate: false, history: false }, addEffect: function (f, c) { d[f] = c } }; var d = { "default": function (f, c) { this.getPanes().hide().eq(f).show(); c.call() }, fade: function (i, c) { var g = this.getConf(), h = g.fadeOutSpeed, f = this.getPanes(); h ? f.fadeOut(h) : f.hide(); f.eq(i).fadeIn(g.fadeInSpeed, c) }, slide: function (f, c) { this.getPanes().slideUp(200); this.getPanes().eq(f).slideDown(400, c) }, ajax: function (f, c) { this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"), c) } }, a; e.tools.tabs.addEffect("horizontal", function (f, c) { a || (a = this.getPanes().eq(0).width()); this.getCurrentPane().animate({ width: 0 }, function () { e(this).hide() }); this.getPanes().eq(f).animate({ width: a }, function () { e(this).show(); c.call() }) }); e.fn.tabs = function (g, c) { var f = this.data("tabs"); if (f) { f.destroy(); this.removeData("tabs") } if (e.isFunction(c)) { c = { onBeforeClick: c} } c = e.extend({}, e.tools.tabs.conf, c); this.each(function () { f = new b(e(this), g, c); e(this).data("tabs", f) }); return c.api ? f : this } })(jQuery); (function (c) { function a(x, A) { function d(g) { var h = c(g); return h.length < 2 ? h : x.parent().find(g) } var y = this, u = x.add(this), z = x.data("tabs"), w, q, s, f = false, e = d(A.next).click(function () { z.next() }), r = d(A.prev).click(function () { z.prev() }); c.extend(y, { getTabs: function () { return z }, getConf: function () { return A }, play: function () { if (!w) { var g = c.Event("onBeforePlay"); u.trigger(g); if (g.isDefaultPrevented()) { return y } f = false; w = setInterval(z.next, A.interval); u.trigger("onPlay"); z.next() } }, pause: function () { if (!w && !s) { return y } var g = c.Event("onBeforePause"); u.trigger(g); if (g.isDefaultPrevented()) { return y } w = clearInterval(w); s = clearInterval(s); u.trigger("onPause") }, stop: function () { y.pause(); f = true } }); c.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","), function (g, h) { c.isFunction(A[h]) && y.bind(h, A[h]); y[h] = function (i) { return y.bind(h, i) } }); if (A.autopause) { var B = z.getTabs().add(e).add(r).add(z.getPanes()); B.hover(function () { y.pause(); q = clearInterval(q) }, function () { f || (q = setTimeout(y.play, A.interval)) }) } if (A.autoplay) { s = setTimeout(y.play, A.interval) } else { y.stop() } A.clickable && z.getPanes().click(function () { z.next() }); if (!z.getConf().rotate) { var v = A.disabledClass; z.getIndex() || r.addClass(v); z.onBeforeClick(function (g, h) { if (h) { r.removeClass(v); h == z.getTabs().length - 1 ? e.addClass(v) : e.removeClass(v) } else { r.addClass(v) } }) } } var b; b = c.tools.tabs.slideshow = { conf: { next: ".forward", prev: ".backward", disabledClass: "disabled", autoplay: false, autopause: true, interval: 3000, clickable: true, api: false} }; c.fn.slideshow = function (e) { var d = this.data("slideshow"); if (d) { return d } e = c.extend({}, b.conf, e); this.each(function () { d = new a(c(this), e); c(this).data("slideshow", d) }); return e.api ? d : this } })(jQuery); (function (b) { function c(g, f, o) { var m = o.relative ? g.position().top : g.offset().top, n = o.relative ? g.position().left : g.offset().left, l = o.position[0]; m -= f.outerHeight() - o.offset[0]; n += g.outerWidth() + o.offset[1]; var k = f.outerHeight() + g.outerHeight(); if (l == "center") { m += k / 2 } if (l == "bottom") { m += k } l = o.position[1]; g = f.outerWidth() + g.outerWidth(); if (l == "center") { n -= g / 2 } if (l == "left") { n -= g } return { top: m, left: n} } function a(B, A) { var z = this, x = B.add(z), y, w = 0, u = 0, n = B.attr("title"), g = B.attr("data-tooltip"), f = d[A.effect], o, E = B.is(":input"), C = E && B.is(":checkbox, :radio, select, :button, :submit"), D = B.attr("type"), p = A.events[D] || A.events[E ? C ? "widget" : "input" : "def"]; if (!f) { throw 'Nonexistent effect "' + A.effect + '"' } p = p.split(/,\s*/); if (p.length != 2) { throw "Tooltip: bad events configuration for " + D } B.bind(p[0], function (e) { clearTimeout(w); if (A.predelay) { u = setTimeout(function () { z.show(e) }, A.predelay) } else { z.show(e) } }).bind(p[1], function (e) { clearTimeout(u); if (A.delay) { w = setTimeout(function () { z.hide(e) }, A.delay) } else { z.hide(e) } }); if (n && A.cancelDefault) { B.removeAttr("title"); B.data("title", n) } b.extend(z, { show: function (h) { if (!y) { if (g) { y = b(g) } else { if (n) { y = b(A.layout).addClass(A.tipClass).appendTo(document.body).hide().append(n) } else { if (A.tip) { y = b(A.tip).eq(0) } else { y = B.next(); y.length || (y = B.parent().next()) } } } if (!y.length) { throw "Cannot find tooltip for " + B } } if (z.isShown()) { return z } y.stop(true, true); var e = c(B, y, A); h = h || b.Event(); h.type = "onBeforeShow"; x.trigger(h, [e]); if (h.isDefaultPrevented()) { return z } e = c(B, y, A); y.css({ position: "absolute", top: e.top, left: e.left }); o = true; f[0].call(z, function () { h.type = "onShow"; o = "full"; x.trigger(h) }); e = A.events.tooltip.split(/,\s*/); y.bind(e[0], function () { clearTimeout(w); clearTimeout(u) }); e[1] && !B.is("input:not(:checkbox, :radio), textarea") && y.bind(e[1], function (i) { i.relatedTarget != B[0] && B.trigger(p[1].split(" ")[0]) }); return z }, hide: function (e) { if (!y || !z.isShown()) { return z } e = e || b.Event(); e.type = "onBeforeHide"; x.trigger(e); if (!e.isDefaultPrevented()) { o = false; d[A.effect][1].call(z, function () { e.type = "onHide"; x.trigger(e) }); return z } }, isShown: function (e) { return e ? o == "full" : o }, getConf: function () { return A }, getTip: function () { return y }, getTrigger: function () { return B } }); b.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function (h, e) { b.isFunction(A[e]) && b(z).bind(e, A[e]); z[e] = function (i) { b(z).bind(e, i); return z } }) } b.tools = b.tools || { version: "1.2.4" }; b.tools.tooltip = { conf: { effect: "toggle", fadeOutSpeed: "fast", predelay: 0, delay: 30, opacity: 1, tip: 0, position: ["top", "center"], offset: [0, 0], relative: false, cancelDefault: true, events: { def: "mouseenter,mouseleave", input: "focus,blur", widget: "focus mouseenter,blur mouseleave", tooltip: "mouseenter,mouseleave" }, layout: "<div/>", tipClass: "tooltip" }, addEffect: function (f, e, g) { d[f] = [e, g] } }; var d = { toggle: [function (f) { var e = this.getConf(), g = this.getTip(); e = e.opacity; e < 1 && g.css({ opacity: e }); g.show(); f.call() }, function (e) { this.getTip().hide(); e.call() } ], fade: [function (f) { var e = this.getConf(); this.getTip().fadeTo(e.fadeInSpeed, e.opacity, f) }, function (e) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, e) } ] }; b.fn.tooltip = function (f) { var e = this.data("tooltip"); if (e) { return e } f = b.extend(true, {}, b.tools.tooltip.conf, f); if (typeof f.position == "string") { f.position = f.position.split(/,?\s/) } this.each(function () { e = new a(b(this), f); b(this).data("tooltip", e) }); return f.api ? e : this } })(jQuery); (function (c) { var a = c.tools.tooltip; c.extend(a.conf, { direction: "up", bounce: false, slideOffset: 10, slideInSpeed: 200, slideOutSpeed: 200, slideFade: !c.browser.msie }); var b = { up: ["-", "top"], down: ["+", "top"], left: ["-", "left"], right: ["+", "left"] }; a.addEffect("slide", function (h) { var e = this.getConf(), i = this.getTip(), d = e.slideFade ? { opacity: e.opacity} : {}, j = b[e.direction] || b.up; d[j[1]] = j[0] + "=" + e.slideOffset; e.slideFade && i.css({ opacity: 0 }); i.show().animate(d, e.slideInSpeed, h) }, function (j) { var e = this.getConf(), k = e.slideOffset, d = e.slideFade ? { opacity: 0} : {}, l = b[e.direction] || b.up, i = "" + l[0]; if (e.bounce) { i = i == "+" ? "-" : "+" } d[l[1]] = i + "=" + k; this.getTip().animate(d, e.slideOutSpeed, function () { c(this).hide(); j.call() }) }) })(jQuery); (function (d) { function b(e) { var i = d(window), g = i.width() + i.scrollLeft(), f = i.height() + i.scrollTop(); return [e.offset().top <= i.scrollTop(), g <= e.offset().left + e.width(), f <= e.offset().top + e.height(), i.scrollLeft() >= e.offset().left] } function a(e) { for (var f = e.length; f--; ) { if (e[f]) { return false } } return true } var c = d.tools.tooltip; c.dynamic = { conf: { classNames: "top right bottom left"} }; d.fn.dynamic = function (e) { if (typeof e == "number") { e = { speed: e} } e = d.extend({}, c.dynamic.conf, e); var g = e.classNames.split(/\s/), f; this.each(function () { var i = d(this).tooltip().onBeforeShow(function (k, j) { k = this.getTip(); var h = this.getConf(); f || (f = [h.position[0], h.position[1], h.offset[0], h.offset[1], d.extend({}, h)]); d.extend(h, f[4]); h.position = [f[0], f[1]]; h.offset = [f[2], f[3]]; k.css({ visibility: "hidden", position: "absolute", top: j.top, left: j.left }).show(); j = b(k); if (!a(j)) { if (j[2]) { d.extend(h, e.top); h.position[0] = "top"; k.addClass(g[0]) } if (j[3]) { d.extend(h, e.right); h.position[1] = "right"; k.addClass(g[1]) } if (j[0]) { d.extend(h, e.bottom); h.position[0] = "bottom"; k.addClass(g[2]) } if (j[1]) { d.extend(h, e.left); h.position[1] = "left"; k.addClass(g[3]) } if (j[0] || j[2]) { h.offset[0] *= -1 } if (j[1] || j[3]) { h.offset[1] *= -1 } } k.css({ visibility: "visible" }).hide() }); i.onBeforeShow(function () { var h = this.getConf(); this.getTip(); setTimeout(function () { h.position = [f[0], f[1]]; h.offset = [f[2], f[3]] }, 0) }); i.onHide(function () { var h = this.getTip(); h.removeClass(e.classNames) }); ret = i }); return e.api ? ret : this } })(jQuery); (function (b) { function c(u, w) { var v = this, r = u.add(v), h = b(window), q, t, l, s = b.tools.expose && (w.mask || w.expose), j = Math.random().toString().slice(10); if (s) { if (typeof s == "string") { s = { color: s} } s.closeOnClick = s.closeOnEsc = false } var a = w.target || u.attr("rel"); t = a ? b(a) : u; if (!t.length) { throw "Could not find Overlay: " + a } u && u.index(t) == -1 && u.click(function (f) { v.load(f); return f.preventDefault() }); b.extend(v, { load: function (n) { if (v.isOpened()) { return v } var k = e[w.effect]; if (!k) { throw 'Overlay: cannot find effect : "' + w.effect + '"' } w.oneInstance && b.each(d, function () { this.close(n) }); n = n || b.Event(); n.type = "onBeforeLoad"; r.trigger(n); if (n.isDefaultPrevented()) { return v } l = true; s && b(t).expose(s); var i = w.top, m = w.left, g = t.outerWidth({ margin: true }), f = t.outerHeight({ margin: true }); if (typeof i == "string") { i = i == "center" ? Math.max((h.height() - f) / 2, 0) : parseInt(i, 10) / 100 * h.height() } if (m == "center") { m = Math.max((h.width() - g) / 2, 0) } k[0].call(v, { top: i, left: m }, function () { if (l) { n.type = "onLoad"; r.trigger(n) } }); s && w.closeOnClick && b.mask.getMask().one("click", v.close); w.closeOnClick && b(document).bind("click." + j, function (o) { b(o.target).parents(t).length || v.close(o) }); w.closeOnEsc && b(document).bind("keydown." + j, function (o) { o.keyCode == 27 && v.close(o) }); return v }, close: function (f) { if (!v.isOpened()) { return v } f = f || b.Event(); f.type = "onBeforeClose"; r.trigger(f); if (!f.isDefaultPrevented()) { l = false; e[w.effect][1].call(v, function () { f.type = "onClose"; r.trigger(f) }); b(document).unbind("click." + j).unbind("keydown." + j); s && b.mask.close(); return v } }, getOverlay: function () { return t }, getTrigger: function () { return u }, getClosers: function () { return q }, isOpened: function () { return l }, getConf: function () { return w } }); b.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function (g, f) { b.isFunction(w[f]) && b(v).bind(f, w[f]); v[f] = function (i) { b(v).bind(f, i); return v } }); q = t.find(w.close || ".close"); if (!q.length && !w.close) { q = b('<a class="close"></a>'); t.prepend(q) } q.click(function (f) { v.close(f) }); w.load && v.load() } b.tools = b.tools || { version: "1.2.4" }; b.tools.overlay = { addEffect: function (f, a, g) { e[f] = [a, g] }, conf: { close: null, closeOnClick: true, closeOnEsc: true, closeSpeed: "fast", effect: "default", fixed: !b.browser.msie || b.browser.version > 6, left: "center", load: false, mask: null, oneInstance: true, speed: "normal", target: null, top: "10%"} }; var d = [], e = {}; b.tools.overlay.addEffect("default", function (g, a) { var h = this.getConf(), f = b(window); if (!h.fixed) { g.top += f.scrollTop(); g.left += f.scrollLeft() } g.position = h.fixed ? "fixed" : "absolute"; this.getOverlay().css(g).fadeIn(h.speed, a) }, function (a) { this.getOverlay().fadeOut(this.getConf().closeSpeed, a) }); b.fn.overlay = function (f) { var a = this.data("overlay"); if (a) { return a } if (b.isFunction(f)) { f = { onBeforeLoad: f} } f = b.extend(true, {}, b.tools.overlay.conf, f); this.each(function () { a = new c(b(this), f); d.push(a); b(this).data("overlay", a) }); return f.api ? a : this } })(jQuery); (function (c) { function b(f) { var h = f.offset(); return { top: h.top + f.height() / 2, left: h.left + f.width() / 2} } var a = c.tools.overlay, d = c(window); c.extend(a.conf, { start: { top: null, left: null }, fadeInSpeed: "fast", zIndex: 9999 }); function g(s, q) { var t = this.getOverlay(), r = this.getConf(), n = this.getTrigger(), f = this, j = t.outerWidth({ margin: true }), k = t.data("img"); if (!k) { var p = t.css("backgroundImage"); if (!p) { throw "background-image CSS property not set for overlay" } p = p.slice(p.indexOf("(") + 1, p.indexOf(")")).replace(/\"/g, ""); t.css("backgroundImage", "none"); k = c('<img src="' + p + '"/>'); k.css({ border: 0, display: "none" }).width(j); c("body").append(k); t.data("img", k) } p = r.start.top || Math.round(d.height() / 2); var i = r.start.left || Math.round(d.width() / 2); if (n) { n = b(n); p = n.top; i = n.left } k.css({ position: "absolute", top: p, left: i, width: 0, zIndex: r.zIndex }).show(); s.top += d.scrollTop(); s.left += d.scrollLeft(); s.position = "absolute"; t.css(s); k.animate({ top: t.css("top"), left: t.css("left"), width: j }, r.speed, function () { if (r.fixed) { s.top -= d.scrollTop(); s.left -= d.scrollLeft(); s.position = "fixed"; k.add(t).css(s) } t.css("zIndex", r.zIndex + 1).fadeIn(r.fadeInSpeed, function () { f.isOpened() && !c(this).index(t) ? q.call() : t.hide() }) }) } function e(f) { var j = this.getOverlay().hide(), h = this.getConf(), k = this.getTrigger(); j = j.data("img"); var i = { top: h.start.top, left: h.start.left, width: 0 }; k && c.extend(i, b(k)); h.fixed && j.css({ position: "absolute" }).animate({ top: "+=" + d.scrollTop(), left: "+=" + d.scrollLeft() }, 0); j.animate(i, h.closeSpeed, f) } a.addEffect("apple", g, e) })(jQuery); (function () { function s(f, e) { if (e) { for (var g in e) { if (e.hasOwnProperty(g)) { f[g] = e[g] } } } return f } function d(f, e) { var i = []; for (var g in f) { if (f.hasOwnProperty(g)) { i[g] = e(f[g]) } } return i } function c(f, e, i) { if (t.isSupported(e.version)) { f.innerHTML = t.getHTML(e, i) } else { if (e.expressInstall && t.isSupported([6, 65])) { f.innerHTML = t.getHTML(s(e, { src: e.expressInstall }), { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title }) } else { if (!f.innerHTML.replace(/\s/g, "")) { f.innerHTML = "<h2>Flash version " + e.version + " or greater is required</h2><h3>" + (r[0] > 0 ? "Your version is " + r : "You have no flash plugin installed") + "</h3>" + (f.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + h + "'>here</a></p>"); if (f.tagName == "A") { f.onclick = function () { location.href = h } } } if (e.onFail) { var g = e.onFail.call(this); if (typeof g == "string") { f.innerHTML = g } } } } if (q) { window[e.id] = document.getElementById(e.id) } s(this, { getRoot: function () { return f }, getOptions: function () { return e }, getConf: function () { return i }, getApi: function () { return f.firstChild } }) } var q = document.all, h = "http://www.adobe.com/go/getflashplayer", b = typeof jQuery == "function", a = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, p = { width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false }; window.attachEvent && window.attachEvent("onbeforeunload", function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { } }); window.flashembed = function (f, e, g) { if (typeof f == "string") { f = document.getElementById(f.replace("#", "")) } if (f) { if (typeof e == "string") { e = { src: e} } return new c(f, s(s({}, p), e), g) } }; var t = s(window.flashembed, { conf: p, getVersion: function () { var f, e; try { e = navigator.plugins["Shockwave Flash"].description.slice(16) } catch (j) { try { e = (f = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")) && f.GetVariable("$version") } catch (i) { try { e = (f = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6")) && f.GetVariable("$version") } catch (g) { } } } return (e = a.exec(e)) ? [e[1], e[3]] : [0, 0] }, asString: function (f) { if (f === null || f === undefined) { return null } var e = typeof f; if (e == "object" && f.push) { e = "array" } switch (e) { case "string": f = f.replace(new RegExp('(["\\\\])', "g"), "\\$1"); f = f.replace(/^\s?(\d+\.?\d+)%/, "$1pct"); return '"' + f + '"'; case "array": return "[" + d(f, function (i) { return t.asString(i) }).join(",") + "]"; case "function": return '"function()"'; case "object": e = []; for (var g in f) { f.hasOwnProperty(g) && e.push('"' + g + '":' + t.asString(f[g])) } return "{" + e.join(",") + "}" } return String(f).replace(/\s/g, " ").replace(/\'/g, '"') }, getHTML: function (f, e) { f = s({}, f); var j = '<object width="' + f.width + '" height="' + f.height + '" id="' + f.id + '" name="' + f.id + '"'; if (f.cachebusting) { f.src += (f.src.indexOf("?") != -1 ? "&" : "?") + Math.random() } j += f.w3c || !q ? ' data="' + f.src + '" type="application/x-shockwave-flash"' : ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'; j += ">"; if (f.w3c || q) { j += '<param name="movie" value="' + f.src + '" />' } f.width = f.height = f.id = f.w3c = f.src = null; f.onFail = f.version = f.expressInstall = null; for (var i in f) { if (f[i]) { j += '<param name="' + i + '" value="' + f[i] + '" />' } } f = ""; if (e) { for (var g in e) { if (e[g]) { i = e[g]; f += g + "=" + (/function|object/.test(typeof i) ? t.asString(i) : i) + "&" } } f = f.slice(0, -1); j += '<param name="flashvars" value=\'' + f + "' />" } j += "</object>"; return j }, isSupported: function (e) { return r[0] > e[0] || r[0] == e[0] && r[1] >= e[1] } }), r = t.getVersion(); if (b) { jQuery.tools = jQuery.tools || { version: "1.2.4" }; jQuery.tools.flashembed = { conf: p }; jQuery.fn.flashembed = function (f, e) { return this.each(function () { $(this).data("flashembed", flashembed(this, f, e)) }) } } })();

/*
* jQuery UI Effects 1.7.2
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Effects/
*/
jQuery.effects || (function (d) { d.effects = { version: "1.7.2", save: function (g, h) { for (var f = 0; f < h.length; f++) { if (h[f] !== null) { g.data("ec.storage." + h[f], g[0].style[h[f]]) } } }, restore: function (g, h) { for (var f = 0; f < h.length; f++) { if (h[f] !== null) { g.css(h[f], g.data("ec.storage." + h[f])) } } }, setMode: function (f, g) { if (g == "toggle") { g = f.is(":hidden") ? "show" : "hide" } return g }, getBaseline: function (g, h) { var i, f; switch (g[0]) { case "top": i = 0; break; case "middle": i = 0.5; break; case "bottom": i = 1; break; default: i = g[0] / h.height } switch (g[1]) { case "left": f = 0; break; case "center": f = 0.5; break; case "right": f = 1; break; default: f = g[1] / h.width } return { x: f, y: i} }, createWrapper: function (f) { if (f.parent().is(".ui-effects-wrapper")) { return f.parent() } var g = { width: f.outerWidth(true), height: f.outerHeight(true), "float": f.css("float") }; f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>'); var j = f.parent(); if (f.css("position") == "static") { j.css({ position: "relative" }); f.css({ position: "relative" }) } else { var i = f.css("top"); if (isNaN(parseInt(i, 10))) { i = "auto" } var h = f.css("left"); if (isNaN(parseInt(h, 10))) { h = "auto" } j.css({ position: f.css("position"), top: i, left: h, zIndex: f.css("z-index") }).show(); f.css({ position: "relative", top: 0, left: 0 }) } j.css(g); return j }, removeWrapper: function (f) { if (f.parent().is(".ui-effects-wrapper")) { return f.parent().replaceWith(f) } return f }, setTransition: function (g, i, f, h) { h = h || {}; d.each(i, function (k, j) { unit = g.cssUnit(j); if (unit[0] > 0) { h[j] = unit[0] * f + unit[1] } }); return h }, animateClass: function (h, i, k, j) { var f = (typeof k == "function" ? k : (j ? j : null)); var g = (typeof k == "string" ? k : null); return this.each(function () { var q = {}; var o = d(this); var p = o.attr("style") || ""; if (typeof p == "object") { p = p.cssText } if (h.toggle) { o.hasClass(h.toggle) ? h.remove = h.toggle : h.add = h.toggle } var l = d.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle)); if (h.add) { o.addClass(h.add) } if (h.remove) { o.removeClass(h.remove) } var m = d.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle)); if (h.add) { o.removeClass(h.add) } if (h.remove) { o.addClass(h.remove) } for (var r in m) { if (typeof m[r] != "function" && m[r] && r.indexOf("Moz") == -1 && r.indexOf("length") == -1 && m[r] != l[r] && (r.match(/color/i) || (!r.match(/color/i) && !isNaN(parseInt(m[r], 10)))) && (l.position != "static" || (l.position == "static" && !r.match(/left|top|bottom|right/)))) { q[r] = m[r] } } o.animate(q, i, g, function () { if (typeof d(this).attr("style") == "object") { d(this).attr("style")["cssText"] = ""; d(this).attr("style")["cssText"] = p } else { d(this).attr("style", p) } if (h.add) { d(this).addClass(h.add) } if (h.remove) { d(this).removeClass(h.remove) } if (f) { f.apply(this, arguments) } }) }) } }; function c(g, f) { var i = g[1] && g[1].constructor == Object ? g[1] : {}; if (f) { i.mode = f } var h = g[1] && g[1].constructor != Object ? g[1] : (i.duration ? i.duration : g[2]); h = d.fx.off ? 0 : typeof h === "number" ? h : d.fx.speeds[h] || d.fx.speeds._default; var j = i.callback || (d.isFunction(g[1]) && g[1]) || (d.isFunction(g[2]) && g[2]) || (d.isFunction(g[3]) && g[3]); return [g[0], i, h, j] } d.fn.extend({ _show: d.fn.show, _hide: d.fn.hide, __toggle: d.fn.toggle, _addClass: d.fn.addClass, _removeClass: d.fn.removeClass, _toggleClass: d.fn.toggleClass, effect: function (g, f, h, i) { return d.effects[g] ? d.effects[g].call(this, { method: g, options: f || {}, duration: h, callback: i }) : null }, show: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) { return this._show.apply(this, arguments) } else { return this.effect.apply(this, c(arguments, "show")) } }, hide: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) { return this._hide.apply(this, arguments) } else { return this.effect.apply(this, c(arguments, "hide")) } }, toggle: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (d.isFunction(arguments[0]) || typeof arguments[0] == "boolean")) { return this.__toggle.apply(this, arguments) } else { return this.effect.apply(this, c(arguments, "toggle")) } }, addClass: function (g, f, i, h) { return f ? d.effects.animateClass.apply(this, [{ add: g }, f, i, h]) : this._addClass(g) }, removeClass: function (g, f, i, h) { return f ? d.effects.animateClass.apply(this, [{ remove: g }, f, i, h]) : this._removeClass(g) }, toggleClass: function (g, f, i, h) { return ((typeof f !== "boolean") && f) ? d.effects.animateClass.apply(this, [{ toggle: g }, f, i, h]) : this._toggleClass(g, f) }, morph: function (f, h, g, j, i) { return d.effects.animateClass.apply(this, [{ add: h, remove: f }, g, j, i]) }, switchClass: function () { return this.morph.apply(this, arguments) }, cssUnit: function (f) { var g = this.css(f), h = []; d.each(["em", "px", "%", "pt"], function (j, k) { if (g.indexOf(k) > 0) { h = [parseFloat(g), k] } }); return h } }); d.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function (g, f) { d.fx.step[f] = function (h) { if (h.state == 0) { h.start = e(h.elem, f); h.end = b(h.end) } h.elem.style[f] = "rgb(" + [Math.max(Math.min(parseInt((h.pos * (h.end[0] - h.start[0])) + h.start[0], 10), 255), 0), Math.max(Math.min(parseInt((h.pos * (h.end[1] - h.start[1])) + h.start[1], 10), 255), 0), Math.max(Math.min(parseInt((h.pos * (h.end[2] - h.start[2])) + h.start[2], 10), 255), 0)].join(",") + ")" } }); function b(g) { var f; if (g && g.constructor == Array && g.length == 3) { return g } if (f = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)) { return [parseInt(f[1], 10), parseInt(f[2], 10), parseInt(f[3], 10)] } if (f = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)) { return [parseFloat(f[1]) * 2.55, parseFloat(f[2]) * 2.55, parseFloat(f[3]) * 2.55] } if (f = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)) { return [parseInt(f[1], 16), parseInt(f[2], 16), parseInt(f[3], 16)] } if (f = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)) { return [parseInt(f[1] + f[1], 16), parseInt(f[2] + f[2], 16), parseInt(f[3] + f[3], 16)] } if (f = /rgba\(0, 0, 0, 0\)/.exec(g)) { return a.transparent } return a[d.trim(g).toLowerCase()] } function e(h, f) { var g; do { g = d.curCSS(h, f); if (g != "" && g != "transparent" || d.nodeName(h, "body")) { break } f = "backgroundColor" } while (h = h.parentNode); return b(g) } var a = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0], transparent: [255, 255, 255] }; d.easing.jswing = d.easing.swing; d.extend(d.easing, { def: "easeOutQuad", swing: function (g, h, f, j, i) { return d.easing[d.easing.def](g, h, f, j, i) }, easeInQuad: function (g, h, f, j, i) { return j * (h /= i) * h + f }, easeOutQuad: function (g, h, f, j, i) { return -j * (h /= i) * (h - 2) + f }, easeInOutQuad: function (g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h + f } return -j / 2 * ((--h) * (h - 2) - 1) + f }, easeInCubic: function (g, h, f, j, i) { return j * (h /= i) * h * h + f }, easeOutCubic: function (g, h, f, j, i) { return j * ((h = h / i - 1) * h * h + 1) + f }, easeInOutCubic: function (g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h + f } return j / 2 * ((h -= 2) * h * h + 2) + f }, easeInQuart: function (g, h, f, j, i) { return j * (h /= i) * h * h * h + f }, easeOutQuart: function (g, h, f, j, i) { return -j * ((h = h / i - 1) * h * h * h - 1) + f }, easeInOutQuart: function (g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h * h + f } return -j / 2 * ((h -= 2) * h * h * h - 2) + f }, easeInQuint: function (g, h, f, j, i) { return j * (h /= i) * h * h * h * h + f }, easeOutQuint: function (g, h, f, j, i) { return j * ((h = h / i - 1) * h * h * h * h + 1) + f }, easeInOutQuint: function (g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h * h * h + f } return j / 2 * ((h -= 2) * h * h * h * h + 2) + f }, easeInSine: function (g, h, f, j, i) { return -j * Math.cos(h / i * (Math.PI / 2)) + j + f }, easeOutSine: function (g, h, f, j, i) { return j * Math.sin(h / i * (Math.PI / 2)) + f }, easeInOutSine: function (g, h, f, j, i) { return -j / 2 * (Math.cos(Math.PI * h / i) - 1) + f }, easeInExpo: function (g, h, f, j, i) { return (h == 0) ? f : j * Math.pow(2, 10 * (h / i - 1)) + f }, easeOutExpo: function (g, h, f, j, i) { return (h == i) ? f + j : j * (-Math.pow(2, -10 * h / i) + 1) + f }, easeInOutExpo: function (g, h, f, j, i) { if (h == 0) { return f } if (h == i) { return f + j } if ((h /= i / 2) < 1) { return j / 2 * Math.pow(2, 10 * (h - 1)) + f } return j / 2 * (-Math.pow(2, -10 * --h) + 2) + f }, easeInCirc: function (g, h, f, j, i) { return -j * (Math.sqrt(1 - (h /= i) * h) - 1) + f }, easeOutCirc: function (g, h, f, j, i) { return j * Math.sqrt(1 - (h = h / i - 1) * h) + f }, easeInOutCirc: function (g, h, f, j, i) { if ((h /= i / 2) < 1) { return -j / 2 * (Math.sqrt(1 - h * h) - 1) + f } return j / 2 * (Math.sqrt(1 - (h -= 2) * h) + 1) + f }, easeInElastic: function (g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l) == 1) { return f + m } if (!k) { k = l * 0.3 } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } return -(h * Math.pow(2, 10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k)) + f }, easeOutElastic: function (g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l) == 1) { return f + m } if (!k) { k = l * 0.3 } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } return h * Math.pow(2, -10 * i) * Math.sin((i * l - j) * (2 * Math.PI) / k) + m + f }, easeInOutElastic: function (g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l / 2) == 2) { return f + m } if (!k) { k = l * (0.3 * 1.5) } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } if (i < 1) { return -0.5 * (h * Math.pow(2, 10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k)) + f } return h * Math.pow(2, -10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k) * 0.5 + m + f }, easeInBack: function (g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } return k * (h /= j) * h * ((i + 1) * h - i) + f }, easeOutBack: function (g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } return k * ((h = h / j - 1) * h * ((i + 1) * h + i) + 1) + f }, easeInOutBack: function (g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } if ((h /= j / 2) < 1) { return k / 2 * (h * h * (((i *= (1.525)) + 1) * h - i)) + f } return k / 2 * ((h -= 2) * h * (((i *= (1.525)) + 1) * h + i) + 2) + f }, easeInBounce: function (g, h, f, j, i) { return j - d.easing.easeOutBounce(g, i - h, 0, j, i) + f }, easeOutBounce: function (g, h, f, j, i) { if ((h /= i) < (1 / 2.75)) { return j * (7.5625 * h * h) + f } else { if (h < (2 / 2.75)) { return j * (7.5625 * (h -= (1.5 / 2.75)) * h + 0.75) + f } else { if (h < (2.5 / 2.75)) { return j * (7.5625 * (h -= (2.25 / 2.75)) * h + 0.9375) + f } else { return j * (7.5625 * (h -= (2.625 / 2.75)) * h + 0.984375) + f } } } }, easeInOutBounce: function (g, h, f, j, i) { if (h < i / 2) { return d.easing.easeInBounce(g, h * 2, 0, j, i) * 0.5 + f } return d.easing.easeOutBounce(g, h * 2 - i, 0, j, i) * 0.5 + j * 0.5 + f } }) })(jQuery); ; /*
 
 * jQuery UI Effects Blind 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	effects.core.js
 */
(function (a) { a.effects.blind = function (b) { return this.queue(function () { var d = a(this), c = ["position", "top", "left"]; var h = a.effects.setMode(d, b.options.mode || "hide"); var g = b.options.direction || "vertical"; a.effects.save(d, c); d.show(); var j = a.effects.createWrapper(d).css({ overflow: "hidden" }); var e = (g == "vertical") ? "height" : "width"; var i = (g == "vertical") ? j.height() : j.width(); if (h == "show") { j.css(e, 0) } var f = {}; f[e] = h == "show" ? i : 0; j.animate(f, b.duration, b.options.easing, function () { if (h == "hide") { d.hide() } a.effects.restore(d, c); a.effects.removeWrapper(d); if (b.callback) { b.callback.apply(d[0], arguments) } d.dequeue() }) }) } })(jQuery); ; 
/* 
 * jQuery UI Effects Clip 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	effects.core.js
 */
(function (a) { a.effects.clip = function (b) { return this.queue(function () { var f = a(this), j = ["position", "top", "left", "height", "width"]; var i = a.effects.setMode(f, b.options.mode || "hide"); var k = b.options.direction || "vertical"; a.effects.save(f, j); f.show(); var c = a.effects.createWrapper(f).css({ overflow: "hidden" }); var e = f[0].tagName == "IMG" ? c : f; var g = { size: (k == "vertical") ? "height" : "width", position: (k == "vertical") ? "top" : "left" }; var d = (k == "vertical") ? e.height() : e.width(); if (i == "show") { e.css(g.size, 0); e.css(g.position, d / 2) } var h = {}; h[g.size] = i == "show" ? d : 0; h[g.position] = i == "show" ? 0 : d / 2; e.animate(h, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { if (i == "hide") { f.hide() } a.effects.restore(f, j); a.effects.removeWrapper(f); if (b.callback) { b.callback.apply(f[0], arguments) } f.dequeue() } }) }) } })(jQuery); ; /*
 * jQuery UI Effects Drop 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	effects.core.js
 */
(function (a) { a.effects.drop = function (b) { return this.queue(function () { var e = a(this), d = ["position", "top", "left", "opacity"]; var i = a.effects.setMode(e, b.options.mode || "hide"); var h = b.options.direction || "left"; a.effects.save(e, d); e.show(); a.effects.createWrapper(e); var f = (h == "up" || h == "down") ? "top" : "left"; var c = (h == "up" || h == "left") ? "pos" : "neg"; var j = b.options.distance || (f == "top" ? e.outerHeight({ margin: true }) / 2 : e.outerWidth({ margin: true }) / 2); if (i == "show") { e.css("opacity", 0).css(f, c == "pos" ? -j : j) } var g = { opacity: i == "show" ? 1 : 0 }; g[f] = (i == "show" ? (c == "pos" ? "+=" : "-=") : (c == "pos" ? "-=" : "+=")) + j; e.animate(g, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { if (i == "hide") { e.hide() } a.effects.restore(e, d); a.effects.removeWrapper(e); if (b.callback) { b.callback.apply(this, arguments) } e.dequeue() } }) }) } })(jQuery); ; /*
 * jQuery UI Effects Highlight 1.7.2
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	effects.core.js
 */
(function (a) { a.effects.highlight = function (b) { return this.queue(function () { var e = a(this), d = ["backgroundImage", "backgroundColor", "opacity"]; var h = a.effects.setMode(e, b.options.mode || "show"); var c = b.options.color || "#ffff99"; var g = e.css("backgroundColor"); a.effects.save(e, d); e.show(); e.css({ backgroundImage: "none", backgroundColor: c }); var f = { backgroundColor: g }; if (h == "hide") { f.opacity = 0 } e.animate(f, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { if (h == "hide") { e.hide() } a.effects.restore(e, d); if (h == "show" && a.browser.msie) { this.style.removeAttribute("filter") } if (b.callback) { b.callback.apply(this, arguments) } e.dequeue() } }) }) } })(jQuery); ;

/*
* jQuery.flash
*/
(function () { var b; b = jQuery.fn.flash = function (g, f, d, i) { var h = d || b.replace; f = b.copy(b.pluginOptions, f); if (!b.hasFlash(f.version)) { if (f.expressInstall && b.hasFlash(6, 0, 65)) { var e = { flashvars: { MMredirectURL: location, MMplayerType: "PlugIn", MMdoctitle: jQuery("title").text()}} } else { if (f.update) { h = i || b.update } else { return this } } } g = b.copy(b.htmlOptions, e, g); return this.each(function () { h.call(this, b.copy(g)) }) }; b.copy = function () { var f = {}, e = {}; for (var g = 0; g < arguments.length; g++) { var d = arguments[g]; if (d == undefined) { continue } jQuery.extend(f, d); if (d.flashvars == undefined) { continue } jQuery.extend(e, d.flashvars) } f.flashvars = e; return f }; b.hasFlash = function () { if (/hasFlash\=true/.test(location)) { return true } if (/hasFlash\=false/.test(location)) { return false } var e = b.hasFlash.playerVersion().match(/\d+/g); var f = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String(b.pluginOptions.version).match(/\d+/g); for (var d = 0; d < 3; d++) { e[d] = parseInt(e[d] || 0); f[d] = parseInt(f[d] || 0); if (e[d] < f[d]) { return false } if (e[d] > f[d]) { return true } } return true }; b.hasFlash.playerVersion = function () { try { try { var d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); try { d.AllowScriptAccess = "always" } catch (f) { return "6,0,0" } } catch (f) { } return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } catch (f) { try { if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } } catch (f) { } } return "0,0,0" }; b.htmlOptions = { height: 240, flashvars: {}, pluginspage: "http://www.adobe.com/go/getflashplayer", src: "#", type: "application/x-shockwave-flash", width: 320 }; b.pluginOptions = { expressInstall: false, update: true, version: "6.0.65" }; b.replace = function (d) { this.innerHTML = '<div class="alt">' + this.innerHTML + "</div>"; jQuery(this).addClass("flash-replaced").prepend(b.transform(d)) }; b.update = function (e) { var d = String(location).split("?"); d.splice(1, 0, "?hasFlash=true&"); d = d.join(""); var f = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="' + d + '">Click here.</a></p>'; this.innerHTML = '<span class="alt">' + this.innerHTML + "</span>"; jQuery(this).addClass("flash-update").prepend(f) }; function a() { var e = ""; for (var d in this) { if (typeof this[d] != "function") { e += d + '="' + this[d] + '" ' } } return e } function c() { var e = ""; for (var d in this) { if (typeof this[d] != "function") { e += d + "=" + encodeURIComponent(this[d]) + "&" } } return e.replace(/&$/, "") } b.transform = function (d) { d.toString = a; if (d.flashvars) { d.flashvars.toString = c } return "<embed " + String(d) + "/>" }; if (window.attachEvent) { window.attachEvent("onbeforeunload", function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { } }) } })();

jQuery.expr[':'].regex = function (elem, index, match) {
	var matchParams = match[3].split(','),
        validLabels = /^(data|css):/,
        attr = {
        	method: matchParams[0].match(validLabels) ?
                        matchParams[0].split(':')[0] : 'attr',
        	property: matchParams.shift().replace(validLabels, '')
        },
        regexFlags = 'ig',
        regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g, ''), regexFlags);
	return regex.test(jQuery(elem)[attr.method](attr.property));
}

$.fn.digits = function () {
	return this.each(function () {
		$(this).text($(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
	})
}

jQuery.easing.jswing = jQuery.easing.swing; jQuery.extend(jQuery.easing, { def: "easeOutQuad", swing: function (x, t, b, c, d) { return jQuery.easing[jQuery.easing.def](x, t, b, c, d) }, easeInQuad: function (x, t, b, c, d) { return c * (t /= d) * t + b }, easeOutQuad: function (x, t, b, c, d) { return -c * (t /= d) * (t - 2) + b }, easeInOutQuad: function (x, t, b, c, d) { if ((t /= d / 2) < 1) { return c / 2 * t * t + b } return -c / 2 * ((--t) * (t - 2) - 1) + b }, easeInCubic: function (x, t, b, c, d) { return c * (t /= d) * t * t + b }, easeOutCubic: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t + 1) + b }, easeInOutCubic: function (x, t, b, c, d) { if ((t /= d / 2) < 1) { return c / 2 * t * t * t + b } return c / 2 * ((t -= 2) * t * t + 2) + b }, easeInQuart: function (x, t, b, c, d) { return c * (t /= d) * t * t * t + b }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t = t / d - 1) * t * t * t - 1) + b }, easeInOutQuart: function (x, t, b, c, d) { if ((t /= d / 2) < 1) { return c / 2 * t * t * t * t + b } return -c / 2 * ((t -= 2) * t * t * t - 2) + b }, easeInQuint: function (x, t, b, c, d) { return c * (t /= d) * t * t * t * t + b }, easeOutQuint: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t * t * t + 1) + b }, easeInOutQuint: function (x, t, b, c, d) { if ((t /= d / 2) < 1) { return c / 2 * t * t * t * t * t + b } return c / 2 * ((t -= 2) * t * t * t * t + 2) + b }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t / d * (Math.PI / 2)) + c + b }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t / d * (Math.PI / 2)) + b }, easeInOutSine: function (x, t, b, c, d) { return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b }, easeInExpo: function (x, t, b, c, d) { return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b }, easeOutExpo: function (x, t, b, c, d) { return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b }, easeInOutExpo: function (x, t, b, c, d) { if (t == 0) { return b } if (t == d) { return b + c } if ((t /= d / 2) < 1) { return c / 2 * Math.pow(2, 10 * (t - 1)) + b } return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t = t / d - 1) * t) + b }, easeInOutCirc: function (x, t, b, c, d) { if ((t /= d / 2) < 1) { return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b } return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b }, easeInElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) { return b } if ((t /= d) == 1) { return b + c } if (!p) { p = d * 0.3 } if (a < Math.abs(c)) { a = c; var s = p / 4 } else { var s = p / (2 * Math.PI) * Math.asin(c / a) } return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b }, easeOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) { return b } if ((t /= d) == 1) { return b + c } if (!p) { p = d * 0.3 } if (a < Math.abs(c)) { a = c; var s = p / 4 } else { var s = p / (2 * Math.PI) * Math.asin(c / a) } return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b }, easeInOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) { return b } if ((t /= d / 2) == 2) { return b + c } if (!p) { p = d * (0.3 * 1.5) } if (a < Math.abs(c)) { a = c; var s = p / 4 } else { var s = p / (2 * Math.PI) * Math.asin(c / a) } if (t < 1) { return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b } return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) { s = 1.70158 } return c * (t /= d) * t * ((s + 1) * t - s) + b }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) { s = 1.70158 } return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) { s = 1.70158 } if ((t /= d / 2) < 1) { return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b } return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b }, easeOutBounce: function (x, t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b } else { if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75) + b } else { if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375) + b } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375) + b } } } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d / 2) { return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * 0.5 + b } return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b } });


/*!
* Enhanced attribute selectors for Sizzle/jQuery
* Version: 1.0.2
* Copyright (c) 2009 Balazs Endresz (balazs.endresz@gmail.com)
* Released under the MIT, BSD, and GPL Licenses.
*/

(function (Sizzle) {

	var Expr = Sizzle.selectors;

	Expr.attrPrefix = {};

	Expr.match.ATTR = /\[\s*(\W*(?:[\w\u00c0-\uFFFF_-]|\.|\\.)+)\s*(?:(\S?[=<>])\s*(['"]*)(.*?)\3|)\s*\](?![^\[]*\])(?![^\(]*\))/;
	//inserted:              \W*                      |\.                 [ <>]                         lookahead appended later

	Expr.leftMatch.ATTR = new RegExp(/(^(?:.|\r|\n)*?)/.source +
    Expr.match.ATTR.source.replace(/\\(\d+)/g,
        function (all, num) { return "\\" + (num - 0 + 1); }));


	Expr.filter.ATTR = function (elem, match) {

		var name = match[1],
		result,
		value,
		type = match[2],
		check = match[4],
		prefix = name.match(/(^\W+)(.*)/);

		if (prefix !== null) {
			for (var i in Expr.attrPrefix)
				if (i === prefix[1]) {
					result = Expr.attrPrefix[i](elem, prefix[2]);
					break;
				}
		} else
			result = Expr.attrHandle[name] ?
			Expr.attrHandle[name](elem) :
			elem[name] != null ?
				elem[name] :
				elem.getAttribute(name);

		value = result + "";

		var ret = result == null ?
		type === "!=" :
		type === "=" ?
		value === check :
		type === "*=" ?
		value.indexOf(check) >= 0 :
		type === "~=" ?
		(" " + value + " ").indexOf(check) >= 0 :
		!check ?
		result === 0 || result :
		type === "!=" ?
		value != check :
		type === "^=" ?
		value.indexOf(check) === 0 :
		type === "$=" ?
		value.substr(value.length - check.length) === check :
		type === "|=" ?
		value === check || value.substr(0, check.length + 1) === check + "-" :
		type === "/=" ?
		new RegExp(check).test(value) :
		false;

		if (ret || type && type.match(/<|>/) === null) return ret;

		var newValue = parseFloat(value), newCheck = parseFloat(check);
		value = isNaN(newValue) ? value : newValue;
		check = isNaN(newCheck) ? check : newCheck;

		return type === "<" ? value < check :
		type === ">" ? value > check :
		type === "<=" ? value <= check :
		type === ">=" ? value >= check :
		false;
	}

})((jQuery && jQuery.find) || Sizzle);


(function ($) {
	//Sizzle.selectors.attrPrefix
	$.extend($.expr.attrPrefix, {
		':': function (e, val) { return $(e).data(val); },
		'~': function (e, val) { return $.curCSS(e, val); },
		'&': function (e, val) { var d = $.data(e, 'events'); return d && d[val]; },
		'::': function (e, val) { var d = $.data(e, 'metadata'); return d && d[val]; }
	})

})(jQuery);

/**
* EasyDrag 1.5 - Drag & Drop jQuery Plug-in
*
* Thanks for the community that is helping the improvement
* of this little piece of code.
*
* For usage instructions please visit http://fromvega.com/scripts
*/

(function (d) { var b = false; var f = null; var h = {}; var k = {}; var j = {}; var l; var i; var g; var a; var e = {}; var c = false; d.getMousePosition = function (n) { var m = 0; var o = 0; if (!n) { var n = window.event } if (n.pageX || n.pageY) { m = n.pageX; o = n.pageY } else { if (n.clientX || n.clientY) { m = n.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; o = n.clientY + document.body.scrollTop + document.documentElement.scrollTop } } return { x: m, y: o} }; d.updatePosition = function (n) { var p = d.getMousePosition(n); var o = (p.x - l); var m = (p.y - i); d(f).css("top", (g + m)); d(f).css("left", (a + o)) }; d(document).mousemove(function (m) { if (b && e[f.id] != "false") { d.updatePosition(m); if (k[f.id] != undefined) { k[f.id](m, f) } return false } }); d(document).mouseup(function (m) { if (b && e[f.id] != "false") { b = false; if (h[f.id] != undefined) { h[f.id](m, f) } return false } }); d.fn.ondrag = function (m) { return this.each(function () { k[this.id] = m }) }; d.fn.ondrop = function (m) { return this.each(function () { h[this.id] = m }) }; d.fn.dragOff = function () { return this.each(function () { e[this.id] = "off" }) }; d.fn.dragOn = function () { return this.each(function () { e[this.id] = "on" }) }; d.fn.setHandler = function (m) { return this.each(function () { var n = this; j[this.id] = true; d(n).css("cursor", ""); e[n.id] = "handler"; d("#" + m).css("cursor", "move"); d("#" + m).mousedown(function (o) { c = true; d(n).trigger("mousedown", o) }); d("#" + m).mouseup(function (o) { c = false }) }) }; d.fn.easydrag = function (m) { return this.each(function () { if (undefined == this.id || !this.id.length) { this.id = "easydrag" + (new Date().getTime()) } j[this.id] = m ? true : false; e[this.id] = "on"; d(this).css("cursor", "move"); d(this).mousedown(function (n) { if ((e[this.id] == "off") || (e[this.id] == "handler" && !c)) { return j[this.id] } d(this).css("position", "absolute"); d(this).css("z-index", parseInt(new Date().getTime() / 1000)); b = true; f = this; var o = d.getMousePosition(n); l = o.x; i = o.y; g = this.offsetTop; a = this.offsetLeft; d.updatePosition(n); return j[this.id] }) }) } })(jQuery);

/* ------------------------------------------------------------------------
* Class: prettyPhoto
* Use: Lightbox clone for jQuery
* Author: Stephane Caron (http://www.no-margin-for-errors.com)
* Version: 3.0
* ------------------------------------------------------------------------- */

(function ($) {
    $.prettyPhoto = { version: '3.0' }; $.fn.prettyPhoto = function (pp_settings) {
        pp_settings = jQuery.extend({ animation_speed: 'fast', slideshow: false, autoplay_slideshow: false, opacity: 0.80, show_title: true, allow_resize: true, default_width: 500, default_height: 344, counter_separator_label: '/', theme: 'facebook', hideflash: false, wmode: 'opaque', autoplay: true, modal: false, overlay_gallery: true, keyboard_shortcuts: true, changepicturecallback: function () { }, callback: function () { }, markup: '<div class="pp_pic_holder"><div class="ppt">&nbsp;</div><div class="pp_top"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div><div class="pp_content_container"><div class="pp_left"><div class="pp_right"><div class="pp_content"><div class="pp_loaderIcon"></div><div class="pp_fade"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="pp_full_res"></div><div class="pp_details clearfix"><p class="pp_description"></p><a class="pp_close" href="#">Close</a><div class="pp_nav"><a href="#" class="pp_arrow_previous">Previous</a><p class="currentTextHolder">0/0</p><a href="#" class="pp_arrow_next">Next</a></div></div></div></div></div></div></div><div class="pp_bottom"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div></div><div class="pp_overlay"></div>', gallery_markup: '<div class="pp_gallery"><a href="#" class="pp_arrow_previous">Previous</a><ul>{gallery}</ul><a href="#" class="pp_arrow_next">Next</a></div>', image_markup: '<img id="fullResImage" src="" />', flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>', quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>', iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', inline_markup: '<div class="pp_inline clearfix">{content}</div>', custom_markup: '' }, pp_settings); var matchedObjects = this, percentBased = false, correctSizes, pp_open, pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, windowHeight = $(window).height(), windowWidth = $(window).width(), pp_slideshow; doresize = true, scroll_pos = _get_scroll(); $(window).unbind('resize').resize(function () { _center_overlay(); _resize_overlay(); }); if (pp_settings.keyboard_shortcuts) {
            $(document).unbind('keydown').keydown(function (e) {
                if (typeof $pp_pic_holder != 'undefined') {
                    if ($pp_pic_holder.is(':visible')) {
                        switch (e.keyCode) {
                            case 37: $.prettyPhoto.changePage('previous'); break; case 39: $.prettyPhoto.changePage('next'); break; case 27: if (!settings.modal)
                                    $.prettyPhoto.close(); break;
                        }; return false;
                    };
                };
            });
        }
        $.prettyPhoto.initialize = function () {
            settings = pp_settings; if ($.browser.msie && parseInt($.browser.version) == 6) settings.theme = "light_square"; _buildOverlay(this); if (settings.allow_resize)
                $(window).scroll(function () { _center_overlay(); }); _center_overlay(); set_position = jQuery.inArray($(this).attr('href'), pp_images); $.prettyPhoto.open(); return false;
        }
        $.prettyPhoto.open = function () {
            if (typeof settings == "undefined") { settings = pp_settings; if ($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; _buildOverlay(this); pp_images = $.makeArray(arguments[0]); pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); isSet = (pp_images.length > 1) ? true : false; set_position = 0; }
            if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'hidden'); if (settings.hideflash) $('object,embed').css('visibility', 'hidden'); _checkPosition($(pp_images).size()); $('.pp_loaderIcon').show(); if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show(); $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); $pp_pic_holder.find('.currentTextHolder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).size()); $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); (settings.show_title && pp_titles[set_position] != "") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html('&nbsp;'); movie_width = (parseFloat(grab_param('width', pp_images[set_position]))) ? grab_param('width', pp_images[set_position]) : settings.default_width.toString(); movie_height = (parseFloat(grab_param('height', pp_images[set_position]))) ? grab_param('height', pp_images[set_position]) : settings.default_height.toString(); if (movie_width.indexOf('%') != -1 || movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; } else { percentBased = false; }
            $pp_pic_holder.fadeIn(function () { imgPreloader = ""; switch (_getFileType(pp_images[set_position])) { case 'image': imgPreloader = new Image(); nextImage = new Image(); if (isSet && set_position > $(pp_images).size()) nextImage.src = pp_images[set_position + 1]; prevImage = new Image(); if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup; $pp_pic_holder.find('#fullResImage').attr('src', pp_images[set_position]); imgPreloader.onload = function () { correctSizes = _fitToViewport(imgPreloader.width, imgPreloader.height); _showContent(); }; imgPreloader.onerror = function () { alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto.close(); }; imgPreloader.src = pp_images[set_position]; break; case 'youtube': correctSizes = _fitToViewport(movie_width, movie_height); movie = 'http://www.youtube.com/v/' + grab_param('v', pp_images[set_position]); if (settings.autoplay) movie += "&autoplay=1"; toInject = settings.flash_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); break; case 'vimeo': correctSizes = _fitToViewport(movie_width, movie_height); movie_id = pp_images[set_position]; var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)/; var match = movie_id.match(regExp); movie = 'http://player.vimeo.com/video/' + match[2] + '?title=0&amp;byline=0&amp;portrait=0'; if (settings.autoplay) movie += "&autoplay=1;"; vimeo_width = correctSizes['width'] + '/embed/?moog_width=' + correctSizes['width']; toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, movie); break; case 'quicktime': correctSizes = _fitToViewport(movie_width, movie_height); correctSizes['height'] += 15; correctSizes['contentHeight'] += 15; correctSizes['containerHeight'] += 15; toInject = settings.quicktime_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); break; case 'flash': correctSizes = _fitToViewport(movie_width, movie_height); flash_vars = pp_images[set_position]; flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10, pp_images[set_position].length); filename = pp_images[set_position]; filename = filename.substring(0, filename.indexOf('?')); toInject = settings.flash_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + '?' + flash_vars); break; case 'iframe': correctSizes = _fitToViewport(movie_width, movie_height); frame_url = pp_images[set_position]; frame_url = frame_url.substr(0, frame_url.indexOf('iframe') - 1); toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, frame_url); break; case 'custom': correctSizes = _fitToViewport(movie_width, movie_height); toInject = settings.custom_markup; break; case 'inline': myClone = $(pp_images[set_position]).clone().css({ 'width': settings.default_width }).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($('body')); correctSizes = _fitToViewport($(myClone).width(), $(myClone).height()); $(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html()); break; }; if (!imgPreloader) { $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; _showContent(); }; }); return false;
        }; $.prettyPhoto.changePage = function (direction) { currentGalleryPage = 0; if (direction == 'previous') { set_position--; if (set_position < 0) { set_position = 0; return; }; } else if (direction == 'next') { set_position++; if (set_position > $(pp_images).size() - 1) { set_position = 0; } } else { set_position = direction; }; if (!doresize) doresize = true; $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); _hideContent(function () { $.prettyPhoto.open(); }); }; $.prettyPhoto.changeGalleryPage = function (direction) { if (direction == 'next') { currentGalleryPage++; if (currentGalleryPage > totalPage) { currentGalleryPage = 0; }; } else if (direction == 'previous') { currentGalleryPage--; if (currentGalleryPage < 0) { currentGalleryPage = totalPage; }; } else { currentGalleryPage = direction; }; itemsToSlide = (currentGalleryPage == totalPage) ? pp_images.length - ((totalPage) * itemsPerPage) : itemsPerPage; $pp_pic_holder.find('.pp_gallery li').each(function (i) { $(this).animate({ 'left': (i * itemWidth) - ((itemsToSlide * itemWidth) * currentGalleryPage) }); }); }; $.prettyPhoto.startSlideshow = function () { if (typeof pp_slideshow == 'undefined') { $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function () { $.prettyPhoto.stopSlideshow(); return false; }); pp_slideshow = setInterval($.prettyPhoto.startSlideshow, settings.slideshow); } else { $.prettyPhoto.changePage('next'); }; }
        $.prettyPhoto.stopSlideshow = function () { $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function () { $.prettyPhoto.startSlideshow(); return false; }); clearInterval(pp_slideshow); pp_slideshow = undefined; }
        $.prettyPhoto.close = function () { clearInterval(pp_slideshow); $pp_pic_holder.stop().find('object,embed').css('visibility', 'hidden'); $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed, function () { $(this).remove(); }); $pp_overlay.fadeOut(settings.animation_speed, function () { if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'visible'); if (settings.hideflash) $('object,embed').css('visibility', 'visible'); $(this).remove(); $(window).unbind('scroll'); settings.callback(); doresize = true; pp_open = false; delete settings; }); }; _showContent = function () {
            $('.pp_loaderIcon').hide(); $ppt.fadeTo(settings.animation_speed, 1); projectedTop = scroll_pos['scrollTop'] + ((windowHeight / 2) - (correctSizes['containerHeight'] / 2)); if (projectedTop < 0) projectedTop = 0; $pp_pic_holder.find('.pp_content').animate({ 'height': correctSizes['contentHeight'] }, settings.animation_speed); $pp_pic_holder.animate({ 'top': projectedTop, 'left': (windowWidth / 2) - (correctSizes['containerWidth'] / 2), 'width': correctSizes['containerWidth'] }, settings.animation_speed, function () {
                $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(correctSizes['height']).width(correctSizes['width']); $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); if (isSet && _getFileType(pp_images[set_position]) == "image") { $pp_pic_holder.find('.pp_hoverContainer').show(); } else { $pp_pic_holder.find('.pp_hoverContainer').hide(); }
                if (correctSizes['resized']) $('a.pp_expand,a.pp_contract').fadeIn(settings.animation_speed); if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); settings.changepicturecallback(); pp_open = true;
            }); _insert_gallery();
        }; function _hideContent(callback) { $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility', 'hidden'); $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed, function () { $('.pp_loaderIcon').show(); callback(); }); }; function _checkPosition(setCount) { if (set_position == setCount - 1) { $pp_pic_holder.find('a.pp_next').css('visibility', 'hidden'); $pp_pic_holder.find('a.pp_next').addClass('disabled').unbind('click'); } else { $pp_pic_holder.find('a.pp_next').css('visibility', 'visible'); $pp_pic_holder.find('a.pp_next.disabled').removeClass('disabled').bind('click', function () { $.prettyPhoto.changePage('next'); return false; }); }; if (set_position == 0) { $pp_pic_holder.find('a.pp_previous').css('visibility', 'hidden').addClass('disabled').unbind('click'); } else { $pp_pic_holder.find('a.pp_previous.disabled').css('visibility', 'visible').removeClass('disabled').bind('click', function () { $.prettyPhoto.changePage('previous'); return false; }); }; (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); }; function _fitToViewport(width, height) { resized = false; _getDimensions(width, height); imageWidth = width, imageHeight = height; if (((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { resized = true, fitting = false; while (!fitting) { if ((pp_containerWidth > windowWidth)) { imageWidth = (windowWidth - 200); imageHeight = (height / width) * imageWidth; } else if ((pp_containerHeight > windowHeight)) { imageHeight = (windowHeight - 200); imageWidth = (width / height) * imageHeight; } else { fitting = true; }; pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; }; _getDimensions(imageWidth, imageHeight); }; return { width: Math.floor(imageWidth), height: Math.floor(imageHeight), containerHeight: Math.floor(pp_containerHeight), containerWidth: Math.floor(pp_containerWidth) + 40, contentHeight: Math.floor(pp_contentHeight), contentWidth: Math.floor(pp_contentWidth), resized: resized }; }; function _getDimensions(width, height) { width = parseFloat(width); height = parseFloat(height); $pp_details = $pp_pic_holder.find('.pp_details'); $pp_details.width(width); detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); $pp_details = $pp_details.clone().appendTo($('body')).css({ 'position': 'absolute', 'top': -10000 }); detailsHeight += $pp_details.height(); detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; if ($.browser.msie && $.browser.version == 7) detailsHeight += 8; $pp_details.remove(); pp_contentHeight = height + detailsHeight; pp_contentWidth = width; pp_containerHeight = pp_contentHeight + $ppt.height() + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); pp_containerWidth = width; }
        function _getFileType(itemSrc) { if (itemSrc.match(/youtube\.com\/watch/i)) { return 'youtube'; } else if (itemSrc.match(/vimeo\.com/i)) { return 'vimeo'; } else if (itemSrc.indexOf('.mov') != -1) { return 'quicktime'; } else if (itemSrc.indexOf('.swf') != -1) { return 'flash'; } else if (itemSrc.indexOf('iframe') != -1) { return 'iframe'; } else if (itemSrc.indexOf('custom') != -1) { return 'custom'; } else if (itemSrc.substr(0, 1) == '#') { return 'inline'; } else { return 'image'; }; }; function _center_overlay() { if (doresize && typeof $pp_pic_holder != 'undefined') { scroll_pos = _get_scroll(); titleHeight = $ppt.height(), contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); projectedTop = (windowHeight / 2) + scroll_pos['scrollTop'] - (contentHeight / 2); $pp_pic_holder.css({ 'top': projectedTop, 'left': (windowWidth / 2) + scroll_pos['scrollLeft'] - (contentwidth / 2) }); }; }; function _get_scroll() { if (self.pageYOffset) { return { scrollTop: self.pageYOffset, scrollLeft: self.pageXOffset }; } else if (document.documentElement && document.documentElement.scrollTop) { return { scrollTop: document.documentElement.scrollTop, scrollLeft: document.documentElement.scrollLeft }; } else if (document.body) { return { scrollTop: document.body.scrollTop, scrollLeft: document.body.scrollLeft }; }; }; function _resize_overlay() { windowHeight = $(window).height(), windowWidth = $(window).width(); if (typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()); }; function _insert_gallery() {
            if (isSet && settings.overlay_gallery && _getFileType(pp_images[set_position]) == "image") {
                itemWidth = 52 + 5; navWidth = (settings.theme == "facebook") ? 58 : 38; itemsPerPage = Math.floor((correctSizes['containerWidth'] - 100 - navWidth) / itemWidth); itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length; totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; if (totalPage == 0) { navWidth = 0; $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide(); } else { $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show(); }; galleryWidth = itemsPerPage * itemWidth + navWidth; $pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left', -(galleryWidth / 2)); $pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage * itemWidth).find('li.selected').removeClass('selected'); goToPage = (Math.floor(set_position / itemsPerPage) <= totalPage) ? Math.floor(set_position / itemsPerPage) : totalPage; if (itemsPerPage) { $pp_pic_holder.find('.pp_gallery').hide().show().removeClass('disabled'); } else { $pp_pic_holder.find('.pp_gallery').hide().addClass('disabled'); }
                $.prettyPhoto.changeGalleryPage(goToPage); $pp_pic_holder.find('.pp_gallery ul li:eq(' + set_position + ')').addClass('selected');
            } else { $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); $pp_pic_holder.find('.pp_gallery').hide(); } 
        }
        function _buildOverlay(caller) {
            theRel = $(caller).attr('rel'); galleryRegExp = /\[(?:.*)\]/; isSet = (galleryRegExp.exec(theRel)) ? true : false; pp_images = (isSet) ? jQuery.map(matchedObjects, function (n, i) { if ($(n).attr('rel').indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(caller).attr('href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function (n, i) { if ($(n).attr('rel').indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(caller).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function (n, i) { if ($(n).attr('rel').indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(caller).attr('title')); $('body').append(settings.markup); $pp_pic_holder = $('.pp_pic_holder'), $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); if (isSet && settings.overlay_gallery) {
                currentGalleryPage = 0; toInject = ""; for (var i = 0; i < pp_images.length; i++) {
                    var regex = new RegExp("(.*?)\.(jpg|jpeg|png|gif)$"); var results = regex.exec(pp_images[i]); if (!results) { classname = 'default'; } else { classname = ''; }
                    toInject += "<li class='" + classname + "'><a href='#'><img src='" + pp_images[i] + "' width='50' alt='' /></a></li>";
                }; toInject = settings.gallery_markup.replace(/{gallery}/g, toInject); $pp_pic_holder.find('#pp_full_res').after(toInject); $pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function () { $.prettyPhoto.changeGalleryPage('next'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function () { $.prettyPhoto.changeGalleryPage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_content').hover(function () { $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); }, function () { $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); }); itemWidth = 52 + 5; $pp_pic_holder.find('.pp_gallery ul li').each(function (i) { $(this).css({ 'position': 'absolute', 'left': i * itemWidth }); $(this).find('a').unbind('click').click(function () { $.prettyPhoto.changePage(i); $.prettyPhoto.stopSlideshow(); return false; }); });
            }; if (settings.slideshow) {
                $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
                $pp_pic_holder.find('.pp_nav .pp_play').click(function () { $.prettyPhoto.startSlideshow(); return false; });
            }
            $pp_pic_holder.attr('class', 'pp_pic_holder ' + settings.theme); $pp_overlay.css({ 'opacity': 0, 'height': $(document).height(), 'width': $(document).width() }).bind('click', function () { if (!settings.modal) $.prettyPhoto.close(); }); $('a.pp_close').bind('click', function () { $.prettyPhoto.close(); return false; }); $('a.pp_expand').bind('click', function (e) { if ($(this).hasClass('pp_expand')) { $(this).removeClass('pp_expand').addClass('pp_contract'); doresize = false; } else { $(this).removeClass('pp_contract').addClass('pp_expand'); doresize = true; }; _hideContent(function () { $.prettyPhoto.open(); }); return false; }); $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click', function () { $.prettyPhoto.changePage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click', function () { $.prettyPhoto.changePage('next'); $.prettyPhoto.stopSlideshow(); return false; }); _center_overlay();
        }; return this.unbind('click').click($.prettyPhoto.initialize);
    }; function grab_param(name, url) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(url); return (results == null) ? "" : results[1]; } 
})(jQuery);

/*
* jQuery outside events - v1.1 - 3/16/2010
* http://benalman.com/projects/jquery-outside-events-plugin/
* 
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
      (function ($, c, b) { $.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "), function (d) { a(d) }); a("focusin", "focus" + b); a("focusout", "blur" + b); $.addOutsideEvent = a; function a(g, e) { e = e || g + b; var d = $(), h = g + "." + e + "-special-event"; $.event.special[e] = { setup: function () { d = d.add(this); if (d.length === 1) { $(c).bind(h, f) } }, teardown: function () { d = d.not(this); if (d.length === 0) { $(c).unbind(h) } }, add: function (i) { var j = i.handler; i.handler = function (l, k) { l.target = k; j.apply(this, arguments) } } }; function f(i) { $(d).each(function () { var j = $(this); if (this !== i.target && !j.has(i.target).length) { j.triggerHandler(e, [i.target]) } }) } } })(jQuery, document, "outside");


/* cookies */

function setCookie(name, value, days) {
if (days) {
    var date = new Date();
    date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
    var expires = "; expires=" + date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}

function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0) == ' ') c = c.substring(1, c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
