/*


 SoundManager 2: Javascript Sound for the Web
 --------------------------------------------
 http://schillmania.com/projects/soundmanager2/

 Copyright (c) 2007, Scott Schiller. All rights reserved.
 Code provided under the BSD License:
 http://schillmania.com/projects/soundmanager2/license.txt

 V2.97a.20110101
*/
getCookie=function(e){var h=null;if(document.cookie&&document.cookie!="")for(var o=document.cookie.split(";"),C=0;C<o.length;C++){var F=jQuery.trim(o[C]);if(F.substring(0,e.length+1)==e+"="){h=decodeURIComponent(F.substring(e.length+1));break}}return h};$.ajaxSetup({headers:{"X-CSRFToken":getCookie("csrftoken")}});
(function(e){function h(m){if(e.facebox.settings.inited)return true;else e.facebox.settings.inited=true;e(document).trigger("init.facebox");F();var s=e.facebox.settings.imageTypes.join("|");e.facebox.settings.imageTypesRegexp=RegExp(".("+s+")$","i");m&&e.extend(e.facebox.settings,m);e("body").append(e.facebox.settings.faceboxHtml);var A=[new Image,new Image];A[0].src=e.facebox.settings.closeImage;A[1].src=e.facebox.settings.loadingImage;e("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){A.push(new Image);
A.slice(-1).src=e(this).css("background-image").replace(/url\((.+)\)/,"$1")});e("#facebox .close").click(e.facebox.close);e("#facebox .close_image").attr("src",e.facebox.settings.closeImage)}function o(){var m,s;if(self.pageYOffset){s=self.pageYOffset;m=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){s=document.documentElement.scrollTop;m=document.documentElement.scrollLeft}else if(document.body){s=document.body.scrollTop;m=document.body.scrollLeft}return[m,
s]}function C(){var m;if(self.innerHeight)m=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)m=document.documentElement.clientHeight;else if(document.body)m=document.body.clientHeight;return m}function F(){var m=e.facebox.settings;m.loadingImage=m.loading_image||m.loadingImage;m.closeImage=m.close_image||m.closeImage;m.imageTypes=m.image_types||m.imageTypes;m.faceboxHtml=m.facebox_html||m.faceboxHtml}function D(m,s){if(m.match(/#/)){var A=window.location.href.split("#")[0];
A=m.replace(A,"");A!="#"&&e.facebox.reveal(e(A).html(),s)}else m.match(e.facebox.settings.imageTypesRegexp)?v(m,s):b(m,s)}function v(m,s){var A=new Image;A.onload=function(){e.facebox.reveal('<div class="image"><img src="'+A.src+'" /></div>',s)};A.src=m}function b(m,s){e.get(m,function(A){e.facebox.reveal(A,s)})}function w(m,s){e.post(m,function(A){e.facebox.reveal(A,s)})}function B(){return e.facebox.settings.overlay==false||e.facebox.settings.opacity===null}function y(){if(!B()){e("#facebox_overlay").length==
0&&e("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');e("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",e.facebox.settings.opacity).click(function(){e(document).trigger("close.facebox")}).fadeIn(200);return false}}function t(){if(!B()){e("#facebox_overlay").fadeOut(200,function(){e("#facebox_overlay").removeClass("facebox_overlayBG");e("#facebox_overlay").addClass("facebox_hide");e("#facebox_overlay").remove()});return false}}e.facebox=function(m,s){e.facebox.loading();
if(m.ajax)b(m.ajax,s);else if(m.post)w(m.post,s);else if(m.image)v(m.image,s);else if(m.div)D(m.div,s);else e.isFunction(m)?m.call(e):e.facebox.reveal(m,s)};e.extend(e.facebox,{settings:{opacity:0.8,overlay:true,loadingImage:"/facebox/loading.gif",closeImage:"/facebox/closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content">                 </div>                 <div class="footer">                   <a href="#" class="close">                     <img title="close" class="close_image" />                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},
loading:function(){h();if(e("#facebox .loading").length==1)return true;y();e("#facebox .content").empty();e("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+e.facebox.settings.loadingImage+'"/></div>');e("#facebox").css({top:o()[1]+C()/10,left:e(window).width()/2-205}).show();e(document).bind("keydown.facebox",function(m){m.keyCode==27&&e.facebox.close();return true});e(document).trigger("loading.facebox")},reveal:function(m,s){if(!e("#facebox .content").hasClass("filled")){e(document).trigger("beforeReveal.facebox");
s&&e("#facebox .content").addClass(s);e("#facebox .content").append(m);e("#facebox .loading").remove();e("#facebox .body").children().fadeIn("normal");e("#facebox").css("left",e(window).width()/2-e("#facebox table").width()/2);e("#facebox .content").addClass("filled");e(document).trigger("reveal.facebox").trigger("afterReveal.facebox")}},close:function(){e(document).trigger("close.facebox");return false}});e.fn.facebox=function(m){if(e(this).length!=0){h(m);return this.bind("click.facebox",function(){e.facebox.loading(true);
var s=this.rel.match(/facebox\[?\.(\w+)\]?/);if(s)s=s[1];D(this.href,s);return false})}};e(document).bind("close.facebox",function(){e(document).unbind("keydown.facebox");e("#facebox").fadeOut(function(){e("#facebox .content").removeClass().addClass("content");t();e("#facebox .loading").remove()})})})(jQuery);
(function(e){e.address=function(){var h=function(k){e(e.address).trigger(e.extend(e.Event(k),function(){for(var x={},X=e.address.parameterNames(),Z=0,la=X.length;Z<la;Z++)x[X[Z]]=e.address.parameter(X[Z]);return{value:e.address.value(),path:e.address.path(),pathNames:e.address.pathNames(),parameterNames:X,parameters:x,queryString:e.address.queryString()}}.call(e.address)))},o=function(k,x,X){e(e.address).bind(k,x,X);return e.address},C=function(){return ma.pushState&&typeof P.state!==j},F=function(){return"/"+
Q.pathname.replace(RegExp(P.state),"")+Q.search+(D()?"#"+D():"")},D=function(){var k=Q.href.indexOf("#");return k!=-1?w(Q.href.substr(k+1),ca):""},v=function(){return C()?F():D()},b=function(k,x){if(P.strict)k=x?k.substr(0,1)!="/"?"/"+k:k:k==""?"/":k;return k},w=function(k,x){if(P.crawlable&&x)return(k!=""?"!":"")+k;return k.replace(/^\!/,"")},B=function(k,x){return parseInt(k.css(x),10)},y=function(k){for(var x,X,Z=0,la=k.childNodes.length;Z<la;Z++){if(k.childNodes[Z].src)x=String(k.childNodes[Z].src);
if(X=y(k.childNodes[Z]))x=X}return x},t=function(){if(!Aa){var k=v(),x=O!=k;if(va&&fa<523){if(Ba!=ma.length){Ba=ma.length;if(typeof za[Ba-1]!=j)O=za[Ba-1];m(ca)}}else if(x)if(wa&&fa<7)Q.reload();else{wa&&fa<8&&P.history&&ra(A,50);O=k;m(ca)}}},m=function(k){h(r);h(k?I:M);ra(s,10)},s=function(){if(P.tracker!=="null"&&P.tracker!==null){var k=e.isFunction(P.tracker)?P.tracker:ba[P.tracker],x=(Q.pathname+Q.search+(e.address&&!C()?e.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,"");if(e.isFunction(k))k(x);
else if(e.isFunction(ba.urchinTracker))ba.urchinTracker(x);else if(typeof ba.pageTracker!=j&&e.isFunction(ba.pageTracker._trackPageview))ba.pageTracker._trackPageview(x);else typeof ba._gaq!=j&&e.isFunction(ba._gaq.push)&&ba._gaq.push(["_trackPageview",x])}},A=function(){var k="javascript:"+ca+";document.open();document.writeln('<html><head><title>"+ea.title+"</title><script>var "+c+' = "'+v()+(ea.domain!=Q.host?'";document.domain="'+ea.domain:"")+"\";<\/script></head></html>');document.close();";
if(fa<7)da.src=k;else da.contentWindow.location.replace(k)},z=function(){if(Fa&&La!=-1){var k,x=Fa.substr(La+1).split("&");for(sa=0;sa<x.length;sa++){k=x[sa].split("=");if(/^(autoUpdate|crawlable|history|strict|wrap)$/.test(k[0]))P[k[0]]=isNaN(k[1])?/^(true|yes)$/i.test(k[1]):parseInt(k[1],10)!==0;if(/^(state|tracker)$/.test(k[0]))P[k[0]]=k[1]}Fa=null}O=v()},E=function(){if(!ta){ta=L;z();var k=e("body").ajaxComplete(function(){T.call(this);g.call(this)}).trigger("ajaxComplete");if(P.wrap){e("body > *").wrapAll('<div style="padding:'+
(B(k,"marginTop")+B(k,"paddingTop"))+"px "+(B(k,"marginRight")+B(k,"paddingRight"))+"px "+(B(k,"marginBottom")+B(k,"paddingBottom"))+"px "+(B(k,"marginLeft")+B(k,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+c+'" style="height:100%; overflow:auto;'+(va?window.statusbar.visible&&!/chrome/i.test(ia)?"":" resize:both;":"")+'" />');e("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"});va&&e('<style type="text/css" />').appendTo("head").text("#"+c+"::-webkit-resizer { background-color: #fff; }")}if(wa&&
fa<8){k=ea.getElementsByTagName("frameset")[0];da=ea.createElement((k?"":"i")+"frame");if(k){k.insertAdjacentElement("beforeEnd",da);k[k.cols?"cols":"rows"]+=",0";da.noResize=L;da.frameBorder=da.frameSpacing=0}else{da.style.display="none";da.style.width=da.style.height=0;da.tabIndex=-1;ea.body.insertAdjacentElement("afterBegin",da)}ra(function(){e(da).bind("load",function(){var x=da.contentWindow;O=typeof x[c]!=j?x[c]:"";if(O!=v()){m(ca);Q.hash=w(O,L)}});typeof da.contentWindow[c]==j&&A()},50)}else if(va){if(fa<
418){e(ea.body).append('<form id="'+c+'" style="position:absolute;top:-9999px;" method="get"></form>');Ia=ea.getElementById(c)}if(typeof Q[c]==j)Q[c]={};if(typeof Q[c][Q.pathname]!=j)za=Q[c][Q.pathname].split(",")}ra(function(){h("init");m(ca)},1);if(!C())if(wa&&fa>7||!wa&&"on"+l in ba)if(ba.addEventListener)ba.addEventListener(l,t,false);else ba.attachEvent&&ba.attachEvent("on"+l,t);else Ka(t,50)}},T=function(){var k,x=e("a"),X=x.size(),Z=-1;ra(function(){if(++Z!=X){k=e(x.get(Z));k.is("[rel*=address:]")&&
k.address();ra(arguments.callee,1)}},1)},R=function(){if(O!=v()){O=v();m(ca)}},U=function(){if(ba.removeEventListener)ba.removeEventListener(l,t,false);else ba.detachEvent&&ba.detachEvent("on"+l,t)},g=function(){var k=Q.pathname.replace(/\/$/,"");e("body").html().indexOf("_escaped_fragment_")!=-1&&e("a[href]:not([href^=http]), , a[href*="+document.domain+"]",this).each(function(){var x=e(this).attr("href").replace(/^http:/,"").replace(RegExp(k+"/?$"),"");if(x==""||x.indexOf("_escaped_fragment_")!=
-1)e(this).attr("href","#"+this.decode(x.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2")))})},J=function(k){return encodeURIComponent(k).replace(/%20/g,"+")},V=function(k){return k.split("#")[0].split("?")[0]},Y=function(k){k=V(k);var x=k.replace(/\/{2,9}/g,"/").split("/");if(k.substr(0,1)=="/"||k.length===0)x.splice(0,1);k.substr(k.length-1,1)=="/"&&x.splice(x.length-1,1);return x},ja=function(k){k=k.split("?");return k.slice(1,k.length).join("?").split("#")[0]},S=function(k,x){if(x=ja(x)){params=
x.split("&");x=[];for(sa=0;sa<params.length;sa++){var X=params[sa].split("=");X[0]==k&&x.push(X.slice(1).join("="))}if(x.length!==0)return x.length!=1?x:x[0]}},W=function(k){var x=ja(k);k=[];if(x&&x.indexOf("=")!=-1){x=x.split("&");for(var X=0;X<x.length;X++){var Z=x[X].split("=")[0];e.inArray(Z,k)==-1&&k.push(Z)}}return k},pa=function(k){k=k.split("#");return k.slice(1,k.length).join("#")},c="jQueryAddress",j="undefined",l="hashchange",r="change",I="internalChange",M="externalChange",L=true,ca=false,
P={autoUpdate:L,crawlable:ca,history:L,strict:L,wrap:ca},na=e.browser,fa=parseFloat(e.browser.version),Ma=na.mozilla,wa=na.msie,Ja=na.opera,va=na.webkit,Ca=ca,ba;try{ba=top.document!==undefined?top:window}catch(Ga){ba=window}var ea=ba.document,ma=ba.history,Q=ba.location,Ka=setInterval,ra=setTimeout,ia=navigator.userAgent,da,Ia,Fa=y(document),La=Fa?Fa.indexOf("?"):-1,xa=ea.title,Ba=ma.length,Aa=ca,ta=ca,Da=L,ya=L,Ha=ca,za=[],O=v();if(wa){fa=parseFloat(ia.substr(ia.indexOf("MSIE")+4));if(ea.documentMode&&
ea.documentMode!=fa)fa=ea.documentMode!=8?7:8;e(document).bind("propertychange",function(){if(ea.title!=xa&&ea.title.indexOf("#"+v())!=-1)ea.title=xa})}if(Ca=Ma&&fa>=1||wa&&fa>=6||Ja&&fa>=9.5||va&&fa>=312){for(var sa=1;sa<Ba;sa++)za.push("");za.push(O);if(Ja)history.navigationMode="compatible";if(document.readyState=="complete")var Na=setInterval(function(){if(e.address){E();clearInterval(Na)}},50);else{z();e(E)}na=F();if(typeof P.state!==j)if(ma.pushState)na.substr(0,3)=="/#/"&&Q.replace(P.state.replace(/^\/$/,
"")+na.substr(2));else na!="/"&&na.replace(/^\/#/,"")!=D()&&Q.replace(P.state.replace(/^\/$/,"")+"/#"+na);e(window).bind("popstate",R).bind("unload",U)}else!Ca&&D()!=""||va&&fa<418&&D()!=""&&Q.search!=""?Q.replace(Q.href.substr(0,Q.href.indexOf("#"))):s();return{bind:function(k,x,X){return o(k,x,X)},init:function(k){return o("init",k)},change:function(k){return o(r,k)},internalChange:function(k){return o(I,k)},externalChange:function(k){return o(M,k)},baseURL:function(){var k=Q.href;if(k.indexOf("#")!=
-1)k=k.substr(0,k.indexOf("#"));if(/\/$/.test(k))k=k.substr(0,k.length-1);return k},autoUpdate:function(k){if(k!==undefined){P.autoUpdate=k;return this}return P.autoUpdate},crawlable:function(k){if(k!==undefined){P.crawlable=k;return this}return P.crawlable},history:function(k){if(k!==undefined){P.history=k;return this}return P.history},state:function(k){if(k!==undefined){P.state=k;return this}return P.state},strict:function(k){if(k!==undefined){P.strict=k;return this}return P.strict},tracker:function(k){if(k!==
undefined){P.tracker=k;return this}return P.tracker},wrap:function(k){if(k!==undefined){P.wrap=k;return this}return P.wrap},update:function(){Ha=L;this.value(O);Ha=ca;return this},encode:function(k){var x=Y(k),X=W(k),Z=ja(k),la=pa(k),ua=k.substr(0,1),Ea=k.substr(k.length-1),f="";e.each(x,function(a,H){f+="/"+J(H)});if(Z!==""){f+="?";if(X.length===0)f+=Z;else{e.each(X,function(a,H){a=S(H,k);if(typeof a!=="string")e.each(a,function(G,u){f+=J(H)+"="+J(u)+"&"});else f+=J(H)+"="+J(a)+"&"});f=f.substr(0,
f.length-1)}}if(la!=="")f+="#"+J(la);if(ua!="/"&&f.substr(0,1)=="/")f=f.substr(1);if(/#|&|\?/.test(Ea))f+=Ea;return f},decode:function(k){return decodeURIComponent(k.replace(/\+/g,"%20"))},title:function(k){if(k!==undefined){ra(function(){xa=ea.title=k;if(ya&&da&&da.contentWindow&&da.contentWindow.document){da.contentWindow.document.title=k;ya=ca}if(!Da&&Ma)Q.replace(Q.href.indexOf("#")!=-1?Q.href:Q.href+"#");Da=ca},50);return this}return ea.title},value:function(k){if(k!==undefined){k=b(this.encode(k),
L);if(k=="/")k="";if(O==k&&!Ha)return;Da=L;O=k;if(P.autoUpdate||Ha){m(L);if(C())ma[P.history?"pushState":"replaceState"]({},"",P.state.replace(/\/$/,"")+(O==""?"/":O));else{Aa=L;za[ma.length]=O;if(va)if(P.history){Q[c][Q.pathname]=za.toString();Ba=ma.length+1;if(fa<418){if(Q.search==""){Ia.action="#"+w(O,L);Ia.submit()}}else if(fa<523||O==""){k=ea.createEvent("MouseEvents");k.initEvent("click",L,L);var x=ea.createElement("a");x.href="#"+w(O,L);x.dispatchEvent(k)}else Q.hash="#"+w(O,L)}else Q.replace("#"+
w(O,L));else if(O!=v())if(P.history)Q.hash="#"+w(O,L);else Q.replace("#"+w(O,L));wa&&fa<8&&P.history&&ra(A,50);if(va)ra(function(){Aa=ca},1);else Aa=ca}}return this}if(!Ca)return null;return b(this.decode(O),ca)},path:function(k){if(k!==undefined){var x=this.queryString(),X=this.hash();this.value(k+(x?"?"+x:"")+(X?"#"+X:""));return this}return V(this.value())},pathNames:function(){return Y(this.value())},queryString:function(k){if(k!==undefined){var x=this.hash();this.value(this.path()+(k?"?"+k:"")+
(x?"#"+x:""));return this}return ja(this.value())},parameter:function(k,x,X){var Z,la;if(x!==undefined){var ua=this.parameterNames();la=[];for(Z=0;Z<ua.length;Z++){var Ea=ua[Z],f=this.parameter(Ea);if(typeof f=="string")f=[f];if(Ea==k)f=x===null||x===""?[]:X?f.concat([x]):[x];for(var a=0;a<f.length;a++)la.push(Ea+"="+f[a])}e.inArray(k,ua)==-1&&x!==null&&x!==""&&la.push(k+"="+x);this.queryString(la.join("&"));return this}return S(k,this.value())},parameterNames:function(){return W(this.value())},hash:function(k){if(k!==
undefined){this.value(this.value().split("#")[0]+(k?"#"+k:""));return this}return pa(this.value())}}}();e.fn.address=function(h){if(!e(this).attr("address")){var o=function(C){if(e(this).is("a")){var F=h?h.call(this):/address:/.test(e(this).attr("rel"))?e(this).attr("rel").split("address:")[1].split(" ")[0]:typeof e.address.state()!=="undefined"&&e.address.state()!="/"?e(this).attr("href").replace(RegExp("^(.*"+e.address.state()+"|\\.)"),""):e(this).attr("href").replace(/^(#\!?|\.)/,"");e.address.value(F);
C.preventDefault()}};e(this).click(o).live("click",o).submit(function(C){if(e(this).is("form")){var F=h?h.call(this):e(this).attr("action")+"?"+e.address.decode(e(this).serialize());e.address.value(F);C.preventDefault()}}).attr("address",true)}return this}})(jQuery);
(function(e){e.fn.easySlider=function(h){h=e.extend({prevId:"prevBtn",prevText:"Previous",nextId:"nextBtn",nextText:"Next",controlsShow:true,controlsBefore:"",controlsAfter:"",controlsFade:true,firstId:"firstBtn",firstText:"First",firstShow:false,lastId:"lastBtn",lastText:"Last",lastShow:false,vertical:false,speed:800,auto:false,pause:2E3,continuous:false,numeric:false,numericId:"controls"},h);this.each(function(){function o(z){z=parseInt(z)+1;e("li","#"+h.numericId).removeClass("current");e("li#"+
h.numericId+z).addClass("current")}function C(){if(s>m)s=0;if(s<0)s=m;h.vertical?v.css("margin-left",s*y*-1):v.css("margin-left",s*B*-1);t=true;h.numeric&&o(s)}function F(z,E){if(t){t=false;var T=s;switch(z){case "next":s=T>=m?h.continuous?s+1:m:s+1;break;case "prev":s=s<=0?h.continuous?s-1:0:s-1;break;case "first":s=0;break;case "last":s=m;break;default:s=z}T=Math.abs(T-s);var R=T*h.speed;if(h.vertical){p=s*y*-1;v.animate({marginTop:p},{queue:false,duration:R,complete:C})}else{p=s*B*-1;v.animate({marginLeft:p},
{queue:false,duration:R,complete:C})}if(!h.continuous&&h.controlsFade){if(s==m){e(h.nextId).hide();e(h.lastId).hide()}else{e(h.nextId).show();e(h.lastId).show()}if(s==0){e(h.prevId).hide();e(h.firstId).hide()}else{e(h.prevId).show();e(h.firstId).show()}}E&&clearTimeout(A);if(h.auto&&z=="next"&&!E)A=setTimeout(function(){F("next",false)},T*h.speed+h.pause)}}var D=e(this),v=D.children("ul"),b=v.children("li"),w=b.length,B=b.width(),y=b.height(),t=true;D.width(B);D.height(y);D.css("overflow","hidden");
var m=w-1,s=0;v.css("width",w*B);if(h.continuous){v.prepend(v.children("li:last-child").clone().css("margin-left","-"+B+"px"));v.append(v.children("li:nth-child(2)").clone());v.css("width",(w+1)*B);b=v.children("li")}h.vertical||b.css("float","left");if(h.controlsShow){b=h.controlsBefore;if(h.numeric)b+='<ol id="'+h.numericId+'"></ol>';else{if(h.firstShow)b+='<span id="'+h.firstId+'"><a href="javascript:void(0);">'+h.firstText+"</a></span>";b+=' <span id="'+h.prevId+'"><a href="javascript:void(0);">'+
h.prevText+"</a></span>";b+=' <span id="'+h.nextId+'"><a href="javascript:void(0);">'+h.nextText+"</a></span>";if(h.lastShow)b+=' <span id="'+h.lastId+'"><a href="javascript:void(0);">'+h.lastText+"</a></span>"}b+=h.controlsAfter;e(D).after(b)}if(h.numeric)for(D=0;D<w;D++)e(document.createElement("li")).attr("id",h.numericId+(D+1)).html("<a rel="+D+' href="javascript:void(0);">'+(D+1)+"</a>").appendTo(e("#"+h.numericId)).click(function(){F(e("a",e(this)).attr("rel"),true)});else{e(h.nextId).click(function(){F("next",
true)});e(h.prevId).click(function(){F("prev",true)});e(h.firstId).click(function(){F("first",true)});e(h.lastId).click(function(){F("last",true)})}var A;if(h.auto)A=setTimeout(function(){F("next",false)},h.pause);h.numeric&&o(0);if(!h.continuous&&h.controlsFade){e(h.prevId).hide();e(h.firstId).hide()}})}})(jQuery);
(function(){var e={jQuery:"http://code.jquery.com/jquery-latest.min.js"},h=function(){(function(b){b.fn.idTabs=function(){for(var w={},B=0;B<arguments.length;++B){var y=arguments[B];switch(y.constructor){case Object:b.extend(w,y);break;case Boolean:w.change=y;break;case Number:w.start=y;break;case Function:w.click=y;break;case String:if(y.charAt(0)==".")w.selected=y;else if(y.charAt(0)=="!")w.event=y;else w.start=y}}if(typeof w["return"]=="function")w.change=w["return"];return this.each(function(){b.idTabs(this,
w)})};b.idTabs=function(w,B){var y=b.metadata?b(w).metadata():{},t=b.extend({},b.idTabs.settings,y,B);if(t.selected.charAt(0)==".")t.selected=t.selected.substr(1);if(t.event.charAt(0)=="!")t.event=t.event.substr(1);if(t.start==null)t.start=-1;y=function(){if(b(this).is("."+t.selected))return t.change;var s="#"+this.href.split("#")[1],A=[],z=[];b("a",w).each(function(){if(this.href.match(/#/)){A.push(this);z.push("#"+this.href.split("#")[1])}});if(t.click&&!t.click.apply(this,[s,z,w,t]))return t.change;
for(i in A)b(A[i]).removeClass(t.selected);for(i in z)b(z[i]).hide();b(this).addClass(t.selected);b(s).show();return t.change};y=b("a[href*='#']",w).unbind(t.event,y).bind(t.event,y);y.each(function(){b("#"+this.href.split("#")[1]).hide()});var m=false;if(!(m=y.filter("."+t.selected)).length)if(!(typeof t.start=="number"&&(m=y.eq(t.start)).length))typeof t.start=="string"&&(m=y.filter("[href*='#"+t.start+"']"));if(m){m.removeClass(t.selected);m.trigger(t.event)}return t};b.idTabs.settings={start:0,
change:false,click:null,selected:".selected",event:"!click"};b.idTabs.version="2.2";b(function(){b(".idTabs").idTabs()})})(jQuery)},o=function(b,w){for(w=w.split(".");b&&w.length;)b=b[w.shift()];return b},C=document.getElementsByTagName("head")[0],F=function(b){var w=document.createElement("script");w.type="text/javascript";w.src=b;C.appendChild(w)},D=document.getElementsByTagName("script");D=D[D.length-1].src;var v=true;for(d in e)if(!o(this,d)){v=false;F(e[d])}if(v)return h();F(D)})();
function clock(){var e=new Date,h=e.getHours(),o=e.getMinutes();e.getSeconds();var C="";C+=h<10?"0"+h:h;C+=o<10?":0"+o:":"+o;h=C;e=e.getDate()+" "+["января","февраля","марта","апрелеля","мая","июня","июля","августа","сентября","октября","ноября","декабря"][e.getMonth()]+" "+e.getFullYear();document.getElementById("timeID").innerHTML=h;document.getElementById("dateID").innerHTML=e;setTimeout("clock()",1E3)}
function retab(e,h){var o=$(e+" .itab"),C=$(e+" "+h);o.hide();C.slideDown("fast");return false}
function initSliders(){$("#zodiak").easySlider({auto:false,continuous:true,prevId:"#zodiak_block #prev",nextId:"#zodiak_block #next",controlsShow:false});$("#afisha .afisha_slide").easySlider({auto:true,pause:8E3,continuous:true,prevId:"#afisha #prev",nextId:"#afisha #next",controlsShow:false});if($("#afisha .today").length)retab("#afisha",".today");else if($("#afisha .week").length)retab("#afisha",".week");else $("#afisha .month").length&&retab("#afisha",".month");retab("#jokes",".joke_new");retab("#video",
".new");$("#radio .itab").easySlider({auto:false,continuous:true,prevId:"#radio .left",nextId:"#radio .right",controlsShow:false});retab("#radio",".new");$("#tv .itab").easySlider({auto:false,continuous:true,prevId:"#tv .left",nextId:"#tv .right",controlsShow:false});retab("#tv",".new");$("#games .itab").easySlider({auto:false,continuous:true,prevId:"#games .left",nextId:"#games .right",controlsShow:false});retab("#games",".new");$("#cars .itab").easySlider({auto:false,continuous:true,prevId:"#cars .left",
nextId:"#cars .right",controlsShow:false});retab("#cars",".new");$("#people .itab").easySlider({auto:false,continuous:true,prevId:"#people #prev",nextId:"#people #next",controlsShow:false});retab("#people",".new")}
function bind_commenst_send(){comment="";var e=$("#comment_form");e.submit(function(){if(comment)return false;comment=e.serialize();var h=$("#id_comment").val();e.slideUp(500);e.after('    \t\t\t\t<div class="comment-waiting" style="display: none;">        \t\t\t<h1>Коментарий отправляется. . . </h1>    \t\t\t\t</div>\t\t\t\t');$("div.comment-waiting").fadeIn(1E3);var o=e.attr("action");$.ajax({type:"POST",url:o,data:comment,success:function(){comment="";var C=$(".comments_my_ava").html();$("div.comments").append('\t\t\t\t\t\t\t<div class="comment_cloud">'+
C+'   <div class="comments_radius">\t\t\t\t\t\t\t\t\t<div class="speech"></div>\t\t\t\t\t\t\t\t\t<div class="comm_box">\t\t\t\t\t\t\t\t\t\t<span class="time">сейчас</span> \t\t\t\t\t\t\t\t\t\t<div class="mb2"></div>'+h+"\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t</div>");$("div.comment-waiting").stop().fadeOut(500);$("div.comment_cloud:last").hide().fadeIn(1E3);$(".comments_send_block").slideUp(500,function(){$(this).remove()})},error:function(){comment="";$("div.comment-waiting").stop().remove();
e.unbind("submit");e.submit()},dataType:"html"});comment="";return false})}posting=false;function post_joke(){if(posting)return false;posting=true;var e=$("#joke_form").serialize(),h=$("#form_url").val(),o=$("#joke_content");o.slideUp("fast");$.ajax({type:"POST",url:h,data:e,success:function(C){o.stop().html(C).slideDown();posting=false},error:function(C){o.stop().html(C).slideDown();posting=false},dataType:"html"})}
function vote(e,h){if(h!="none"){var o=$("#down_"+e),C=$("#up_"+e),F=C.attr("href");if(F.charAt(F.length-1)!="/")F+="/";var D=$("#object_"+e+"_score"),v=$("#object_"+e+"_score_rating");D.hide();v.hide();$.post(F+e+"/"+h+"vote/",function(b){b=eval("("+b+")").score.score;D.hide().stop().text(b).fadeIn(1E3);o.fadeOut();C.fadeOut();v.hide().text("Ok").fadeIn(1E3)})}}
function initExternal(){$('a[rel="external_radio"]').click(function(){window.open($(this).attr("href"),"miniwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=688,height=340");return false});$('a[rel="external_tv"]').click(function(){window.open($(this).attr("href"),"miniwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=700,height=800");return false});$('a[rel="mess"]').click(function(){window.open($(this).attr("href"),
"miniwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=700,height=800");return false})}function openCupon(e){window.open(e,"miniwin","toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=700,height=850")}function initCupon(){$('a[target="cupon"]').click(function(){openCupon($(this).attr("href"));return false})}
function initPhoneTitle(){$('a[rel="phone_title"]').click(function(){$this=$(this);$this.fadeOut(200);$this.children("div.phone").text($this.attr("title"));$this.fadeIn(800);return false})}function initSubmenu(){var e=$(".exp_menu_i");e.fadeOut(100);$("#novosti, .exp_menu_i").hover(function(){e.stop(true,true).fadeIn(500)},function(){e.stop(true,true).animate({opacity:0.99},1E3).fadeOut(500)})}
function tripleImage(){var e=$("#photo_swicher a"),h=$("#wtg_big_picture img"),o=h.attr("src");e.mouseenter(function(){$this=$(this);if(h.attr("src")!=$this.attr("href")){h.stop(true,false);h.animate({opacity:0},100,function(){h.attr("src",$this.attr("href"));h.animate({opacity:1},300)})}});e.click(function(){$this=$(this);if(h.attr("src")!=$this.attr("href")){h.stop(true,false);h.animate({opacity:0},100,function(){h.attr("src",$this.attr("href"));h.animate({opacity:1},300)})}return false});e.mouseleave(function(){$this=
$(this);if(h.attr("src")==o)return false;h.delay(400).animate({opacity:0},200,function(){h.attr("src",o);h.animate({opacity:1},300)})});var C=new Image;e.each(function(){C.src=$(this).attr("href")})}
function initDatePicker(){$.datepicker.regional.ru={closeText:"Закрыть",prevText:"&#x3c;Пред",nextText:"След&#x3e;",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс",
"Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Не",dateFormat:"dd-mm-yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};$.datepicker.setDefaults($.datepicker.regional.ru)}
function reajax(e){$(".ajax-page-body",e).each(function(){reajax($(this))});var h=e;if(h.hasClass("ajax-page-body-up"))h=h.parent();$("a[rel*=facebox]",h).facebox();$("a[rel*='ajax']",h).click(function(){h.fadeTo(300,0.5);url=$(this).attr("href");h.load(url,function(){h.fadeTo(300,1)});return false}).attr("rel","push");$("a[rel*='postajx']",h).click(function(){h.fadeTo(300,0.5);url=$(this).attr("href");$.post(url,function(o){h.html(o);h.fadeTo(300,1)});return false}).attr("rel","push");$("input[rel*='ajax']",
h).click(function(){h.fadeTo(300,0.5);try{for(var o in CKEDITOR.instances)CKEDITOR.instances[o].updateElement()}catch(C){alert(C.toString())}form=$(this).parents("form");$.post(form.attr("action"),form.serialize(),function(F){h.html(F);h.fadeTo(300,1)});return false}).attr("rel","push")}function initFacebox(){var e=$.facebox.settings;e.loadingImage="/site_media/static/pinax/img/facebox/loading.gif";e.closeImage="/site_media/static/pinax/img/facebox/closelabel.gif"}
function initMenu(){$("#main_menu").easySlider({auto:false,prevId:"#main_menu_left",nextId:"#main_menu_right",controlsShow:false,continuous:false})}jQuery(document).ready(function(){clock();initMenu();initSubmenu();initSliders();initExternal();initFacebox();tripleImage();initCupon();initPhoneTitle();bind_commenst_send();reajax($("body"));initDatePicker()});
function send_url_by_email(e){var h=$("#facebox #send_status");h.slideUp("fast",function(){to_email=$("#facebox #send_to_email").val();send_url=$("#send_server_url").val();$.post(send_url,{email:to_email,url:e},function(o){h.html(o).slideDown()})})}
(function(e,h){e.fn.lazyload=function(o){var C=function(A){A=A._$.offset();if(/; CPU.*OS (?:3_2|4_0)/i.test(navigator.userAgent)&&"getBoundingClientRect"in document.documentElement){A.top-=h.scrollY;A.left-=h.scrollX}return A},F=this,D={threshold:0,container:h,effect:"show",namespace:".lazyload",sparce_time:0};o&&e.extend(D,o);var v=e(D.container),b=D.namespace,w="appear"+b;o="resize"+b;var B="scroll"+b,y=D.sparce_time,t=D.threshold;v._$=v;v.lastupdated=0;var m=function(){if(v[0]===h){v._bottom=v._height+
v.scrollTop()+t;v._left=v.scrollLeft()-t;v._right=v._width+v.scrollLeft()+t;v._top=v.scrollTop()-t}else{v._offset=C(v);v._bottom=v._offset.top+v._height+t;v._left=v._offset.left-t;v._right=v._offset.left+v._width+t;v._top=v._offset.top-t}};v._height=v.height();v._width=v.width();m();var s=function(A){A=A._$;if(!A.length)return false;offset=C(A);var z=offset.top+A._height,E=offset.left;A=offset.left+A._width;return offset.top<=v._bottom&&E<=v._right&&z>=v._top&&A>=v._left};F.each(function(){var A=
this,z=e(A),E=z.attr("original");this._$=z;z._$=z;z._height=z.height();z._width=z.width();if(s(z)){A.loaded=true;E&&z.attr("src",E)}else{z.data("original",E||z.attr("src"));if(!z.attr("src")||D.placeholder===z.attr("src")||!s(z)){D.placeholder?z.attr("src",D.placeholder):z.removeAttr("src");A.loaded=false}z.one(w,function(){this.loaded||e("<img />").load(function(){z.hide().attr("src",z.data("original"))[D.effect](D.effectSpeed).removeData("original");A.loaded=true}).attr("src",z.data("original"))})}});
v.bind(B+" "+o,function(){if(!((new Date).getTime()-v.lastupdated<y)){v.lastupdated=(new Date).getTime();m();for(var A=F.length,z,E=0;E<A;E++){z=F[E];s(z)&&!z.loaded&&z._$.trigger(w)}F=e(e.grep(F,function(T){return!T.loaded}));F.length||v.unbind(b)}}).trigger(B);return this}})(jQuery,window);
(function(e){function h(C,F){function D(){if(b.debugURLParam.test(y))b.debugMode=true}this.flashVersion=8;this.debugFlash=this.debugMode=false;this.useConsole=true;this.waitForWindowLoad=this.consoleOnly=false;this.nullURL="about:blank";this.allowPolling=true;this.useFastPolling=false;this.useMovieStar=true;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashPollingInterval=null;this.flashLoadTimeout=1E3;this.wmode=null;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock=
false;this.html5Test=/^probably$/i;this.ondebuglog=false;this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:true},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:true},ogg:{type:["audio/ogg; codecs=vorbis"],required:false},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:false}};this.defaultOptions={autoLoad:false,
stream:true,autoPlay:false,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfailure:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,type:null,usePolicyFile:false,volume:100};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,
ondataerror:null,onstats:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,bufferTimes:null,duration:null};this.version=null;this.versionNumber="V2.97a.20110101";this.movieURL=null;this.url=C||null;this.altURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=F||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",
flashDebug:"flash_debug"};this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=false;this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.didFlashBlock=this.specialWmodeCase=false;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.baseMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamTypes=["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v",
"3gp","3g2"];this.netStreamPattern=RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.mimePattern=this.baseMimeTypes;this.features={buffering:false,peakData:false,waveformData:false,eqData:false,movieStar:false};this.sandbox={};this.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=false;var v,b=this,w,B=navigator.userAgent,y=e.location.href.toString(),t=this.flashVersion,m=document,s=e,A,z,E=[],T=false,R=false,U=false,g=false,J=false,V,Y,ja,S,W,pa,c,j,l,r,I,M,L,ca,P,na,
fa,Ma,wa,Ja,va,Ca=null,ba=null,Ga,ea,ma,Q,Ka,ra,ia,da=false,Ia=false,Fa,La,xa=null,Ba,Aa,ta=false,Da,ya,Ha,za,O,sa=Array.prototype.slice,Na=B.match(/pre\//i),k=B.match(/(ipad|iphone|ipod)/i);B.match(/mobile/i);var x=B.match(/MSIE/i),X=B.match(/webkit/i),Z=B.match(/safari/i)&&!B.match(/chrome/i),la=typeof m.hasFocus!=="undefined"?m.hasFocus():null,ua=typeof m.hasFocus==="undefined"&&Z,Ea=!ua;this._use_maybe=y.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=m.location?m.location.protocol.match(/http/i):
null;this.useAltURL=!this._overHTTP;if(k||Na){b.useHTML5Audio=true;b.ignoreFlash=true}if(Na||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;this.supported=this.ok=function(){return xa?U&&!g:b.useHTML5Audio&&b.hasHTML5};this.getMovie=function(f){return x?s[f]:Z?w(f)||m[f]:w(f)};this.createSound=function(f){function a(){H=Q(H);b.sounds[u.id]=new v(u);b.soundIDs.push(u.id);return b.sounds[u.id]}var H=null,G=null,u=null;if(!U||!b.ok()){ra("soundManager.createSound(): "+Ga(!U?"notReady":"notOK"));return false}if(arguments.length===
2)f={id:arguments[0],url:arguments[1]};u=H=Y(f);if(ia(u.id,true))return b.sounds[u.id];if(Aa(u)){G=a();G._setup_html5(u)}else{if(t>8&&b.useMovieStar){if(u.isMovieStar===null)u.isMovieStar=u.serverURL||(u.type?u.type.match(b.netStreamPattern):false)||u.url.match(b.netStreamPattern)?true:false;if(u.isMovieStar)if(u.usePeakData)u.usePeakData=false}u=Ka(u,"soundManager.createSound(): ");G=a();if(t===8)b.o._createSound(u.id,u.onjustbeforefinishtime,u.loops||1,u.usePolicyFile);else{b.o._createSound(u.id,
u.url,u.onjustbeforefinishtime,u.usePeakData,u.useWaveformData,u.useEQData,u.isMovieStar,u.isMovieStar?u.bufferTime:false,u.loops||1,u.serverURL,u.duration||null,u.autoPlay,true,u.bufferTimes,u.onstats?true:false,u.autoLoad,u.usePolicyFile);if(!u.serverURL){G.connected=true;u.onconnect&&u.onconnect.apply(G)}}}if(u.autoLoad||u.autoPlay)if(G)if(b.isHTML5){G.autobuffer="auto";G.preload="auto"}else G.load(u);u.autoPlay&&G.play();return G};this.destroySound=function(f,a){if(!ia(f))return false;var H=b.sounds[f],
G;H._iO={};H.stop();H.unload();for(G=0;G<b.soundIDs.length;G++)if(b.soundIDs[G]===f){b.soundIDs.splice(G,1);break}a||H.destruct(true);delete b.sounds[f];return true};this.load=function(f,a){if(!ia(f))return false;return b.sounds[f].load(a)};this.unload=function(f){if(!ia(f))return false;return b.sounds[f].unload()};this.start=this.play=function(f,a){if(!U||!b.ok()){ra("soundManager.play(): "+Ga(!U?"notReady":"notOK"));return false}if(!ia(f)){a instanceof Object||(a={url:a});if(a&&a.url){a.id=f;return b.createSound(a).play()}else return false}return b.sounds[f].play(a)};
this.setPosition=function(f,a){if(!ia(f))return false;return b.sounds[f].setPosition(a)};this.stop=function(f){if(!ia(f))return false;return b.sounds[f].stop()};this.stopAll=function(){for(var f in b.sounds)b.sounds[f]instanceof v&&b.sounds[f].stop()};this.pause=function(f){if(!ia(f))return false;return b.sounds[f].pause()};this.pauseAll=function(){for(var f=b.soundIDs.length;f--;)b.sounds[b.soundIDs[f]].pause()};this.resume=function(f){if(!ia(f))return false;return b.sounds[f].resume()};this.resumeAll=
function(){for(var f=b.soundIDs.length;f--;)b.sounds[b.soundIDs[f]].resume()};this.togglePause=function(f){if(!ia(f))return false;return b.sounds[f].togglePause()};this.setPan=function(f,a){if(!ia(f))return false;return b.sounds[f].setPan(a)};this.setVolume=function(f,a){if(!ia(f))return false;return b.sounds[f].setVolume(a)};this.mute=function(f){var a=0;if(typeof f!=="string")f=null;if(f){if(!ia(f))return false;return b.sounds[f].mute()}else{for(a=b.soundIDs.length;a--;)b.sounds[b.soundIDs[a]].mute();
b.muted=true}return true};this.muteAll=function(){b.mute()};this.unmute=function(f){if(typeof f!=="string")f=null;if(f){if(!ia(f))return false;return b.sounds[f].unmute()}else{for(f=b.soundIDs.length;f--;)b.sounds[b.soundIDs[f]].unmute();b.muted=false}return true};this.unmuteAll=function(){b.unmute()};this.toggleMute=function(f){if(!ia(f))return false;return b.sounds[f].toggleMute()};this.getMemoryUse=function(){if(t===8)return 0;if(b.o)return parseInt(b.o._getMemoryUse(),10)};this.disable=function(f){if(typeof f===
"undefined")f=false;if(g)return false;g=true;for(var a=b.soundIDs.length;a--;)wa(b.sounds[b.soundIDs[a]]);V(f);O.remove(s,"load",W);return true};this.canPlayMIME=function(f){var a;if(b.hasHTML5)a=Da({type:f});return!xa||a?a:f?f.match(b.mimePattern)?true:false:null};this.canPlayURL=function(f){var a;if(b.hasHTML5)a=Da(f);return!xa||a?a:f?f.match(b.filePattern)?true:false:null};this.canPlayLink=function(f){if(typeof f.type!=="undefined"&&f.type)if(b.canPlayMIME(f.type))return true;return b.canPlayURL(f.href)};
this.getSoundById=function(f){if(!f)throw Error("SoundManager.getSoundById(): sID is null/undefined");return b.sounds[f]};this.onready=function(f,a){if(f&&f instanceof Function){a||(a=s);ja("onready",f,a);S();return true}else throw Ga("needFunction","onready");};this.ontimeout=function(f,a){if(f&&f instanceof Function){a||(a=s);ja("ontimeout",f,a);S({type:"ontimeout"});return true}else throw Ga("needFunction","ontimeout");};this.getMoviePercent=function(){return b.o&&typeof b.o.PercentLoaded!=="undefined"?
b.o.PercentLoaded():null};this._wD=this._writeDebug=function(f,a,H){b.ondebuglog&&b.ondebuglog(f,a,H);return true};this._debug=function(){};this.reboot=function(){var f,a;for(f=b.soundIDs.length;f--;)b.sounds[b.soundIDs[f]].destruct();try{if(x)ba=b.o.innerHTML;Ca=b.o.parentNode.removeChild(b.o)}catch(H){}ba=Ca=null;b.enabled=U=da=Ia=T=R=g=b.swfLoaded=false;b.soundIDs=b.sounds=[];b.o=null;for(f in E)if(E.hasOwnProperty(f))for(a=E[f].length;a--;)E[f][a].fired=false;s.setTimeout(function(){b.beginDelayedInit()},
20)};this.destruct=function(){b.disable(true)};this.beginDelayedInit=function(){J=true;L();setTimeout(I,20);c()};v=function(f){var a=this,H,G,u,ka,aa,ga,N;this.sID=f.id;this.url=f.url;this._iO=this.instanceOptions=this.options=Y(f);this.pan=this.options.pan;this.volume=this.options.volume;this._lastURL=null;this.isHTML5=false;this.id3={};this._debug=function(){};this._debug();this.load=function(n){var K=null;if(typeof n!=="undefined"){a._iO=Y(n);a.instanceOptions=a._iO}else{n=a.options;a._iO=n;a.instanceOptions=
a._iO;if(a._lastURL&&a._lastURL!==a.url){a._iO.url=a.url;a.url=null}}if(a._iO.url===a.url&&a.readyState!==0&&a.readyState!==2)return a;a._lastURL=a.url;a.loaded=false;a.readyState=1;a.playState=0;if(Aa(a._iO)){K=a._setup_html5(a._iO);K.load();a._iO.autoPlay&&a.play()}else try{a.isHTML5=false;a._iO=Ka(Q(a._iO));t===8?b.o._load(a.sID,a._iO.url,a._iO.stream,a._iO.autoPlay,a._iO.whileloading?1:0,a._iO.loops||1,a._iO.usePolicyFile):b.o._load(a.sID,a._iO.url,a._iO.stream?true:false,a._iO.autoPlay?true:
false,a._iO.loops||1,a._iO.autoLoad?true:false,a._iO.usePolicyFile)}catch(ha){fa()}return a};this.unload=function(){if(a.readyState!==0){if(a.isHTML5){ka();if(N){N.pause();N.src=""}}else t===8?b.o._unload(a.sID,b.nullURL):b.o._unload(a.sID);H()}return a};this.destruct=function(n){if(a.isHTML5){ka();if(N){N.pause();N.src="about:blank";N.load();N=a._audio=null}}else{a._iO.onfailure=null;b.o._destroySound(a.sID)}n||b.destroySound(a.sID,true)};this.start=this.play=function(n,K){K=typeof K==="undefined"?
true:K;n||(n={});a._iO=Y(n,a._iO);a._iO=Y(a._iO,a.options);a.instanceOptions=a._iO;if(a._iO.serverURL)if(!a.connected){a.getAutoPlay()||a.setAutoPlay(true);return a}if(Aa(a._iO)){a._setup_html5(a._iO);aa()}if(a.playState===1&&!a.paused)if(a._iO.multiShot)a.isHTML5&&a.setPosition(a._iO.position);else return a;if(!a.loaded)if(a.readyState===0)if(a.isHTML5){a.load(a._iO);a.readyState=1}else{if(!a._iO.serverURL){a._iO.autoPlay=true;a.load(a._iO)}}else if(a.readyState===2)return a;if(a.paused&&a.position&&
a.position>0)a.resume();else{a.playState=1;a.paused=false;if(!a.instanceCount||a._iO.multiShotEvents||t>8&&!a.isHTML5&&!a.getAutoPlay())a.instanceCount++;a.position=typeof a._iO.position!=="undefined"&&!isNaN(a._iO.position)?a._iO.position:0;if(!a.isHTML5)a._iO=Ka(Q(a._iO));if(a._iO.onplay&&K){a._iO.onplay.apply(a);a._onplay_called=true}a.setVolume(a._iO.volume,true);a.setPan(a._iO.pan,true);if(a.isHTML5){aa();a._setup_html5().play()}else b.o._start(a.sID,a._iO.loops||1,t===9?a.position:a.position/
1E3)}return a};this.stop=function(n){if(a.playState===1){a._onbufferchange(0);a.resetOnPosition(0);if(!a.isHTML5)a.playState=0;a.paused=false;a._iO.onstop&&a._iO.onstop.apply(a);if(a.isHTML5){if(N){a.setPosition(0);N.pause();a.playState=0;a._onTimer();ka();a.unload()}}else{b.o._stop(a.sID,n);a._iO.serverURL&&a.unload()}a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(n){a._iO.autoPlay=n;b.o._setAutoPlay(a.sID,n);n&&!a.instanceCount&&a.readyState===1&&a.instanceCount++};this.getAutoPlay=
function(){return a._iO.autoPlay};this.setPosition=function(n){if(n===undefined)n=0;n=a.isHTML5?Math.max(n,0):Math.min(a.duration||a._iO.duration,Math.max(n,0));a.position=n;a.resetOnPosition(a.position);a._iO.position=n;if(a.isHTML5){if(N){if(a.playState)try{N.currentTime=a.position/1E3}catch(K){}if(a.paused){a._onTimer(true);a._iO.useMovieStar&&a.resume()}}}else{n=t===9?a.position:a.position/1E3;a.serverURL&&a.playState===0?a.play({position:n}):b.o._setPosition(a.sID,n,a.paused||!a.playState)}return a};
this.pause=function(n){if(a.paused||a.playState===0&&a.readyState!==1)return a;a.paused=true;if(a.isHTML5){a._setup_html5().pause();ka()}else if(n||n===undefined)b.o._pause(a.sID);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){if(!a.paused)return a;a.paused=false;a.playState=1;if(a.isHTML5){a._setup_html5().play();aa()}else{b.o._pause(a.sID);a._iO.isMovieStar&&X&&a.setPosition(a.position)}if(!a._onplay_called&&a._iO.onplay){a._iO.onplay.apply(a);a._onplay_called=true}else a._iO.onresume&&
a._iO.onresume.apply(a);return a};this.togglePause=function(){if(a.playState===0){a.play({position:t===9&&!a.isHTML5?a.position:a.position/1E3});return a}a.paused?a.resume():a.pause();return a};this.setPan=function(n,K){if(typeof n==="undefined")n=0;if(typeof K==="undefined")K=false;a.isHTML5||b.o._setPan(a.sID,n);a._iO.pan=n;if(!K)a.pan=n;return a};this.setVolume=function(n,K){if(typeof n==="undefined")n=100;if(typeof K==="undefined")K=false;if(a.isHTML5){if(N)N.volume=n/100}else b.o._setVolume(a.sID,
b.muted&&!a.muted||a.muted?0:n);a._iO.volume=n;if(!K)a.volume=n;return a};this.mute=function(){a.muted=true;if(a.isHTML5){if(N)N.muted=true}else b.o._setVolume(a.sID,0);return a};this.unmute=function(){a.muted=false;var n=typeof a._iO.volume!=="undefined";if(a.isHTML5){if(N)N.muted=false}else b.o._setVolume(a.sID,n?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(n,K,ha){a._onPositionItems.push({position:n,method:K,scope:typeof ha!==
"undefined"?ha:a,fired:false});return a};this.processOnPosition=function(){var n,K;n=a._onPositionItems.length;if(!n||!a.playState||a._onPositionFired>=n)return false;for(;n--;){K=a._onPositionItems[n];if(!K.fired&&a.position>=K.position){K.method.apply(K.scope,[K.position]);K.fired=true;b._onPositionFired++}}return true};this.resetOnPosition=function(n){var K,ha;K=a._onPositionItems.length;if(!K)return false;for(;K--;){ha=a._onPositionItems[K];if(ha.fired&&n<=ha.position){ha.fired=false;b._onPositionFired--}}return true};
this._onTimer=function(n){var K={};if(a._hasTimer||n)if(N&&(n||(a.playState>0||a.readyState===1)&&!a.paused)){a.duration=ga();a.durationEstimate=a.duration;n=N.currentTime?N.currentTime*1E3:0;a._whileplaying(n,K,K,K,K);return true}else return false};ga=function(){var n=N?N.duration*1E3:undefined;return n&&!isNaN(n)?n:null};aa=function(){a.isHTML5&&Fa(a)};ka=function(){a.isHTML5&&La(a)};H=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._added_events=null;a._onplay_called=false;
N=a._audio=null;a.bytesLoaded=null;a.bytesTotal=null;a.position=null;a.duration=a._iO&&a._iO.duration?a._iO.duration:null;a.durationEstimate=null;a.failures=0;a.loaded=false;a.playState=0;a.paused=false;a.readyState=0;a.muted=false;a.didBeforeFinish=false;a.didJustBeforeFinish=false;a.isBuffering=false;a.instanceOptions={};a.instanceCount=0;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.eqData=[];a.eqData.left=[];a.eqData.right=[]};H();this._setup_html5=function(n){n=Y(a._iO,n);if(N){if(a.url!==
n.url)N.src=n.url}else{a._audio=new Audio(n.url);N=a._audio;a.isHTML5=true;G()}N.loop=n.loops>1?"loop":"";return a._audio};u={canplay:function(){a._onbufferchange(0)},load:function(){if(N&&!a.loaded){a._onbufferchange(0);a._whileloading(a.bytesTotal,a.bytesTotal,ga());a._onload(true)}},ended:function(){a._onfinish()},error:function(){N&&a._onload(false)},loadstart:function(){a._onbufferchange(1)},play:function(){a._onbufferchange(0)},playing:function(){a._onbufferchange(0)},progress:function(n){if(!N||
a.loaded)return false;var K,ha=0,oa=n.target.buffered;K=n.loaded||0;var qa=n.total||1;if(oa&&oa.length){for(K=oa.length;K--;)ha=oa.end(K)-oa.start(K);K=ha/n.target.duration}a._onbufferchange(0);a._whileloading(K,qa,ga());K&&qa&&K===qa&&u.load()},suspend:function(n){u.progress(n)},timeupdate:function(){a._onTimer()},waiting:function(){a._onbufferchange(1)}};G=function(){if(a._added_events)return false;var n;a._added_events=true;for(n in u)u.hasOwnProperty(n)&&N&&N.addEventListener(n,u[n],false);return true};
this._whileloading=function(n,K,ha,oa){a.bytesLoaded=n;a.bytesTotal=K;a.duration=Math.floor(ha);a.bufferLength=oa;if(a._iO.isMovieStar)a.durationEstimate=a.duration;else{a.durationEstimate=a._iO.duration?a.duration>a._iO.duration?a.duration:a._iO.duration:parseInt(a.bytesTotal/a.bytesLoaded*a.duration,10);if(a.durationEstimate===undefined)a.durationEstimate=a.duration}a.readyState!==3&&a._iO.whileloading&&a._iO.whileloading.apply(a)};this._onid3=function(n,K){var ha=[],oa,qa;oa=0;for(qa=n.length;oa<
qa;oa++)ha[n[oa]]=K[oa];a.id3=Y(a.id3,ha);a._iO.onid3&&a._iO.onid3.apply(a)};this._whileplaying=function(n,K,ha,oa,qa){if(isNaN(n)||n===null)return false;if(a.playState===0&&n>0)n=0;a.position=n;a.processOnPosition();if(t>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof K!=="undefined"&&K)a.peakData={left:K.leftPeak,right:K.rightPeak};if(a._iO.useWaveformData&&typeof ha!=="undefined"&&ha)a.waveformData={left:ha.split(","),right:oa.split(",")};if(a._iO.useEQData)if(typeof qa!=="undefined"&&qa&&qa.leftEQ){n=
qa.leftEQ.split(",");a.eqData=n;a.eqData.left=n;if(typeof qa.rightEQ!=="undefined"&&qa.rightEQ)a.eqData.right=qa.rightEQ.split(",")}}if(a.playState===1){!a.isHTML5&&b.flashVersion===8&&!a.position&&a.isBuffering&&a._onbufferchange(0);a._iO.whileplaying&&a._iO.whileplaying.apply(a);if((a.loaded||!a.loaded&&a._iO.isMovieStar)&&a._iO.onbeforefinish&&a._iO.onbeforefinishtime&&!a.didBeforeFinish&&a.duration-a.position<=a._iO.onbeforefinishtime)a._onbeforefinish()}return true};this._onconnect=function(n){n=
n===1;if(a.connected=n){a.failures=0;a._iO.onconnect&&a._iO.onconnect.apply(a,[n]);if(ia(a.sID)&&(a.options.autoLoad||a.getAutoPlay()))a.play(undefined,a.getAutoPlay())}};this._onload=function(n){n=n?true:false;a.loaded=n;a.readyState=n?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[n]);return true};this._onfailure=function(n,K,ha){a.failures++;a._iO.onfailure&&a.failures===1&&a._iO.onfailure(a,n,K,ha)};this._onbeforefinish=function(){if(!a.didBeforeFinish){a.didBeforeFinish=true;a._iO.onbeforefinish&&
a._iO.onbeforefinish.apply(a)}};this._onjustbeforefinish=function(){if(!a.didJustBeforeFinish){a.didJustBeforeFinish=true;a._iO.onjustbeforefinish&&a._iO.onjustbeforefinish.apply(a)}};this._onstats=function(n){a._iO.onstats&&a._iO.onstats(a,n)};this._onfinish=function(){a._onbufferchange(0);a.resetOnPosition(0);a._iO.onbeforefinishcomplete&&a._iO.onbeforefinishcomplete.apply(a);a.didBeforeFinish=false;a.didJustBeforeFinish=false;if(a.instanceCount){a.instanceCount--;if(!a.instanceCount){a.playState=
0;a.paused=false;a.instanceCount=0;a.instanceOptions={};ka()}if(!a.instanceCount||a._iO.multiShotEvents)a._iO.onfinish&&a._iO.onfinish.apply(a)}};this._onbufferchange=function(n){if(a.playState===0)return false;if(n&&a.isBuffering||!n&&!a.isBuffering)return false;a.isBuffering=n===1;a._iO.onbufferchange&&a._iO.onbufferchange.apply(a);return true};this._ondataerror=function(){a.playState>0&&a._iO.ondataerror&&a._iO.ondataerror.apply(a)}};P=function(){return m.body?m.body:m._docElement?m.documentElement:
m.getElementsByTagName("div")[0]};w=function(f){return m.getElementById(f)};Y=function(f,a){var H={},G,u;for(G in f)if(f.hasOwnProperty(G))H[G]=f[G];G=typeof a==="undefined"?b.defaultOptions:a;for(u in G)if(G.hasOwnProperty(u)&&typeof H[u]==="undefined")H[u]=G[u];return H};O=function(){function f(u){u=sa.call(u);var ka=u.length;if(H){u[1]="on"+u[1];ka>3&&u.pop()}else ka===3&&u.push(false);return u}function a(u,ka){var aa=u.shift(),ga=[G[ka]];H?aa[ga](u[0],u[1]):aa[ga].apply(aa,u)}var H=s.attachEvent,
G={add:H?"attachEvent":"addEventListener",remove:H?"detachEvent":"removeEventListener"};return{add:function(){a(f(arguments),"add")},remove:function(){a(f(arguments),"remove")}}}();Aa=function(f){return f.type?Da({type:f.type}):Da(f.url)||ta};Da=function(f){if(!b.useHTML5Audio||!b.hasHTML5)return false;var a,H=b.audioFormats;if(!ya){ya=[];for(a in H)if(H.hasOwnProperty(a)){ya.push(a);if(H[a].related)ya=ya.concat(H[a].related)}ya=RegExp("\\.("+ya.join("|")+")","i")}a=typeof f.type!=="undefined"?f.type:
null;f=typeof f==="string"?f.toLowerCase().match(ya):null;if(!f||!f.length){if(!a)return false}else f=f[0].substr(1);if(f&&typeof b.html5[f]!=="undefined")return b.html5[f];else{if(!a)if(f&&b.html5[f])return b.html5[f];else a="audio/"+f;a=b.html5.canPlayType(a);return b.html5[f]=a}};za=function(){function f(aa){var ga,N,n=false;if(!a||typeof a.canPlayType!=="function")return false;if(aa instanceof Array){ga=0;for(N=aa.length;ga<N&&!n;ga++)if(b.html5[aa[ga]]||a.canPlayType(aa[ga]).match(b.html5Test)){n=
true;b.html5[aa[ga]]=true}return n}else return(aa=a&&typeof a.canPlayType==="function"?a.canPlayType(aa):false)&&(aa.match(b.html5Test)?true:false)}if(!b.useHTML5Audio||typeof Audio==="undefined")return false;var a=typeof Audio!=="undefined"?new Audio:null,H,G={},u,ka;u=b.audioFormats;for(H in u)if(u.hasOwnProperty(H)){G[H]=f(u[H].type);if(u[H]&&u[H].related)for(ka=0;ka<u[H].related.length;ka++)b.html5[u[H].related[ka]]=G[H]}G.canPlayType=a?f:null;b.html5=Y(b.html5,G);return true};Ga=function(){};
Q=function(f){if(t===8&&f.loops>1&&f.stream)f.stream=false;return f};Ka=function(f){if(f&&!f.usePolicyFile&&(f.onid3||f.usePeakData||f.useWaveformData||f.useEQData))f.usePolicyFile=true;return f};ra=function(f){typeof console!=="undefined"&&typeof console.warn!=="undefined"&&console.warn(f)};A=function(){return false};wa=function(f){for(var a in f)if(f.hasOwnProperty(a)&&typeof f[a]==="function")f[a]=A};Ja=function(f){if(typeof f==="undefined")f=false;if(g||f)b.disable(f)};va=function(f){if(f)if(f.match(/\.swf(\?.*)?$/i)){if(f.substr(f.toLowerCase().lastIndexOf(".swf?")+
4))return f}else if(f.lastIndexOf("/")!==f.length-1)f+="/";return(f&&f.lastIndexOf("/")!==-1?f.substr(0,f.lastIndexOf("/")+1):"./")+b.movieURL};l=function(){if(t!==8&&t!==9)b.flashVersion=8;var f=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.useHTML5Audio&&!ta&&b.audioFormats.mp4.required&&b.flashVersion<9)b.flashVersion=9;t=b.flashVersion;b.version=b.versionNumber+(ta?" (HTML5-only mode)":t===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(t>8){b.defaultOptions=Y(b.defaultOptions,b.flash9Options);b.features.buffering=
true}if(t>8&&b.useMovieStar){b.defaultOptions=Y(b.defaultOptions,b.movieStarOptions);b.filePatterns.flash9=RegExp("\\.(mp3|"+b.netStreamTypes.join("|")+")(\\?.*)?$","i");b.mimePattern=b.netStreamMimeTypes;b.features.movieStar=true}else{b.useMovieStar=false;b.features.movieStar=false}b.filePattern=b.filePatterns[t!==8?"flash9":"flash8"];b.movieURL=(t===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",f);b.features.peakData=b.features.waveformData=b.features.eqData=t>8};Ma=function(f,
a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(f,a)};na=function(f,a){var H=a?a:b.url,G=b.altURL?b.altURL:H;P();var u,ka,aa=ma(),ga,N=null;N=(N=m.getElementsByTagName("html")[0])&&N.dir&&N.dir.match(/rtl/i);f=typeof f==="undefined"?b.id:f;if(T&&R)return false;if(ta){l();b.oMC=w(b.movieID);z();R=T=true;return false}T=true;l();b.url=va(b._overHTTP?H:G);a=b.url;b.wmode=!b.wmode&&b.useHighPerformance&&!b.useMovieStar?"transparent":b.wmode;if(b.wmode!==null&&!x&&!b.useHighPerformance&&navigator.platform.match(/win32/i)){b.specialWmodeCase=
true;b.wmode=null}G={name:f,id:f,src:a,width:"100%",height:"100%",quality:"high",allowScriptAccess:b.allowScriptAccess,bgcolor:b.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:b.wmode};if(b.debugFlash)G.FlashVars="debug=1";b.wmode||delete G.wmode;if(x){H=m.createElement("div");ka='<object id="'+f+'" data="'+a+'" type="'+G.type+'" width="'+G.width+'" height="'+G.height+'"><param name="movie" value="'+a+'" /><param name="AllowScriptAccess" value="'+
b.allowScriptAccess+'" /><param name="quality" value="'+G.quality+'" />'+(b.wmode?'<param name="wmode" value="'+b.wmode+'" /> ':"")+'<param name="bgcolor" value="'+b.bgColor+'" />'+(b.debugFlash?'<param name="FlashVars" value="'+G.FlashVars+'" />':"")+"<!-- --\></object>"}else{H=m.createElement("embed");for(u in G)G.hasOwnProperty(u)&&H.setAttribute(u,G[u])}D();aa=ma();if(G=P()){b.oMC=w(b.movieID)?w(b.movieID):m.createElement("div");if(b.oMC.id){ga=b.oMC.className;b.oMC.className=(ga?ga+" ":b.swfCSS.swfDefault)+
(aa?" "+aa:"");b.oMC.appendChild(H);if(x){u=b.oMC.appendChild(m.createElement("div"));u.className=b.swfCSS.swfBox;u.innerHTML=ka}R=true}else{b.oMC.id=b.movieID;b.oMC.className=b.swfCSS.swfDefault+" "+aa;u=aa=null;if(!b.useFlashBlock)if(b.useHighPerformance)aa={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden",hasPriority:"true"};else{aa={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px",hasPriority:"true"};if(N)aa.left=Math.abs(parseInt(aa.left,
10))+"px"}if(X)b.oMC.style.zIndex=1E4;if(!b.debugFlash)for(ga in aa)if(aa.hasOwnProperty(ga))b.oMC.style[ga]=aa[ga];try{x||b.oMC.appendChild(H);G.appendChild(b.oMC);if(x){u=b.oMC.appendChild(m.createElement("div"));u.className=b.swfCSS.swfBox;u.innerHTML=ka}R=true}catch(n){throw Error(Ga("appXHTML"));}}}return true};ia=this.getSoundById;M=function(){if(ta){na();return false}if(b.o)return false;b.o=b.getMovie(b.id);if(!b.o){if(Ca){if(x)b.oMC.innerHTML=ba;else b.oMC.appendChild(Ca);Ca=null;T=true}else na(b.id,
b.url);b.o=b.getMovie(b.id)}b.oninitmovie instanceof Function&&setTimeout(b.oninitmovie,1);return true};pa=function(f){if(f)b.url=f;M()};c=function(){setTimeout(j,500)};j=function(){if(da)return false;da=true;O.remove(s,"load",c);if(ua&&!la)return false;var f;U||(f=b.getMoviePercent());setTimeout(function(){f=b.getMoviePercent();if(!U&&Ea)if(f===null)if(b.useFlashBlock||b.flashLoadTimeout===0)b.useFlashBlock&&ea();else Ja(true);else b.flashLoadTimeout!==0&&Ja(true)},b.flashLoadTimeout)};pa=function(f){if(f)b.url=
f;M()};ma=function(){var f=[];b.debugMode&&f.push(b.swfCSS.sm2Debug);b.debugFlash&&f.push(b.swfCSS.flashDebug);b.useHighPerformance&&f.push(b.swfCSS.highPerf);return f.join(" ")};ea=function(){Ga("fbHandler");var f=b.getMoviePercent();if(b.ok()){if(b.oMC)b.oMC.className=ma()+" "+b.swfCSS.swfDefault+(" "+b.swfCSS.swfUnblocked)}else{if(xa)b.oMC.className=ma()+" "+b.swfCSS.swfDefault+" "+(f===null?b.swfCSS.swfTimedout:b.swfCSS.swfError);b.didFlashBlock=true;S({type:"ontimeout",ignoreInit:true});b.onerror instanceof
Function&&b.onerror.apply(s)}};r=function(){function f(){O.remove(s,"focus",r);O.remove(s,"load",r)}if(la||!ua){f();return true}la=Ea=true;Z&&ua&&O.remove(s,"mousemove",r);da=false;f();return true};V=function(f){if(U)return false;if(ta){U=true;S();W();return true}b.useFlashBlock&&b.flashLoadTimeout&&!b.getMoviePercent()||(U=true);if(g||f){if(b.useFlashBlock)b.oMC.className=ma()+" "+(b.getMoviePercent()===null?b.swfCSS.swfTimedout:b.swfCSS.swfError);S({type:"ontimeout"});b.onerror instanceof Function&&
b.onerror.apply(s);return false}O.add(e,"unload",A);if(b.waitForWindowLoad&&!J){O.add(s,"load",W);return false}else W();return true};ja=function(f,a,H){if(typeof E[f]==="undefined")E[f]=[];E[f].push({method:a,scope:H||null,fired:false})};S=function(f){f||(f={type:"onready"});if(!U&&f&&!f.ignoreInit)return false;var a={success:f&&f.ignoreInit?b.ok():!g},H=f&&f.type?E[f.type]||[]:[];f=[];var G,u=xa&&b.useFlashBlock&&!b.ok();for(G=0;G<H.length;G++)H[G].fired!==true&&f.push(H[G]);if(f.length){G=0;for(H=
f.length;G<H;G++){f[G].scope?f[G].method.apply(f[G].scope,[a]):f[G].method(a);if(!u)f[G].fired=true}}return true};W=function(){s.setTimeout(function(){b.useFlashBlock&&ea();S();b.onload instanceof Function&&b.onload.apply(s);b.waitForWindowLoad&&O.add(s,"load",W)},1)};Ba=function(){var f,a,H=!y.match(/usehtml5audio/i)&&!y.match(/sm2\-ignorebadua/i)&&Z&&B.match(/OS X 10_6_(3|4|5)/i);if(B.match(/iphone os (1|2|3_0|3_1)/i)?true:false){b.hasHTML5=false;ta=true;if(b.oMC)b.oMC.style.display="none";return false}if(b.useHTML5Audio){if(!b.html5||
!b.html5.canPlayType){b.hasHTML5=false;return true}else b.hasHTML5=true;if(H){b.useHTML5Audio=false;b.hasHTML5=false;return true}}else return true;for(a in b.audioFormats)if(b.audioFormats.hasOwnProperty(a)&&b.audioFormats[a].required&&!b.html5.canPlayType(b.audioFormats[a].type))f=true;if(b.ignoreFlash)f=false;ta=b.useHTML5Audio&&b.hasHTML5&&!f;return f};z=function(){var f,a=[];if(U)return false;if(b.hasHTML5)for(f in b.audioFormats)b.audioFormats.hasOwnProperty(f)&&a.push(f+": "+b.html5[f]);if(ta){if(!U){O.remove(s,
"load",b.beginDelayedInit);b.enabled=true;V()}return true}M();try{b.o._externalInterfaceTest(false);if(b.allowPolling)Ma(true,b.flashPollingInterval?b.flashPollingInterval:b.useFastPolling?10:50);b.debugMode||b.o._disableDebug();b.enabled=true}catch(H){Ja(true);V();return false}V();O.remove(s,"load",b.beginDelayedInit);return true};I=function(){if(Ia)return false;na();M();return Ia=true};L=function(){if(ca)return false;ca=true;D();za();b.html5.usingFlash=Ba();xa=b.html5.usingFlash;ca=true;m.removeEventListener&&
m.removeEventListener("DOMContentLoaded",L,false);pa();return true};Fa=function(f){if(!f._hasTimer)f._hasTimer=true};La=function(f){if(f._hasTimer)f._hasTimer=false};fa=function(){b.onerror instanceof Function&&b.onerror();b.disable()};this._setSandboxType=function(){};this._externalInterfaceOK=function(){if(b.swfLoaded)return false;(new Date).getTime();b.swfLoaded=true;ua=false;x?setTimeout(z,100):z()};Ha=function(){if(m.readyState==="complete"){L();m.detachEvent("onreadystatechange",Ha)}return true};
if(!b.hasHTML5||xa){O.add(s,"focus",r);O.add(s,"load",r);O.add(s,"load",c);Z&&ua&&O.add(s,"mousemove",r)}if(m.addEventListener)m.addEventListener("DOMContentLoaded",L,false);else m.attachEvent?m.attachEvent("onreadystatechange",Ha):fa();m.readyState==="complete"&&setTimeout(L,100)}var o=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER)o=new h;e.SoundManager=h;e.soundManager=o})(window);
(function(e){e.fn.extend({autocomplete:function(h,o){var C=typeof h=="string";o=e.extend({},e.Autocompleter.defaults,{url:C?h:null,data:C?null:h,delay:C?e.Autocompleter.defaults.delay:10,max:o&&!o.scroll?10:150},o);o.highlight=o.highlight||function(F){return F};o.formatMatch=o.formatMatch||o.formatItem;return this.each(function(){new e.Autocompleter(this,o)})},result:function(h){return this.bind("result",h)},search:function(h){return this.trigger("search",[h])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(h){return this.trigger("setOptions",[h])},unautocomplete:function(){return this.trigger("unautocomplete")}});e.Autocompleter=function(h,o){function C(){var g=R.selected();if(!g)return false;var J=g.result;s=J;if(o.multiple){var V=D(t.val());if(V.length>1){var Y=o.multipleSeparator.length,ja=e(h).selection().start,S,W=0;e.each(V,function(pa,c){W+=c.length;if(ja<=W){S=pa;return false}W+=Y});V[S]=J;J=V.join(o.multipleSeparator)}J+=o.multipleSeparator}t.val(J);b();t.trigger("result",
[g.data,g.value]);return true}function F(g,J){if(E==y.DEL)R.hide();else{var V=t.val();if(!(!J&&V==s)){s=V;V=v(V);if(V.length>=o.minChars){t.addClass(o.loadingClass);o.matchCase||(V=V.toLowerCase());B(V,w,b)}else{t.removeClass(o.loadingClass);R.hide()}}}}function D(g){if(!g)return[""];if(!o.multiple)return[e.trim(g)];return e.map(g.split(o.multipleSeparator),function(J){return e.trim(g).length?e.trim(J):null})}function v(g){if(!o.multiple)return g;var J=D(g);if(J.length==1)return J[0];J=e(h).selection().start;
J=J==g.length?D(g):D(g.replace(g.substring(J),""));return J[J.length-1]}function b(){R.visible();R.hide();clearTimeout(m);t.removeClass(o.loadingClass);o.mustMatch&&t.search(function(g){if(!g)if(o.multiple){g=D(t.val()).slice(0,-1);t.val(g.join(o.multipleSeparator)+(g.length?o.multipleSeparator:""))}else{t.val("");t.trigger("result",null)}})}function w(g,J){if(J&&J.length&&z){t.removeClass(o.loadingClass);R.display(J,g);var V=J[0].value;if(o.autoFill&&v(t.val()).toLowerCase()==g.toLowerCase()&&E!=
y.BACKSPACE){t.val(t.val()+V.substring(v(s).length));e(h).selection(s.length,s.length+V.length)}R.show()}else b()}function B(g,J,V){o.matchCase||(g=g.toLowerCase());var Y=A.load(g);if(Y&&Y.length)J(g,Y);else if(typeof o.url=="string"&&o.url.length>0){var ja={timestamp:+new Date};e.each(o.extraParams,function(S,W){ja[S]=typeof W=="function"?W():W});e.ajax({mode:"abort",port:"autocomplete"+h.name,dataType:o.dataType,url:o.url,data:e.extend({q:v(g),limit:o.max},ja),success:function(S){var W;if(!(W=o.parse&&
o.parse(S))){W=[];S=S.split("\n");for(var pa=0;pa<S.length;pa++){var c=e.trim(S[pa]);if(c){c=c.split("|");W[W.length]={data:c,value:c[0],result:o.formatResult&&o.formatResult(c,c[0])||c[0]}}}W=W}W=W;A.add(g,W);J(g,W)}})}else{R.emptyList();V(g)}}var y={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},t=e(h).attr("autocomplete","off").addClass(o.inputClass),m,s="",A=e.Autocompleter.Cache(o),z=0,E,T={mouseDownOnSelect:false},R=e.Autocompleter.Select(o,h,C,T),U;
e.browser.opera&&e(h.form).bind("submit.autocomplete",function(){if(U)return U=false});t.bind((e.browser.opera?"keypress":"keydown")+".autocomplete",function(g){z=1;E=g.keyCode;switch(g.keyCode){case y.UP:g.preventDefault();R.visible()?R.prev():F(0,true);break;case y.DOWN:g.preventDefault();R.visible()?R.next():F(0,true);break;case y.PAGEUP:g.preventDefault();R.visible()?R.pageUp():F(0,true);break;case y.PAGEDOWN:g.preventDefault();R.visible()?R.pageDown():F(0,true);break;case o.multiple&&e.trim(o.multipleSeparator)==
","&&y.COMMA:case y.TAB:case y.RETURN:if(C()){g.preventDefault();U=true;return false}break;case y.ESC:R.hide();break;default:clearTimeout(m);m=setTimeout(F,o.delay)}}).focus(function(){z++}).blur(function(){z=0;if(!T.mouseDownOnSelect){clearTimeout(m);m=setTimeout(b,200)}}).click(function(){z++>1&&!R.visible()&&F(0,true)}).bind("search",function(){function g(V,Y){var ja;if(Y&&Y.length)for(var S=0;S<Y.length;S++)if(Y[S].result.toLowerCase()==V.toLowerCase()){ja=Y[S];break}typeof J=="function"?J(ja):
t.trigger("result",ja&&[ja.data,ja.value])}var J=arguments.length>1?arguments[1]:null;e.each(D(t.val()),function(V,Y){B(Y,g,g)})}).bind("flushCache",function(){A.flush()}).bind("setOptions",function(g,J){e.extend(o,J);"data"in J&&A.populate()}).bind("unautocomplete",function(){R.unbind();t.unbind();e(h.form).unbind(".autocomplete")})};e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,
cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(h){return h[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(h,o){return h.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+o.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};e.Autocompleter.Cache=function(h){function o(w,B){h.matchCase||(w=w.toLowerCase());var y=w.indexOf(B);
if(h.matchContains=="word")y=w.toLowerCase().search("\\b"+B.toLowerCase());if(y==-1)return false;return y==0||h.matchContains}function C(w,B){b>h.cacheLength&&D();v[w]||b++;v[w]=B}function F(){if(!h.data)return false;var w={},B=0;if(!h.url)h.cacheLength=1;w[""]=[];for(var y=0,t=h.data.length;y<t;y++){var m=h.data[y];m=typeof m=="string"?[m]:m;var s=h.formatMatch(m,y+1,h.data.length);if(s!==false){var A=s.charAt(0).toLowerCase();w[A]||(w[A]=[]);m={value:s,data:m,result:h.formatResult&&h.formatResult(m)||
s};w[A].push(m);B++<h.max&&w[""].push(m)}}e.each(w,function(z,E){h.cacheLength++;C(z,E)})}function D(){v={};b=0}var v={},b=0;setTimeout(F,25);return{flush:D,add:C,populate:F,load:function(w){if(!h.cacheLength||!b)return null;if(!h.url&&h.matchContains){var B=[],y;for(y in v)if(y.length>0){var t=v[y];e.each(t,function(m,s){o(s.value,w)&&B.push(s)})}return B}else if(v[w])return v[w];else if(h.matchSubset)for(y=w.length-1;y>=h.minChars;y--)if(t=v[w.substr(0,y)]){B=[];e.each(t,function(m,s){if(o(s.value,
w))B[B.length]=s});return B}return null}}};e.Autocompleter.Select=function(h,o,C,F){function D(){if(s){A=e("<div/>").hide().addClass(h.resultsClass).css("position","absolute").appendTo(document.body);z=e("<ul/>").appendTo(A).mouseover(function(E){if(v(E).nodeName&&v(E).nodeName.toUpperCase()=="LI"){y=e("li",z).removeClass(w.ACTIVE).index(v(E));e(v(E)).addClass(w.ACTIVE)}}).click(function(E){e(v(E)).addClass(w.ACTIVE);C();o.focus();return false}).mousedown(function(){F.mouseDownOnSelect=true}).mouseup(function(){F.mouseDownOnSelect=
false});h.width>0&&A.css("width",h.width);s=false}}function v(E){for(E=E.target;E&&E.tagName!="LI";)E=E.parentNode;if(!E)return[];return E}function b(E){B.slice(y,y+1).removeClass(w.ACTIVE);y+=E;if(y<0)y=B.size()-1;else if(y>=B.size())y=0;E=B.slice(y,y+1).addClass(w.ACTIVE);if(h.scroll){var T=0;B.slice(0,y).each(function(){T+=this.offsetHeight});if(T+E[0].offsetHeight-z.scrollTop()>z[0].clientHeight)z.scrollTop(T+E[0].offsetHeight-z.innerHeight());else T<z.scrollTop()&&z.scrollTop(T)}}var w={ACTIVE:"ac_over"},
B,y=-1,t,m="",s=true,A,z;return{display:function(E,T){D();t=E;m=T;z.empty();for(var R=h.max&&h.max<t.length?h.max:t.length,U=0;U<R;U++)if(t[U]){var g=h.formatItem(t[U].data,U+1,R,t[U].value,m);if(g!==false){g=e("<li/>").html(h.highlight(g,m)).addClass(U%2==0?"ac_even":"ac_odd").appendTo(z)[0];e.data(g,"ac_data",t[U])}}B=z.find("li");if(h.selectFirst){B.slice(0,1).addClass(w.ACTIVE);y=0}e.fn.bgiframe&&z.bgiframe()},next:function(){b(1)},prev:function(){b(-1)},pageUp:function(){y!=0&&y-8<0?b(-y):b(-8)},
pageDown:function(){y!=B.size()-1&&y+8>B.size()?b(B.size()-1-y):b(8)},hide:function(){A&&A.hide();B&&B.removeClass(w.ACTIVE);y=-1},visible:function(){return A&&A.is(":visible")},current:function(){return this.visible()&&(B.filter("."+w.ACTIVE)[0]||h.selectFirst&&B[0])},show:function(){var E=e(o).offset();A.css({width:typeof h.width=="string"||h.width>0?h.width:e(o).width(),top:E.top+o.offsetHeight,left:E.left}).show();if(h.scroll){z.scrollTop(0);z.css({maxHeight:h.scrollHeight,overflow:"auto"});if(e.browser.msie&&
typeof document.body.style.maxHeight==="undefined"){var T=0;B.each(function(){T+=this.offsetHeight});E=T>h.scrollHeight;z.css("height",E?h.scrollHeight:T);E||B.width(z.width()-parseInt(B.css("padding-left"))-parseInt(B.css("padding-right")))}}},selected:function(){var E=B&&B.filter("."+w.ACTIVE).removeClass(w.ACTIVE);return E&&E.length&&e.data(E[0],"ac_data")},emptyList:function(){z&&z.empty()},unbind:function(){A&&A.remove()}}};e.fn.selection=function(h,o){if(h!==undefined)return this.each(function(){if(this.createTextRange){var b=
this.createTextRange();if(o===undefined||h==o)b.move("character",h);else{b.collapse(true);b.moveStart("character",h);b.moveEnd("character",o)}b.select()}else if(this.setSelectionRange)this.setSelectionRange(h,o);else if(this.selectionStart){this.selectionStart=h;this.selectionEnd=o}});var C=this[0];if(C.createTextRange){var F=document.selection.createRange(),D=C.value,v=F.text.length;F.text="<->";F=C.value.indexOf("<->");C.value=D;this.selection(F,F+v);return{start:F,end:F+v}}else if(C.selectionStart!==
undefined)return{start:C.selectionStart,end:C.selectionEnd}}})(window.jQuery||django.jQuery);
jQuery.fn.uniform=function(e){e=jQuery.extend({valid_class:"valid",invalid_class:"invalid",focused_class:"focused",holder_class:"ctrlHolder",field_selector:"input, select, textarea"},e);return this.each(function(){var h=jQuery(this);h.find(e.field_selector).focus(function(){h.find("."+e.focused_class).removeClass(e.focused_class);jQuery(this).parents("."+e.holder_class).addClass(e.focused_class)}).blur(function(){h.find("."+e.focused_class).removeClass(e.focused_class)})})};
$(document).ready(function(){q=jQuery("form.uniForm");q.length&&q.uniform();$(document.activeElement).focus()});
(function(){var e=this,h=e._,o={},C=Array.prototype,F=Object.prototype,D=C.slice,v=C.unshift,b=F.toString,w=F.hasOwnProperty,B=C.forEach,y=C.map,t=C.reduce,m=C.reduceRight,s=C.filter,A=C.every,z=C.some,E=C.indexOf,T=C.lastIndexOf;F=Array.isArray;var R=Object.keys,U=Function.prototype.bind,g=function(c){return new S(c)};if(typeof module!=="undefined"&&module.exports){module.exports=g;g._=g}else e._=g;g.VERSION="1.1.6";var J=g.each=g.forEach=function(c,j,l){if(c!=null)if(B&&c.forEach===B)c.forEach(j,
l);else if(g.isNumber(c.length))for(var r=0,I=c.length;r<I;r++){if(j.call(l,c[r],r,c)===o)break}else for(r in c)if(w.call(c,r))if(j.call(l,c[r],r,c)===o)break};g.map=function(c,j,l){var r=[];if(c==null)return r;if(y&&c.map===y)return c.map(j,l);J(c,function(I,M,L){r[r.length]=j.call(l,I,M,L)});return r};g.reduce=g.foldl=g.inject=function(c,j,l,r){var I=l!==void 0;if(c==null)c=[];if(t&&c.reduce===t){if(r)j=g.bind(j,r);return I?c.reduce(j,l):c.reduce(j)}J(c,function(M,L,ca){if(!I&&L===0){l=M;I=true}else l=
j.call(r,l,M,L,ca)});if(!I)throw new TypeError("Reduce of empty array with no initial value");return l};g.reduceRight=g.foldr=function(c,j,l,r){if(c==null)c=[];if(m&&c.reduceRight===m){if(r)j=g.bind(j,r);return l!==void 0?c.reduceRight(j,l):c.reduceRight(j)}c=(g.isArray(c)?c.slice():g.toArray(c)).reverse();return g.reduce(c,j,l,r)};g.find=g.detect=function(c,j,l){var r;V(c,function(I,M,L){if(j.call(l,I,M,L)){r=I;return true}});return r};g.filter=g.select=function(c,j,l){var r=[];if(c==null)return r;
if(s&&c.filter===s)return c.filter(j,l);J(c,function(I,M,L){if(j.call(l,I,M,L))r[r.length]=I});return r};g.reject=function(c,j,l){var r=[];if(c==null)return r;J(c,function(I,M,L){j.call(l,I,M,L)||(r[r.length]=I)});return r};g.every=g.all=function(c,j,l){var r=true;if(c==null)return r;if(A&&c.every===A)return c.every(j,l);J(c,function(I,M,L){if(!(r=r&&j.call(l,I,M,L)))return o});return r};var V=g.some=g.any=function(c,j,l){j||(j=g.identity);var r=false;if(c==null)return r;if(z&&c.some===z)return c.some(j,
l);J(c,function(I,M,L){if(r=j.call(l,I,M,L))return o});return r};g.include=g.contains=function(c,j){var l=false;if(c==null)return l;if(E&&c.indexOf===E)return c.indexOf(j)!=-1;V(c,function(r){if(l=r===j)return true});return l};g.invoke=function(c,j){var l=D.call(arguments,2);return g.map(c,function(r){return(j.call?j||r:r[j]).apply(r,l)})};g.pluck=function(c,j){return g.map(c,function(l){return l[j]})};g.max=function(c,j,l){if(!j&&g.isArray(c))return Math.max.apply(Math,c);var r={computed:-Infinity};
J(c,function(I,M,L){M=j?j.call(l,I,M,L):I;M>=r.computed&&(r={value:I,computed:M})});return r.value};g.min=function(c,j,l){if(!j&&g.isArray(c))return Math.min.apply(Math,c);var r={computed:Infinity};J(c,function(I,M,L){M=j?j.call(l,I,M,L):I;M<r.computed&&(r={value:I,computed:M})});return r.value};g.sortBy=function(c,j,l){return g.pluck(g.map(c,function(r,I,M){return{value:r,criteria:j.call(l,r,I,M)}}).sort(function(r,I){var M=r.criteria,L=I.criteria;return M<L?-1:M>L?1:0}),"value")};g.sortedIndex=
function(c,j,l){l||(l=g.identity);for(var r=0,I=c.length;r<I;){var M=r+I>>1;l(c[M])<l(j)?r=M+1:I=M}return r};g.toArray=function(c){if(!c)return[];if(c.toArray)return c.toArray();if(g.isArray(c))return c;if(g.isArguments(c))return D.call(c);return g.values(c)};g.size=function(c){return g.toArray(c).length};g.first=g.head=function(c,j,l){return j!=null&&!l?D.call(c,0,j):c[0]};g.rest=g.tail=function(c,j,l){return D.call(c,j==null||l?1:j)};g.last=function(c){return c[c.length-1]};g.compact=function(c){return g.filter(c,
function(j){return!!j})};g.flatten=function(c){return g.reduce(c,function(j,l){if(g.isArray(l))return j.concat(g.flatten(l));j[j.length]=l;return j},[])};g.without=function(c){var j=D.call(arguments,1);return g.filter(c,function(l){return!g.include(j,l)})};g.uniq=g.unique=function(c,j){return g.reduce(c,function(l,r,I){if(0==I||(j===true?g.last(l)!=r:!g.include(l,r)))l[l.length]=r;return l},[])};g.intersect=function(c){var j=D.call(arguments,1);return g.filter(g.uniq(c),function(l){return g.every(j,
function(r){return g.indexOf(r,l)>=0})})};g.zip=function(){for(var c=D.call(arguments),j=g.max(g.pluck(c,"length")),l=Array(j),r=0;r<j;r++)l[r]=g.pluck(c,""+r);return l};g.indexOf=function(c,j,l){if(c==null)return-1;var r;if(l){l=g.sortedIndex(c,j);return c[l]===j?l:-1}if(E&&c.indexOf===E)return c.indexOf(j);l=0;for(r=c.length;l<r;l++)if(c[l]===j)return l;return-1};g.lastIndexOf=function(c,j){if(c==null)return-1;if(T&&c.lastIndexOf===T)return c.lastIndexOf(j);for(var l=c.length;l--;)if(c[l]===j)return l;
return-1};g.range=function(c,j,l){if(arguments.length<=1){j=c||0;c=0}l=arguments[2]||1;for(var r=Math.max(Math.ceil((j-c)/l),0),I=0,M=Array(r);I<r;){M[I++]=c;c+=l}return M};g.bind=function(c,j){if(c.bind===U&&U)return U.apply(c,D.call(arguments,1));var l=D.call(arguments,2);return function(){return c.apply(j,l.concat(D.call(arguments)))}};g.bindAll=function(c){var j=D.call(arguments,1);if(j.length==0)j=g.functions(c);J(j,function(l){c[l]=g.bind(c[l],c)});return c};g.memoize=function(c,j){var l={};
j||(j=g.identity);return function(){var r=j.apply(this,arguments);return w.call(l,r)?l[r]:l[r]=c.apply(this,arguments)}};g.delay=function(c,j){var l=D.call(arguments,2);return setTimeout(function(){return c.apply(c,l)},j)};g.defer=function(c){return g.delay.apply(g,[c,1].concat(D.call(arguments,1)))};var Y=function(c,j,l){var r;return function(){var I=this,M=arguments,L=function(){r=null;c.apply(I,M)};l&&clearTimeout(r);if(l||!r)r=setTimeout(L,j)}};g.throttle=function(c,j){return Y(c,j,false)};g.debounce=
function(c,j){return Y(c,j,true)};g.once=function(c){var j=false,l;return function(){if(j)return l;j=true;return l=c.apply(this,arguments)}};g.wrap=function(c,j){return function(){var l=[c].concat(D.call(arguments));return j.apply(this,l)}};g.compose=function(){var c=D.call(arguments);return function(){for(var j=D.call(arguments),l=c.length-1;l>=0;l--)j=[c[l].apply(this,j)];return j[0]}};g.after=function(c,j){return function(){if(--c<1)return j.apply(this,arguments)}};g.keys=R||function(c){if(c!==
Object(c))throw new TypeError("Invalid object");var j=[],l;for(l in c)if(w.call(c,l))j[j.length]=l;return j};g.values=function(c){return g.map(c,g.identity)};g.functions=g.methods=function(c){return g.filter(g.keys(c),function(j){return g.isFunction(c[j])}).sort()};g.extend=function(c){J(D.call(arguments,1),function(j){for(var l in j)if(j[l]!==void 0)c[l]=j[l]});return c};g.defaults=function(c){J(D.call(arguments,1),function(j){for(var l in j)if(c[l]==null)c[l]=j[l]});return c};g.clone=function(c){return g.isArray(c)?
c.slice():g.extend({},c)};g.tap=function(c,j){j(c);return c};g.isEqual=function(c,j){if(c===j)return true;var l=typeof c;if(l!=typeof j)return false;if(c==j)return true;if(!c&&j||c&&!j)return false;if(c._chain)c=c._wrapped;if(j._chain)j=j._wrapped;if(c.isEqual)return c.isEqual(j);if(g.isDate(c)&&g.isDate(j))return c.getTime()===j.getTime();if(g.isNaN(c)&&g.isNaN(j))return false;if(g.isRegExp(c)&&g.isRegExp(j))return c.source===j.source&&c.global===j.global&&c.ignoreCase===j.ignoreCase&&c.multiline===
j.multiline;if(l!=="object")return false;if(c.length&&c.length!==j.length)return false;l=g.keys(c);var r=g.keys(j);if(l.length!=r.length)return false;for(var I in c)if(!(I in j)||!g.isEqual(c[I],j[I]))return false;return true};g.isEmpty=function(c){if(g.isArray(c)||g.isString(c))return c.length===0;for(var j in c)if(w.call(c,j))return false;return true};g.isElement=function(c){return!!(c&&c.nodeType==1)};g.isArray=F||function(c){return b.call(c)==="[object Array]"};g.isArguments=function(c){return!!(c&&
w.call(c,"callee"))};g.isFunction=function(c){return!!(c&&c.constructor&&c.call&&c.apply)};g.isString=function(c){return!!(c===""||c&&c.charCodeAt&&c.substr)};g.isNumber=function(c){return!!(c===0||c&&c.toExponential&&c.toFixed)};g.isNaN=function(c){return c!==c};g.isBoolean=function(c){return c===true||c===false};g.isDate=function(c){return!!(c&&c.getTimezoneOffset&&c.setUTCFullYear)};g.isRegExp=function(c){return!!(c&&c.test&&c.exec&&(c.ignoreCase||c.ignoreCase===false))};g.isNull=function(c){return c===
null};g.isUndefined=function(c){return c===void 0};g.noConflict=function(){e._=h;return this};g.identity=function(c){return c};g.times=function(c,j,l){for(var r=0;r<c;r++)j.call(l,r)};g.mixin=function(c){J(g.functions(c),function(j){pa(j,g[j]=c[j])})};var ja=0;g.uniqueId=function(c){var j=ja++;return c?c+j:j};g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};g.template=function(c,j){var l=g.templateSettings;l="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+
c.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(l.interpolate,function(r,I){return"',"+I.replace(/\\'/g,"'")+",'"}).replace(l.evaluate||null,function(r,I){return"');"+I.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";l=new Function("obj",l);return j?l(j):l};var S=function(c){this._wrapped=c};g.prototype=S.prototype;var W=function(c,j){return j?g(c).chain():c},pa=function(c,j){S.prototype[c]=function(){var l=
D.call(arguments);v.call(l,this._wrapped);return W(j.apply(g,l),this._chain)}};g.mixin(g);J(["pop","push","reverse","shift","sort","splice","unshift"],function(c){var j=C[c];S.prototype[c]=function(){j.apply(this._wrapped,arguments);return W(this._wrapped,this._chain)}});J(["concat","join","slice"],function(c){var j=C[c];S.prototype[c]=function(){return W(j.apply(this._wrapped,arguments),this._chain)}});S.prototype.chain=function(){this._chain=true;return this};S.prototype.value=function(){return this._wrapped}})();

