(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof(r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);jQuery.noConflict();(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);(function(b){var d=false;b(document).mouseup(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"&&a.target.nodeName?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===true){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j<f;j+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle",g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length?(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i-
m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false;this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b=this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c<f))c=f;if(c!==this.values(b)){f=this.values();f[b]=c;a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:f});this.values(b?0:1);a!==false&&this.values(b,c,true)}}else if(c!==this.value()){a=this._trigger("slide",a,{handle:this.handles[b],value:c});a!==false&&this.value(c)}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a);this._refreshValue();this._change(null,0)}else return this._value()},values:function(a,b){var c,f,e;if(arguments.length>1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e<c.length;e+=1){c[e]=this._trimAlignValue(f[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();else return this._values()},_setOption:function(a,b){var c,f=0;if(d.isArray(this.options.values))f=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case"disabled":if(b){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];return b=this._trimAlignValue(b)}else{b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e-
g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"},b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery);(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};var Cookie=(function($){var cookies={};function escapeCookieValue(val){return encodeURIComponent(val);}
function unescapeCookieValue(val){return decodeURIComponent(val);}
return function(opts){var cookieRegEx,options,cookieData={},predefined;if(!opts||!opts.name||!opts.path){throw'invalid name and path for cookie';}
if(opts.pairDelimiter==undefined){var pairDelimiter='@';}else{var pairDelimiter=opts.pairDelimiter;}
if(opts.keyValueDelimiter==undefined){var keyValueDelimiter=':';}else{var keyValueDelimiter=opts.keyValueDelimiter;}
predefined=cookies[opts.name];if(predefined){predefined.setPath(opts.path);return predefined;}
options=jQuery.extend({expires:3},opts);options.expires*=86400000;cookieRegEx=new RegExp(options.name+'=(.*?)(?:;|$)');function write(){var date=new Date(),tokens=[],prop,first=true,cookieString;date.setTime(date.getTime()+options.expires);for(prop in cookieData){if(Object.hasOwnProperty.call(cookieData,prop)){if(!first){tokens.push(pairDelimiter);}}
tokens.push(escapeCookieValue(prop));tokens.push(keyValueDelimiter);tokens.push(escapeCookieValue(cookieData[prop]));first=false;}
cookieString=options.name+"="+tokens.join('')+"; expires="+date.toGMTString()+"; path="+options.path;document.cookie=cookieString;}
function read(){var cookie=(document.cookie.match(cookieRegEx)||[])[1],pairs,i,pair;if(cookie){pairs=cookie.split(pairDelimiter);for(i=0;i<pairs.length;i+=1){pair=pairs[i].split(keyValueDelimiter);cookieData[unescapeCookieValue(pair[0])]=unescapeCookieValue(pair[1]);}
return true;}
return false;}
function clear(){document.cookie=options.name+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path='+options.path;}
function set(name,val){if(name){cookieData[name]=val;write();}}
function get(name){return cookieData[name];}
function remove(name){var prop;if(name){delete cookieData[name];for(prop in cookieData){if(Object.hasOwnProperty.call(cookieData,prop)){write();return;}}
clear();}}
function setPath(path){if(path!==options.path){options.path=path;write();}}
read();return(cookies[options.name]={clear:clear,set:set,get:get,remove:remove,read:read,setPath:setPath});};}());(function(jQuery,undefined){var oldManip=jQuery.fn.domManip,tmplItmAtt="_tmplitem",htmlExpr=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,newTmplItems={},wrappedItems={},appendToTmplItems,topTmplItem={key:0,data:{}},itemKey=0,cloneIndex=0,stack=[];function newTmplItem(options,parentItem,fn,data){var newItem={data:data||(data===0||data===false)?data:(parentItem?parentItem.data:{}),_wrap:parentItem?parentItem._wrap:null,tmpl:null,parent:parentItem||null,nodes:[],calls:tiCalls,nest:tiNest,wrap:tiWrap,html:tiHtml,update:tiUpdate};if(options){jQuery.extend(newItem,options,{nodes:[],parent:parentItem});}
if(fn){newItem.tmpl=fn;newItem._ctnt=newItem._ctnt||newItem.tmpl(jQuery,newItem);newItem.key=++itemKey;(stack.length?wrappedItems:newTmplItems)[itemKey]=newItem;}
return newItem;}
jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector),elems,i,l,tmplItems,parent=this.length===1&&this[0].parentNode;appendToTmplItems=newTmplItems||{};if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);ret=this;}else{for(i=0,l=insert.length;i<l;i++){cloneIndex=i;elems=(i>0?this.clone(true):this).get();jQuery(insert[i])[original](elems);ret=ret.concat(elems);}
cloneIndex=0;ret=this.pushStack(ret,name,insert.selector);}
tmplItems=appendToTmplItems;appendToTmplItems=null;jQuery.tmpl.complete(tmplItems);return ret;};});jQuery.fn.extend({tmpl:function(data,options,parentItem){return jQuery.tmpl(this[0],data,options,parentItem);},tmplItem:function(){return jQuery.tmplItem(this[0]);},template:function(name){return jQuery.template(name,this[0]);},domManip:function(args,table,callback,options){if(args[0]&&jQuery.isArray(args[0])){var dmArgs=jQuery.makeArray(arguments),elems=args[0],elemsLength=elems.length,i=0,tmplItem;while(i<elemsLength&&!(tmplItem=jQuery.data(elems[i++],"tmplItem"))){}
if(tmplItem&&cloneIndex){dmArgs[2]=function(fragClone){jQuery.tmpl.afterManip(this,fragClone,callback);};}
oldManip.apply(this,dmArgs);}else{oldManip.apply(this,arguments);}
cloneIndex=0;if(!appendToTmplItems){jQuery.tmpl.complete(newTmplItems);}
return this;}});jQuery.extend({tmpl:function(tmpl,data,options,parentItem){var ret,topLevel=!parentItem;if(topLevel){parentItem=topTmplItem;tmpl=jQuery.template[tmpl]||jQuery.template(null,tmpl);wrappedItems={};}else if(!tmpl){tmpl=parentItem.tmpl;newTmplItems[parentItem.key]=parentItem;parentItem.nodes=[];if(parentItem.wrapped){updateWrapped(parentItem,parentItem.wrapped);}
return jQuery(build(parentItem,null,parentItem.tmpl(jQuery,parentItem)));}
if(!tmpl){return[];}
if(typeof data==="function"){data=data.call(parentItem||{});}
if(options&&options.wrapped){updateWrapped(options,options.wrapped);}
ret=jQuery.isArray(data)?jQuery.map(data,function(dataItem){return dataItem?newTmplItem(options,parentItem,tmpl,dataItem):null;}):[newTmplItem(options,parentItem,tmpl,data)];return topLevel?jQuery(build(parentItem,null,ret)):ret;},tmplItem:function(elem){var tmplItem;if(elem instanceof jQuery){elem=elem[0];}
while(elem&&elem.nodeType===1&&!(tmplItem=jQuery.data(elem,"tmplItem"))&&(elem=elem.parentNode)){}
return tmplItem||topTmplItem;},template:function(name,tmpl){if(tmpl){if(typeof tmpl==="string"){tmpl=buildTmplFn(tmpl);}else if(tmpl instanceof jQuery){tmpl=tmpl[0]||{};}
if(tmpl.nodeType){tmpl=jQuery.data(tmpl,"tmpl")||jQuery.data(tmpl,"tmpl",buildTmplFn(tmpl.innerHTML));}
return typeof name==="string"?(jQuery.template[name]=tmpl):tmpl;}
return name?(typeof name!=="string"?jQuery.template(null,name):(jQuery.template[name]||jQuery.template(null,htmlExpr.test(name)?name:jQuery(name)))):null;},encode:function(text){return(""+text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;");}});jQuery.extend(jQuery.tmpl,{tag:{"tmpl":{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},"wrap":{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},"each":{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},"html":{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(items){newTmplItems={};},afterManip:function afterManip(elem,fragClone,callback){var content=fragClone.nodeType===11?jQuery.makeArray(fragClone.childNodes):fragClone.nodeType===1?[fragClone]:[];callback.call(elem,fragClone);storeTmplItems(content);cloneIndex++;}});function build(tmplItem,nested,content){var frag,ret=content?jQuery.map(content,function(item){return(typeof item==="string")?(tmplItem.key?item.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+tmplItmAtt+"=\""+tmplItem.key+"\" $2"):item):build(item,tmplItem,item._ctnt);}):tmplItem;if(nested){return ret;}
ret=ret.join("");ret.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(all,before,middle,after){frag=jQuery(middle).get();storeTmplItems(frag);if(before){frag=unencode(before).concat(frag);}
if(after){frag=frag.concat(unencode(after));}});return frag?frag:unencode(ret);}
function unencode(text){var el=document.createElement("div");el.innerHTML=text;return jQuery.makeArray(el.childNodes);}
function buildTmplFn(markup){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;"+"with($data){__.push('"+
jQuery.trim(markup).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(all,slash,type,fnargs,target,parens,args){var tag=jQuery.tmpl.tag[type],def,expr,exprAutoFnDetect;if(!tag){throw"Unknown template tag: "+type;}
def=tag._default||[];if(parens&&!/\w$/.test(target)){target+=parens;parens="";}
if(target){target=unescape(target);args=args?(","+unescape(args)+")"):(parens?")":"");expr=parens?(target.indexOf(".")>-1?target+unescape(parens):("("+target+").call($item"+args)):target;exprAutoFnDetect=parens?expr:"(typeof("+target+")==='function'?("+target+").call($item):("+target+"))";}else{exprAutoFnDetect=expr=def.$1||"null";}
fnargs=unescape(fnargs);return"');"+
tag[slash?"close":"open"].split("$notnull_1").join(target?"typeof("+target+")!=='undefined' && ("+target+")!=null":"true").split("$1a").join(exprAutoFnDetect).split("$1").join(expr).split("$2").join(fnargs||def.$2||"")+"__.push('";})+"');}return __;");}
function updateWrapped(options,wrapped){options._wrap=build(options,true,jQuery.isArray(wrapped)?wrapped:[htmlExpr.test(wrapped)?wrapped:jQuery(wrapped).html()]).join("");}
function unescape(args){return args?args.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null;}
function outerHtml(elem){var div=document.createElement("div");div.appendChild(elem.cloneNode(true));return div.innerHTML;}
function storeTmplItems(content){var keySuffix="_"+cloneIndex,elem,elems,newClonedItems={},i,l,m;for(i=0,l=content.length;i<l;i++){if((elem=content[i]).nodeType!==1){continue;}
elems=elem.getElementsByTagName("*");for(m=elems.length-1;m>=0;m--){processItemKey(elems[m]);}
processItemKey(elem);}
function processItemKey(el){var pntKey,pntNode=el,pntItem,tmplItem,key;if((key=el.getAttribute(tmplItmAtt))){while(pntNode.parentNode&&(pntNode=pntNode.parentNode).nodeType===1&&!(pntKey=pntNode.getAttribute(tmplItmAtt))){}
if(pntKey!==key){pntNode=pntNode.parentNode?(pntNode.nodeType===11?0:(pntNode.getAttribute(tmplItmAtt)||0)):0;if(!(tmplItem=newTmplItems[key])){tmplItem=wrappedItems[key];tmplItem=newTmplItem(tmplItem,newTmplItems[pntNode]||wrappedItems[pntNode]);tmplItem.key=++itemKey;newTmplItems[itemKey]=tmplItem;}
if(cloneIndex){cloneTmplItem(key);}}
el.removeAttribute(tmplItmAtt);}else if(cloneIndex&&(tmplItem=jQuery.data(el,"tmplItem"))){cloneTmplItem(tmplItem.key);newTmplItems[tmplItem.key]=tmplItem;pntNode=jQuery.data(el.parentNode,"tmplItem");pntNode=pntNode?pntNode.key:0;}
if(tmplItem){pntItem=tmplItem;while(pntItem&&pntItem.key!=pntNode){pntItem.nodes.push(el);pntItem=pntItem.parent;}
delete tmplItem._ctnt;delete tmplItem._wrap;jQuery.data(el,"tmplItem",tmplItem);}
function cloneTmplItem(key){key=key+keySuffix;tmplItem=newClonedItems[key]=(newClonedItems[key]||newTmplItem(tmplItem,newTmplItems[tmplItem.parent.key+keySuffix]||tmplItem.parent));}}}
function tiCalls(content,tmpl,data,options){if(!content){return stack.pop();}
stack.push({_:content,tmpl:tmpl,item:this,data:data,options:options});}
function tiNest(tmpl,data,options){return jQuery.tmpl(jQuery.template(tmpl),data,options,this);}
function tiWrap(call,wrapped){var options=call.options||{};options.wrapped=wrapped;return jQuery.tmpl(jQuery.template(call.tmpl),call.data,options,call.item);}
function tiHtml(filter,textOnly){var wrapped=this._wrap;return jQuery.map(jQuery(jQuery.isArray(wrapped)?wrapped.join(""):wrapped).filter(filter||"*"),function(e){return textOnly?e.innerText||e.textContent:e.outerHTML||outerHtml(e);});}
function tiUpdate(){var coll=this.nodes;jQuery.tmpl(null,null,null,this).insertBefore(coll[0]);jQuery(coll).remove();}})(jQuery);var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());var store=(function(){var api={},win=window,doc=win.document,localStorageName='localStorage',globalStorageName='globalStorage',namespace='__storejs__',storage
api.disabled=false
api.set=function(key,value){}
api.get=function(key){}
api.remove=function(key){}
api.clear=function(){}
api.transact=function(key,transactionFn){var val=api.get(key)
if(typeof val=='undefined'){val={}}
transactionFn(val)
api.set(key,val)}
api.serialize=function(value){return JSON.stringify(value)}
api.deserialize=function(value){if(typeof value!='string'){return undefined}
return JSON.parse(value)}
function isLocalStorageNameSupported(){try{return(localStorageName in win&&win[localStorageName])}
catch(err){return false}}
function isGlobalStorageNameSupported(){try{return(globalStorageName in win&&win[globalStorageName]&&win[globalStorageName][win.location.hostname])}
catch(err){return false}}
if(isLocalStorageNameSupported()){storage=win[localStorageName]
api.set=function(key,val){try{storage.setItem(key,api.serialize(val));}catch(e){console.log(e)}}
api.get=function(key){return api.deserialize(storage.getItem(key))}
api.remove=function(key){storage.removeItem(key)}
api.clear=function(){storage.clear()}}else if(isGlobalStorageNameSupported()){storage=win[globalStorageName][win.location.hostname]
api.set=function(key,val){storage[key]=api.serialize(val)}
api.get=function(key){return api.deserialize(storage[key]&&storage[key].value)}
api.remove=function(key){delete storage[key]}
api.clear=function(){for(var key in storage){delete storage[key]}}}else if(doc.documentElement.addBehavior){var storage=doc.createElement('div')
function withIEStorage(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0)
args.unshift(storage)
doc.body.appendChild(storage)
storage.addBehavior('#default#userData')
storage.load(localStorageName)
var result=storeFunction.apply(api,args)
doc.body.removeChild(storage)
return result}}
api.set=withIEStorage(function(storage,key,val){storage.setAttribute(key,api.serialize(val))
storage.save(localStorageName)})
api.get=withIEStorage(function(storage,key){return api.deserialize(storage.getAttribute(key))})
api.remove=withIEStorage(function(storage,key){storage.removeAttribute(key)
storage.save(localStorageName)})
api.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes
storage.load(localStorageName)
for(var i=0,attr;attr=attributes[i];i++){storage.removeAttribute(attr.name)}
storage.save(localStorageName)})}
try{api.set(namespace,namespace)
if(api.get(namespace)!=namespace){api.disabled=true}
api.remove(namespace)}catch(e){api.disabled=true}
return api})();if(typeof module!='undefined'){module.exports=store}
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);(function(window,$,undefined){"use strict";var ALWAYS_RELOAD='__all__',HASH_REPLACEMENT=':',CONTAINERPATH='/listen/',previousLocation=null,upcomingLocation=null,previousSubhash=null,transitions={},document=window.document,location=window.location,history=window.history,insertId=0,activeOpts,defaultOpts,liveFormsSel,referrer,methods;function isCached(url){var cache=-1!==url.indexOf('.css')||-1!==url.indexOf('.js')||-1!==url.indexOf('/browse/')||-1!==url.indexOf('/charts/')||-1!==url.indexOf('/music-news/')||-1!==url.indexOf('/book-news/')||-1!==url.indexOf('/music-genres/')||-1!==url.indexOf('/book-genres/')||-1!==url.indexOf('/artist/')||-1!==url.indexOf('/search/')||-1!==url.indexOf('/radio/')||(url.indexOf('/album/')===-1&&url.indexOf('/book/')===-1&&false!==pathOf(url));return cache;}
function isCrossDomain(url){var ajaxLocation,ajaxLocParts,parts,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/;try{ajaxLocation=window.location.href;}catch(e){ajaxLocation=window.document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;}
ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];parts=rurl.exec(url.toLowerCase());return!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?80:443))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));}
function hrefToHash(href){var parts=href.split("#"),subhash=parts[1]||"";return parts[0]+HASH_REPLACEMENT+encodeURIComponent(subhash);}
function hashToHref(hash){var subhashIndex,page,subhash;hash=(hash.charAt(0)==="#"?hash.substr(1):hash);subhashIndex=hash.lastIndexOf(HASH_REPLACEMENT);if(subhashIndex===-1){return hash;}else{page=hash.substr(0,subhashIndex);subhash=decodeURIComponent(hash.substr(subhashIndex+1));return page+(subhash?"#"+subhash:"");}}
function urlPrefix(){return location.protocol+"//"+location.host;}
function pathOf(absolute){var domain=urlPrefix()+"/";if(0!==absolute.indexOf(domain)){return false;}
if(-1!==absolute.indexOf(CONTAINERPATH+'#/')){if(/:$/.test(absolute)){absolute=absolute.slice(0,-1);return absolute.slice(domain.length+CONTAINERPATH.length);}else{return absolute.slice(domain.length+CONTAINERPATH.length);}}else{return"/"+absolute.slice(domain.length);}}
function resolve(url){return $('<a href="'+url+'"></a>').get(0).href;}
function log(){var args;if(!(activeOpts&&activeOpts.debug)){return;}
args=[new Date(),"hashsignal"].concat(Array.prototype.slice.apply(arguments));if(window.console){window.console.log(args);}else{window.alert(args.join(" "));}}
defaultOpts={excludeSelector:'.no-ajax',beforeUpdate:function(){log('beforeUpdate');},afterUpdate:function(){log('afterUpdate');},errorUpdate:function(){log('errorUpdate');},onDocumentWrite:function(msg){if(window.console){window.console.error("jQuery.hashsignal received document.write: "+msg);}},debug:false,disabled:false,resolverId:"hashsignal-abs",inlineStylesheets:false,replaceBlocksOnError:false};function blockAction(actionName,blockName){var transition=transitions[blockName],name;if(!transition){return;}
for(name in transition){if(transition.hasOwnProperty(name)){transition[name][actionName]();if(actionName==='unload'&&!transition[name].o.runOnce&&blockName!==ALWAYS_RELOAD){delete transition[name];}}}}
function getOldBlocks(doc){var blockRe=/^ (end)?block ([^ ]*) ([0-9a-f]{32} )?$/,blocks={};function walker(root,handle){var i,c;handle(root);for(i=0,c=root.childNodes.length;i<c;i+=1){walker(root.childNodes[i],handle);}}
function blockWalker(root,handle){walker(root,function(node){var match;if(node.nodeType===8){match=blockRe.exec(node.nodeValue);if(match){handle(match[2],match[3],!match[1],node);}}});}
doc=doc||document;blockWalker(doc,function(name,signature,isStart,node){if(blocks[name]===undefined){blocks[name]={nodes:[null,null],signature:signature};}
blocks[name].nodes[isStart?0:1]=node;});return blocks;}
function getNewBlocks(html,callback){var blocker=/<!-- (end)?block ([^ ]*) ([0123456789abcdef]{32} )?-->/gi,stylesheet=/<link.+?(rel=["']?stylesheet["'\s])?.*?href=["']?(.+?)["'\s].*?(rel=["']?stylesheet["'\s])?.*?>/gi,starts=[],closing,blocks={},stylesheetPromises=[];function last(){return starts[starts.length-1];}
html.replace(blocker,function(matched,ending,blockName,signatureMaybe,offset,fullString){if(ending&&starts.length===0){log("Unexpected block nesting on match: "+matched);}
if(!ending&&!signatureMaybe){log('WARNING: block found without signature',blockName);}
if(ending){closing=last();blockName=closing.name;starts.length=starts.length-1;blocks[blockName]={html:fullString.slice(closing.start,offset),signature:closing.signature};if(activeOpts.inlineStylesheets){blocks[blockName].html.replace(stylesheet,function(sMatched,preRel,href,postRel,offset,sFullString){if(!isCrossDomain(href)&&((preRel&&(preRel.toLowerCase().indexOf('stylesheet')!==-1))||(postRel&&(postRel.toLowerCase().indexOf('stylesheet')!==-1)))){stylesheetPromises.push($.ajax({cache:isCached(href),dataType:"text",url:href}).done(function(css){blocks[blockName].html=blocks[blockName].html.replace(sMatched,'<style type="text/css">'+css+'</style>');}));}});}}else{starts.push({name:blockName,start:offset+matched.length,signature:signatureMaybe});}});if(0!==starts.length){log("Unclosed block: "+last().name);}
if(stylesheetPromises.length>0){$.when.apply($,stylesheetPromises).then(function(){callback(blocks);},function(){callback(blocks);});}else{callback(blocks);}}
function replaceBlocks(html,forceReload,callback){log('replaceBlocks');var oldBlocks=getOldBlocks();callback=callback||$.noop;function siblingsBetween(start,end){var siblings=[],current=start;while(current&&(current!==end)){if(current!==start){siblings.push(current);}
current=current.nextSibling;}
return siblings;}
function getBodyAttrs(body){var bodyAttrs={},blacklist='contentEditable';$.each(body.attributes,function(i,attr){if(!(!!attr&&attr.name)||blacklist.indexOf(attr.name)!==-1){return;}
if(attr.value){bodyAttrs[attr.name]=attr.value;}});return bodyAttrs;}
getNewBlocks(html,function(newBlocks){var titleRe=/<title>(.*)<\/title>/,titleMatch=titleRe.exec(html),oldBody=$('body'),bodyRe=/<body([^>]*)>/,bodyMatch=bodyRe.exec(html),oldBodyAttrs,newBodyAttrs,fakeDoc,namespaceURI,fakeHtml,newBody,newValue,blockName,oldBlock,newBlock;if(titleMatch){document.title=titleMatch[1];}
if(bodyMatch){if(window.ActiveXObject){try{fakeDoc=new ActiveXObject("Microsoft.XMLDOM");fakeDoc.async=false;fakeDoc.loadXML('<body '+bodyMatch[1]+'></body>');newBody=fakeDoc.documentElement;}catch(e){}}else if(window.document.implementation&&window.document.implementation.createDocument){namespaceURI=window.document.namespaceURI||'http://www.w3.org/1999/xhtml';fakeDoc=window.document.implementation.createDocument(namespaceURI,'html',null);fakeHtml=fakeDoc.documentElement;fakeHtml.innerHTML='<body '+bodyMatch[1]+'></body>';newBody=$('body',fakeHtml).get(0);}
if(newBody){oldBodyAttrs=getBodyAttrs(oldBody.get(0));newBodyAttrs=getBodyAttrs(newBody);$.each(oldBodyAttrs,function(key,oldValue){newValue=newBodyAttrs[key];if(newValue){if(newValue!==oldValue){oldBody.attr(key,newValue);}
delete newBodyAttrs[key];}else{if(oldBody.attr(key)){oldBody.removeAttr(key);}}});oldBody.attr(newBodyAttrs);}}
methods._unloadBlock(ALWAYS_RELOAD);for(blockName in newBlocks){if(newBlocks.hasOwnProperty(blockName)){if(oldBlocks.hasOwnProperty(blockName)){oldBlock=oldBlocks[blockName];newBlock=newBlocks[blockName];if(oldBlock.signature&&((newBlock.signature&&(oldBlock.signature===newBlock.signature))&&!forceReload)){log('Not replacing block, signatures match.',blockName,oldBlock.signature);continue;}
methods._unloadBlock(blockName);$(siblingsBetween(oldBlock.nodes[0],oldBlock.nodes[1])).remove();log('Replacing block',blockName,newBlock.html);$(oldBlock.nodes[0]).after(newBlock.html+'<script type="text/javascript">'+'jQuery.hashsignal._loadBlock("'+
blockName.replace('"','\\"')+'");'+'</scr'+'ipt>');insertId+=1;$(oldBlock.nodes[0]).replaceWith("<!-- block "+blockName+" "+(newBlock.signature||"")+"-->");}else{log('WARNING: unmatched block',blockName);}}}
methods._loadBlock(ALWAYS_RELOAD);callback();});}
function updatePage(opts){var o,callbacks,urlParts,expectedLocation,subhash;opts.url=opts.url+(opts.url.indexOf('?')<0?'?':'&')+'hashsignal=true';o=$.extend({url:(previousLocation||'')+'#'+(previousSubhash||''),type:'GET',data:'',cache:false,forceReload:false},opts);callbacks=$.extend({beforeUpdate:function(){},afterUpdate:function(){},errorUpdate:function(){}},activeOpts);urlParts=o.url.split("#");expectedLocation=urlParts[0]||previousLocation;subhash=urlParts[1]||'';if(expectedLocation===previousLocation&&(subhash!==previousSubhash)){$(window).trigger('hashsignal.hashchange',[subhash]);previousSubhash=subhash;return;}
if(!o.forceReload&&(expectedLocation===previousLocation&&((o.type.toLowerCase()==='get')&&!o.data))){return;}
upcomingLocation=expectedLocation;function makeSuccessor(expectedLocation){return function(data,status,xhr){var jsonData;if(expectedLocation!==upcomingLocation){log("Success for ",expectedLocation," fired but last-requested was ",upcomingLocation," - aborting");return;}
try{jsonData=$.parseJSON(data);}catch(ex){}
if(jsonData&&jsonData.redirectLocation){log('redirecting page',jsonData.redirectLocation);previousLocation=expectedLocation;previousSubhash=subhash;location.replace('#'+hrefToHash(jsonData.redirectLocation));return;}
replaceBlocks(data,o.forceReload,function(){if(subhash){$(window).trigger('hashsignal.hashchange',[subhash]);}
previousLocation=expectedLocation;previousSubhash=subhash;callbacks.afterUpdate();});};}
callbacks.beforeUpdate();$.ajax({dataType:"text",data:o.data,cache:isCached(expectedLocation),error:function(xhr,status,error){log('updatePage error '+status+" "+error);callbacks.errorUpdate(xhr,status,error,previousLocation);if(activeOpts.replaceBlocksOnError){makeSuccessor(expectedLocation)(xhr.responseText,status,xhr);}else{history.back();}},success:makeSuccessor(expectedLocation),beforeSend:function(xhr){xhr.setRequestHeader('X-Hashsignal','Hashsignal');if(previousLocation){xhr.setRequestHeader('X-Hashsignal-Referer',resolve(previousLocation));}},type:o.type,url:expectedLocation});}
function Transition(opts){var script,that;this.hasRun=false;this.o=$.extend({load:function(){},unload:function(){},runOnce:false},opts);this.events=[];this.delegates=[];this.timeouts=[];this.intervals=[];this.scripts={};this.bind=function(obj,eventType,eventData,handler){this.events.push([obj,eventType,handler]);return $(obj).bind(eventType,eventData,handler);};this.delegate=function(obj,selector,eventType,eventData,handler){this.delegates.push([obj,selector,eventType,handler]);return $(obj).delegate(selector,eventType,eventData,handler);};this.setTimeout=function(callback,timeout){this.timeouts.push(window.setTimeout(callback,timeout));};this.setInterval=function(callback,timeout){this.intervals.push(window.setInterval(callback,timeout));};this.clearTimeout=window.clearTimeout;this.clearInterval=window.clearInterval;this.addScript=function(src,loadOnce){var parts;loadOnce=loadOnce===undefined?true:loadOnce;if(!(loadOnce&&this.scripts[src])){script=document.createElement('script');script.type='text/javascript';if(src.indexOf('?')){parts=src.split('?');src=parts[0];}
script.src=src;script=$(script);that=this;script.load(function(){that.scripts[src]=true;$(this).unbind('load');});$('body').append(script);}};this.load=function(){if(!(this.hasRun&&this.runOnce)){this.o.load(this);}
this.hasRun=true;};this.unload=function(){var i,e;if(!this.runOnce){for(i=0;i<this.events.length;i+=1){e=this.events[i];$(e[0]).unbind(e[1],e[2]);}
for(i=0;i<this.delegates.length;i+=1){e=this.delegates[i];$(e[0]).undelegate(e[1],e[2],e[3]);}
for(i=0;i<this.timeouts.length;i+=1){window.clearTimeout(this.timeouts[i]);}
for(i=0;i<this.intervals.length;i+=1){window.clearInterval(this.intervals[i]);}
this.o.unload(this);}};}
function Location(url){var parts,that,partFunc,k;function parseUri(str){var o=parseUri.options,m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;while(i--){uri[o.key[i]]=m[i]||"";}
uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2;}});return uri;}
parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};parts={port:'',protocol:'',hostname:'',pathname:'',search:''};that=this;partFunc=function(k){return function(value){if(value===undefined){return parts[k];}else{parts[k]=value;}};};for(k in parts){if(parts.hasOwnProperty(k)){that[k]=partFunc(k);}}
parts.hash='';this.hash=function(value){if(value===undefined){return parts.hash;}else{if(value.length===0){parts.hash='';}else{parts.hash=value[0]==='#'?value:'#'+value;}
return parts.hash;}};this.href=function(value){var obj;if(value===undefined){return this.protocol()+'//'+this.host()+this.pathname()+this.search()+this.hash();}else{obj=parseUri(value);parts={port:obj.port,protocol:obj.protocol+':',hostname:obj.host,pathname:obj.path,search:obj.query?"?"+obj.query:"",hash:obj.anchor?"#"+obj.anchor:""};return this.href();}};this.host=function(value){var obj;if(value===undefined){return this.hostname()+(this.port()===''?'':':'+this.port());}else{obj=parseUri(value+this.pathname()+this.search()+this.hash());parts.port=obj.port;parts.hostname=obj.host;return this.host();}};this.relativeHref=function(){return this.pathname()+this.search()+this.hash();};this.href(url);}
methods={init:function(explicitOpts){activeOpts=$.extend(defaultOpts,explicitOpts);if(activeOpts.disabled){return this;}
document.write=activeOpts.onDocumentWrite;$(window).bind('hashchange',function(e){log('hashchange',e);updatePage({url:hashToHref(location.hash),type:'GET'});});if(location.hash&&location.hash!=='#'){updatePage({url:hashToHref(location.hash),type:'GET'});}
$('a:not('+activeOpts.excludeSelector+')').live('click',function(){var href=resolve(this.getAttribute('href')||"."),hash;if(isCrossDomain(href)){return true;}
hash=hrefToHash(pathOf(href));if(hash==="/:"&&((window.location.hash==='#/'||window.location.hash==='#/:')&&(!$.cookie('EMUSIC_REMEMBER_ME_COOKIE')))){window.location.href="/";}
location.hash=hash;return false;});liveFormsSel='form:not('+activeOpts.excludeSelector+')';$(liveFormsSel).live('submit',function(event){var href=resolve($(this).attr('action')||"."),path=pathOf(href),type,data,submitter;if(isCrossDomain(href)||path===false){return true;}
if($(this).has("input[type='file']").length){$(this).attr('action',path);return true;}
type=$(this).attr('method');data=$(this).serialize();if(!data){return false;}
submitter=this.submitter;if(submitter){data+=(data.length===0?"":"&")+(encodeURIComponent($(submitter).attr("name"))+"="+encodeURIComponent($(submitter).attr("value"))+'');}
if(type&&type.toLowerCase()==='get'){path=path.substring(0,path.indexOf('?'))||path;path+='?'+data;location.hash=hrefToHash(path);}else{activeOpts.beforeUpdate();updatePage({url:path,type:type,data:data});}
return false;});$(liveFormsSel+" input[type=submit], "+liveFormsSel+" button[type=submit]").live('click',function(event){var form=$(this).closest("form").get(0);if(form){form.submitter=this;}
return true;});return this;},isEnabled:function(){return activeOpts&&activeOpts.hashsignalEnabled;},hashchange:function(callback){$(window).bind('hashsignal.hashchange',callback);return this;},location:(function(properties){var that={};$(properties).each(function(i,property){that[property]=function(value){var href=resolve(hashToHref(location.hash)),l=new Location(href);if(!l){log("Could not parse current location! "+href);}
if(value===undefined){return l[property]();}else{l[property](value);location.hash=hrefToHash(l.relativeHref());}};});that.assign=that.href;that.reload=function(){updatePage({forceReload:true});};that.replace=function(url){var l=new Location(url);location.replace('#'+hrefToHash(l.relativeHref()));};return that;}(['hash','href','pathname','search'])),registerTransition:function(name,blockNames,opts){log('hashsignal.registerTransition',name,blockNames);var transition=new Transition(opts),i,blockName;if(!!opts.alwaysReload){blockNames=[ALWAYS_RELOAD];}
for(i=0;i<blockNames.length;i+=1){blockName=blockNames[i];if(transitions[blockName]===undefined){transitions[blockName]={};}
if(transitions[blockName][name]===undefined){transitions[blockName][name]=transition;}}
return this;},_unloadBlock:function(blockName){log('hashsignal.unloadBlock',blockName);blockAction('unload',blockName);},_loadBlock:function(blockName){log('hashsignal.loadBlock',blockName);blockAction('load',blockName);}};$.hashsignal=methods;}(window,jQuery));(function($){var types=['DOMMouseScroll','mousewheel'];if($.event.fixHooks){for(var i=types.length;i;){$.event.fixHooks[types[--i]]=$.event.mouseHooks;}}
$.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var i=types.length;i;){this.addEventListener(types[--i],handler,false);}}else{this.onmousewheel=handler;}},teardown:function(){if(this.removeEventListener){for(var i=types.length;i;){this.removeEventListener(types[--i],handler,false);}}else{this.onmousewheel=null;}}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,returnValue=true,deltaX=0,deltaY=0;event=$.event.fix(orgEvent);event.type="mousewheel";if(orgEvent.wheelDelta){delta=orgEvent.wheelDelta/120;}
if(orgEvent.detail){delta=-orgEvent.detail/3;}
deltaY=delta;if(orgEvent.axis!==undefined&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaY=0;deltaX=-1*delta;}
if(orgEvent.wheelDeltaY!==undefined){deltaY=orgEvent.wheelDeltaY/120;}
if(orgEvent.wheelDeltaX!==undefined){deltaX=-1*orgEvent.wheelDeltaX/120;}
args.unshift(event,delta,deltaX,deltaY);return($.event.dispatch||$.event.handle).apply(this,args);}})(jQuery);(function(b,a,c){b.fn.jScrollPane=function(f){function d(D,N){var ay,P=this,X,aj,w,al,S,Y,z,r,az,aE,au,j,I,i,k,Z,T,ap,W,u,B,aq,ae,am,G,m,at,ax,y,av,aH,g,K,ai=true,O=true,aG=false,l=false,ao=D.clone(false,false).empty(),ab=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aH=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");g=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function ar(aQ){var aO,aP,aK,aM,aL,aJ,aI,aN;ay=aQ;if(X===c){aI=D.scrollTop();aN=D.scrollLeft();D.css({overflow:"hidden",padding:0});aj=D.innerWidth()+g;w=D.innerHeight();D.width(aj);X=b('<div class="jspPane" />').css("padding",aH).append(D.children());al=b('<div class="jspContainer" />').css({width:aj+"px",height:w+"px"}).append(X).appendTo(D)}else{D.css("width","");aJ=D.innerWidth()+g!=aj||D.outerHeight()!=w;if(aJ){aj=D.innerWidth()+g;w=D.innerHeight();al.css({width:aj+"px",height:w+"px"})}if(!aJ&&K==S&&X.outerHeight()==Y){D.width(aj);return}K=S;X.css("width","");D.width(aj);al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}aO=X.clone(false,false).css("position","absolute");aP=b('<div style="width:1px; position: relative;" />').append(aO);b("body").append(aP);S=Math.max(X.outerWidth(),aO.outerWidth());aP.remove();Y=X.outerHeight();z=S/aj;r=Y/w;az=r>1;aE=z>1;if(!(aE||az)){D.removeClass("jspScrollable");X.css({top:0,width:al.width()-g});o();E();Q();x();ah()}else{D.addClass("jspScrollable");aK=ay.maintainPosition&&(I||Z);if(aK){aM=aC();aL=aA()}aF();A();F();if(aK){M(aM,false);L(aL,false)}J();af();an();if(ay.enableKeyboardNavigation){R()}if(ay.clickOnTrack){q()}C();if(ay.hijackInternalLinks){n()}}if(ay.autoReinitialise&&!av){av=setInterval(function(){ar(ay)},ay.autoReinitialiseDelay)}else{if(!ay.autoReinitialise&&av){clearInterval(av)}}aI&&D.scrollTop(0)&&L(aI,false);aN&&D.scrollLeft(0)&&M(aN,false);D.trigger("jsp-initialised",[aE||az])}function aF(){if(az){al.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'),b('<div class="jspDragBottom" />'))),b('<div class="jspCap jspCapBottom" />')));T=al.find(">.jspVerticalBar");ap=T.find(">.jspTrack");au=ap.find(">.jspDrag");if(ay.showArrows){aq=b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",aD(0,-1)).bind("click.jsp",aB);ae=b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",aD(0,1)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){aq.bind("mouseover.jsp",aD(0,-1,aq));ae.bind("mouseover.jsp",aD(0,1,ae))}ak(ap,ay.verticalArrowPositions,aq,ae)}u=w;al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){u-=b(this).outerHeight()});au.hover(function(){au.addClass("jspHover")},function(){au.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);au.addClass("jspActive");var s=aI.pageY-au.position().top;b("html").bind("mousemove.jsp",function(aJ){U(aJ.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});p()}}function p(){ap.height(u+"px");I=0;W=ay.verticalGutter+ap.outerWidth();X.width(aj-W-g);if(T.position().left===0){X.css("margin-left",W+"px")}}function A(){if(aE){al.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'),b('<div class="jspDragRight" />'))),b('<div class="jspCap jspCapRight" />')));am=al.find(">.jspHorizontalBar");G=am.find(">.jspTrack");i=G.find(">.jspDrag");if(ay.showArrows){ax=b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",aD(-1,0)).bind("click.jsp",aB);y=b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",aD(1,0)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){ax.bind("mouseover.jsp",aD(-1,0,ax));y.bind("mouseover.jsp",aD(1,0,y))}ak(G,ay.horizontalArrowPositions,ax,y)}i.hover(function(){i.addClass("jspHover")},function(){i.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);i.addClass("jspActive");var s=aI.pageX-i.position().left;b("html").bind("mousemove.jsp",function(aJ){V(aJ.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});m=al.innerWidth();ag()}}function ag(){al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){m-=b(this).outerWidth()});G.width(m+"px");Z=0}function F(){if(aE&&az){var aI=G.outerHeight(),s=ap.outerWidth();u-=aI;b(am).find(">.jspCap:visible,>.jspArrow").each(function(){m+=b(this).outerWidth()});m-=s;w-=s;aj-=aI;G.parent().append(b('<div class="jspCorner" />').css("width",aI+"px"));p();ag()}if(aE){X.width((al.outerWidth()-g)+"px")}Y=X.outerHeight();r=Y/w;if(aE){at=Math.ceil(1/z*m);if(at>ay.horizontalDragMaxWidth){at=ay.horizontalDragMaxWidth}else{if(at<ay.horizontalDragMinWidth){at=ay.horizontalDragMinWidth}}i.width(at+"px");k=m-at;ad(Z)}if(az){B=Math.ceil(1/r*u);if(B>ay.verticalDragMaxHeight){B=ay.verticalDragMaxHeight}else{if(B<ay.verticalDragMinHeight){B=ay.verticalDragMinHeight}}au.height(B+"px");j=u-B;ac(I)}}function ak(aJ,aL,aI,s){var aN="before",aK="after",aM;if(aL=="os"){aL=/Mac/.test(navigator.platform)?"after":"split"}if(aL==aN){aK=aL}else{if(aL==aK){aN=aL;aM=aI;aI=s;s=aM}}aJ[aN](aI)[aK](s)}function aD(aI,s,aJ){return function(){H(aI,s,this,aJ);this.blur();return false}}function H(aL,aK,aO,aN){aO=b(aO).addClass("jspActive");var aM,aJ,aI=true,s=function(){if(aL!==0){P.scrollByX(aL*ay.arrowButtonSpeed)}if(aK!==0){P.scrollByY(aK*ay.arrowButtonSpeed)}aJ=setTimeout(s,aI?ay.initialDelay:ay.arrowRepeatFreq);aI=false};s();aM=aN?"mouseout.jsp":"mouseup.jsp";aN=aN||b("html");aN.bind(aM,function(){aO.removeClass("jspActive");aJ&&clearTimeout(aJ);aJ=null;aN.unbind(aM)})}function q(){x();if(az){ap.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageY-aO.top-I,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageY-aR.top-B/2,aP=w*ay.scrollPagePercent,aQ=j*aP/(Y-w);if(aM<0){if(I-aQ>aS){P.scrollByY(-aP)}else{U(aS)}}else{if(aM>0){if(I+aQ<aS){P.scrollByY(aP)}else{U(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}if(aE){G.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageX-aO.left-Z,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageX-aR.left-at/2,aP=aj*ay.scrollPagePercent,aQ=k*aP/(S-aj);if(aM<0){if(Z-aQ>aS){P.scrollByX(-aP)}else{V(aS)}}else{if(aM>0){if(Z+aQ<aS){P.scrollByX(aP)}else{V(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}}function x(){if(G){G.unbind("mousedown.jsp")}if(ap){ap.unbind("mousedown.jsp")}}function aw(){b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(au){au.removeClass("jspActive")}if(i){i.removeClass("jspActive")}}function U(s,aI){if(!az){return}if(s<0){s=0}else{if(s>j){s=j}}if(aI===c){aI=ay.animateScroll}if(aI){P.animate(au,"top",s,ac)}else{au.css("top",s);ac(s)}}function ac(aI){if(aI===c){aI=au.position().top}al.scrollTop(0);I=aI;var aL=I===0,aJ=I==j,aK=aI/j,s=-aK*(Y-w);if(ai!=aL||aG!=aJ){ai=aL;aG=aJ;D.trigger("jsp-arrow-change",[ai,aG,O,l])}v(aL,aJ);X.css("top",s);D.trigger("jsp-scroll-y",[-s,aL,aJ]).trigger("scroll")}function V(aI,s){if(!aE){return}if(aI<0){aI=0}else{if(aI>k){aI=k}}if(s===c){s=ay.animateScroll}if(s){P.animate(i,"left",aI,ad)}else{i.css("left",aI);ad(aI)}}function ad(aI){if(aI===c){aI=i.position().left}al.scrollTop(0);Z=aI;var aL=Z===0,aK=Z==k,aJ=aI/k,s=-aJ*(S-aj);if(O!=aL||l!=aK){O=aL;l=aK;D.trigger("jsp-arrow-change",[ai,aG,O,l])}t(aL,aK);X.css("left",s);D.trigger("jsp-scroll-x",[-s,aL,aK]).trigger("scroll")}function v(aI,s){if(ay.showArrows){aq[aI?"addClass":"removeClass"]("jspDisabled");ae[s?"addClass":"removeClass"]("jspDisabled")}}function t(aI,s){if(ay.showArrows){ax[aI?"addClass":"removeClass"]("jspDisabled");y[s?"addClass":"removeClass"]("jspDisabled")}}function L(s,aI){var aJ=s/(Y-w);U(aJ*j,aI)}function M(aI,s){var aJ=aI/(S-aj);V(aJ*k,s)}function aa(aU,aP,aJ){var aN,aK,aL,s=0,aT=0,aI,aO,aR,aQ,aS;try{aN=b(aU)}catch(aM){return}aK=aN.outerHeight();aL=aN.outerWidth();al.scrollTop(0);al.scrollLeft(0);while(!aN.is(".jspPane")){s+=aN.position().top;aT+=aN.position().left;aN=aN.offsetParent();if(/^body|html$/i.test(aN[0].nodeName)){return}}aI=aA();aO=aI+w;if(s<aI||aP){aQ=s-ay.verticalGutter}else{if(s+aK>aO){aQ=s-w+aK+ay.verticalGutter}}if(aQ){L(aQ,aJ)}viewportLeft=aC();aR=viewportLeft+aj;if(aT<viewportLeft||aP){aS=aT-ay.horizontalGutter}else{if(aT+aL>aR){aS=aT-aj+aL+ay.horizontalGutter}}if(aS){M(aS,aJ)}}function aC(){return-X.position().left}function aA(){return-X.position().top}function af(){al.unbind(ab).bind(ab,function(aL,aM,aK,aI){var aJ=Z,s=I;P.scrollBy(aK*ay.mouseWheelSpeed,-aI*ay.mouseWheelSpeed,false);return aJ==Z&&s==I})}function o(){al.unbind(ab)}function aB(){return false}function J(){X.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){aa(s.target,false)})}function E(){X.find(":input,a").unbind("focus.jsp")}function R(){var s,aI;X.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aM){if(aM.target!==this){return}var aL=Z,aK=I;switch(aM.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aM.keyCode;aJ();break;case 35:L(Y-w);s=null;break;case 36:L(0);s=null;break}aI=aM.keyCode==s&&aL!=Z||aK!=I;return!aI}).bind("keypress.jsp",function(aK){if(aK.keyCode==s){aJ()}return!aI});if(ay.hideFocus){D.css("outline","none");if("hideFocus"in al[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus"in al[0]){D.attr("hideFocus",false)}}function aJ(){var aL=Z,aK=I;switch(s){case 40:P.scrollByY(ay.keyboardSpeed,false);break;case 38:P.scrollByY(-ay.keyboardSpeed,false);break;case 34:case 32:P.scrollByY(w*ay.scrollPagePercent,false);break;case 33:P.scrollByY(-w*ay.scrollPagePercent,false);break;case 39:P.scrollByX(ay.keyboardSpeed,false);break;case 37:P.scrollByX(-ay.keyboardSpeed,false);break}aI=aL!=Z||aK!=I;return aI}}function Q(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aJ,aI;try{aJ=b(location.hash)}catch(s){return}if(aJ.length&&X.find(location.hash)){if(al.scrollTop()===0){aI=setInterval(function(){if(al.scrollTop()>0){aa(location.hash,true);b(document).scrollTop(al.position().top);clearInterval(aI)}},50)}else{aa(location.hash,true);b(document).scrollTop(al.position().top)}}}}function ah(){b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function n(){ah();b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var s=this.href.split("#"),aI;if(s.length>1){aI=s[1];if(aI.length>0&&X.find("#"+aI).length>0){aa("#"+aI,true);return false}}})}function an(){var aJ,aI,aL,aK,aM,s=false;al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aN){var aO=aN.originalEvent.touches[0];aJ=aC();aI=aA();aL=aO.pageX;aK=aO.pageY;aM=false;s=true}).bind("touchmove.jsp",function(aQ){if(!s){return}var aP=aQ.originalEvent.touches[0],aO=Z,aN=I;P.scrollTo(aJ+aL-aP.pageX,aI+aK-aP.pageY);aM=aM||Math.abs(aL-aP.pageX)>5||Math.abs(aK-aP.pageY)>5;return aO==Z&&aN==I}).bind("touchend.jsp",function(aN){s=false}).bind("click.jsp-touchclick",function(aN){if(aM){aM=false;return false}})}function h(){var s=aA(),aI=aC();D.removeClass("jspScrollable").unbind(".jsp");D.replaceWith(ao.append(X.children()));ao.scrollTop(s);ao.scrollLeft(aI)}b.extend(P,{reinitialise:function(aI){aI=b.extend({},ay,aI);ar(aI)},scrollToElement:function(aJ,aI,s){aa(aJ,aI,s)},scrollTo:function(aJ,s,aI){M(aJ,aI);L(s,aI)},scrollToX:function(aI,s){M(aI,s)},scrollToY:function(s,aI){L(s,aI)},scrollToPercentX:function(aI,s){M(aI*(S-aj),s)},scrollToPercentY:function(aI,s){L(aI*(Y-w),s)},scrollBy:function(aI,s,aJ){P.scrollByX(aI,aJ);P.scrollByY(s,aJ)},scrollByX:function(s,aJ){var aI=aC()+s,aK=aI/(S-aj);V(aK*k,aJ)},scrollByY:function(s,aJ){var aI=aA()+s,aK=aI/(Y-w);U(aK*j,aJ)},positionDragX:function(s,aI){V(s,aI)},positionDragY:function(aI,s){V(aI,s)},animate:function(aI,aL,s,aK){var aJ={};aJ[aL]=s;aI.animate(aJ,{duration:ay.animateDuration,ease:ay.animateEase,queue:false,step:aK})},getContentPositionX:function(){return aC()},getContentPositionY:function(){return aA()},getContentWidth:function(){return S()},getContentHeight:function(){return Y()},getPercentScrolledX:function(){return aC()/(S-aj)},getPercentScrolledY:function(){return aA()/(Y-w)},getIsScrollableH:function(){return aE},getIsScrollableV:function(){return az},getContentPane:function(){return X},scrollToBottom:function(s){U(j,s)},hijackInternalLinks:function(){n()},destroy:function(){h()}});ar(N)}f=b.extend({},b.fn.jScrollPane.defaults,f);b.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){f[this]=f[this]||f.speed});var e;this.each(function(){var g=b(this),h=g.data("jsp");if(h){h.reinitialise(f)}else{h=new d(g,f);g.data("jsp",h)}e=e?e.add(g):g});return e};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);(function($,undefined){$.fn.jPlayer=function(options){var name="jPlayer";var isMethodCall=typeof options==="string",args=Array.prototype.slice.call(arguments,1),returnValue=this;options=!isMethodCall&&args.length?$.extend.apply(null,[true,options].concat(args)):options;if(isMethodCall&&options.charAt(0)==="_"){return returnValue;}
if(isMethodCall){this.each(function(){var instance=$.data(this,name),methodValue=instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance;if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false;}});}else{this.each(function(){var instance=$.data(this,name);if(instance){instance.option(options||{});}else{$.data(this,name,new $.jPlayer(options,this));}});}
return returnValue;};$.jPlayer=function(options,element){if(arguments.length){this.element=$(element);this.options=$.extend(true,{},this.options,options);var self=this;this.element.bind("remove.jPlayer",function(){self.destroy();});this._init();}};$.jPlayer.emulateMethods="load play pause";$.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";$.jPlayer.emulateOptions="muted volume";$.jPlayer.reservedEvent="ready resize error warning";$.jPlayer.event={ready:"jPlayer_ready",resize:"jPlayer_resize",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};$.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplaythrough","ratechange"];$.jPlayer.pause=function(){$.each($.jPlayer.prototype.instances,function(i,element){if(element.data("jPlayer").status.srcSet){element.jPlayer("pause");}});};$.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};$.jPlayer.convertTime=function(s){var myTime=new Date(s*1000);var hour=myTime.getUTCHours();var min=myTime.getUTCMinutes();var sec=myTime.getUTCSeconds();var strHour=($.jPlayer.timeFormat.padHour&&hour<10)?"0"+hour:hour;var strMin=($.jPlayer.timeFormat.padMin&&min<10)?"0"+min:min;var strSec=($.jPlayer.timeFormat.padSec&&sec<10)?"0"+sec:sec;return(($.jPlayer.timeFormat.showHour)?strHour+$.jPlayer.timeFormat.sepHour:"")+(($.jPlayer.timeFormat.showMin)?strMin+$.jPlayer.timeFormat.sepMin:"")+(($.jPlayer.timeFormat.showSec)?strSec+$.jPlayer.timeFormat.sepSec:"");};$.jPlayer.uaBrowser=function(userAgent){var ua=userAgent.toLowerCase();var rwebkit=/(webkit)[ \/]([\w.]+)/;var ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/;var rmsie=/(msie) ([\w.]+)/;var rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/;var match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};$.jPlayer.uaPlatform=function(userAgent){var ua=userAgent.toLowerCase();var rplatform=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/;var rtablet=/(ipad|playbook)/;var randroid=/(android)/;var rmobile=/(mobile)/;var platform=rplatform.exec(ua)||[];var tablet=rtablet.exec(ua)||!rmobile.exec(ua)&&randroid.exec(ua)||[];return{platform:platform[1]||"",tablet:tablet[1]||""};};$.jPlayer.browser={};$.jPlayer.platform={};var browserMatch=$.jPlayer.uaBrowser(navigator.userAgent);if(browserMatch.browser){$.jPlayer.browser[browserMatch.browser]=true;$.jPlayer.browser.version=browserMatch.version;}
var platformMatch=$.jPlayer.uaPlatform(navigator.userAgent);if(platformMatch.platform){$.jPlayer.platform[platformMatch.platform]=true;$.jPlayer.platform.mobile=!platformMatch.tablet;$.jPlayer.platform.tablet=!!platformMatch.tablet;}
$.jPlayer.prototype={count:0,version:{script:"2.0.15",needFlash:"2.0.9",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:'metadata',volume:0.8,muted:false,wmode:"window",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen"},fullScreen:false,idPrefix:"jp",noConflict:"jQuery",emulateHtml:false,errorAlerts:false,warningAlerts:false},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"90%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:false},solution:{html:true,flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:'audio'},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:'audio'},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:'audio'},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:'audio'},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:'audio'},fla:{codec:'audio/x-flv',flashCanPlay:true,media:'audio'},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:'video'},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:false,media:'video'},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:'video'},flv:{codec:'video/x-flv',flashCanPlay:true,media:'video'}},_init:function(){var self=this;this.element.empty();this.status=$.extend({},this.status);this.internal=$.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);$.each(this.options.supplied.toLowerCase().split(","),function(index1,value1){var format=value1.replace(/^\s+|\s+$/g,"");if(self.format[format]){var dupFound=false;$.each(self.formats,function(index2,value2){if(format===value2){dupFound=true;return false;}});if(!dupFound){self.formats.push(format);}}});$.each(this.options.solution.toLowerCase().split(","),function(index1,value1){var solution=value1.replace(/^\s+|\s+$/g,"");if(self.solution[solution]){var dupFound=false;$.each(self.solutions,function(index2,value2){if(solution===value2){dupFound=true;return false;}});if(!dupFound){self.solutions.push(solution);}}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;if(this.element.attr("id")===""){this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);}
this.internal.self=$.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=$.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:undefined});this.internal.video=$.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:undefined});this.internal.flash=$.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:undefined,swf:this.options.swfPath+((this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/")?"/":"")+"Jplayer.swf"});this.internal.poster=$.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:undefined});$.each($.jPlayer.event,function(eventName,eventType){if(self.options[eventName]!==undefined){self.element.bind(eventType+".jPlayer",self.options[eventName]);self.options[eventName]=undefined;}});this.require.audio=false;this.require.video=false;$.each(this.formats,function(priority,format){self.require[self.format[format].media]=true;});if(this.require.video){this.options=$.extend(true,{},this.optionsVideo,this.options);}else{this.options=$.extend(true,{},this.optionsAudio,this.options);}
this._setSize();this.htmlElement.poster=document.createElement('img');this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!self.status.video||self.status.waitForPlay){self.internal.poster.jq.show();}};this.element.append(this.htmlElement.poster);this.internal.poster.jq=$("#"+this.internal.poster.id);this.internal.poster.jq.css({'width':this.status.width,'height':this.status.height});this.internal.poster.jq.hide();this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement('audio');this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType;}
this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement('video');this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType;}
this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};$.each(this.formats,function(priority,format){self.html.canPlay[format]=self.html[self.format[format].media].available&&""!==self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec);self.flash.canPlay[format]=self.format[format].flashCanPlay&&self.flash.available;});this.html.desired=false;this.flash.desired=false;$.each(this.solutions,function(solutionPriority,solution){if(solutionPriority===0){self[solution].desired=true;}else{var audioCanPlay=false;var videoCanPlay=false;$.each(self.formats,function(formatPriority,format){if(self[self.solutions[0]].canPlay[format]){if(self.format[format].media==='video'){videoCanPlay=true;}else{audioCanPlay=true;}}});self[solution].desired=(self.require.audio&&!audioCanPlay)||(self.require.video&&!videoCanPlay);}});this.html.support={};this.flash.support={};$.each(this.formats,function(priority,format){self.html.support[format]=self.html.canPlay[format]&&self.html.desired;self.flash.support[format]=self.flash.canPlay[format]&&self.flash.desired;});this.html.used=false;this.flash.used=false;$.each(this.solutions,function(solutionPriority,solution){$.each(self.formats,function(formatPriority,format){if(self[solution].support[format]){self[solution].used=true;return false;}});});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;this._cssSelectorAncestor(this.options.cssSelectorAncestor);if(!(this.html.used||this.flash.used)){this._error({type:$.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:$.jPlayer.errorMsg.NO_SOLUTION,hint:$.jPlayer.errorHint.NO_SOLUTION});}
if(this.flash.used){var htmlObj,flashVars='jQuery='+encodeURI(this.options.noConflict)+'&id='+encodeURI(this.internal.self.id)+'&vol='+this.options.volume+'&muted='+this.options.muted;if($.browser.msie&&Number($.browser.version)<=8){var objStr='<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0"></object>';var paramStr=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+flashVars+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];htmlObj=document.createElement(objStr);for(var i=0;i<paramStr.length;i++){htmlObj.appendChild(document.createElement(paramStr[i]));}}else{var createParam=function(el,n,v){var p=document.createElement("param");p.setAttribute("name",n);p.setAttribute("value",v);el.appendChild(p);};htmlObj=document.createElement("object");htmlObj.setAttribute("id",this.internal.flash.id);htmlObj.setAttribute("data",this.internal.flash.swf);htmlObj.setAttribute("type","application/x-shockwave-flash");htmlObj.setAttribute("width","1");htmlObj.setAttribute("height","1");createParam(htmlObj,"flashvars",flashVars);createParam(htmlObj,"allowscriptaccess","always");createParam(htmlObj,"bgcolor",this.options.backgroundColor);createParam(htmlObj,"wmode",this.options.wmode);}
this.element.append(htmlObj);this.internal.flash.jq=$(htmlObj);}
if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=$("#"+this.internal.audio.id);}
if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=$("#"+this.internal.video.id);this.internal.video.jq.css({'width':'0px','height':'0px'});}}
if(this.options.emulateHtml){this._emulateHtmlBridge();}
if(this.html.used&&!this.flash.used){window.setTimeout(function(){self.internal.ready=true;self.version.flash="n/a";self._trigger($.jPlayer.event.ready);},100);}
this._updateInterface();this._updateButtons(false);this._updateVolume(this.options.volume);this._updateMute(this.options.muted);if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.hide();}
$.jPlayer.prototype.count++;},destroy:function(){this._resetStatus();this._updateInterface();this._seeked();if(this.css.jq.currentTime.length){this.css.jq.currentTime.text("");}
if(this.css.jq.duration.length){this.css.jq.duration.text("");}
if(this.status.srcSet){this.pause();}
$.each(this.css.jq,function(fn,jq){if(jq.length){jq.unbind(".jPlayer");}});if(this.options.emulateHtml){this._destroyHtmlBridge();}
this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();this.instances[this.internal.instance]=undefined;},enable:function(){},disable:function(){},_addHtmlEventListeners:function(mediaElement,entity){var self=this;mediaElement.preload=this.options.preload;mediaElement.muted=this.options.muted;mediaElement.volume=this.options.volume;mediaElement.addEventListener("progress",function(){if(entity.gate&&!self.status.waitForLoad){self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.progress);}},false);mediaElement.addEventListener("timeupdate",function(){if(entity.gate&&!self.status.waitForLoad){self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.timeupdate);}},false);mediaElement.addEventListener("durationchange",function(){if(entity.gate&&!self.status.waitForLoad){self.status.duration=this.duration;self._getHtmlStatus(mediaElement);self._updateInterface();self._trigger($.jPlayer.event.durationchange);}},false);mediaElement.addEventListener("play",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(true);self._trigger($.jPlayer.event.play);}},false);mediaElement.addEventListener("playing",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(true);self._seeked();self._trigger($.jPlayer.event.playing);}},false);mediaElement.addEventListener("pause",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(false);self._trigger($.jPlayer.event.pause);}},false);mediaElement.addEventListener("waiting",function(){if(entity.gate&&!self.status.waitForLoad){self._seeking();self._trigger($.jPlayer.event.waiting);}},false);mediaElement.addEventListener("canplay",function(){if(entity.gate&&!self.status.waitForLoad){mediaElement.volume=self._volumeFix(self.options.volume);self._trigger($.jPlayer.event.canplay);}},false);mediaElement.addEventListener("seeking",function(){if(entity.gate&&!self.status.waitForLoad){self._seeking();self._trigger($.jPlayer.event.seeking);}},false);mediaElement.addEventListener("seeked",function(){if(entity.gate&&!self.status.waitForLoad){self._seeked();self._trigger($.jPlayer.event.seeked);}},false);mediaElement.addEventListener("suspend",function(){if(entity.gate&&!self.status.waitForLoad){self._seeked();self._trigger($.jPlayer.event.suspend);}},false);mediaElement.addEventListener("ended",function(){if(entity.gate&&!self.status.waitForLoad){if(!$.jPlayer.browser.webkit){self.htmlElement.media.currentTime=0;}
self.htmlElement.media.pause();self._updateButtons(false);self._getHtmlStatus(mediaElement,true);self._updateInterface();self._trigger($.jPlayer.event.ended);}},false);mediaElement.addEventListener("error",function(){if(entity.gate&&!self.status.waitForLoad){self._updateButtons(false);self._seeked();if(self.status.srcSet){clearTimeout(self.internal.htmlDlyCmdId);self.status.waitForLoad=true;self.status.waitForPlay=true;if(self.status.video){self.internal.video.jq.css({'width':'0px','height':'0px'});}
if(self._validString(self.status.media.poster)){self.internal.poster.jq.show();}
if(self.css.jq.videoPlay.length){self.css.jq.videoPlay.show();}
self._error({type:$.jPlayer.error.URL,context:self.status.src,message:$.jPlayer.errorMsg.URL,hint:$.jPlayer.errorHint.URL});}}},false);$.each($.jPlayer.htmlEvent,function(i,eventType){mediaElement.addEventListener(this,function(){if(entity.gate&&!self.status.waitForLoad){self._trigger($.jPlayer.event[eventType]);}},false);});},_getHtmlStatus:function(media,override){var ct=0,d=0,cpa=0,sp=0,cpr=0;if(media.duration){this.status.duration=media.duration;}
ct=media.currentTime;cpa=(this.status.duration>0)?100*ct/this.status.duration:0;if((typeof media.seekable==="object")&&(media.seekable.length>0)){sp=(this.status.duration>0)?100*media.seekable.end(media.seekable.length-1)/this.status.duration:100;cpr=100*media.currentTime/media.seekable.end(media.seekable.length-1);}else{sp=100;cpr=cpa;}
if(override){ct=0;cpr=0;cpa=0;}
this.status.seekPercent=sp;this.status.currentPercentRelative=cpr;this.status.currentPercentAbsolute=cpa;this.status.currentTime=ct;this.status.readyState=media.readyState;this.status.networkState=media.networkState;this.status.playbackRate=media.playbackRate;this.status.ended=media.ended;},_resetStatus:function(){this.status=$.extend({},this.status,$.jPlayer.prototype.status);},_trigger:function(eventType,error,warning){var event=$.Event(eventType);event.jPlayer={};event.jPlayer.version=$.extend({},this.version);event.jPlayer.options=$.extend(true,{},this.options);event.jPlayer.status=$.extend(true,{},this.status);event.jPlayer.html=$.extend(true,{},this.html);event.jPlayer.flash=$.extend(true,{},this.flash);if(error){event.jPlayer.error=$.extend({},error);}
if(warning){event.jPlayer.warning=$.extend({},warning);}
this.element.trigger(event);},jPlayerFlashEvent:function(eventType,status){if(eventType===$.jPlayer.event.ready&&!this.internal.ready){this.internal.ready=true;this.internal.flash.jq.css({'width':'0px','height':'0px'});this.version.flash=status.version;if(this.version.needFlash!==this.version.flash){this._error({type:$.jPlayer.error.VERSION,context:this.version.flash,message:$.jPlayer.errorMsg.VERSION+this.version.flash,hint:$.jPlayer.errorHint.VERSION});}
this._trigger(eventType);}
if(this.flash.gate){switch(eventType){case $.jPlayer.event.progress:this._getFlashStatus(status);this._updateInterface();this._trigger(eventType);break;case $.jPlayer.event.timeupdate:this._getFlashStatus(status);this._updateInterface();this._trigger(eventType);break;case $.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(eventType);break;case $.jPlayer.event.pause:this._updateButtons(false);this._trigger(eventType);break;case $.jPlayer.event.ended:this._updateButtons(false);this._trigger(eventType);break;case $.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;if(this.status.video){this.internal.flash.jq.css({'width':'0px','height':'0px'});}
if(this._validString(this.status.media.poster)){this.internal.poster.jq.show();}
if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.show();}
if(this.status.video){this._flash_setVideo(this.status.media);}else{this._flash_setAudio(this.status.media);}
this._error({type:$.jPlayer.error.URL,context:status.src,message:$.jPlayer.errorMsg.URL,hint:$.jPlayer.errorHint.URL});break;case $.jPlayer.event.seeking:this._seeking();this._trigger(eventType);break;case $.jPlayer.event.seeked:this._seeked();this._trigger(eventType);break;case $.jPlayer.event.ready:break;default:this._trigger(eventType);}}
return false;},_getFlashStatus:function(status){this.status.seekPercent=status.seekPercent;this.status.currentPercentRelative=status.currentPercentRelative;this.status.currentPercentAbsolute=status.currentPercentAbsolute;this.status.currentTime=status.currentTime;this.status.duration=status.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false;},_updateButtons:function(playing){this.status.paused=!playing;if(this.css.jq.play.length&&this.css.jq.pause.length){if(playing){this.css.jq.play.hide();this.css.jq.pause.show();}else{this.css.jq.play.show();this.css.jq.pause.hide();}}},_updateInterface:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.width(this.status.seekPercent+"%");}
if(this.css.jq.playBar.length){this.css.jq.playBar.width(this.status.currentPercentRelative+"%");}
if(this.css.jq.currentTime.length){this.css.jq.currentTime.text($.jPlayer.convertTime(this.status.currentTime));}
if(this.css.jq.duration.length){this.css.jq.duration.text($.jPlayer.convertTime(this.status.duration));}},_seeking:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.addClass("jp-seeking-bg");}},_seeked:function(){if(this.css.jq.seekBar.length){this.css.jq.seekBar.removeClass("jp-seeking-bg");}},setMedia:function(media){var self=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var audioGate=this.html.audio.gate;var videoGate=this.html.video.gate;var supported=false;$.each(this.formats,function(formatPriority,format){var isVideo=self.format[format].media==='video';$.each(self.solutions,function(solutionPriority,solution){if(self[solution].support[format]&&self._validString(media[format])){var isHtml=solution==='html';if(isVideo){if(isHtml){self.html.audio.gate=false;self.html.video.gate=true;self.flash.gate=false;}else{self.html.audio.gate=false;self.html.video.gate=false;self.flash.gate=true;}}else{if(isHtml){self.html.audio.gate=true;self.html.video.gate=false;self.flash.gate=false;}else{self.html.audio.gate=false;self.html.video.gate=false;self.flash.gate=true;}}
if(self.flash.active||(self.html.active&&self.flash.gate)||(audioGate===self.html.audio.gate&&videoGate===self.html.video.gate)){self.clearMedia();}else if(audioGate!==self.html.audio.gate&&videoGate!==self.html.video.gate){self._html_pause();if(self.status.video){self.internal.video.jq.css({'width':'0px','height':'0px'});}
self._resetStatus();}
if(isVideo){if(isHtml){self._html_setVideo(media);self.html.active=true;self.flash.active=false;}else{self._flash_setVideo(media);self.html.active=false;self.flash.active=true;}
if(self.css.jq.videoPlay.length){self.css.jq.videoPlay.show();}
self.status.video=true;}else{if(isHtml){self._html_setAudio(media);self.html.active=true;self.flash.active=false;}else{self._flash_setAudio(media);self.html.active=false;self.flash.active=true;}
if(self.css.jq.videoPlay.length){self.css.jq.videoPlay.hide();}
self.status.video=false;}
supported=true;return false;}});if(supported){return false;}});if(supported){if(this._validString(media.poster)){if(this.htmlElement.poster.src!==media.poster){this.htmlElement.poster.src=media.poster;}else{this.internal.poster.jq.show();}}else{this.internal.poster.jq.hide();}
this.status.srcSet=true;this.status.media=$.extend({},media);this._updateButtons(false);this._updateInterface();}else{if(this.status.srcSet&&!this.status.waitForPlay){this.pause();}
this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();if(this.html.used&&this.require.video){this.internal.video.jq.css({'width':'0px','height':'0px'});}
if(this.flash.used){this.internal.flash.jq.css({'width':'0px','height':'0px'});}
this._error({type:$.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:$.jPlayer.errorMsg.NO_SUPPORT,hint:$.jPlayer.errorHint.NO_SUPPORT});}},clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active){this._html_clearMedia();}else if(this.flash.active){this._flash_clearMedia();}},load:function(){if(this.status.srcSet){if(this.html.active){this._html_load();}else if(this.flash.active){this._flash_load();}}else{this._urlNotSetError("load");}},play:function(time){time=(typeof time==="number")?time:NaN;if(this.status.srcSet){if(this.html.active){this._html_play(time);}else if(this.flash.active){this._flash_play(time);}}else{this._urlNotSetError("play");}},videoPlay:function(e){this.play();},pause:function(time){time=(typeof time==="number")?time:NaN;if(this.status.srcSet){if(this.html.active){this._html_pause(time);}else if(this.flash.active){this._flash_pause(time);}}else{this._urlNotSetError("pause");}},pauseOthers:function(){var self=this;$.each(this.instances,function(i,element){if(self.element!==element){if(element.data("jPlayer").status.srcSet){element.jPlayer("pause");}}});},stop:function(){if(this.status.srcSet){if(this.html.active){this._html_pause(0);}else if(this.flash.active){this._flash_pause(0);}}else{this._urlNotSetError("stop");}},playHead:function(p){p=this._limitValue(p,0,100);if(this.status.srcSet){if(this.html.active){this._html_playHead(p);}else if(this.flash.active){this._flash_playHead(p);}}else{this._urlNotSetError("playHead");}},_muted:function(muted){this.options.muted=muted;if(this.html.used){this._html_mute(muted);}
if(this.flash.used){this._flash_mute(muted);}
this._updateMute(muted);this._updateVolume(this.options.volume);this._trigger($.jPlayer.event.volumechange);},mute:function(mute){mute=mute===undefined?true:!!mute;this._muted(mute);},unmute:function(unmute){unmute=unmute===undefined?true:!!unmute;this._muted(!unmute);},_updateMute:function(mute){if(this.css.jq.mute.length&&this.css.jq.unmute.length){if(mute){this.css.jq.mute.hide();this.css.jq.unmute.show();}else{this.css.jq.mute.show();this.css.jq.unmute.hide();}}},volume:function(v){v=this._limitValue(v,0,1);this.options.volume=v;if(this.html.used){this._html_volume(v);}
if(this.flash.used){this._flash_volume(v);}
this._updateVolume(v);this._trigger($.jPlayer.event.volumechange);},volumeBar:function(e){if(!this.options.muted&&this.css.jq.volumeBar.length){var offset=this.css.jq.volumeBar.offset();var x=e.pageX-offset.left;var w=this.css.jq.volumeBar.width();var v=x/w;this.volume(v);}},volumeBarValue:function(e){this.volumeBar(e);},_updateVolume:function(v){v=this.options.muted?0:v;if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.width((v*100)+"%");}},_volumeFix:function(v){var rnd=0.001*Math.random();var fix=(v<0.5)?rnd:-rnd;return(v+fix);},_cssSelectorAncestor:function(ancestor){var self=this;this.options.cssSelectorAncestor=ancestor;this._removeUiClass();this.ancestorJq=ancestor?$(ancestor):[];if(ancestor&&this.ancestorJq.length!==1){this._warning({type:$.jPlayer.warning.CSS_SELECTOR_COUNT,context:ancestor,message:$.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:$.jPlayer.warningHint.CSS_SELECTOR_COUNT});}
this._addUiClass();$.each(this.options.cssSelector,function(fn,cssSel){self._cssSelector(fn,cssSel);});},_cssSelector:function(fn,cssSel){var self=this;if(typeof cssSel==='string'){if($.jPlayer.prototype.options.cssSelector[fn]){if(this.css.jq[fn]&&this.css.jq[fn].length){this.css.jq[fn].unbind(".jPlayer");}
this.options.cssSelector[fn]=cssSel;this.css.cs[fn]=this.options.cssSelectorAncestor+" "+cssSel;if(cssSel){this.css.jq[fn]=$(this.css.cs[fn]);}else{this.css.jq[fn]=[];}
if(this.css.jq[fn].length){var handler=function(e){self[fn](e);$(this).blur();return false;};this.css.jq[fn].bind("click.jPlayer",handler);}
if(cssSel&&this.css.jq[fn].length!==1){this._warning({type:$.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[fn],message:$.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[fn].length+" found for "+fn+" method.",hint:$.jPlayer.warningHint.CSS_SELECTOR_COUNT});}}else{this._warning({type:$.jPlayer.warning.CSS_SELECTOR_METHOD,context:fn,message:$.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:$.jPlayer.warningHint.CSS_SELECTOR_METHOD});}}else{this._warning({type:$.jPlayer.warning.CSS_SELECTOR_STRING,context:cssSel,message:$.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:$.jPlayer.warningHint.CSS_SELECTOR_STRING});}},seekBar:function(e){if(this.css.jq.seekBar){var offset=this.css.jq.seekBar.offset();var x=e.pageX-offset.left;var w=this.css.jq.seekBar.width();var p=100*x/w;this.playHead(p);}},playBar:function(e){this.seekBar(e);},currentTime:function(e){},duration:function(e){},option:function(key,value){var options=key;if(arguments.length===0){return $.extend(true,{},this.options);}
if(typeof key==="string"){var keys=key.split(".");if(value===undefined){var opt=$.extend(true,{},this.options);for(var i=0;i<keys.length;i++){if(opt[keys[i]]!==undefined){opt=opt[keys[i]];}else{this._warning({type:$.jPlayer.warning.OPTION_KEY,context:key,message:$.jPlayer.warningMsg.OPTION_KEY,hint:$.jPlayer.warningHint.OPTION_KEY});return undefined;}}
return opt;}
options={};var opts=options;for(var j=0;j<keys.length;j++){if(j<keys.length-1){opts[keys[j]]={};opts=opts[keys[j]];}else{opts[keys[j]]=value;}}}
this._setOptions(options);return this;},_setOptions:function(options){var self=this;$.each(options,function(key,value){self._setOption(key,value);});return this;},_setOption:function(key,value){var self=this;switch(key){case"volume":this.volume(value);break;case"muted":this._muted(value);break;case"cssSelectorAncestor":this._cssSelectorAncestor(value);break;case"cssSelector":$.each(value,function(fn,cssSel){self._cssSelector(fn,cssSel);});break;case"fullScreen":if(this.options[key]!==value){this._removeUiClass();this.options[key]=value;this._refreshSize();}
break;case"size":if(!this.options.fullScreen&&this.options[key].cssClass!==value.cssClass){this._removeUiClass();}
this.options[key]=$.extend({},this.options[key],value);this._refreshSize();break;case"sizeFull":if(this.options.fullScreen&&this.options[key].cssClass!==value.cssClass){this._removeUiClass();}
this.options[key]=$.extend({},this.options[key],value);this._refreshSize();break;case"emulateHtml":if(this.options[key]!==value){this.options[key]=value;if(value){this._emulateHtmlBridge();}else{this._destroyHtmlBridge();}}
break;}
return this;},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();},_setSize:function(){if(this.options.fullScreen){this.status.width=this.options.sizeFull.width;this.status.height=this.options.sizeFull.height;this.status.cssClass=this.options.sizeFull.cssClass;}else{this.status.width=this.options.size.width;this.status.height=this.options.size.height;this.status.cssClass=this.options.size.cssClass;}
this.element.css({'width':this.status.width,'height':this.status.height});},_addUiClass:function(){if(this.ancestorJq.length){this.ancestorJq.addClass(this.status.cssClass);}},_removeUiClass:function(){if(this.ancestorJq.length){this.ancestorJq.removeClass(this.status.cssClass);}},_updateSize:function(){this.internal.poster.jq.css({'width':this.status.width,'height':this.status.height});if(!this.status.waitForPlay){if(this.html.active&&this.status.video){this.internal.video.jq.css({'width':this.status.width,'height':this.status.height});}
else if(this.flash.active){this.internal.flash.jq.css({'width':this.status.width,'height':this.status.height});}}},fullScreen:function(){this._setOption("fullScreen",true);},restoreScreen:function(){this._setOption("fullScreen",false);},_html_initMedia:function(){if(this.status.srcSet&&!this.status.waitForPlay){this.htmlElement.media.pause();}
if(this.options.preload!=='none'){this._html_load();}
this._trigger($.jPlayer.event.timeupdate);},_html_setAudio:function(media){var self=this;$.each(this.formats,function(priority,format){if(self.html.support[format]&&media[format]){self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false;}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia();},_html_setVideo:function(media){var self=this;$.each(this.formats,function(priority,format){if(self.html.support[format]&&media[format]){self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false;}});this.htmlElement.media=this.htmlElement.video;this._html_initMedia();},_html_clearMedia:function(){if(this.htmlElement.media){if(this.htmlElement.media.id===this.internal.video.id){this.internal.video.jq.css({'width':'0px','height':'0px'});}
this.htmlElement.media.pause();this.htmlElement.media.src="";this.htmlElement.media.load();}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src;this.htmlElement.media.load();}
clearTimeout(this.internal.htmlDlyCmdId);},_html_play:function(time){var self=this;this._html_load();this.htmlElement.media.play();if(!isNaN(time)){try{this.htmlElement.media.currentTime=time;}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.play(time);},100);return;}}
this._html_checkWaitForPlay();},_html_pause:function(time){var self=this;if(time>0){this._html_load();}else{clearTimeout(this.internal.htmlDlyCmdId);}
this.htmlElement.media.pause();if(!isNaN(time)){try{this.htmlElement.media.currentTime=time;}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.pause(time);},100);return;}}
if(time>0){this._html_checkWaitForPlay();}},_html_playHead:function(percent){var self=this;this._html_load();try{if((typeof this.htmlElement.media.seekable==="object")&&(this.htmlElement.media.seekable.length>0)){this.htmlElement.media.currentTime=percent*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;}else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration)){this.htmlElement.media.currentTime=percent*this.htmlElement.media.duration/100;}else{throw"e";}}catch(err){this.internal.htmlDlyCmdId=setTimeout(function(){self.playHead(percent);},100);return;}
if(!this.status.waitForLoad){this._html_checkWaitForPlay();}},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.hide();}
if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({'width':this.status.width,'height':this.status.height});}}},_html_volume:function(v){if(this.html.audio.available){this.htmlElement.audio.volume=v;}
if(this.html.video.available){this.htmlElement.video.volume=v;}},_html_mute:function(m){if(this.html.audio.available){this.htmlElement.audio.muted=m;}
if(this.html.video.available){this.htmlElement.video.muted=m;}},_flash_setAudio:function(media){var self=this;try{$.each(this.formats,function(priority,format){if(self.flash.support[format]&&media[format]){switch(format){case"m4a":case"fla":self._getMovie().fl_setAudio_m4a(media[format]);break;case"mp3":self._getMovie().fl_setAudio_mp3(media[format]);break;}
self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false;}});if(this.options.preload==='auto'){this._flash_load();this.status.waitForLoad=false;}}catch(err){this._flashError(err);}},_flash_setVideo:function(media){var self=this;try{$.each(this.formats,function(priority,format){if(self.flash.support[format]&&media[format]){switch(format){case"m4v":case"flv":self._getMovie().fl_setVideo_m4v(media[format]);break;}
self.status.src=media[format];self.status.format[format]=true;self.status.formatType=format;return false;}});if(this.options.preload==='auto'){this._flash_load();this.status.waitForLoad=false;}}catch(err){this._flashError(err);}},_flash_clearMedia:function(){this.internal.flash.jq.css({'width':'0px','height':'0px'});try{this._getMovie().fl_clearMedia();}catch(err){this._flashError(err);}},_flash_load:function(){try{this._getMovie().fl_load();}catch(err){this._flashError(err);}
this.status.waitForLoad=false;},_flash_play:function(time){try{this._getMovie().fl_play(time);}catch(err){this._flashError(err);}
this.status.waitForLoad=false;this._flash_checkWaitForPlay();},_flash_pause:function(time){try{this._getMovie().fl_pause(time);}catch(err){this._flashError(err);}
if(time>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay();}},_flash_playHead:function(p){try{this._getMovie().fl_play_head(p);}catch(err){this._flashError(err);}
if(!this.status.waitForLoad){this._flash_checkWaitForPlay();}},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;if(this.css.jq.videoPlay.length){this.css.jq.videoPlay.hide();}
if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({'width':this.status.width,'height':this.status.height});}}},_flash_volume:function(v){try{this._getMovie().fl_volume(v);}catch(err){this._flashError(err);}},_flash_mute:function(m){try{this._getMovie().fl_mute(m);}catch(err){this._flashError(err);}},_getMovie:function(){return document[this.internal.flash.id];},_checkForFlash:function(version){var flashIsInstalled=false;var flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true;}
catch(e){}}
else if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version){flashIsInstalled=true;}}}
return flashIsInstalled;},_validString:function(url){return(url&&typeof url==="string");},_limitValue:function(value,min,max){return(value<min)?min:((value>max)?max:value);},_urlNotSetError:function(context){this._error({type:$.jPlayer.error.URL_NOT_SET,context:context,message:$.jPlayer.errorMsg.URL_NOT_SET,hint:$.jPlayer.errorHint.URL_NOT_SET});},_flashError:function(error){this._error({type:$.jPlayer.error.FLASH,context:this.internal.flash.swf,message:$.jPlayer.errorMsg.FLASH+error.message,hint:$.jPlayer.errorHint.FLASH});},_error:function(error){this._trigger($.jPlayer.event.error,error);if(this.options.errorAlerts){this._alert("Error!"+(error.message?"\n\n"+error.message:"")+(error.hint?"\n\n"+error.hint:"")+"\n\nContext: "+error.context);}},_warning:function(warning){this._trigger($.jPlayer.event.warning,undefined,warning);if(this.options.warningAlerts){this._alert("Warning!"+(warning.message?"\n\n"+warning.message:"")+(warning.hint?"\n\n"+warning.hint:"")+"\n\nContext: "+warning.context);}},_alert:function(message){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+message);},_emulateHtmlBridge:function(){var self=this,methods=$.jPlayer.emulateMethods;$.each($.jPlayer.emulateMethods.split(/\s+/g),function(i,name){self.internal.domNode[name]=function(arg){self[name](arg);};});$.each($.jPlayer.event,function(eventName,eventType){var nativeEvent=true;$.each($.jPlayer.reservedEvent.split(/\s+/g),function(i,name){if(name===eventName){nativeEvent=false;return false;}});if(nativeEvent){self.element.bind(eventType+".jPlayer.jPlayerHtml",function(){self._emulateHtmlUpdate();var domEvent=document.createEvent("Event");domEvent.initEvent(eventName,false,true);self.internal.domNode.dispatchEvent(domEvent);});}});},_emulateHtmlUpdate:function(){var self=this;$.each($.jPlayer.emulateStatus.split(/\s+/g),function(i,name){self.internal.domNode[name]=self.status[name];});$.each($.jPlayer.emulateOptions.split(/\s+/g),function(i,name){self.internal.domNode[name]=self.options[name];});},_destroyHtmlBridge:function(){var self=this;this.element.unbind(".jPlayerHtml");var emulated=$.jPlayer.emulateMethods+" "+$.jPlayer.emulateStatus+" "+$.jPlayer.emulateOptions;$.each(emulated.split(/\s+/g),function(i,name){delete self.internal.domNode[name];});}};$.jPlayer.error={FLASH:"e_flash",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};$.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+$.jPlayer.prototype.version.script+" needs Jplayer.swf version "+$.jPlayer.prototype.version.needFlash+" but found "};$.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};$.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};$.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};$.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."};})(jQuery);if(jQuery.cookie('STREAMING_ENABLED')!=null){var SHOW_PLAYER=(window.location.host!=='wmp.emusic.com'&&jQuery.cookie('STREAMING_ENABLED')==="1");}else{var SHOW_PLAYER=true;}
function PersistentQueue(key,options){var self=this,items,o=jQuery.extend({maxSize:900},options),s={makeKey:function(){return[key,'queue'].join('_');},get:function(){return store.get(s.makeKey());},set:function(value){return store.set(s.makeKey(),value);},clear:function(){return store.clear(s.makeKey());}};items=s.get()||[];jQuery.each(['pop','shift','splice','slice'],function(i,prop){self[prop]=function(){var result=items[prop].apply(items,arguments);s.set(items);return result;};});jQuery.each(['push','reverse','sort','unshift'],function(i,prop){self[prop]=function(){items[prop].apply(items,arguments);s.set(items);return self;};});self.length=function(){return items.length;};self.get=function(index){return items[index];};}
(function($,store,window,shouldRun){"use strict";if(!shouldRun){return;}
Date.prototype.withHourOffset=function(hrs){var D=this;return new Date(D.getFullYear(),D.getMonth(),D.getDate(),D.getHours()+hrs,D.getMinutes(),D.getSeconds(),0);};var EMUSIC,DEBUG=false,validateCookie,$c,lastItemMode=false,addingToQueue=false,queueTemplate=['<div class="aHistoryRow ${playListClass}">','<span class="col1"><a href="${tmpSample}" rel="${fromStation}" class="sample ${isRadio}">${count}</a></span>','<span class="col2"><a title="${name}" class="no-ajax">${name}</a></span>','<span class="col3"><a title="${artist.name}" class="no-ajax">${artist.name}</a></span>','<span class="col4" data-domain="${domain}" data-id="${id}" data-parent-id="${parentId}" data-sample="${tmpSample}" data-saved="${saved}">','<a class="actions no-ajax in-queue" data-domain="${domain}" data-id="${id}" data-parent-id="${parentId}" data-sample="${tmpSample}" data-saved="${saved}"></a></span>','</div>'].join(''),historyTemplate=['<div class="aHistoryRow">','<span class="col1"><a href="${tmpSample}" rel="${fromStation}" class="sample ${isRadio}">${count}</a></span>','<span class="col2"><a title="${name}" class="no-ajax">${name}</a></span>','<span class="col3"><a title="${artist.name}" class="no-ajax">${artist.name}</a></span>','<span class="col4" data-domain="${domain}" data-id="${id}" data-parent-id="${parentId}" data-sample="${tmpSample}" data-saved="${saved}">','<a class="actions no-ajax" data-domain="${domain}" data-id="${id}" data-parent-id="${parentId}" data-sample="${tmpSample}" data-saved="${saved}"></a></span>','</div>'].join(''),radioProgramTemplate=['<div class="aHistoryRow ${isPlaying}">','<span class="col1"><a rel="${stationId}" class="radioButton no-ajax sample ${isRadio}"></a></span>','<span class="col2"><a title="${stationName}" class="no-ajax">${stationName}</a></span>','<span class="col3"><a title="${curatorName}" class="no-ajax">${curatorName}</a></span>','<span class="col4"><a class="radioButton no-ajax" rel="${stationId}"></a></span>','</div>'].join('');$c=(function(){var cache={};return function(selector){if(undefined===cache[selector]){cache[selector]=$(selector);}
return cache[selector];};}());validateCookie=(function(){var authTokenDeferred;return function(auditUser){var cookie_token,cookie=$.cookie(EMUSIC.cookie_key);authTokenDeferred=$.Deferred();cookie_token=store.get(EMUSIC.cookie_key);d("seeing if we have the token in storage",cookie_token);if(cookie_token&&cookie_token.auth&&cookie_token.auth.token){$.extend(EMUSIC.modeOpts,{token:cookie_token.auth.token});authTokenDeferred.resolve(cookie_token);d("we do - ",cookie_token.auth.token);}else{d("nope - lets go verify it.");callAuth(function(data){d('validate done...',data);if('0'===data){$.cookie(EMUSIC.cookie_key,null);authTokenDeferred.reject(arguments);window.location.href="/log-in.php";}else{$.extend(EMUSIC.modeOpts,{token:data});store.set(EMUSIC.cookie_key,{auth:{token:data}});authTokenDeferred.resolve(data);}},function(){authTokenDeferred.reject(arguments);$.cookie(EMUSIC.cookie_key,null);EMUSIC.player.utils.showMessage('You are not logged in or have no subscription :(');});}
return authTokenDeferred.promise();};}());function resolveServices(ssl){var host=window.location.hostname.split('.');return['http',ssl?'s':'','://services.',host[host.length-2],'.',host[host.length-1]].join('');}
function mp3Regex(){return(/^http:\/\/[a-zA-Z0-9_\-\.]*?\.com\/[b]?s\/[a-zA-Z0-9_\-]+\/(\d+)\/(\d+)\/[a-zA-Z0-9_]+\.mp3$/mg);}
function d(){if(DEBUG&&window.console!==undefined&&window.console.log!==undefined){var args=['DEBUG',new Date()];$.merge(args,[].slice.call(arguments));window.console.log(args);}}
function objectsEqual(a,b){var aKeys,bKeys,keys=Object.keys||function(obj){var key,keys=[];if(obj!==Object(obj)){throw new TypeError('Invalid object');}
for(key in obj){d('obj.hasOwnProperty(key)',obj.hasOwnProperty(key));if(obj.hasOwnProperty(key)){keys[keys.length]=key;}}
return keys;};aKeys=keys(a);bKeys=keys(b);if(aKeys.length!=bKeys.length){return false;}
for(var key in a){if(!(key in b)||a[key]!==b[key]){return false;}}
return true;}
function processText(text,currentTrack,hideAddMore){var dest=$c('.expanded-review-content');window.setTimeout(function(){var tmpTxt=text.split(' '),origLength;origLength=tmpTxt.length;dest.html(text);while(dest.height()>50){tmpTxt.pop();if(hideAddMore){dest.html(tmpTxt.join(' ')+'...');}else{dest.html(tmpTxt.join(' ')+'... <a href="'+currentTrack.album.url+'" class="extended-album-link">more &raquo;</a>');}}},1000);}
function setTruncatedText(string,width,dest,letters){string=string||'';var origTxt=string,origLength,old_display=dest.css('display'),tmpTxt=string.split(undefined===letters?' ':''),joinc=undefined===letters?' ':'';origLength=tmpTxt.length;dest.css('display','inline').html(string);while(dest.width()>width){tmpTxt.pop();dest.html(tmpTxt.join(joinc)+'...');}
dest.css('display',old_display);if(origLength!==tmpTxt.length){dest.attr('title',origTxt);}}
function pad(num,size){var s="00"+num;return s.substr(s.length-size);}
function formatTime(timeInSeconds){var minutes,seconds;if(timeInSeconds===Infinity){timeInSeconds=0;}
timeInSeconds=Math.round(timeInSeconds);minutes=Math.floor(timeInSeconds/60);seconds=timeInSeconds%60;return(pad(minutes,2)+':'+pad(seconds,2));}
function canPlayRadio(){return'US'===EMUSIC.region;}
function resumeMode(){var p=$.cookie(EMUSIC.last_mode);if(!p){p='sample';}
if('radio'===p){EMUSIC.setMode(p,{stationId:parseInt($.cookie(EMUSIC.last_station),10)});}else{EMUSIC.setMode(p);}}
function callAuth(success,error){return $.ajax({url:'/wp-content/ajax.php',data:{action:'validate_token'},success:success,error:error});}
function callRadio(path,params,success,error){var options,theUrl,theParams;theParams=$.extend(params||{},{format:'jsonp'});error=error||$.noop;theUrl=resolveServices(false)+'/radio-service'+(path.match(/station\//)?'':'/session')+path;d(theUrl);options={data:theParams,dataType:'jsonp',error:error,success:success,type:'GET',url:theUrl};return $.ajax(options);}
function callAPI(path,params,success,error){var options,theUrl;params=$.extend(params||{},{apiKey:EMUSIC.modes.sample.api.key,format:'jsonp',cc:get_country_code()});error=error||$.noop;theUrl='http://ws.emusic.com/api'+path;options={data:params,dataType:'jsonp',error:error,success:success,type:'GET',url:theUrl};return $.ajax(options);}
function updateListPanel(item,mode){if($("#player-expand-toggle").hasClass('toggled')){var z,x,o,i,n,j,max,tracks;if(mode){lastItemMode=mode;}
if(!lastItemMode||(lastItemMode&&item!==lastItemMode)||''===$('.expanded-history-container .expanded-tracks').html()){d(item,addingToQueue);if('queue'===item&&addingToQueue){addingToQueue=false;}else{if(mode&&EMUSIC.historyScrollPane){EMUSIC.historyScrollPane.destroy();d("DESTROY HISTORY PANEL");}
$('.expanded-history-container .expanded-tracks').empty();}
tracks=$('.expanded-history-container .expanded-tracks');var saved,isLoggedIn=$.cookie(EMUSIC.cookie_key),isMember=EMUSIC_GLOBAL.emusicOatmealIsMember();if(isLoggedIn){saved=0;}else if(isMember){saved=-1;}else{saved=-2;}
switch(item){case'queue':if(typeof(EMUSIC.modes.sample.queue)!="undefined"){max=EMUSIC.modes.sample.queue.length()-1;if(max>200){max=199;}
if(mode){EMUSIC.modes.sample.queue=new PersistentQueue('sample');}
var count=1;for(i=0;i<=max;i++){o=$.extend({},EMUSIC.modes.sample.queue.get(i));if('sample'in o){o.isRadio='';o.tmpSample=o.sample.replace('http://www.emusic.com','');o.playListClass=(o.playList)?'playNowItem':'';o.parentId=o.album.id?o.album.id:0;o.domain=o.album.id?'S':'B';o.saved=saved;o.count=count<10?'0'+count.toString():count.toString();count++;tracks.append($.tmpl(queueTemplate,o));}}}
break;case'history':max=EMUSIC.history.length()-1;n=200;j=0;count=1;for(i=max;i>=0;i-=1){if(j>n){break;}
o=$.extend({},EMUSIC.history.get(i));o.isRadio=(o.fromStation)?'radio':'';o.tmpSample=o.sample.replace('http://www.emusic.com','');o.parentId=o.album.id?o.album.id:0;o.domain=o.album.id?'S':'B';o.saved=saved;o.count=count<10?'0'+count.toString():count.toString();count++;tracks.append($.tmpl(historyTemplate,o));}
break;case'radio-programs':stationSearch();for(z in EMUSIC.modes.radio.stationCache){x=$.tmpl(radioProgramTemplate,EMUSIC.modes.radio.stationCache[z]);tracks.append(x);}
break;case'clear-queue':break;default:updateListPanel($('.expanded-toggle-mode a.selected').attr('rel'));break;}
window.setTimeout(function(){x=$('.expanded-history-container').jScrollPane({dragMinHeight:30,showArrows:false,verticalGutter:30});EMUSIC.historyScrollPane=x.data('jsp');},400)}
lastItemMode=item||$('.expanded-toggle-mode a.selected').attr('rel');$('a[rel="'+lastItemMode+'"]').addClass('selected').siblings().removeClass('selected');}}
EMUSIC={cookie_key:'EMUSIC_REMEMBER_ME_COOKIE',cookie_tooltip:'EMUSIC_SEEN_PLAYER_TOOLTIP',region:$('body').attr('data-region'),last_mode:'EMUSIC_LAST_MODE_COOKIE',last_station:'EMUSIC_LAST_STATION_KEY',prev_disabled:false,historyScrollPane:null,history:new PersistentQueue('history'),mode:undefined,modeOpts:{},dmca:{cache:null,canPlayStation:function(stationId){var number=EMUSIC.dmca.cache[stationId].length;if(number>=6){return false;}
return true;},update:function(stationId){if(EMUSIC.dmca.cache==null){var skipsFromDisk=store.get('dmca_skips');if(!skipsFromDisk)
skipsFromDisk={};EMUSIC.dmca.cache=skipsFromDisk;}
var aDate=new Date();var anHrAgo=Math.floor(Date.parse(aDate.withHourOffset(-1))/1000);var now=Math.floor(Date.parse(aDate)/1000);d(anHrAgo,now)
if(typeof EMUSIC.dmca.cache[stationId]=='undefined'){EMUSIC.dmca.cache[stationId]=[];}
var skips=EMUSIC.dmca.cache[stationId];var newSkips=[];for(var k in skips){if(skips[k]>anHrAgo){newSkips.push(skips[k]);}}
EMUSIC.dmca.cache[stationId]=newSkips;store.set('dmca_skips',EMUSIC.dmca.cache);return EMUSIC.dmca.cache[stationId].length;},add:function(stationId){d("THE SKIP LIST",store.get('dmca_skips'));d('get skip');EMUSIC.dmca.update(stationId);if(!EMUSIC.dmca.canPlayStation(stationId)){return false;}
var aDate=new Date();EMUSIC.dmca.cache[stationId].unshift(Math.floor(Date.parse(aDate)/1000));d('set skip');store.set('dmca_skips',EMUSIC.dmca.cache);return true;}},setMode:function(mode,opts){var key,oldStation;opts=opts||{};d('new opts',mode,opts);if(mode!==EMUSIC.mode||!objectsEqual(opts,EMUSIC.modeOpts)){$.cookie(EMUSIC.last_mode,mode);if(mode!==EMUSIC.mode){if(!$('#expanded-player-bar-container').hasClass('hidden')){if('radio'===mode){updateListPanel('radio-programs');}else{$('#expanded-player-bar-container').animate({height:257},100,function(){$(this).removeClass('radio-mode');updateListPanel('queue');});$('#expanded-player-bar .left-panel .expanded-title').animate({height:0},100);}}else{if('radio'===mode){stationSearch();$('#expanded-player-bar-container').addClass('radio-mode');$('.extended-program-link').removeAttr('href').find('span').html('Loading...');updateListPanel('radio-programs');}else{$('#expanded-player-bar-container').removeClass('radio-mode');updateListPanel('queue');}}}
EMUSIC.mode=mode;EMUSIC.modeOpts=opts;if(canPlayRadio()){$('#player-bar .player-progress-container').removeClass('no-radio');if(mode==='radio'){$("#player-bar .player-controls li.previous").addClass('disabled');EMUSIC.prev_disabled=true;$.cookie(EMUSIC.last_station,opts.stationId);$('#player-bar .player-radio-indicator a').addClass('active');}else{$("#player-bar .player-controls li.previous").removeClass('disabled');EMUSIC.prev_disabled=false;$('#player-bar .player-radio-indicator a').removeClass('active');}}else{$('#player-bar .player-progress-container').addClass('no-radio');}
if(EMUSIC.modes.radio.currentStation&&EMUSIC.modes.radio.currentStation!==opts.stationId){key=EMUSIC.modes.radio.api.stationKey(opts.stationId);oldStation=store.set(key,null);}
if(EMUSIC.track.nextDeferred){EMUSIC.track.nextDeferred.reject('mode changed');EMUSIC.track.nextDeferred=undefined;}}},track:{historyPointer:undefined,nextDeferred:undefined,current:{cache:undefined,makeKey:function(userId){userId=userId||'anonymous';return['EMUSIC_CURRENT_TRACK',userId].join('_');},get:function(){var key;if(EMUSIC.track.current.cache){return EMUSIC.track.current.cache;}
key=EMUSIC.track.current.makeKey(EMUSIC.modeOpts.userId);return store.get(key);},set:function(track){var key=EMUSIC.track.current.makeKey(EMUSIC.modeOpts.userId);store.set(key,track);EMUSIC.track.current.cache=track;},clear:function(){var key=EMUSIC.track.current.makeKey(EMUSIC.modeOpts.userId);store.clear(key);EMUSIC.track.current.cache=undefined;}},next:function(){var deferred=$.Deferred(),currentTrack,historyPointer,historyTrack;if(!EMUSIC.modes[EMUSIC.mode]){deferred.reject('no mode set');}else{d("history pointer:",EMUSIC.track.historyPointer);if(EMUSIC.track.historyPointer){currentTrack=EMUSIC.track.current.get();historyPointer=EMUSIC.track.historyPointer;historyPointer+=1;historyTrack=EMUSIC.history.get(historyPointer);if(historyTrack===undefined){EMUSIC.track.historyPointer=undefined;deferred.reject('no history tracks left');}else if(historyTrack.type==='sample'){EMUSIC.track.historyPointer=historyPointer;deferred.resolve(historyTrack);}else{EMUSIC.modes.samples.api.track(historyTrack.id,historyTrack.album.id).done(function(track){EMUSIC.track.historyPointer=historyPointer;deferred.resolve(track);}).fail(function(args){deferred.reject(args);});}}else{if(EMUSIC.track.nextDeferred){return EMUSIC.track.nextDeferred.promise();}
EMUSIC.track.nextDeferred=deferred;d("emusic mode: ",EMUSIC.mode,EMUSIC.modeOpts);EMUSIC.modes[EMUSIC.mode].getNextTrack(EMUSIC.modeOpts).done(function(track){d("WE HAVE A TRACK:",track);EMUSIC.track.nextDeferred=undefined;deferred.resolve(track);}).fail(function(args){EMUSIC.track.nextDeferred=undefined;deferred.reject(args);});}}
return deferred.promise();},previous:function(){var deferred=$.Deferred(),currentTrack=EMUSIC.track.current.get(),historyPointer=EMUSIC.track.historyPointer,historyTrack;if(historyPointer===undefined){historyPointer=EMUSIC.history.length()-1;}else{historyPointer-=1;}
historyTrack=EMUSIC.history.get(historyPointer);while(historyTrack&&currentTrack&&historyTrack.internalId===currentTrack.internalId){historyPointer-=1;historyTrack=EMUSIC.history.get(historyPointer);}
if(historyTrack===undefined){deferred.reject('no history tracks left');}else if(historyTrack.type==='sample'){EMUSIC.track.historyPointer=historyPointer;deferred.resolve(historyTrack);}else{EMUSIC.modes.samples.api.track(historyTrack.id,historyTrack.album.id).done(function(track){EMUSIC.track.historyPointer=historyPointer;deferred.resolve(track);}).fail(function(args){deferred.reject(args);});}
return deferred.promise();},clean:function(track){var cleanTrack={album:{id:track.album.id,image:track.album.image,url:track.album.url,name:track.album.name},artist:{url:track.artist.url,name:track.artist.name},id:track.id,name:track.name,duration:track.duration,type:track.type,blurb:(track.blurb!==undefined)?track.blurb:"",internalId:[track.id,Math.random()].join('_'),inHistory:track.inHistory||false,elapsed:track.elapsed||0};if(track.type==='sample'){cleanTrack.sample=track.sample;}
if(track.type==='radio'){cleanTrack.streamUrl=track.streamUrl;}
d('CLEAN TRACK:',cleanTrack);return cleanTrack;},mp3:function(track){d("WE HAVE THE TRACK?");var cookie=$.cookie(EMUSIC.cookie_key);if(EMUSIC.mode==='radio'){if(!cookie){EMUSIC.setMode('sample');}}
return EMUSIC.modes[track.type].api.mp3(track);}},modes:{sample:{playListCount:null,queue:new PersistentQueue('sample'),didSkip:false,trackDeferred:undefined,getNextTrack:function(){if(EMUSIC.modes.sample.trackPromise){return EMUSIC.modes.sample.trackDeferred.promise();}
var track=EMUSIC.modes.sample.queue.shift();if(track){if(EMUSIC.modes.sample.playListCount>0){EMUSIC.modes.sample.playListCount-=1;}
return $.Deferred().resolve(track).promise();}else{EMUSIC.modes.sample.trackDeferred=$.Deferred();return EMUSIC.modes.sample.trackDeferred.promise();}},api:{key:'emusic007',cache:{album:{},artist:{},book:{}},album:function(albumId){var c=EMUSIC.modes.sample.api.cache;if(c.album[albumId]===undefined){var deferred=new $.Deferred();c.album[albumId]=deferred.promise();callAPI('/album/info.html',{albumId:albumId},function(data){deferred.resolve(data.album);var artistDeferred=new $.Deferred();artistDeferred.resolve(data.album.artist);c.artist[data.album.artist.id]=artistDeferred.promise();},function(){EMUSIC.player.utils.showMessage('We are currently experiencing some technical difficulties.');deferred.reject(arguments);});EMUSIC.modes.sample.api.cache.album[albumId]=c.album[albumId];}
return EMUSIC.modes.sample.api.cache.album[albumId];},artist:function(artistId){if(EMUSIC.modes.sample.api.cache.artist[artistId]===undefined){var deferred=new $.Deferred();EMUSIC.modes.sample.api.cache.artist[artistId]=deferred.promise();callAPI('/artist/info.html',{artistId:artistId},function(data){deferred.resolve(data.artist);},function(){deferred.reject(arguments);});}
return EMUSIC.modes.sample.api.cache.artist[artistId];},track:function(trackId,albumId){var deferred=$.Deferred();EMUSIC.modes.sample.api.album(albumId).done(function(album){var track;if(album.discs){$.each(album.discs,function(i,disc){if(track!==undefined){return false;}
$.each(disc.tracks,function(i,discTrack){if(discTrack.id===trackId){track=discTrack;track.album=$.extend({},album);delete track.album.discs;return false;}});});}
if(track){$.extend(track,{type:'sample',duration:30});deferred.resolve(EMUSIC.track.clean(track));}else{deferred.reject('track not found');}}).fail(function(args){deferred.reject(args);});return deferred.promise();},book:function(bookId){if(EMUSIC.modes.sample.api.cache.book[bookId]===undefined){var deferred=new $.Deferred();EMUSIC.modes.sample.api.cache.book[bookId]=deferred.promise();callAPI('/book/info.html',{bookId:bookId},function(data){data.book.elapsed=0;deferred.resolve(data.book);},function(){deferred.reject(arguments);});}
return EMUSIC.modes.sample.api.cache.book[bookId];},m3uParse:function(m3uUrl){if(m3uUrl){var deferred=$.Deferred();$.ajax({dataType:'text',error:function(){deferred.reject(arguments);},success:function(data){var mp3s=[],mp3Urls=data.match(mp3Regex())||[];$.each(mp3Urls,function(i,mp3Url){var matches=null,matches1=null;matches=mp3Regex().exec(mp3Url);matches1=mp3Regex().exec(mp3Url);if(matches){mp3s.push({url:mp3Url,albumId:parseInt(matches[1],10),trackId:parseInt(matches[2],10)});}
matches=null;});deferred.resolve(mp3s);},type:'get',url:m3uUrl,cache:false});return deferred.promise();}},m3uTracks:function(m3uUrl){var deferred=$.Deferred();EMUSIC.modes.sample.api.m3uParse(m3uUrl).done(function(mp3s){var trackPromises=[];$.each(mp3s,function(i,mp3){d(i,mp3,EMUSIC.modes.sample.api.track(mp3.trackId,mp3.albumId));trackPromises.push(EMUSIC.modes.sample.api.track(mp3.trackId,mp3.albumId));});$.when.apply({},trackPromises).done(function(){d("done?");var tracks=Array.prototype.slice.call(arguments);deferred.resolve(tracks);}).fail(function(args){d("fail?");deferred.reject(args);});}).fail(function(args){deferred.reject(args);});return deferred.promise();},queueTracks:function(m3uUrl,prepend){var deferred=$.Deferred(),promisedTrack,spliceArgs;EMUSIC.modes.sample.api.m3uTracks(m3uUrl).done(function(tracks){var i;$(tracks).each(function(){this.playlist=prepend;});if(prepend){while(EMUSIC.modes.sample.playListCount>0){EMUSIC.modes.sample.queue.shift();EMUSIC.modes.sample.playListCount-=1;}
EMUSIC.modes.sample.playListCount=tracks.length;}
if(EMUSIC.modes.sample.trackDeferred&&tracks.length>0){promisedTrack=tracks.shift();EMUSIC.modes.sample.trackDeferred.resolve(promisedTrack);EMUSIC.modes.sample.trackDeferred=undefined;}
if(!!prepend){spliceArgs=$.merge([0,0],tracks);EMUSIC.modes.sample.queue.splice.apply({},spliceArgs);}else{$(tracks).each(function(){EMUSIC.modes.sample.queue.push(this);});}
deferred.resolve(tracks);}).fail(function(args){deferred.reject(args);});return deferred.promise();},queueBook:function(m3uUrl,prepend){var deferred=$.Deferred(),m3uRegex=/samples\/m3u\/book\/(\d+)\/0\.m3u/,match=m3uUrl.match(m3uRegex),bookId=match&&match[1];if(bookId){EMUSIC.modes.sample.api.book(bookId).done(function(book){var track={album:{id:'',image:book.image,url:book.url},artist:{url:(book.authors.length>0?book.authors[0].url:''),name:(book.authors.length>0?book.authors[0].name:'')},id:book.id,name:book.name,duration:180,elapsed:book.elapsed||0,internalId:[book.id,Math.random()].join('_'),inHistory:book.inHistory||false,type:'sample',sample:book.sample};if(!!prepend){EMUSIC.modes.sample.queue.unshift(track);}else{EMUSIC.modes.sample.queue.push(track);}
deferred.resolve(track);}).fail(function(args){deferred.reject(args);});}else{deferred.reject('no bookId found');}
return deferred.promise();},mp3:function(track){d("CURRENT TRACK: ",track);var mp3Deferred=$.Deferred(),m3u=track.sample,parts;m3u='/'+m3u.split('/').slice(3).join('/');if('radio'===EMUSIC.mode&&track.streamUrl){d("LOAD THE TRACK INTO THE PLAYER");mp3Deferred.resolve(track.streamUrl);}else{if(track.album.url.indexOf('audiobooks')>-1){track.duration=180;}else{track.duration=30;}
if(track.elapsed>track.duration){track.elapsed=0;}
EMUSIC.modes.sample.api.m3uParse(m3u).done(function(mp3s){d(mp3s);mp3Deferred.resolve(mp3s[0].url);});}
return mp3Deferred.promise();}},updateListPanel:updateListPanel},radio:{didSkip:false,stationCache:null,currentStation:null,stationRetry:0,getNextTrack:function(opts){d("ABOUT TO VALIDATE COOKIE");var result,deferred=$.Deferred(),sId=opts.stationId+'s';EMUSIC.dmca.update(sId);if(EMUSIC.dmca.canPlayStation(sId)){result=validateCookie('radio');if(result){result.done(function(){d("VALIDATE COOKIE DONE");var canContinue=true,result;if(EMUSIC.modes[EMUSIC.mode].didSkip){result=EMUSIC.dmca.add(sId);d("CHECKED IF CAN SKIP: ",result);if(!result){EMUSIC.player.utils.showMessage('You have reached your skip limit.');EMUSIC.modes[EMUSIC.mode].didSkip=false;canContinue=false;$("#player-bar .player-controls li.next").addClass('disabled').hover(function(){EMUSIC.player.utils.showMessage('You have reached your skip limit.');},function(){EMUSIC.player.utils.hideMessage();});}}
if(canContinue){$("#player-bar .player-controls li.next").removeClass('disabled').unbind('mouseenter mouseleave');EMUSIC.modes.radio.currentStation=opts.stationId;EMUSIC.modes.radio.api.getNextSongs(opts.token,opts.stationId).done(function(tracks){d("GOT A TRACK",tracks);if(tracks.length>0){updateListPanel('radio-programs');deferred.resolve(tracks[0]);}else{deferred.reject('not enough tracks left in station');}}).fail(function(args){deferred.reject(args);});}});}else{EMUSIC.player.utils.showMessage('You are not logged in or have no subscription :(');}}else{EMUSIC.player.utils.showMessage('You have reached your skip limit.');}
return deferred.promise();},status:{call:function(path,params,success,error){d("PARAMS: ",params);params=$.extend(params||{},{format:'jsonp'});var options,theUrl;error=error||$.noop;theUrl=resolveServices(false)+path;options={data:params,dataType:'jsonp',error:error,success:success,type:'GET',url:theUrl,cache:path.match(/station\/search/)};return $.ajax(options);}},api:{stationKey:function(userId){userId=userId||'anonymous';return['EMUSIC_RADIO_STATION',userId].join('_');},getStation:function(userId,stationId,forceNewSession){d("GET STATION");var deferred=$.Deferred(),key=EMUSIC.modes.radio.api.stationKey(stationId),oldStation=store.get(key);d("CHECKING LOCAL STORAGE....",key,oldStation);if(oldStation&&oldStation.stationId===stationId&&!forceNewSession){d("we already have a station... just return that.");deferred.resolve(oldStation);}else{d("HERE WITH userID and stationID",userId,stationId);callRadio('/startSession',{token:userId,stationId:stationId},function(session){d("WE GOT A SESSION: ",session);if(session.status.code===200&&session.seconds.total>0){delete session.status;var newStation={stationId:stationId,session:session};store.set(key,newStation);deferred.resolve(newStation);}else if(session.messages[0].code===10001){EMUSIC.player.utils.showMessage('No subscription was found.');EMUSIC.setMode('sample');}else if(session.status.code===500){EMUSIC.player.utils.showMessage("We're sorry. This program is currently unavailable.");}else{d('invalid session here, need to try to start over');EMUSIC.player.utils.showMessage("We're sorry. This program is currently unavailable.");store.set(key,null);store.set(EMUSIC.cookie_key,null);deferred.reject(arguments);}},function(){store.set(key,null);deferred.reject(arguments);});}
return deferred.promise();},getNextSongs:function(userId,stationId,numTracks,forceNewSession){numTracks=numTracks||1;var deferred=$.Deferred();d("getNextSongs",userId,stationId);EMUSIC.modes.radio.api.getStation(userId,stationId,forceNewSession).done(function(station){callRadio('/getNextSongs',{sessionToken:station.session.sessionToken},function(nextSongs){var key,trackPromises=[];d('NEXT SONGS: ',nextSongs);if(nextSongs.status.code===10003){EMUSIC.player.utils.showMessage('You have no remaining playtime.');}else if(nextSongs.status.code===400){key=EMUSIC.modes.radio.api.stationKey(stationId);store.set(key,null);EMUSIC.modes.radio.api.getNextSongs(userId,stationId,numTracks,true).done(function(tracks){deferred.resolve(tracks);}).fail(function(args){deferred.reject(args);});}else if('songs'in nextSongs&&'song'in nextSongs.songs){$.each(nextSongs.songs.song,function(i,track){trackPromises.push(EMUSIC.modes.sample.api.track(track.id,track.albumId));});$.when.apply($,trackPromises).done(function(){var i,tracks=Array.prototype.slice.call(arguments);for(i=0;i<tracks.length;i+=1){$.extend(tracks[i],{duration:nextSongs.songs.song[i].duration,streamUrl:nextSongs.songs.song[i].streamUrl,blurb:nextSongs.songs.song[i].blurb});$.extend(tracks[i].album,{name:nextSongs.songs.song[i].album});d("CURRENT TRACKS: ",tracks[i]);}
deferred.resolve(tracks);}).fail(function(args){deferred.reject(args);});}else{EMUSIC.player.utils.showMessage("We're sorry. This program is currently unavailable.");}},function(){EMUSIC.modes.radio.api.getNextSongs(userId,stationId,numTracks,true).done(function(tracks){deferred.resolve(tracks);}).fail(function(args){deferred.reject(args);});});}).fail(function(args){deferred.reject(args);});return deferred.promise();},mp3:function(track){return $.Deferred().resolve(track.streamUrl).promise();}}}},player:{info:undefined,options:{initialVolume:0.6,fadeLength:2,addToHistoryAt:1},cycleTimeout:false,stopCyclePlayerBar:function(){window.clearTimeout(EMUSIC.player.cycleTimeout);EMUSIC.player.cycleTimeout=false;},cyclePlayerBar:function(callback){if(EMUSIC.mode==='radio'){if(!EMUSIC.player.cycleTimeout){EMUSIC.player.cycleTimeout=window.setTimeout(function(){$('#player-bar .track-info .artist').animate({marginTop:18},500,function(){$('#player-bar .track-info .artist').hide();$('#player-bar .track-info .album-title').css('marginTop','-18px').show().animate({marginTop:-1},500,function(){if(EMUSIC.player.cycleTimeout){EMUSIC.player.cycleTimeout=window.setTimeout(function(){$('#player-bar .track-info .album-title').animate({marginTop:18},500,function(){$('#player-bar .track-info .album-title').hide();$('#player-bar .track-info .program-title').css('marginTop','-18px').show().animate({marginTop:-1},500,function(){if(EMUSIC.player.cycleTimeout){EMUSIC.player.cycleTimeout=window.setTimeout(function(){$('#player-bar .track-info .program-title').animate({marginTop:18},500,function(){$('#player-bar .track-info .program-title').hide();$('#player-bar .track-info .artist').show().css('marginTop','-18px').animate({marginTop:-1},500,function(){window.clearTimeout(EMUSIC.player.cycleTimeout);EMUSIC.player.cycleTimeout=false;EMUSIC.player.cyclePlayerBar();});});},5000);}});});},5000);}});});},5000);}}else{if(!EMUSIC.player.cycleTimeout){EMUSIC.player.cycleTimeout=window.setTimeout(function(){$('#player-bar .track-info .artist').animate({marginTop:18},500,function(){$('#player-bar .track-info .artist').hide();$('#player-bar .track-info .album-title').css('marginTop','-18px').show().animate({marginTop:-1},500,function(){if(EMUSIC.player.cycleTimeout){EMUSIC.player.cycleTimeout=window.setTimeout(function(){$('#player-bar .track-info .album-title').animate({marginTop:18},500,function(){$('#player-bar .track-info .artist').show();$('#player-bar .track-info .album-title').hide();$('#player-bar .track-info .artist').css('marginTop','-18px').animate({marginTop:-1},500,function(){window.clearTimeout(EMUSIC.player.cycleTimeout);EMUSIC.player.cycleTimeout=false;EMUSIC.player.cyclePlayerBar();});});},5000);}});});},5000);}}},utils:{Fade:(function(){function Fade(elem,initialVolume,targetVolume,length,override){var player=elem,self=this,existingFade=Fade.getCurrent(elem),currentVolume=initialVolume,step=targetVolume>initialVolume?0.02:-0.02,interval=length*1000/((targetVolume-initialVolume)/step),handle,events;if(existingFade){if(!override){self.invalid=true;return;}else{existingFade.stop();}}
function work(){if(step>0){if(currentVolume<targetVolume){currentVolume=Math.min(currentVolume+step,targetVolume);player.jPlayer('volume',currentVolume);}else{self.stop();}}else{if(currentVolume>targetVolume){currentVolume=Math.max(currentVolume+step,targetVolume);player.jPlayer('volume',currentVolume);}else{self.stop();}}}
self.begin=function(){d('FADE BEGIN');player.jPlayer('volume',initialVolume);player.data(Fade.key,self);handle=window.setInterval(work,interval);$.each(events,function(eventType,handler){player.bind($.jPlayer.event[eventType],handler);});};self.pause=function(){d('FADE PAUSE');window.clearInterval(handle);handle=undefined;};self.resume=function(){d('FADE RESUME');if(handle===undefined){handle=window.setInterval(work,interval);}};self.stop=function(){d('FADE STOP');window.clearInterval(handle);handle=undefined;player.removeData(Fade.key);$.each(events,function(eventType,handler){player.unbind($.jPlayer.event[eventType],handler);});};events={error:self.stop,loadstart:self.stop,suspend:self.pause,abort:self.stop,emptied:self.stop,stalled:self.pause,play:self.resume,pause:self.pause,ended:self.stop};}
Fade.key='fade';Fade.getCurrent=function(elem){return elem.data(Fade.key);};return Fade;}()),tooltip:{show:function(text,offset){var hist_pos,tt=$('#miniIndicatorTooltip');if(!tt.length){$("#expanded-player-bar-container").append('<div id="miniIndicatorTooltip"></div>');tt=$('#miniIndicatorTooltip');}
hist_pos=$('.expanded-history-container').position();tt.html(text).css('top',hist_pos.top+offset.top-(tt.height()/3)+parseInt($('.expanded-history-container .jspPane').css('top'),10)).css('left',hist_pos.left+offset.left+20).show();},hide:function(){var tt=$('#miniIndicatorTooltip');tt.hide().html('').css('top',-10000).css('left',-10000);}},showMessage:function(message){d('showMessage',message);$('#warningTips').show().find('p').text(message);$('#messageClose').click(EMUSIC.player.utils.hideMessage);},hideMessage:function(){d('this should hide the message');$c('#warningTips').hide();},showTip:function(message){if(!$.cookie(EMUSIC.cookie_tooltip)){$('#expandTip').show().find('p');$('#expandTip .close').click(EMUSIC.player.utils.hideTip);}},hideTip:function(){d('this should hide the message');$.cookie(EMUSIC.cookie_tooltip,true,{expires:3650,path:'/'});$c('#expandTip').hide();},shouldFade:function(track){return true;},displayRatings:function(rating){var ratingsBlob=$('<ul><li></li><li></li><li></li><li></li><li></li></ul>').addClass('smallStar');ratingsBlob.children().each(function(i){var count=i+1,star=$(this);if(2*count<=2*rating){star.addClass('cRating');}else if(2*count-2*rating===1){star.addClass('cRating1-2');}else{star.addClass('offStar');}});return ratingsBlob;}},volume:(function(){var key='EMUSIC_PLAYER_VOLUME',cache;return{get:function(){if(cache===undefined){var tmpVolume=store.get(key);if(tmpVolume===undefined){tmpVolume=EMUSIC.player.options.initialVolume;}
cache=tmpVolume;store.set(key,tmpVolume);}
return cache;},set:function(value){var container=$("#jplayer-container");container.jPlayer('volume',value);cache=value;store.set(key,cache);}};}()),play:function(track,andPause){var fade,container=$("#jplayer-container");EMUSIC.track.mp3(track).done(function(url){if(!EMUSIC.modes.sample.playListCount){var item,i,c=0;if(EMUSIC.modes.sample.queue){for(i=0;i<=EMUSIC.modes.sample.queue.length();i+=1){item=EMUSIC.modes.sample.queue.get(i);if(item&&item.playList){c+=1;}else{break;}}
EMUSIC.modes.sample.playListCount=c;}}
fade=EMUSIC.player.utils.Fade.getCurrent(container);if(fade){fade.stop();}
EMUSIC.player.utils.showTip();if(EMUSIC.player.info&&!EMUSIC.player.info.status.paused&&!EMUSIC.player.info.status.ended){container.jPlayer('stop');}
EMUSIC.track.current.set(track);if(EMUSIC.player.utils.shouldFade(track)){container.jPlayer('volume',0);}
d(url);container.jPlayer('setMedia',{mp3:url});if(EMUSIC.modes[EMUSIC.mode].didSkip){d("setting didSkip back to false");track.elapsed=0;EMUSIC.modes[EMUSIC.mode].didSkip=false;}else{if(track.elapsed&&track.elapsed>0){container.jPlayer('pause',track.elapsed);}}
container.jPlayer('play');d('should be playing');if(andPause){container.jPlayer('pause');d('should be paused');}}).fail(function(args){d('playTrack failed',args);EMUSIC.player.next();});},move:function(direction){EMUSIC.track[direction]().done(function(track){EMUSIC.player.play(track);});},next:function(){EMUSIC.player.move('next');},previous:function(){EMUSIC.player.move('previous');}}};function stationSearch(){var o,i,hasStationCache=store.get('EMUSIC_STATIONcache')||$.cookie('EMUSIC_STATIONcache');if(hasStationCache&&!EMUSIC.modes.radio.stationCache){EMUSIC.modes.radio.stationCache=store.get('EMUSIC_STATIONcache');}
if(!EMUSIC.modes.radio.stationCache){$.ajax({type:'get',url:'/wp-content/ajax.php',data:{action:'station-list'},cache:true,dataType:'json',success:function(data){d(data);EMUSIC.modes.radio.stationCache={};$(data).each(function(){o=$.extend({},this);o.isRadio='radio';o.isPlaying=(EMUSIC.modeOpts.stationId===o.stationId)?'playing':'';EMUSIC.modes.radio.stationCache[o.stationId]=o;});store.set('EMUSIC_STATIONcache',EMUSIC.modes.radio.stationCache);$.cookie('EMUSIC_STATIONcache','EMUSIC_STATIONcache',{expires:1,path:'/'});}});}}
function bindPlayerEvents(){$('a.miniIndicatorTooltip').live('mouseover',function(e){var that=$(this);EMUSIC.player.utils.tooltip.show('Visit the program page',that.position());that.mouseout(function(){EMUSIC.player.utils.tooltip.hide();});});$('a.miniIndicatorTooltip').live('click',function(e){if(EMUSIC.modes.radio.stationCache){var url=EMUSIC.modes.radio.stationCache[$(this).attr('rel')].url;url=url.replace('www.emusic.com',window.location.host);$.hashsignal.location.href(url);}
e.stopPropagation();e.preventDefault();return false;});$('.aHistoryRow').live('click',function(e){var target=$(e.target);if('TD'==target[0].parentElement.nodeName){return false;}
var btn=$(this).find('.col4 a._samplePlayButton');if(btn.length){$(this).find('.col4 a._samplePlayButton').trigger('click');}else{var saved,isLoggedIn=$.cookie(EMUSIC.cookie_key),isMember=EMUSIC_GLOBAL.emusicOatmealIsMember();if(isLoggedIn){EMUSIC.setMode('radio',{stationId:$(this).find('.col4 a').attr('rel')});EMUSIC.player.next();}else if(isMember){var wpRedirect=window.location.href.replace('\/listen\/#','');window.location.href='/log-in.php?redirect_to='+wpRedirect;}else{window.location.href='/registration/1.html';}}});$('.clear-queue').click(function(){store.set('sample_queue',[]);EMUSIC.modes.sample.queue=new PersistentQueue('sample');updateListPanel('queue');return false;});$('a[href$=".m3u"]').live('click',function(){var i,target=this,m3u,targetRow,position,newArray=[],item;m3u=target?$(target).attr('href'):undefined;if(m3u){addingToQueue=true;lastItemMode=false;EMUSIC.track.historyPointer=undefined;if($(target).hasClass('in-queue')){targetRow=$(this).parent().parent();position=targetRow.parent().children().index(targetRow);for(i=0;i<position;i+=1){newArray.push(EMUSIC.modes.sample.queue.shift());}
item=EMUSIC.modes.sample.queue.shift();for(i=newArray.length-1;i>=0;i-=1){EMUSIC.modes.sample.queue.unshift(newArray[i]);}}
if($(target).hasClass('queue-track')){if(m3u.indexOf('book')>-1){EMUSIC.modes.sample.api.queueBook(m3u,false).done(function(track){updateListPanel('queue');});}else{EMUSIC.modes.sample.api.queueTracks(m3u,false).done(function(tracks){updateListPanel('queue');});}}else{EMUSIC.setMode('sample');if(m3u.indexOf('book')>-1){EMUSIC.modes.sample.api.queueBook(m3u,true).done(function(track){EMUSIC.player.next();});}else{EMUSIC.modes.sample.api.queueTracks(m3u,true).done(function(tracks){EMUSIC.player.next();});}}}
return false;});$('.player-radio-indicator').click(function(e){stationSearch();updateListPanel('radio-programs');if(!$c("#player-expand-toggle").hasClass('toggled')){$c("#player-expand-toggle").trigger('click');}
$('.right-panel a[rel="radio-programs"]').trigger('click');e.stopPropagation();e.preventDefault();return false;});$c('#player-expand-toggle').click(function(){var ht1,ht2;if($(this).hasClass('toggled')){$(this).removeClass('toggled');ht1=277;ht2=0;if(!$("#expanded-player-bar-container").hasClass('radio-mode')){ht1=277;}
$c("#expanded-player-bar-container").animate({'height':ht1},50,function(){$(this).animate({height:ht2},500,function(){$(this).addClass('hidden');});});}else{$(this).addClass('toggled');ht1=277;ht2=257;$c("#expanded-player-bar-container").removeClass('hidden').animate({height:ht1},500,function(){$(this).animate({height:ht2},50,function(){updateListPanel($("#expanded-player-bar-container").hasClass('radio-mode')?'radio-programs':'queue');});});}});$('.expanded-toggle-mode a').click(function(e){var elem=$(this);elem.addClass('selected').parent().find('a').removeClass('selected');updateListPanel(elem.attr('rel'));return false;});updateListPanel($('.expanded-toggle-mode a.selected').attr('rel'));$c("#player-bar .next").click(function(){EMUSIC.modes[EMUSIC.mode].didSkip=true;EMUSIC.player.next();});$c("#player-bar .previous").click(function(){if(!EMUSIC.prev_disabled){EMUSIC.modes[EMUSIC.mode].didSkip=true;EMUSIC.player.previous();}
return false;});$c('.player-actions .buy').click(function(){var url,currentTrack=EMUSIC.track.current.get();if(currentTrack){url=currentTrack.album.url.replace('www.emusic.com',window.location.hostname);$.hashsignal.location.href(url);}});}
function createPlayer(){var container,jPlayerOptions,trackInfoTemplate;container=$("#jplayer-container");d('$("#jplayer-container");',$("#jplayer-container"));trackInfoTemplate=['<span class="track-title"><a class="track-link" href="${album.url}">${name}</a></span>','<span class="artist"><a class="artist-link" href="${artist.url}">${artist.name}</a></span>','<span class="album-title"><a class="album-link" href="${album.url}">${album.name}</a></span>','<span class="program-title"></span>'].join('');jPlayerOptions={swfPath:'/wp-content/themes/dark/swf/',volume:EMUSIC.player.volume.get(),solution:'flash',ready:function(e){var currentTrack,inactivityTimeout,inactivityHandle;d('jPlayer event','ready',e);if(canPlayRadio()){$('#player-bar .player-progress-container').removeClass('no-radio');$('#expanded-player-bar a[rel="radio-programs"]').show();}else{$('#player-bar .player-progress-container').addClass('no-radio');$('#expanded-player-bar a[rel="radio-programs"]').hide();}
$("#player-bar .volume-slider").slider({range:"min",min:0,max:100,value:EMUSIC.player.volume.get()*100,slide:function(event,ui){container.jPlayer('volume',ui.value/100);},change:function(event,ui){EMUSIC.player.volume.set(ui.value/100);}});bindPlayerEvents();inactivityTimeout=1000*60*60;currentTrack=EMUSIC.track.current.get();if(currentTrack&&'undefined'!==currentTrack){EMUSIC.player.play(currentTrack,true);}
d('Play Current Track',currentTrack);},ended:function(e){EMUSIC.player.info=e.jPlayer;EMUSIC.player.next();d('jPlayer event','ended',e);},error:function(e){EMUSIC.player.info=e.jPlayer;if(e.jPlayer.error.type==='e_url'){EMUSIC.player.next();}
d('jPlayer event','error',e.jPlayer.error.type,e.jPlayer);},loadstart:function(e){var currentTrack=EMUSIC.track.current.get(),dataDomain,urlSlug;var saved,isLoggedIn=$.cookie(EMUSIC.cookie_key),isMember=EMUSIC_GLOBAL.emusicOatmealIsMember();if(isLoggedIn){saved=0;}else if(isMember){saved=-1;}else{saved=-2;}
if(currentTrack.album.id){dataDomain='A';urlSlug='album';}else{dataDomain='B';urlSlug='book';}
EMUSIC.player.info=e.jPlayer;d('jPlayer event','loadstart',e);EMUSIC.player.stopCyclePlayerBar();$("#player-bar .pause").hide();$("#player-bar .play").show();$("#player-bar .track-info").empty().append($.tmpl(trackInfoTemplate,currentTrack));$("#player-bar .album-title, #player-bar .program-title").hide();setTruncatedText($('#player-bar').find('.track-link').html(),300,$('#player-bar').find('.track-title'));setTruncatedText($('#player-bar').find('.artist-link').html(),300,$('#player-bar').find(' .artist'));setTruncatedText($('#player-bar').find('.album-link').html(),300,$('#player-bar').find('.album-title'));$('.expanded-content-image').attr('src',currentTrack.album.image);$('.expanded-content-container .bundle a.play').attr('href',currentTrack.sample.replace('http://www.emusic.com',''));$('.expanded-content-container .bundle-bar-download').attr('href',currentTrack.album.url);$('.expanded-content-container .bundle-bar .bundle-bar-add').attr({'data-saved':saved,'data-domain':dataDomain,'data-id':currentTrack.album.id});setTruncatedText(currentTrack.name,420,$('.expanded-song-title'),true);setTruncatedText(currentTrack.album.name,200,$('.expanded-album-title'),true);setTruncatedText(currentTrack.artist.name,200,$('.expanded-artist-title'),true);$('.extended-album-link').attr('href',currentTrack.album.url);EMUSIC.player.cyclePlayerBar();callAPI('/album/info',{albumId:currentTrack.album.id,include:'albumRating,albumReview'},function(data){var avg=0.0,album=data.album,ratings,review;if(undefined!==album){ratings=album.ratings;if(undefined!==ratings.communityRating&&undefined!==ratings.communityRating.average){avg=data.album.ratings.communityRating.average;}
$('.smallCom').html(EMUSIC.player.utils.displayRatings(avg));$('.expanded-content .rate').show();}
$c('.expanded-content .review').hide();if(currentTrack.blurb){$c('.expanded-content .review').addClass('commentary').find('strong').html('TRACK COMMENTARY');processText(currentTrack.blurb,currentTrack,true);$c('.expanded-content .review').show();$c('.expanded-review-author').html("");}else{if(data.album!==undefined&&data.album.editorial!==undefined){review=data.album.editorial;$('.review strong').html('eMusicReview'==review.review.type?'<a href="'+currentTrack.album.url+'"><span>eMusic</span> Review</a>':'ALBUM REVIEW');processText(review.review.content,currentTrack);$c('.expanded-review-author').html("By "+review.review.author);$c('.expanded-content .review').removeClass('commentary').show();}else{$('.review strong').html('REVIEWS');$c('.expanded-review-author').html("");$('.expanded-review-content').html('Be the first to <a href="'+currentTrack.album.url+'">review this album &raquo;</a>');$c('.expanded-content .review').hide();}}},function(){$('.expanded-content .rate').hide();$('.review strong').html('REVIEWS');$c('.expanded-review-author').html("");$('.expanded-review-content').html('Be the first to <a href="'+currentTrack.album.url+'">review this album &raquo;</a>');$c('.expanded-content .review').show();});if(EMUSIC.mode==='radio'){callRadio('/station/getInfo',{'stationId':EMUSIC.modeOpts.stationId},function(data){$('#expanded-player-bar .left-panel .expanded-title span').html(data.stationName+' Radio Program');if($('.review strong').html()==='TRACK COMMENTARY'){$c('.expanded-review-author').html("By "+data.curatorName);}
$c('#player-bar .track-info .program-title').html(data.stationName);$('.extended-program-link').attr('href',data.url.replace('editorial-xmlrpc',window.location.hostname));},function(){$('.extended-program-link').removeAttr('href').find('span').html("...");$c('.expanded-review-author').html("");});}
if(EMUSIC.prev_disabled){$("#player-bar .player-controls li.previous").addClass('disabled');$('.left-panel .expanded-title').css('height',27);$("#expanded-player-bar-container").addClass('radio-mode');$('#player-bar .player-radio-indicator a').addClass('active');updateListPanel('radio-programs');}else{$("#player-bar .player-controls li.previous").removeClass('disabled');}
$(".player-time-elapsed").text(formatTime(currentTrack.elapsed));$(".player-time-total").text(formatTime(currentTrack.duration));$(".player-progress").css('width',(currentTrack.elapsed/currentTrack.duration*100)+'%');if($("#player-bar-container").hasClass('hidden')){$("#player-bar-container").removeClass('hidden').animate({bottom:0},200);}},play:function(e){EMUSIC.player.info=e.jPlayer;$("#player-bar .play").hide();$("#player-bar .pause").show();},pause:function(e){EMUSIC.player.info=e.jPlayer;$("#player-bar .pause").hide();$("#player-bar .play").show();d('jPlayer event','pause',e);},timeupdate:function(e){var CT,fade,fadeLength=EMUSIC.player.options.fadeLength,currentTrack=EMUSIC.track.current.get();EMUSIC.player.info=e.jPlayer;if(EMUSIC.player.info.status.currentTime>0&&EMUSIC.player.info.status.currentTime>(currentTrack.elapsed+1)){currentTrack.elapsed=EMUSIC.player.info.status.currentTime;if(!currentTrack.inHistory&&currentTrack.elapsed>=EMUSIC.player.options.addToHistoryAt){currentTrack.inHistory=true;CT=$.extend(true,{},currentTrack);if('undefined'!==typeof CT.streamUrl){delete CT.streamUrl;CT.duration=30;CT.elapsed=0;CT.fromStation=EMUSIC.modeOpts.stationId;}
EMUSIC.history.push(CT);updateListPanel('queue');}
EMUSIC.track.current.set(currentTrack);}
if(EMUSIC.player.utils.shouldFade(currentTrack)&&e.jPlayer.options.volume===0&&EMUSIC.player.info.status.currentTime>0){fade=new EMUSIC.player.utils.Fade(container,e.jPlayer.options.volume,EMUSIC.player.volume.get(),fadeLength);fade.begin();}
d('current trak duration',currentTrack.duration);if(EMUSIC.player.utils.shouldFade(currentTrack)&&currentTrack.duration-EMUSIC.player.info.status.currentTime<=fadeLength){fade=new EMUSIC.player.utils.Fade(container,e.jPlayer.options.volume,0,fadeLength);if(!fade.invalid){fade.begin();}}
$(".player-time-elapsed").text(formatTime(EMUSIC.player.info.status.currentTime));$(".player-time-total").text(formatTime(currentTrack.duration));$(".player-progress").css('width',(EMUSIC.player.info.status.currentTime/currentTrack.duration*100)+'%');},cssSelectorAncestor:'#player-bar'};d('jPlayerOptions',jPlayerOptions);if(DEBUG){}
container.jPlayer(jPlayerOptions);}
$(document).ready(function(){resumeMode();createPlayer();});window.EMUSIC=EMUSIC;}(jQuery,store,window,SHOW_PLAYER));var EMUSIC_GLOBAL=(function($,EMUSIC){"use strict";var lastXhr,lastId,trigger,tools,dropdown,mains,subs,arrowActive,subActive,arrow,states=['arrow','reviews-arrow','radio-arrow','books-arrow'];function revertNav(e){window.setTimeout(function(){subs.hide();subActive.show();arrow.attr('class','the-arrow'+arrowActive);},2000);}
function bindNav(){mains=$('.main-nav nav a');arrow=$('.the-arrow');subs=$('.nav-wrapper nav');arrowActive=arrow.get(0).className.replace(/the-arrow/gi,'');subActive=$('.nav-wrapper .active');mains.bind('mouseover',function(e){e.stopPropagation();var elem=$(this),ctx;arrow.attr('class','the-arrow '+states[mains.index(this)]);ctx=elem.attr('data-nav');subs.hide();$('nav[data-nav="'+ctx+'"]').show();});$('.content').live('mouseover',revertNav);}
function toggleContainer(fn,file,blocks,ar){if($.hashsignal){jQuery.hashsignal.registerTransition(file,[blocks],{alwaysReload:ar?ar:false,load:fn});}else{$(document).ready(fn);}}
function doHovercraft(domElem){return function(){var elem=$(domElem),theAction;if(lastId===elem.attr('data-id')){return;}
switch(true){case elem.hasClass('album'):theAction='hover-album';break;case elem.hasClass('book'):theAction='hover-book';break;case elem.hasClass('track'):theAction='hover-track';break;default:theAction='hover-album';break;}
lastId=elem.attr('data-id');if(lastXhr){lastXhr.abort();}
elem.css('cursor','wait');lastXhr=$.ajax({url:'/wp-content/ajax.php',data:{action:theAction,id:elem.attr('data-id')},success:function(data){var alt=elem.offset().left>530;$('#hovercraft').hide().html(data)
[(alt?'add':'remove')+'Class']('hovercraft-alt').css({top:elem.hasClass('book')?(elem.offset().top-15):(elem.offset().top-110),left:alt?(elem.offset().left-335):(elem.offset().left+elem.width()+5)}).fadeIn('fast');elem.css('cursor','default');}});}}
function closeHover(){window.clearTimeout(hoverTiming);closingTiming=window.setTimeout(function(){$('#hovercraft').fadeOut();lastId=0;},50);}
function bindHovercraft(){var ctx;$('.hovercraft-me').live('mouseover mouseout',function(e){if('mouseover'===e.type){window.clearTimeout(closingTiming);if(this!==ctx){$('#hovercraft').fadeOut('fast');}
ctx=this;hoverTiming=window.setTimeout(doHovercraft(this),500);$('#hovercraft a').click($('#hovercraft').hide());}else{closeHover();}});$('#hovercraft').live('mouseover mouseout',function(e){e.stopPropagation();if('mouseover'===e.type){window.clearTimeout(closingTiming);}else{closeHover();}});}
function bindRadio(){$('.play-radio').live('click',function(){EMUSIC.setMode('radio',{stationId:$(this).attr('data-stationId')});EMUSIC.player.next();return false;});}
function setHeader(){$.ajax({url:'/wp-content/ajax.php',data:{action:'get-header'},cache:false,success:function(data){tools.html(data);trigger=$('#nav-dropdown-trigger');dropdown=$('.nav-dropdown');trigger.mouseover(function(){tools.addClass('open');});dropdown.mouseleave(function(){tools.removeClass('open');});if(typeof EMUSIC_NOTIFICATIONS!='undefined'){EMUSIC_NOTIFICATIONS.init();EMUSIC_NOTIFICATIONS.setMustReadNotification();}}});}
function emusicOatmealIsMember(){var ck=new Cookie({name:'oatmeal',path:'/',pairDelimiter:'&',keyValueDelimiter:'='});ck.read();return(ck.get('us')>8);}
function canonicalURL(){var canonicalURL,linkTags=document.getElementsByTagName('link');for(var i=0;i<linkTags.length;i++){if(linkTags[i]['rel']=='canonical'){canonicalURL=linkTags[i]['href'];break;}}
return canonicalURL;}
function popIt(element,width,height){element.click(function(e){e.preventDefault();var $this=$(this),url=$this.attr('href'),popWindow=window.open(url,'popup','width='+width+',height='+height);return false;});}
$(document).ready(function(){tools=$('#nav-tools');bindRadio();bindHovercraft();bindNav();setHeader();});window.popIt=popIt;window.bindNav=bindNav;window.get_country_code=function(){return $('body').attr('data-cc');}
window.get_region=function(){return $('body').attr('data-region');}
window.get_currency_symbol=function(){var cmap={};cmap['UK']='£';cmap['EU']='€';cmap['CA']='$';cmap['US']='$';return cmap[get_region()];}
return{toggleContainer:toggleContainer,emusicOatmealIsMember:emusicOatmealIsMember,canonicalURL:canonicalURL}}(jQuery,window.EMUSIC));(function($,global){var doc=global.document;function doEvil(code){var div=doc.createElement('div');doc.body.insertBefore(div,null);$.replaceWith(div,'<script type="text/javascript">'+code+'</script>');}
$=$||(function(jQuery){return{ajax:jQuery.ajax,$:function(s){return jQuery(s)[0];},replaceWith:function(selector,content){var el=jQuery(selector)[0];var next=el.nextSibling,parent=el.parentNode;jQuery(el).remove();if(next){jQuery(next).before(content);}else{jQuery(parent).append(content);}},onLoad:function(fn){jQuery(fn);},copyAttrs:function(src,dest){var el=jQuery(dest),attrs=src.attributes;for(var i=0,len=attrs.length;i<len;i++){if(attrs[i]&&attrs[i].value){try{el.attr(attrs[i].name,attrs[i].value);}catch(e){}}}}};})(global.jQuery);$.copyAttrs=$.copyAttrs||function(){};$.onLoad=$.onLoad||function(){throw"error: autoAsync cannot be used without jQuery "+"or defining writeCaptureSupport.onLoad";};function each(array,fn){for(var i=0,len=array.length;i<len;i++){if(fn(array[i])===false)return;}}
function isFunction(o){return Object.prototype.toString.call(o)==="[object Function]";}
function isString(o){return Object.prototype.toString.call(o)==="[object String]";}
function slice(array,start,end){return Array.prototype.slice.call(array,start||0,end||array&&array.length);}
function any(array,fn){var result=false;each(array,check);function check(it){return!(result=fn(it));}
return result;}
function SubQ(parent){this._queue=[];this._children=[];this._parent=parent;if(parent)parent._addChild(this);}
SubQ.prototype={_addChild:function(q){this._children.push(q);},push:function(task){this._queue.push(task);this._bubble('_doRun');},pause:function(){this._bubble('_doPause');},resume:function(){this._bubble('_doResume');},_bubble:function(name){var root=this;while(!root[name]){root=root._parent;}
return root[name]();},_next:function(){if(any(this._children,runNext))return true;function runNext(c){return c._next();}
var task=this._queue.shift();if(task){task();}
return!!task;}};function Q(parent){if(parent){return new SubQ(parent);}
SubQ.call(this);this.paused=0;}
Q.prototype=(function(){function f(){}
f.prototype=SubQ.prototype;return new f();})();Q.prototype._doRun=function(){if(!this.running){this.running=true;try{while(this.paused<1&&this._next()){}}finally{this.running=false;}}};Q.prototype._doPause=function(){this.paused++;};Q.prototype._doResume=function(){this.paused--;this._doRun();};function MockDocument(){}
MockDocument.prototype={_html:'',open:function(){this._opened=true;if(this._delegate){this._delegate.open();}},write:function(s){if(this._closed)return;this._written=true;if(this._delegate){this._delegate.write(s);}else{this._html+=s;}},writeln:function(s){this.write(s+'\n');},close:function(){this._closed=true;if(this._delegate){this._delegate.close();}},copyTo:function(d){this._delegate=d;d.foobar=true;if(this._opened){d.open();}
if(this._written){d.write(this._html);}
if(this._closed){d.close();}}};var canCall=(function(){var f={f:doc.getElementById};try{f.f.call(doc,'abc');return true;}catch(e){return false;}})();function unProxy(elements){each(elements,function(it){var real=doc.getElementById(it.id);if(!real){logError('<proxyGetElementById - finish>','no element in writen markup with id '+it.id);return;}
each(it.el.childNodes,function(it){real.appendChild(it);});if(real.contentWindow){global.setTimeout(function(){it.el.contentWindow.document.copyTo(real.contentWindow.document);},1);}
$.copyAttrs(it.el,real);});}
function getOption(name,options){if(options&&options[name]===false){return false;}
return options&&options[name]||self[name];}
function capture(context,options){var tempEls=[],proxy=getOption('proxyGetElementById',options),forceLast=getOption('forceLastScriptTag',options),writeOnGet=getOption('writeOnGetElementById',options),immediate=getOption('immediateWrites',options),state={write:doc.write,writeln:doc.writeln,finish:function(){},out:''};context.state=state;doc.write=immediate?immediateWrite:replacementWrite;doc.writeln=immediate?immediateWriteln:replacementWriteln;if(proxy||writeOnGet){state.getEl=doc.getElementById;doc.getElementById=getEl;if(writeOnGet){findEl=writeThenGet;}else{findEl=makeTemp;state.finish=function(){unProxy(tempEls);};}}
if(forceLast){state.getByTag=doc.getElementsByTagName;doc.getElementsByTagName=function(name){var result=slice(canCall?state.getByTag.call(doc,name):state.getByTag(name));if(name==='script'){result.push($.$(context.target));}
return result;};var f=state.finish;state.finish=function(){f();doc.getElementsByTagName=state.getByTag;};}
function replacementWrite(s){state.out+=s;}
function replacementWriteln(s){state.out+=s+'\n';}
function immediateWrite(s){var target=$.$(context.target);var div=doc.createElement('div');target.parentNode.insertBefore(div,target);$.replaceWith(div,sanitize(s));}
function immediateWriteln(s){var target=$.$(context.target);var div=doc.createElement('div');target.parentNode.insertBefore(div,target);$.replaceWith(div,sanitize(s)+'\n');}
function makeTemp(id){var t=doc.createElement('div');tempEls.push({id:id,el:t});t.contentWindow={document:new MockDocument()};return t;}
function writeThenGet(id){var target=$.$(context.target);var div=doc.createElement('div');target.parentNode.insertBefore(div,target);$.replaceWith(div,state.out);state.out='';return canCall?state.getEl.call(doc,id):state.getEl(id);}
function getEl(id){var result=canCall?state.getEl.call(doc,id):state.getEl(id);return result||findEl(id);}
return state;}
function uncapture(state){doc.write=state.write;doc.writeln=state.writeln;if(state.getEl){doc.getElementById=state.getEl;}
return state.out;}
function clean(code){return code&&code.replace(/^\s*<!(\[CDATA\[|--)/,'').replace(/(\]\]|--)>\s*$/,'');}
function ignore(){}
function doLog(code,error){console.error("Error",error,"executing code:",code);}
var logError=isFunction(global.console&&console.error)?doLog:ignore;function captureWrite(code,context,options){var state=capture(context,options);try{doEvil(clean(code));}catch(e){logError(code,e);}finally{uncapture(state);}
return state;}
function isXDomain(src){var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(src);return parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host);}
function attrPattern(name){return new RegExp('[\\s\\r\\n]'+name+'=(?:(["\'])([\\s\\S]*?)\\1|([^\\s>]+))','i');}
function matchAttr(name){var regex=attrPattern(name);return function(tag){var match=regex.exec(tag)||[];return match[2]||match[3];};}
var SCRIPT_TAGS=/(<script[^>]*>)([\s\S]*?)<\/script>/ig,SCRIPT_2=/<script[^>]*\/>/ig,SRC_REGEX=attrPattern('src'),SRC_ATTR=matchAttr('src'),TYPE_ATTR=matchAttr('type'),LANG_ATTR=matchAttr('language'),GLOBAL="__document_write_ajax_callbacks__",DIV_PREFIX="__document_write_ajax_div-",TEMPLATE="window['"+GLOBAL+"']['%d']();",callbacks=global[GLOBAL]={},TEMPLATE_TAG='<script type="text/javascript">'+TEMPLATE+'</script>',global_id=0;function nextId(){return(++global_id).toString();}
function normalizeOptions(options,callback){var done;if(isFunction(options)){done=options;options=null;}
options=options||{};done=done||options&&options.done;options.done=callback?function(){callback(done);}:done;return options;}
var GLOBAL_Q=new Q();var debug=[];var logDebug=window._debugWriteCapture?function(){}:function(type,src,data){debug.push({type:type,src:src,data:data});};var logString=window._debugWriteCapture?function(){}:function(){debug.push(arguments);};function newCallback(fn){var id=nextId();callbacks[id]=function(){fn();delete callbacks[id];};return id;}
function newCallbackTag(fn){return TEMPLATE_TAG.replace(/%d/,newCallback(fn));}
function sanitize(html,options,parentQ,parentContext){var queue=parentQ&&new Q(parentQ)||GLOBAL_Q;options=normalizeOptions(options);var done=getOption('done',options);var doneHtml='';var fixUrls=getOption('fixUrls',options);if(!isFunction(fixUrls)){fixUrls=function(src){return src;};}
if(isFunction(done)){doneHtml=newCallbackTag(function(){queue.push(done);});}
return html.replace(SCRIPT_TAGS,proxyTag).replace(SCRIPT_2,proxyBodyless)+doneHtml;function proxyBodyless(tag){return proxyTag(tag,tag.substring(0,tag.length-2)+'>','');}
function proxyTag(element,openTag,code){var src=SRC_ATTR(openTag),type=TYPE_ATTR(openTag)||'',lang=LANG_ATTR(openTag)||'',isJs=(!type&&!lang)||type.toLowerCase().indexOf('javascript')!==-1||lang.toLowerCase().indexOf('javascript')!==-1;logDebug('replace',src,element);if(!isJs){return element;}
var id=newCallback(queueScript),divId=DIV_PREFIX+id,run,context={target:'#'+divId,parent:parentContext};function queueScript(){queue.push(run);}
if(src){src=fixUrls(src);openTag=openTag.replace(SRC_REGEX,'');if(isXDomain(src)){run=loadXDomain;}else{if(getOption('asyncAll',options)){run=loadAsync();}else{run=loadSync;}}}else{run=runInline;}
function runInline(){captureHtml(code);}
function loadSync(){$.ajax({url:src,type:'GET',dataType:'text',async:false,success:function(html){captureHtml(html);}});}
function logAjaxError(xhr,status,error){logError("<XHR for "+src+">",error);queue.resume();}
function setupResume(){return newCallbackTag(function(){queue.resume();});}
function loadAsync(){var ready,scriptText;function captureAndResume(script,status){if(!ready){scriptText=script;return;}
try{captureHtml(script,setupResume());}catch(e){logError(script,e);}}
$.ajax({url:src,type:'GET',dataType:'text',async:true,success:captureAndResume,error:logAjaxError});return function(){ready=true;if(scriptText){captureHtml(scriptText);}else{queue.pause();}};}
function loadXDomain(cb){var state=capture(context,options);queue.pause();logDebug('pause',src);$.ajax({url:src,type:'GET',dataType:"script",success:captureAndResume,error:logAjaxError});function captureAndResume(xhr,st,error){logDebug('out',src,state.out);html(uncapture(state),newCallbackTag(state.finish)+setupResume());logDebug('resume',src);}}
function captureHtml(script,cb){var state=captureWrite(script,context,options);cb=newCallbackTag(state.finish)+(cb||'');html(state.out,cb);}
function safeOpts(options){var copy={};for(var i in options){if(options.hasOwnProperty(i)){copy[i]=options[i];}}
delete copy.done;return copy;}
function html(markup,cb){$.replaceWith(context.target,sanitize(markup,safeOpts(options),queue,context)+(cb||''));}
return'<div style="display: none" id="'+divId+'"></div>'+openTag+
TEMPLATE.replace(/%d/,id)+'</script>';}}
function sanitizeSerial(fragments,done){var queue=GLOBAL_Q;each(fragments,function(f){queue.push(run);function run(){f.action(sanitize(f.html,f.options,queue),f);}});if(done){queue.push(done);}}
function findLastChild(el){var n=el;while(n&&n.nodeType===1){el=n;n=n.lastChild;while(n&&n.nodeType!==1){n=n.previousSibling;}}
return el;}
function autoCapture(done){var write=doc.write,writeln=doc.writeln,currentScript,autoQ=[];doc.writeln=function(s){doc.write(s+'\n');};var state;doc.write=function(s){var scriptEl=findLastChild(doc.body);if(scriptEl!==currentScript){currentScript=scriptEl;autoQ.push(state={el:scriptEl,out:[]});}
state.out.push(s);};$.onLoad(function(){var el,div,out,safe,doneFn;done=normalizeOptions(done);doneFn=done.done;done.done=function(){doc.write=write;doc.writeln=writeln;if(doneFn)doneFn();};for(var i=0,len=autoQ.length;i<len;i++){el=autoQ[i].el;div=doc.createElement('div');el.parentNode.insertBefore(div,el.nextSibling);out=autoQ[i].out.join('');safe=len-i===1?sanitize(out,done):sanitize(out);$.replaceWith(div,safe);}});}
function extsrc(cb){var scripts=document.getElementsByTagName('script'),s,o,html,q,ext,async,doneCount=0,done=cb?newCallbackTag(function(){if(++doneCount>=exts.length){cb();}}):'',exts=[];for(var i=0,len=scripts.length;i<len;i++){s=scripts[i];ext=s.getAttribute('extsrc');async=s.getAttribute('asyncsrc');if(ext||async){exts.push({ext:ext,async:async,s:s});}}
for(i=0,len=exts.length;i<len;i++){o=exts[i];if(o.ext){html='<script type="text/javascript" src="'+o.ext+'"> </script>';$.replaceWith(o.s,sanitize(html)+done);}else if(o.async){html='<script type="text/javascript" src="'+o.async+'"> </script>';$.replaceWith(o.s,sanitize(html,{asyncAll:true},new Q())+done);}}}
var name='writeCapture';var self=global[name]={_original:global[name],support:$,fixUrls:function(src){return src.replace(/&amp;/g,'&');},noConflict:function(){global[name]=this._original;return this;},debug:debug,proxyGetElementById:false,_forTest:{Q:Q,GLOBAL_Q:GLOBAL_Q,$:$,matchAttr:matchAttr,slice:slice,capture:capture,uncapture:uncapture,captureWrite:captureWrite},replaceWith:function(selector,content,options){$.replaceWith(selector,sanitize(content,options));},html:function(selector,content,options){var el=$.$(selector);el.innerHTML='<span/>';$.replaceWith(el.firstChild,sanitize(content,options));},load:function(selector,url,options){$.ajax({url:url,dataType:'text',type:"GET",success:function(content){self.html(selector,content,options);}});},extsrc:extsrc,autoAsync:autoCapture,sanitize:sanitize,sanitizeSerial:sanitizeSerial};})(this.writeCaptureSupport,this);(function($,wc,noop){var methods={html:html};$.each(['append','prepend','after','before','wrap','wrapAll','replaceWith','wrapInner'],function(){methods[this]=makeMethod(this);});function isString(s){return Object.prototype.toString.call(s)=="[object String]";}
function executeMethod(method,content,options,cb){if(arguments.length==0)return proxyMethods.call(this);var m=methods[method];if(method=='load'){return load.call(this,content,options,cb);}
if(!m)error(method);return doEach.call(this,content,options,m);}
$.fn.writeCapture=executeMethod;var PROXIED='__writeCaptureJsProxied-fghebd__';function proxyMethods(){if(this[PROXIED])return this;var jq=this;function F(){var _this=this,sanitizing=false;this[PROXIED]=true;$.each(methods,function(method){var _super=jq[method];if(!_super)return;_this[method]=function(content,options,cb){if(!sanitizing&&isString(content)){try{sanitizing=true;return executeMethod.call(_this,method,content,options,cb);}finally{sanitizing=false;}}
return _super.apply(_this,arguments);};});this.pushStack=function(){return proxyMethods.call(jq.pushStack.apply(_this,arguments));};this.endCapture=function(){return jq;};}
F.prototype=jq;return new F();}
function doEach(content,options,action){var done,self=this;if(options&&options.done){done=options.done;delete options.done;}else if($.isFunction(options)){done=options;options=null;}
wc.sanitizeSerial($.map(this,function(el){return{html:content,options:options,action:function(text){action.call(el,text);}};}),done&&function(){done.call(self);}||done);return this;}
function html(safe){$(this).html(safe);}
function makeMethod(method){return function(safe){$(this)[method](safe);};}
function load(url,options,callback){var self=this,selector,off=url.indexOf(' ');if(off>=0){selector=url.slice(off,url.length);url=url.slice(0,off);}
if($.isFunction(callback)){options=options||{};options.done=callback;}
return $.ajax({url:url,type:options&&options.type||"GET",dataType:"html",data:options&&options.params,complete:loadCallback(self,options,selector)});}
function loadCallback(self,options,selector){return function(res,status){if(status=="success"||status=="notmodified"){var text=getText(res.responseText,selector);doEach.call(self,text,options,html);}};}
var PLACEHOLDER=/jquery-writeCapture-script-placeholder-(\d+)-wc/g;function getText(text,selector){if(!selector||!text)return text;var id=0,scripts={};return $('<div/>').append(text.replace(/<script(.|\s)*?\/script>/g,function(s){scripts[id]=s;return"jquery-writeCapture-script-placeholder-"+(id++)+'-wc';})).find(selector).html().replace(PLACEHOLDER,function(all,id){return scripts[id];});}
function error(method){throw"invalid method parameter "+method;}
$.writeCapture=wc;})(jQuery,writeCapture.noConflict());var DartHeader=(function($){var url=location.href.toString(),wrappers,ck,userIsMember,planId,bonusPlanId,fref,splitUrl,finalUrl,region,page,siteCat,script;function getDataRegion(){if($('body').attr('data-region')){return $('body').attr('data-region');}else{return'';}}
function getCookieParams(){ck=new Cookie({name:'oatmeal',path:'/',pairDelimiter:'&',keyValueDelimiter:'='});ck.read();userIsMember=ck.get('us')>8;planId=ck.get('p')?';planid='+ck.get('p'):'';bonusPlanId=ck.get('bp')?';bonusplanid='+ck.get('bp'):'';fref=ck.get('t')?';fref='+ck.get('t'):'';splitUrl=url.split('?');finalUrl=';url='+encodeURIComponent(splitUrl[0]);region=ck.get('rsc')?';rs='+ck.get('rsc'):';rs='+getDataRegion();page=location.pathname+location.search+location.hash;if(page.indexOf('listen/#/')!=-1){page=page.replace("listen/#/","");}
page=';page='+encodeURIComponent(page);}
function getSiteCategory(){var hash=location.hash.toString(),path=location.pathname.toString(),splitUrl;if(hash){splitUrl=hash.split('/');}else{splitUrl=path.split('/');}
siteCat=splitUrl[1]?';cat='+splitUrl[1]:'';}
function createDartScript(wrapper){var scriptId,ord=Math.floor(Math.random()*1e16);switch(wrapper){case'#dart-site-banner':scriptId='NewSite_Banner';break;case'#dart-legal-footer':scriptId='NewSite_Legal_Disclaimer';break;case'#dart-nonmember-stage':scriptId='NewMainStage';break;case'#dart-offer-body':scriptId='MarketingBoxHome';break;}
script=['<script type="text/javascript" src="http://ad.doubleclick.net/N5421/adj/',scriptId,planId,bonusPlanId,fref,siteCat,region,page,';ord=',ord,'\?"><\/script>'].join('');return script;}
function injectDartScript(wrapper){var $wrapper=$(wrapper);if($wrapper.length!==0&&typeof $wrapper.writeCapture!=='undefined'){$wrapper.writeCapture().html(createDartScript(wrapper),function(){if(wrapper==='#dart-site-banner'&&$wrapper.find('img').length!=0){$wrapper.addClass('display-banner-bkgrd');}});}}
function doDartScripts(){for(var i=0;i<wrappers.length;i++){injectDartScript(wrappers[i]);}}
function init(){wrappers=['#dart-site-banner','#dart-legal-footer','#dart-nonmember-stage','#dart-offer-body'];getCookieParams();getSiteCategory();if(!userIsMember){doDartScripts();}}
if(url.indexOf('log-in')===-1){EMUSIC_GLOBAL.toggleContainer(init,'dart-header.js','PAGEJS',true);}
return{init:init};})(jQuery);var uberTags=(function($){"use strict";function init(){var uberURL=("https:"==document.location.protocol)?"https://app.ubertags.com/javascripts/ubertags.js":"http://app.ubertags.com/javascripts/ubertags.js",url=location.href.toString(),cleanedURL=url.replace('http://'+location.hostname,'');cleanedURL=cleanedURL.replace('/listen/#','');cleanedURL=cleanedURL.replace(':','');$('.footer-wrapper').writeCapture().append('<script src="'+uberURL+'"> </script>');$('.footer-wrapper').writeCapture().append('<script type="text/javascript">ubertags_init("UT-187541605");//version:0.3</script>');$('.footer-wrapper').writeCapture().append('<script type="text/javascript">ubertags_load("'+cleanedURL+'")</script>');}
EMUSIC_GLOBAL.toggleContainer(init,'ubertags.js','PAGEJS',true);return{init:init};})(jQuery);(function(window,document,$){var W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments);},didResize=false,resizeTimer=null;$.extend(F,{version:'2.0.3',defaults:{padding:10,margin:20,width:800,height:600,minWidth:200,minHeight:200,maxWidth:9999,maxHeight:9999,autoSize:true,fitToView:true,aspectRatio:false,topRatio:0.5,fixed:!$.browser.msie||$.browser.version>6,scrolling:'auto',wrapCSS:'fancybox-default',arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3000,modal:false,loop:true,ajax:{},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':'')+' scrolling="{scrolling}" src="{href}"></iframe>',swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="no-ajax fancybox-item fancybox-next"><span></span></a>',prev:'<a title="Previous" class="no-ajax fancybox-item fancybox-prev"><span></span></a>'},openEffect:'fade',openSpeed:500,openEasing:'swing',openOpacity:true,openMethod:'zoomIn',closeEffect:'fade',closeSpeed:500,closeEasing:'swing',closeOpacity:true,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:300,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:300,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:{speedIn:0,speedOut:0,opacity:0.85,css:{cursor:'pointer','background-color':'rgba(119, 119, 119, 0.85)'},closeClick:true},title:{type:'float'}},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},coming:null,current:null,isOpen:false,isOpened:false,wrap:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(!$.isArray(group)){group=[group];}
if(!group.length){return;}
F.close(true);F.opts=$.extend(true,{},F.defaults,opts);F.group=group;F._start(F.opts.index||0);},cancel:function(){if(F.coming&&false===F.trigger('onCancel')){return;}
F.coming=null;F.hideLoading();if(F.ajaxLoad){F.ajaxLoad.abort();}
F.ajaxLoad=null;if(F.imgPreload){F.imgPreload.onload=F.imgPreload.onabort=F.imgPreload.onerror=null;}},close:function(a){F.cancel();if(!F.current||false===F.trigger('beforeClose')){return;}
F.unbindEvents();if(!F.isOpen||(a&&a[0]===true)){$(".fancybox-wrap").stop().trigger('onReset').remove();F._afterZoomOut();}else{F.isOpen=F.isOpened=false;$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.closeMethod]();}},play:function(a){var clear=function(){clearTimeout(F.player.timer);},set=function(){clear();if(F.current&&F.player.isActive){F.player.timer=setTimeout(F.next,F.current.playSpeed);}},stop=function(){clear();$('body').unbind('.player');F.player.isActive=false;F.trigger('onPlayEnd');},start=function(){if(F.current&&(F.current.loop||F.current.index<F.group.length-1)){F.player.isActive=true;set();$('body').bind({'onCancel.player afterShow.player onUpdate.player':set,'beforeClose.player':stop,'beforeLoad.player':clear});F.trigger('onPlayStart');}};if(F.player.isActive||(a&&a[0]===false)){stop();}else{start();}},next:function(){if(F.current){F.jumpto(F.current.index+1);}},prev:function(){if(F.current){F.jumpto(F.current.index-1);}},jumpto:function(index){if(!F.current){return;}
index=parseInt(index,10);if(F.group.length>1&&F.current.loop){if(index>=F.group.length){index=0;}else if(index<0){index=F.group.length-1;}}
if(typeof F.group[index]!=='undefined'){F.cancel();F._start(index);}},reposition:function(a){if(F.isOpen){F.wrap.css(F._getPosition(a));}},update:function(){if(F.isOpen){if(!didResize){resizeTimer=setInterval(function(){if(didResize){didResize=false;clearTimeout(resizeTimer);if(F.current){if(F.current.autoSize){F.inner.height('auto');F.current.height=F.inner.height();}
F._setDimension();if(F.current.canGrow){F.inner.height('auto');}
F.reposition();F.trigger('onUpdate');}}},100);}
didResize=true;}},toggle:function(){if(F.isOpen){F.current.fitToView=!F.current.fitToView;F.update();}},hideLoading:function(){$("#fancybox-loading").remove();},showLoading:function(){F.hideLoading();$('<div id="fancybox-loading"></div>').click(F.cancel).appendTo('body');},getViewport:function(){return{x:W.scrollLeft(),y:W.scrollTop(),w:W.width(),h:W.height()};},unbindEvents:function(){if(F.wrap){F.wrap.unbind('.fb');}
D.unbind('.fb');W.unbind('.fb');},bindEvents:function(){var current=F.current,keys=current.keys;if(!current){return;}
W.bind('resize.fb, orientationchange.fb',F.update);if(keys){D.bind('keydown.fb',function(e){if($.inArray(e.target.tagName.toLowerCase(),['input','textarea','select','button'])>-1){return;}
if($.inArray(e.keyCode,keys.close)>-1){F.close();e.preventDefault();}else if($.inArray(e.keyCode,keys.next)>-1){F.next();e.preventDefault();}else if($.inArray(e.keyCode,keys.prev)>-1){F.prev();e.preventDefault();}});}
if($.fn.mousewheel&&current.mouseWheel&&F.group.length>1){F.wrap.bind('mousewheel.fb',function(e,delta){if($(e.target).get(0).clientHeight===0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();F[delta>0?'prev':'next']();}});}},trigger:function(event){var ret,obj=$.inArray(event,['onCancel','beforeLoad','afterLoad'])>-1?'coming':'current';if(!F[obj]){return;}
if($.isFunction(F[obj][event])){ret=F[obj][event].apply(F[obj],Array.prototype.slice.call(arguments,1));}
if(ret===false){return false;}
if(F[obj].helpers){$.each(F[obj].helpers,function(helper,opts){if(opts&&typeof F.helpers[helper]!=='undefined'&&$.isFunction(F.helpers[helper][event])){F.helpers[helper][event](opts);}});}
$.event.trigger(event+'.fb');},isImage:function(str){return str&&str.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i);},isSWF:function(str){return str&&str.match(/\.(swf)(.*)?$/i);},_start:function(index){var element=F.group[index]||null,isDom,href,type,rez,coming=$.extend(true,{},F.opts,($.isPlainObject(element)?element:{}),{index:index,element:element});if(typeof coming.margin==='number'){coming.margin=[coming.margin,coming.margin,coming.margin,coming.margin];}
if(coming.modal){$.extend(true,coming,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{css:{cursor:'auto'},closeClick:false}}});}
F.coming=coming;if(false===F.trigger('beforeLoad')){F.coming=null;return;}
if(typeof element==='object'&&(element.nodeType||element instanceof $)){isDom=true;coming.href=$(element).attr('href')||coming.href;coming.title=$(element).attr('title')||coming.title;if($.metadata){$.extend(coming,$(element).metadata());}}
type=coming.type;href=coming.href;if(!type){if(isDom){rez=$(element).data('fancybox-type');if(!rez&&element.className){rez=element.className.match(/fancybox\.(\w+)/);rez=rez?rez[1]:false;}}
if(rez){type=rez;}else if(href){if(F.isImage(href)){type='image';}else if(F.isSWF(href)){type='swf';}else if(href.match(/^#/)){type='inline';}}
if(!type){type=isDom?'inline':'html';}
coming.type=type;}
if(type==='inline'||type==='html'){if(!coming.content){coming.content=type==='inline'&&href?$(href):element;}
if(!coming.content.length){type=null;}}else{coming.href=href||element;if(!coming.href){type=null;}}
coming.group=F.group;if(type==='image'){F._loadImage();}else if(type==='ajax'){F._loadAjax();}else if(type){F._afterLoad();}else{F._error();}},_error:function(){F.coming.type='html';F.coming.minHeight=0;F.coming.autoSize=true;F.coming.content=F.coming.tpl.error;F._afterLoad();},_loadImage:function(){F.imgPreload=new Image();F.imgPreload.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width;F.coming.height=this.height;F._afterLoad();};F.imgPreload.onerror=function(){this.onload=this.onerror=null;F._error();};F.imgPreload.src=F.coming.href;if(!F.imgPreload.complete){F.showLoading();}},_loadAjax:function(){F.showLoading();F.ajaxLoad=$.ajax($.extend({},F.coming.ajax,{url:F.coming.href,error:function(jqXHR,textStatus,errorThrown){if(textStatus!=='abort'){F.coming.content=errorThrown;F._error();}else{F.hideLoading();}},success:function(data,textStatus,jqXHR){if(textStatus==='success'){F.coming.content=data;F._afterLoad();}}}));},_afterLoad:function(){F.hideLoading();if(!F.coming||false===F.trigger('afterLoad',F.current)){F.coming=false;return;}
if(F.isOpened){$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.prevMethod]();}else{$(".fancybox-wrap").stop().trigger('onReset').remove();F.trigger('afterClose');}
F.unbindEvents();F.isOpen=false;F.current=F.coming;F.coming=false;F.wrap=$(F.current.tpl.wrap).addClass('fancybox-tmp '+F.current.wrapCSS).appendTo('body');F.outer=$('.fancybox-outer',F.wrap).css('padding',F.current.padding+'px');F.inner=$('.fancybox-inner',F.wrap);F._setContent();F.trigger('beforeShow');F._setDimension();F.wrap.hide().removeClass('fancybox-tmp');F.bindEvents();F.transitions[F.isOpened?F.current.nextMethod:F.current.openMethod]();},_setContent:function(){var content,loadingBay,current=F.current,type=current.type;switch(type){case'inline':case'ajax':case'html':if(type==='inline'){content=current.content.show().detach();if(content.parent().hasClass('fancybox-inner')){content.parents('.fancybox-wrap').trigger('onReset').remove();}
$(F.wrap).bind('onReset',function(){content.appendTo('body').hide();});}else{content=current.content;}
if(current.autoSize){loadingBay=$('<div class="fancybox-tmp"></div>').appendTo($("body")).append(content);current.width=loadingBay.outerWidth();current.height=loadingBay.outerHeight(true);content=loadingBay.contents().detach();loadingBay.remove();}
break;case'image':content=current.tpl.image.replace('{href}',current.href);current.aspectRatio=true;break;case'swf':content=current.tpl.swf.replace(/\{width\}/g,current.width).replace(/\{height\}/g,current.height).replace(/\{href\}/g,current.href);break;case'iframe':content=current.tpl.iframe.replace('{href}',current.href).replace('{scrolling}',current.scrolling).replace('{rnd}',new Date().getTime());break;}
if($.inArray(type,['image','swf','iframe'])>-1){current.autoSize=false;current.scrolling=false;}
F.inner.append(content);},_setDimension:function(){var current=F.current,viewport=F.getViewport(),margin=current.margin,padding2=current.padding*2,width=current.width+padding2,height=current.height+padding2,ratio=current.width/current.height,maxWidth=current.maxWidth,maxHeight=current.maxHeight,minWidth=current.minWidth,minHeight=current.minHeight,height_,space;viewport.w-=(margin[1]+margin[3]);viewport.h-=(margin[0]+margin[2]);if(width.toString().indexOf('%')>-1){width=((viewport.w*parseFloat(width))/100);}
if(height.toString().indexOf('%')>-1){height=((viewport.h*parseFloat(height))/100);}
if(current.fitToView){maxWidth=Math.min(viewport.w,maxWidth);maxHeight=Math.min(viewport.h,maxHeight);}
maxWidth=Math.max(minWidth,maxWidth);maxHeight=Math.max(minHeight,maxHeight);if(current.aspectRatio){if(width>maxWidth){width=maxWidth;height=((width-padding2)/ratio)+padding2;}
if(height>maxHeight){height=maxHeight;width=((height-padding2)*ratio)+padding2;}
if(width<minWidth){width=minWidth;height=((width-padding2)/ratio)+padding2;}
if(height<minHeight){height=minHeight;width=((height-padding2)*ratio)+padding2;}}else{width=Math.max(minWidth,Math.min(width,maxWidth));height=Math.max(minHeight,Math.min(height,maxHeight));}
width=Math.round(width);height=Math.round(height);$(F.wrap.add(F.outer).add(F.inner)).width('auto').height('auto');F.inner.width(width-padding2).height(height-padding2);F.wrap.width(width);height_=F.wrap.height();if(width>maxWidth||height_>maxHeight){while((width>maxWidth||height_>maxHeight)&&width>minWidth&&height_>minHeight){height=height-10;if(current.aspectRatio){width=Math.round(((height-padding2)*ratio)+padding2);if(width<minWidth){width=minWidth;height=((width-padding2)/ratio)+padding2;}}else{width=width-10;}
F.inner.width(width-padding2).height(height-padding2);F.wrap.width(width);height_=F.wrap.height();}}
current.dim={width:width,height:height_};current.canGrow=current.autoSize&&height>minHeight&&height<maxHeight;current.canShrink=false;current.canExpand=false;if((width-padding2)<current.width||(height-padding2)<current.height){current.canExpand=true;}else if((width>viewport.w||height_>viewport.h)&&width>minWidth&&height>minHeight){current.canShrink=true;}
space=height_-padding2;F.innerSpace=space-F.inner.height();F.outerSpace=space-F.outer.height();},_getPosition:function(a){var viewport=F.getViewport(),margin=F.current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:'absolute',top:margin[0]+viewport.y,left:margin[3]+viewport.x};if(F.current.fixed&&(!a||a[0]===false)&&height<=viewport.h&&width<=viewport.w){rez={position:'fixed',top:margin[0],left:margin[3]};}
rez.top=Math.ceil(Math.max(rez.top,rez.top+((viewport.h-height)*F.current.topRatio)))+'px';rez.left=Math.ceil(Math.max(rez.left,rez.left+((viewport.w-width)*0.5)))+'px';return rez;},_afterZoomIn:function(){var current=F.current;F.isOpen=F.isOpened=true;F.wrap.addClass('fancybox-opened').css('overflow','visible');F.update();F.inner.css('overflow',current.scrolling==='auto'?'auto':(current.scrolling==='yes'?'scroll':'hidden'));if(current.closeClick||current.nextClick){F.inner.bind('click.fb',current.nextClick?F.next:F.close);}
if(current.closeBtn){$(F.current.tpl.closeBtn).appendTo(F.wrap).bind('click.fb',F.close);}
if(current.arrows&&F.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendTo(F.wrap).bind('click.fb',F.prev);}
if(current.loop||current.index<F.group.length-1){$(current.tpl.next).appendTo(F.wrap).bind('click.fb',F.next);}}
F.trigger('afterShow');if(F.opts.autoPlay&&!F.player.isActive){F.opts.autoPlay=false;F.play();}},_afterZoomOut:function(){F.trigger('afterClose');F.wrap.trigger('onReset').remove();$.extend(F,{group:{},opts:{},current:null,isOpened:false,isOpen:false,wrap:null,outer:null,inner:null});}});F.transitions={getOrigPosition:function(){var element=F.current.element,pos={},width=50,height=50,image,viewport;if(element&&element.nodeName&&$(element).is(':visible')){image=$(element).find('img:first');if(image.length){pos=image.offset();width=image.outerWidth();height=image.outerHeight();}else{pos=$(element).offset();}}else{viewport=F.getViewport();pos.top=viewport.y+(viewport.h-height)*0.5;pos.left=viewport.x+(viewport.w-width)*0.5;}
pos={top:Math.ceil(pos.top)+'px',left:Math.ceil(pos.left)+'px',width:Math.ceil(width)+'px',height:Math.ceil(height)+'px'};return pos;},step:function(now,fx){var ratio,innerValue,outerValue;if(fx.prop==='width'||fx.prop==='height'){innerValue=outerValue=Math.ceil(now-(F.current.padding*2));if(fx.prop==='height'){ratio=(now-fx.start)/(fx.end-fx.start);if(fx.start>fx.end){ratio=1-ratio;}
innerValue-=F.innerSpace*ratio;outerValue-=F.outerSpace*ratio;}
F.inner[fx.prop](innerValue);F.outer[fx.prop](outerValue);}},zoomIn:function(){var current=F.current,startPos,endPos,dim=current.dim;if(current.openEffect==='elastic'){endPos=$.extend({},dim,F._getPosition(true));delete endPos.position;startPos=this.getOrigPosition();if(current.openOpacity){startPos.opacity=0;endPos.opacity=1;}
F.wrap.css(startPos).show().animate(endPos,{duration:current.openSpeed,easing:current.openEasing,step:this.step,complete:F._afterZoomIn});}else{F.wrap.css($.extend({},dim,F._getPosition()));if(current.openEffect==='fade'){F.wrap.fadeIn(current.openSpeed,F._afterZoomIn);}else{F.wrap.show();F._afterZoomIn();}}},zoomOut:function(){var current=F.current,endPos;if(current.closeEffect==='elastic'){if(F.wrap.css('position')==='fixed'){F.wrap.css(F._getPosition(true));}
endPos=this.getOrigPosition();if(current.closeOpacity){endPos.opacity=0;}
F.wrap.animate(endPos,{duration:current.closeSpeed,easing:current.closeEasing,step:this.step,complete:F._afterZoomOut});}else{F.wrap.fadeOut(current.closeEffect==='fade'?current.closeSpeed:0,F._afterZoomOut);}},changeIn:function(){var current=F.current,startPos;if(F.current.nextEffect==='elastic'){startPos=F._getPosition(true);startPos.opacity=0;startPos.top=(parseInt(startPos.top,10)-200)+'px';F.wrap.css(startPos).show().animate({opacity:1,top:'+=200px'},{duration:current.nextSpeed,complete:F._afterZoomIn});}else{F.wrap.css(F._getPosition());if(current.nextEffect==='fade'){F.wrap.hide().fadeIn(current.nextSpeed,F._afterZoomIn);}else{F.wrap.show();F._afterZoomIn();}}},changeOut:function(){function cleanUp(){$(this).trigger('onReset').remove();}
F.wrap.removeClass('fancybox-opened');if(F.current.prevEffect==='elastic'){F.wrap.animate({'opacity':0,top:'+=200px'},{duration:F.current.prevSpeed,complete:cleanUp});}else{F.wrap.fadeOut(F.current.prevEffect==='fade'?F.current.prevSpeed:0,cleanUp);}}};F.helpers.overlay={overlay:null,update:function(){var width,scrollWidth,offsetWidth;this.overlay.width(0).height(0);if($.browser.msie){scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);width=scrollWidth<offsetWidth?W.width():scrollWidth;}else{width=D.width();}
this.overlay.width(width).height(D.height());},beforeShow:function(opts){if(this.overlay){return;}
this.overlay=$('<div id="fancybox-overlay"></div>').css(opts.css||{background:'rgba(119,119,119,0.85)'}).appendTo('body');this.update();if(opts.closeClick){this.overlay.bind('click.fb',F.close);}
W.bind("resize.fb",$.proxy(this.update,this));this.overlay.fadeTo(opts.speedIn||"fast",opts.opacity||1);},onUpdate:function(){this.update();},afterClose:function(opts){if(this.overlay){this.overlay.fadeOut(opts.speedOut||"fast",function(){$(this).remove();});}
this.overlay=null;}};F.helpers.title={beforeShow:function(opts){var title,text=F.current.title;if(text){title=$('<div class="fancybox-title fancybox-title-'+opts.type+'-wrap">'+text+'</div>').appendTo('body');if(opts.type==='float'){title.width(title.width());title.wrapInner('<span class="child"></span>');F.current.margin[2]+=Math.abs(parseInt(title.css('margin-bottom'),10));}
title.appendTo(opts.type==='over'?F.inner:(opts.type==='outside'?F.wrap:F.outer));}}};$.fn.fancybox=function(options){var opts=options||{},selector=this.selector||'';function run(e){var group=[],relType=false,relVal=$(this).data('fancybox-group');e.preventDefault();if(typeof relVal!=='undefined'){relType=relVal?'data-fancybox-group':false;}else if(this.rel&&this.rel!==''&&this.rel!=='nofollow'){relVal=this.rel;relType='rel';}
if(relType){group=selector.length?$(selector).filter('['+relType+'="'+relVal+'"]'):$('['+relType+'="'+relVal+'"]');}
if(group.length){opts.index=group.index(this);F.open(group.get(),opts);}else{F.open(this,opts);}
return false;}
if(selector){D.undelegate(selector,'click.fb-start').delegate(selector,'click.fb-start',run);}else{$(this).unbind('click.fb-start').bind('click.fb-start',run);}
return this;};}(window,document,jQuery));"use strict";(function($){var searchMenu;function highlightInput(){var elem=$(this);elem.addClass('search-input-on');}
function toggleMenu(e){if(e&&'stopPropagation'in e){e.stopPropagation();}
searchMenu=$('#search-menu');if(searchMenu.hasClass('open')){searchMenu.removeClass('open').hide();}else{searchMenu.addClass('open').show();}
return false;}
function setSearchContext(e){e.stopPropagation();var elem=$(this),wrap,label,ctx;label=elem.text().replace(/Search /gi,'');if('Audiobooks'===label){label='Books';}
ctx=elem.attr('data-context');wrap=elem.closest('div');wrap.find('a').removeClass('on');elem.addClass('on');$('#search-context').attr('data-context',ctx).text(label);$('input[name="search_context"]').val(ctx);if(elem.parents('.facets').length){$('#facet-search').submit();}
if(wrap.hasClass('search-menu')){toggleMenu();}
return false;}
function createHash(){var ctx,term,elem=$(this);term=encodeURIComponent(jQuery.trim(elem.find('input[name="s"]').val().replace(/\(|\)|,|"/g,'').replace(/\//g,' ')));ctx=encodeURIComponent(elem.find('input[name="search_context"]').val());if(term.length>0){if('/listen/'===window.location.pathname&&'#/search/'===elem.attr('action')){$.hashsignal.location.href(':/search/'+ctx+'/'+term+'/');}else{window.location.href='http://'+window.location.host+'/search/'+ctx+'/'+term+'/';}}
return false;}
function toggleBodyClick(e){if('mouseout'===e.type&&searchMenu.hasClass('open')){$('body').bind('click.closesearch',maybeCloseSearch);}else{$('body').unbind('click.closesearch');}}
function maybeCloseSearch(){if(searchMenu.hasClass('open')){toggleMenu();}}
$(document).ready(function(){searchMenu=$('#search-menu');$('.search-module').live('mouseout mouseover',toggleBodyClick);$('#global-search, #facet-search').live('submit',createHash);$('#s').live('focus',highlightInput);$('input[name="s"]').keypress(function(e){if(e.keyCode===13&&!$(this).val().length){e.preventDefault();}});$('#search-context').live('click',toggleMenu);$('#search-menu a, .facets a').live('click',setSearchContext);$('.track-table-wrapper tr:not(.headers)').live('mouseenter mouseleave',function(e){var hi=$('.track-table-highlight'),elem=$(this);if('mouseenter'===e.type){hi.addClass('track-table-highlight-over');hi.css('top',elem.position().top);}else{hi.removeClass('track-table-highlight-over');}});});}(jQuery));(function($){'use strict';var iframe,retryCheckInterval=0,pollTimeout,logged=false,iframePrepended=false;function getIframeInstance(){return iframe;}
function removeIframe(){if(iframe){$(getIframeInstance()).remove();iframe=null;}}
function setIframeInstance(url){removeIframe();iframePrepended=false;logged=false;iframe=document.createElement('iframe');iframe.src=url;iframe.id=new Date().getTime();iframe.style.position='absolute';iframe.style.left="-100000px";iframe.name='downloadFrame';loadIframe();}
function loadIframe(){$('body').prepend(getIframeInstance());iframePrepended=true;}
function getIntervals(){return retryCheckInterval<4?5000:(retryCheckInterval<14?2000:retryCheckInterval<30?10000:retryCheckInterval<40?70000:null);}
function getPageState(){if(!iframePrepended&&!logged){$.ajax({type:'post',url:'/wp-content/ajax.php',data:{action:'log-errors',error:['iFrame not appended ',iframe.src,' albumId: ',$('#album-tools').attr('data-id')].join('')}});logged=true;}
$.ajax({type:'post',dataType:'json',url:'/wp-content/ajax.php',data:{action:'get_page_state',album_id:$('#album-tools').attr('data-id'),format:'json'},success:updatePageState})}
function pollForRetry(){var interval=getIntervals();if(interval){clearTimeout(pollTimeout);pollTimeout=setTimeout(function(){retryCheckInterval=retryCheckInterval+1;getPageState();},interval);}else{clearTimeout(pollTimeout);}}
function updatePageState(data){if(data){if(data.tracks){$('#tracks').html(data.tracks);}
if(data.album){$('#album-tools').html(data.album);}
if(data.music_balance){$('#music-balance span:eq(0)').html(data.music_balance);}
if(data.retry){pollForRetry();}}}
function loadDownloadMessage(type,download,albumId){var url='/wp-content/ajax.php';if('one-click'===type){url='/remote/oneclick.html';}else if('stop'===type){url='/remote/oneclick.html?stop=true';}
$.ajax({url:url,data:{action:'get_download_message',type:type,id:download?download.attr('data-id'):'',domain:download?download.attr('data-domain'):''},success:function(data){$.fancybox({content:data,wrapCSS:'fancybox-transparent-border-wrap',beforeShow:function(){$('.box-close').click(function(){$.fancybox.close();});if('stop'===type){$('.upgradeInfo').show();$('#upgrade-complete').attr('data-domain',download.attr('domain'));if(download.attr('data-id')){$('#upgrade-complete').attr('data-id',download.attr('data-id'));}else{$('#upgrade-complete').attr('data-id',albumId);}}
if('stop'===type||'one-click'==type){$('#oneclick').submit(function(){OneClick.upgradeSub(OneClick.plan());return false;});$('#one-click-submit').click(function(){$('#oneclick').submit();return false;});}},afterClose:function(){$('#oneclick').unbind('submit');$('#one-click-submit').unbind('click');}});},error:function(){$.fancybox({content:'This track is unavailable'});}});return false;}
function hasMessage(download,albumId){switch(true){case download.hasClass('pending'):loadDownloadMessage('pending');return true;break;case download.hasClass('stop'):loadDownloadMessage('stop',download,albumId);return true;break;case download.hasClass('one-click'):loadDownloadMessage('one-click',download,albumId);return true;break;case download.hasClass('repurchase'):loadDownloadMessage('repurchase',download);return true;break;}
return false;}
function book_download(){$('.book-download').live('click',function(){var download=$(this),book=$('#book-tools'),url=download.attr('href');if(book.attr('data-dl')=='1'){if(!EMUSIC_GLOBAL.DLM.getDLM()){loadDownloadMessage('dlm',download);return false;}
setIframeInstance(url);}
return false;});return false;}
function download(){$('.track-download, .album-download').live('click',function(){var download=$(this),album=$('#album-tools'),hash=window.location.hash;if(album.attr('data-dl')=='1'){if((download.hasClass('album-only')&&!download.hasClass('retry'))||download.hasClass('not-available')||download.hasClass('not-available-yet')){return false;}
if(!EMUSIC_GLOBAL.DLM.getDLM()){loadDownloadMessage('dlm',download);return false;}
if(hasMessage(download,album.attr('data-id'))){return false;}
download.addClass('pending');$.ajax({type:'post',async:$.support.leadingWhitespace?true:false,url:'/wp-content/ajax.php',data:{domain:download.attr('data-domain'),action:'user-can-download',album_id:album.attr('data-id'),track_id:download.attr('data-id')?download.attr('data-id'):'',retry:download.hasClass('retry')},success:function(data){download.removeClass('pending');retryCheckInterval=0;switch(data){case'0':window.location.href='/log-in.php?redirect_to='+('http://'+window.location.host+hash.substr(1));break;case'20520':loadDownloadMessage('one-click',download,album.attr('data-id'));;break;case'20521':loadDownloadMessage('stop',download,album.attr('data-id'));break;case'2053':loadDownloadMessage('error');break;case'2050':loadDownloadMessage('stale');break;case'2059':loadDownloadMessage('error');break;default:setIframeInstance(data);getPageState();break;}},error:function(){download.removeClass('pending');}});return false;}});}
function init(){download();book_download();}
if(!$.support.leadingWhitespace){EMUSIC_GLOBAL.toggleContainer(init,'download.js',['PAGEJS']);}
$(document).ready(init);}(jQuery));(function($,EMUSIC){"use strict";var timerHandle,bundleActionInfo,bundleActions,bound=false;function createBundleActionList(){var bundleList=['<ul class="item-actions">','<li class="save-for-later"></li>','<li class="add-to-list">Add to List</li>','<li class="toggle-queue">Add to Queue</li>','</ul>'].join('');return $(bundleList);}
bundleActions=createBundleActionList();function remove(el){return function(){$('li.save-for-later').unbind('click');el.remove();};}
function setTimer(e){var el=$(e.target.parentNode);timerHandle=window.setTimeout(remove(el),600);}
function clearTimer(){if(timerHandle){window.clearTimeout(timerHandle);}}
function toggleSavedText(li){return function(){$.ajax({type:'post',url:'/wp-content/ajax.php',data:{action:'get-sfl-count'},success:function(data){$('#saved-items-count').text(data);if(bundleActionInfo.saved==='1'){bundleActionInfo.infoTarget.attr('data-saved','0').removeClass('saved');li.text('Save for Later');}else{bundleActionInfo.infoTarget.attr('data-saved','1').addClass('saved');li.text('Un-Save');}}})};}
function bindBundleActionClicks(){$('li.save-for-later').live('click',function(e){var li=$(this);if(bundleActionInfo.saved==="-2"){window.location.href='/registration/1.html';}else if(bundleActionInfo.saved==="-1"){var wpRedirect=window.location.href.replace('\/listen\/#','');window.location.href='/log-in.php?redirect_to='+wpRedirect;}else{$.ajax({type:'post',url:'/wp-content/ajax.php',data:{action:(bundleActionInfo.saved==='1')?'remove-sfl':'add-sfl',id:bundleActionInfo.id,domain:bundleActionInfo.domain},success:toggleSavedText(li),error:function(data){}});e.stopPropagation();return false;}});$('li.add-to-list').live('click',function(e){var li=$(this);if(bundleActionInfo.saved==="-2"){window.location.href='/registration/1.html';}else if(bundleActionInfo.saved==="-1"){var wpRedirect=window.location.href.replace('\/listen\/#','');window.location.href='/log-in.php?redirect_to='+wpRedirect;}else{$.ajax({type:'get',url:'/lists/ajax.html',data:{method:'getLists',contentIds:bundleActionInfo.id,contentType:bundleActionInfo.domain,js:'yes',alt:true},success:function(data){$.fancybox({content:data,wrapCSS:'fancybox-transparent-border-wrap',beforeShow:function(){$('.scroll-pane').jScrollPane({dragMinHeight:10,showArrows:false});$('.box-close').click(function(){$.fancybox.close();});$('#create-list-form').submit(function(){$('#add-new').trigger('click');return false;});$('#add-new').click(function(e){if($('#createList').val()!==''){$.ajax({type:'get',url:'/lists/ajax.html',data:{method:'addToNewList',contentIds:bundleActionInfo.id,contentType:bundleActionInfo.domain,js:'yes',listName:$('#createList').val(),sfl:false,saving:true},success:function(xml){$('#list-container').html($('response',xml).text());$('#create-new').slideUp();}});e.stopPropagation();return false;}});$('.addToListLink').click(function(){$.ajax({type:'get',url:'/lists/ajax.html',data:{method:'addToList',contentIds:bundleActionInfo.id,contentType:bundleActionInfo.domain,js:'yes',sfl:false,saving:true,listId:$(this).attr('data-id')},success:function(xml){$('#list-container').html($('response',xml).text());$('#create-new').slideUp();}});return false;});}})},error:function(data){}});e.stopPropagation();return false;}});$('li.toggle-queue').live('click',function(){switch(bundleActionInfo.domain){case'B':EMUSIC.modes.sample.api.queueBook(bundleActionInfo.sampleUrl,false).done(function(tracks){EMUSIC.modes.sample.updateListPanel('queue',true);});break;default:EMUSIC.modes.sample.api.queueTracks(bundleActionInfo.sampleUrl,false).done(function(tracks){EMUSIC.modes.sample.updateListPanel('queue',true);});break;}});}
function isItemInQueue(){var queue,inQueue=false,len,i;queue=store.get('sample_queue');if(queue){len=queue.length;for(i=0;i<len;i+=1){if(queue[i].album.id==bundleActionInfo.parentId){if(bundleActionInfo.isTrack){if(queue[i].id==bundleActionInfo.id){return{inQueue:true,index:i};}}else{return{inQueue:true,index:i}}}}}
return{inQueue:inQueue,index:i};}
$(document).ready(function(){$('.actions').live('click',function(e){var saved,elem=$(this);saved=elem.attr('data-saved');bundleActionInfo={isTrack:elem.attr('data-domain')==='S',infoTarget:elem,id:elem.attr('data-id'),domain:elem.attr('data-domain'),saved:elem.attr('data-saved'),savedText:saved==='1'?'Un-Save':'Save for Later',parentId:elem.attr('data-parent-id')?elem.attr('data-parent-id'):elem.attr('data-id'),queueText:'Add To Queue',inQueue:function(){return isItemInQueue().inQueue;},sampleUrl:elem.attr('data-sample')};$('ul.item-actions').remove();bundleActions.css({top:elem.offset().top,left:elem.offset().left,'z-index':1000002}).find('li.save-for-later').text(bundleActionInfo.savedText).end().find('li.toggle-queue').html(bundleActionInfo.queueText).end();$('body').append(bundleActions);if(!bound){bindBundleActionClicks();bound=true;}
window.clearTimeout(timerHandle);bundleActions.mouseleave(setTimer).mouseenter(clearTimer);return false;});});}(jQuery,window.EMUSIC));"use strict";(function($){function buildStage(){var stage=$(this),buttons,actors,actorWidth,prevButton,nextButton,current=0,buttonTimeout;buttons=stage.find('.stage-actions .button');prevButton=stage.find('.prev-next .prev');nextButton=stage.find('.prev-next .next');prevButton.click(function(){current=current-1<0?buttons.length-1:current-1;buttons.eq(current).trigger('mouseover');return false;});nextButton.click(function(){current=current+1>=buttons.length?0:current+1;buttons.eq(current).trigger('mouseover');return false;});actors=stage.find('.actors');actorWidth=actors.children('li').eq(0).width();actors.css('width',actorWidth*actors.children('li').length);actors.children('li').each(function(i){var elem=$(this);elem.css('left',actorWidth*i);});buttons.bind('mouseover',function(e){var index=buttons.index(this),elem=$(this);buttonTimeout=window.setTimeout(function(){current=index;elem.addClass('button-on').siblings().removeClass('button-on');actors.stop().animate({marginLeft:-1*(actorWidth*index)});},350);});buttons.bind('mouseout',function(){window.clearTimeout(buttonTimeout);});}
function init(){$('.stage').each(buildStage);}
window.buildStages=init;EMUSIC_GLOBAL.toggleContainer(init,'stage.js','PAGEJS');}(jQuery));
