/*!
 * Add to Homescreen v1.0.8 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
 * Released under MIT license, http://cubiq.org/license
 */
(function(){var j=navigator,k=(/iphone|ipod|ipad/gi).test(j.platform),w=(/ipad/gi).test(j.platform),o="devicePixelRatio" in window&&window.devicePixelRatio>1,x=j.appVersion.match(/Safari/gi),a="standalone" in j&&k,z=a&&j.standalone,f=j.appVersion.match(/OS \d+_\d+/g),y=j.platform.split(" ")[0],q=j.language.replace("-","_"),v=startX=0,g=localStorage.getItem("_addToHome"),t,m,b,u,r,e={animationIn:"drop",animationOut:"fade",startDelay:2000,lifespan:20000,bottomOffset:14,expire:0,message:"",touchIcon:false,arrow:true,iterations:100},p={ca_es:"Per instal·lar aquesta aplicació al vostre %device premeu %icon i llavors <strong>Afegir a pantalla d'inici</strong>.",da_dk:"Tilføj denne side til din %device: tryk på %icon og derefter <strong>Tilføj til hjemmeskærm</strong>.",de_de:"Installieren Sie diese App auf Ihrem %device: %icon antippen und dann <strong>Zum Home-Bildschirm</strong>.",el_gr:"Εγκαταστήσετε αυτήν την Εφαρμογή στήν συσκευή σας %device: %icon μετά πατάτε <strong>Προσθήκη σε Αφετηρία</strong>.",en_us:"Install this web app on your %device: tap %icon and then <strong>Add to Home Screen</strong>.",es_es:"Para instalar esta app en su %device, pulse %icon y seleccione <strong>Añadir a pantalla de inicio</strong>.",fi_fi:"Asenna tämä web-sovellus laitteeseesi %device: paina %icon ja sen jälkeen valitse <strong>Lisää Koti-valikkoon</strong>.",fr_fr:"Ajoutez cette application sur votre %device en cliquant sur %icon, puis <strong>Ajouter à l'écran d'accueil</strong>.",he_il:'<span dir="rtl">התקן אפליקציה זו על ה-%device שלך: הקש %icon ואז <strong>הוסף למסך הבית</strong>.</span>',hu_hu:"Telepítse ezt a web-alkalmazást az Ön %device-jára: nyomjon a %icon-ra majd a <strong>Főképernyőhöz adás</strong> gombra.",it_it:"Installa questa applicazione sul tuo %device: premi su %icon e poi <strong>Aggiungi a Home</strong>.",ja_jp:"このウェブアプリをあなたの%deviceにインストールするには%iconをタップして<strong>ホーム画面に追加</strong>を選んでください。",ko_kr:'%device에 웹앱을 설치하려면 %icon을 터치 후 "홈화면에 추가"를 선택하세요',nb_no:"Installer denne appen på din %device: trykk på %icon og deretter <strong>Legg til på Hjem-skjerm</strong>",nl_nl:"Installeer deze webapp op uw %device: tik %icon en dan <strong>Zet in beginscherm</strong>.",pt_br:"Instale este web app em seu %device: aperte %icon e selecione <strong>Adicionar à Tela Inicio</strong>.",pt_pt:"Para instalar esta aplicação no seu %device, prima o %icon e depois o <strong>Adicionar ao ecrã principal</strong>.",ru_ru:"Установите это веб-приложение на ваш %device: нажмите %icon, затем <strong>Добавить в «Домой»</strong>.",sv_se:"Lägg till denna webbapplikation på din %device: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.",th_th:"ติดตั้งเว็บแอพฯ นี้บน %device ของคุณ: แตะ %icon และ <strong>เพิ่มที่หน้าจอโฮม</strong>",tr_tr:"%device için bu uygulamayı kurduktan sonra %icon simgesine dokunarak <strong>Ev Ekranına Ekle</strong>yin.",zh_cn:"您可以将此应用程式安装到您的 %device 上。请按 %icon 然后点选<strong>添加至主屏幕</strong>。",zh_tw:"您可以將此應用程式安裝到您的 %device 上。請按 %icon 然後點選<strong>加入主畫面螢幕</strong>。"};f=f?f[0].replace(/[^\d_]/g,"").replace("_",".")*1:0;g=g=="null"?0:g*1;if(window.addToHomeConfig){for(u in window.addToHomeConfig){e[u]=window.addToHomeConfig[u]}}if(!e.expire||g<new Date().getTime()){g=0}if(a&&!g&&!z&&x){document.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",s,false)}function n(){document.removeEventListener("DOMContentLoaded",n,false);var C=document.createElement("div"),B,A=e.touchIcon?document.querySelectorAll("head link[rel=apple-touch-icon],head link[rel=apple-touch-icon-precomposed]"):[],l,i="";C.id="addToHomeScreen";C.style.cssText+="position:absolute;-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0;-webkit-transform:translate3d(0,0,0);";C.style.left="-9999px";if(e.message in p){q=e.message;e.message=""}if(e.message==""){e.message=q in p?p[q]:p.en_us
}if(A.length){for(u=0,r=A.length;u<r;u++){l=A[u].getAttribute("sizes");if(l){if(o&&l=="114x114"){i=A[u].href;break}}else{i=A[u].href}}i='<span style="background-image:url('+i+')" class="touchIcon"></span>'}C.className=(w?"ipad":"iphone")+(i?" wide":"");C.innerHTML=i+e.message.replace("%device",y).replace("%icon",f>=4.2?'<span class="share"></span>':'<span class="plus">+</span>')+(e.arrow?'<span class="arrow"></span>':"")+'<span class="close">\u00D7</span>';document.body.appendChild(C);b=C;B=b.querySelector(".close");if(B){B.addEventListener("click",c,false)}if(e.expire){localStorage.setItem("_addToHome",new Date().getTime()+e.expire*60*1000)}}function s(){window.removeEventListener("load",s,false);setTimeout(function(){var i;v=w?window.scrollY:window.innerHeight+window.scrollY;startX=w?window.scrollX:Math.round((window.innerWidth-b.offsetWidth)/2)+window.scrollX;b.style.top=w?v+e.bottomOffset+"px":v-b.offsetHeight-e.bottomOffset+"px";b.style.left=w?startX+(f>=5?160:208)-Math.round(b.offsetWidth/2)+"px":startX+"px";switch(e.animationIn){case"drop":if(w){i="0.6s";b.style.webkitTransform="translate3d(0,"+-(window.scrollY+e.bottomOffset+b.offsetHeight)+"px,0)"}else{i="0.9s";b.style.webkitTransform="translate3d(0,"+-(v+e.bottomOffset)+"px,0)"}break;case"bubble":if(w){i="0.6s";b.style.opacity="0";b.style.webkitTransform="translate3d(0,"+(v+50)+"px,0)"}else{i="0.6s";b.style.webkitTransform="translate3d(0,"+(b.offsetHeight+e.bottomOffset+50)+"px,0)"}break;default:i="1s";b.style.opacity="0"}setTimeout(function(){b.style.webkitTransitionDuration=i;b.style.opacity="1";b.style.webkitTransform="translate3d(0,0,0)";b.addEventListener("webkitTransitionEnd",h,false)},0);m=setTimeout(c,e.lifespan)},e.startDelay)}function h(){b.removeEventListener("webkitTransitionEnd",h,false);b.style.webkitTransitionProperty="-webkit-transform";b.style.webkitTransitionDuration="0.2s";if(m){clearInterval(t);t=setInterval(d,e.iterations)}else{b.parentNode.removeChild(b)}}function d(){var i=new WebKitCSSMatrix(window.getComputedStyle(b,null).webkitTransform),l=w?window.scrollY-v:window.scrollY+window.innerHeight-v,A=w?window.scrollX-startX:window.scrollX+Math.round((window.innerWidth-b.offsetWidth)/2)-startX;if(l==i.m42&&A==i.m41){return}clearInterval(t);b.removeEventListener("webkitTransitionEnd",h,false);setTimeout(function(){b.addEventListener("webkitTransitionEnd",h,false);b.style.webkitTransform="translate3d("+A+"px,"+l+"px,0)"},0)}function c(){clearInterval(t);clearTimeout(m);m=null;b.removeEventListener("webkitTransitionEnd",h,false);var B=w?window.scrollY-v:window.scrollY+window.innerHeight-v,C=w?window.scrollX-startX:window.scrollX+Math.round((window.innerWidth-b.offsetWidth)/2)-startX,i="1",l="0",A=b.querySelector(".close");if(A){A.removeEventListener("click",c,false)}b.style.webkitTransitionProperty="-webkit-transform,opacity";switch(e.animationOut){case"drop":if(w){l="0.4s";i="0";B=B+50}else{l="0.6s";B=B+b.offsetHeight+e.bottomOffset+50}break;case"bubble":if(w){l="0.8s";B=B-b.offsetHeight-e.bottomOffset-50}else{l="0.4s";i="0";B=B-50}break;default:l="0.8s";i="0"}b.addEventListener("webkitTransitionEnd",h,false);b.style.opacity=i;b.style.webkitTransitionDuration=l;b.style.webkitTransform="translate3d("+C+"px,"+B+"px,0)"}window.addToHomeClose=c})();(function(a){window.MBP=window.MBP||{};MBP.viewportmeta=a.querySelector&&a.querySelector('meta[name="viewport"]');MBP.ua=navigator.userAgent;MBP.scaleFix=function(){if(MBP.viewportmeta&&/iPhone|iPad/.test(MBP.ua)&&!/Opera Mini/.test(MBP.ua)){MBP.viewportmeta.content="width=device-width, minimum-scale=1.0, maximum-scale=1.0";a.addEventListener("gesturestart",MBP.gestureStart,false)}};MBP.gestureStart=function(){MBP.viewportmeta.content="width=device-width, minimum-scale=0.25, maximum-scale=1.6"};MBP.hideUrlBar=function(){/iPhone/.test(MBP.ua)&&!pageYOffset&&!location.hash&&setTimeout(function(){window.scrollTo(0,1)},1000)};MBP.fastButton=function(b,c){this.element=b;this.handler=c;if(b.addEventListener){b.addEventListener("touchstart",this,false);b.addEventListener("click",this,false)}};MBP.fastButton.prototype.handleEvent=function(b){switch(b.type){case"touchstart":this.onTouchStart(b);break;case"touchmove":this.onTouchMove(b);break;case"touchend":this.onClick(b);break;case"click":this.onClick(b);break}};MBP.fastButton.prototype.onTouchStart=function(b){b.stopPropagation();this.element.addEventListener("touchend",this,false);a.body.addEventListener("touchmove",this,false);this.startX=b.touches[0].clientX;this.startY=b.touches[0].clientY;this.element.style.backgroundColor="rgba(0,0,0,.7)"};MBP.fastButton.prototype.onTouchMove=function(b){if(Math.abs(b.touches[0].clientX-this.startX)>10||Math.abs(b.touches[0].clientY-this.startY)>10){this.reset()}};MBP.fastButton.prototype.onClick=function(b){b.stopPropagation();this.reset();this.handler(b);if(b.type=="touchend"){MBP.preventGhostClick(this.startX,this.startY)}this.element.style.backgroundColor=""};MBP.fastButton.prototype.reset=function(){this.element.removeEventListener("touchend",this,false);a.body.removeEventListener("touchmove",this,false);this.element.style.backgroundColor=""};MBP.preventGhostClick=function(b,c){MBP.coords.push(b,c);window.setTimeout(function(){MBP.coords.splice(0,2)},2500)};MBP.ghostClickHandler=function(e){for(var d=0,c=MBP.coords.length;d<c;d+=2){var b=MBP.coords[d];var f=MBP.coords[d+1];if(Math.abs(e.clientX-b)<25&&Math.abs(e.clientY-f)<25){e.stopPropagation();e.preventDefault()}}};if(a.addEventListener){a.addEventListener("click",MBP.ghostClickHandler,true)}MBP.coords=[];MBP.splash=function(){var b=navigator.platform==="iPad"?"h/":"l/";a.write('<link rel="apple-touch-startup-image" href="/img/'+b+'splash.png" />')};MBP.autogrow=function(d,b){function e(h){var g=this.scrollHeight,i=this.clientHeight;if(g>i){this.style.height=g+3*f+"px"}}var c=(b)?b:12,f=d.currentStyle?d.currentStyle.lineHeight:getComputedStyle(d,null).lineHeight;f=(f.indexOf("px")==-1)?c:parseInt(f,10);d.style.overflow="hidden";d.addEventListener?d.addEventListener("keyup",e,false):d.attachEvent("onkeyup",e)}})(document);window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;console.log(Array.prototype.slice.call(arguments))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})(window.console=window.console||{});(function(a){a.fn.shuffle=function(){return this.each(function(){var b=a(this).children();return(b.length)?a(this).html(a.shuffle(b)):this})};a.shuffle=function(c){for(var d,b,e=c.length;e;d=parseInt(Math.random()*e),b=c[--e],c[e]=c[d],c[d]=b){}return c}})(jQuery);var flickrhelpers=null;(function(a){a.fn.flickrGallery=function(d){var b=a(this),e=this;var c={init:function(){f=a.extend({},g,d);if(f.flickrKey===null||f.flickrSet===null){alert("You must pass an API key and a Flickr setID");return}$("body").append('<div id="flickr_loader"></div>');$("#flickr_loader").css({width:e.width(),height:e.height(),"background-color":"transparent"});e.css("overflow","hidden");$.getJSON("http://api.flickr.com/services/rest/?format=json&method=flickr.photosets.getPhotos&photoset_id="+f.flickrSet+"&api_key="+f.flickrKey+"&jsoncallback=?",function(m){var k=m.photoset.photo.length>f.limit?f.limit:m.photoset.photo.length;var n="";var l=$.shuffle(m.photoset.photo);for(i=0;i<k;i++){var j="http://farm"+l[i].farm+".static.flickr.com/"+l[i].server+"/"+l[i].id+"_"+l[i].secret+".jpg";var h="http://farm"+l[i].farm+".static.flickr.com/"+l[i].server+"/"+l[i].id+"_"+l[i].secret+"_s.jpg";n+="<img src="+h+' width="50" height="50" onclick="flickrhelpers.navImg('+i+');flickrhelpers.toggleUp();" style="cursor: pointer;">';f.imgArray[i]=j;f.titleArray[i]=l[i].title}$("body").append('<div id="flickr_next"></div>');$("body").append('<div id="flickr_prev"></div>');$("#flickr_next").click(function(){if(f.currentIndex<(f.imgArray.length-1)){f.currentIndex=f.currentIndex+1;flickrhelpers.navImg(f.currentIndex)}});$("#flickr_prev").click(function(){if(f.currentIndex>0){f.currentIndex=f.currentIndex-1;flickrhelpers.navImg(f.currentIndex)}});f.x=e.offset().left;f.y=e.offset().top;f.c=f.x+(e.width()/2);f.ct=f.y+(e.height()/2);$("#flickr_loader").css({left:f.x,top:f.y});$("body").append('<div id="flickr_thumbs"></div>');$("#flickr_thumbs").css("background-color",e.css("background-color"));$("#flickr_thumbs").css("width",e.width());$("#flickr_thumbs").css("left",f.x);$("#flickr_thumbs").css("top",f.y);$("#flickr_thumbs").html(n);$("#flickr_thumbs").slideUp("slow");flickrhelpers.navImg(0)})}};flickrhelpers={navImg:function(h){currentIndex=h;$("#flickr_loader").css({top:f.y,left:f.x,display:"block"});var j=null;j=new Image();j.src=f.imgArray[h];f.fImg=$(j);e.html("");e.html('<img id="thsImage" src='+f.imgArray[h]+" border=0>");$("#thsImage").load(function(){var k=$("#thsImage").width();var n=$("#thsImage").height();if(k>n){var p=k/n;$("#thsImage").css("width",e.width());$("#thsImage").css("height",Math.round(e.width()*(1/p)))}else{var p=n/k;$("#thsImage").css("height",e.height());$("#thsImage").css("width",Math.round(e.height()*(1/p)))}if(e.outerHeight()>$("#thsImage").outerHeight()){var m=$("#thsImage").outerHeight()/2;var o=(e.outerHeight()/2)-m;$("#thsImage").css("margin-top",o+"px")}var l=currentIndex+1;$("#flickr_count").html("Photo "+l+" of "+f.imgArray.length);if(f.titleArray[currentIndex]!=""){$("#flickr_count").append(" : "+f.titleArray[currentIndex])}$("#flickr_loader").fadeOut()})},toggleUp:function(){$("#flickr_thumbs").slideUp("slow")}};var g={flickrSet:null,flickrKey:null,x:0,y:0,c:0,ct:0,mX:0,mY:0,imgArray:[],titleArray:[],currentIndex:0,fImg:null,};var f={};a(document).ready(function(){c.init()});$(window).resize(function(){f.x=e.offset().left;f.y=e.offset().top;f.c=f.x+(e.width()/2);f.ct=f.y+(e.height()/2);$("#flickr_loader").css("background-color","transparent");$("#flickr_loader").css("width",e.width()+"px");$("#flickr_loader").css("height",e.height()+"px");$("#flickr_thumbs").css("background-color","#eee");$("#flickr_thumbs").css("width",e.width()+"px");$("#flickr_thumbs").css("left",f.x+"px");$("#flickr_thumbs").css("top",f.y+"px")});$(document).mousemove(function(k){f.mX=k.pageX;f.mY=k.pageY;var j=f.y+e.height();var h=f.x+e.width();if(((f.mY>f.y)&&(f.mY<j))&&((f.mX>f.x)&&(f.mX<h))){if(f.mY<(f.y+50)){$("#flickr_thumbs").slideDown("slow")}else{if((f.mY>(f.y+$("#flickr_thumbs").outerHeight()))){$("#flickr_thumbs").slideUp("slow")
}}if(f.mX<f.c){$("#flickr_next").css("display","none");$("#flickr_prev").css("display","block");$("#flickr_prev").css("left",f.mX-20+"px");$("#flickr_prev").css("top",f.mY-10+"px")}else{if(f.mX>f.c){$("#flickr_prev").css("display","none");$("#flickr_next").css("display","block");$("#flickr_next").css("left",f.mX-10+"px");$("#flickr_next").css("top",f.mY-10+"px")}else{$("#flickr_prev").css("display","none");$("#flickr_next").css("display","none")}}}else{$("#flickr_thumbs").slideUp("slow");$("#flickr_prev").css("display","none");$("#flickr_next").css("display","none")}})}})(jQuery);/* Build-0.6: color.core.js color.rgb.js color.huebased.js color.hsv.js color.hsl.js color.object.js color.parse.js color.related.js color.palette.css3.js color.css.js */
/*
 * jQuery Colour 0.6
 *
 * Copyright (c) 2009 Adaptavist.com
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * Author: Mark Gibson (jollytoad at gmail dot com)
 *
 * http://www.adaptavist.com/display/jQuery/Colour+Library
 */
(jQuery.color||(function(a){a.color={isEqual:function(b,d){if(b.length!==d.length){return false}var c=b.length;while(c--){if(b[c]!==d[c]){return false}}return true},fix:function(b,d){var c=d.length;while(c--){if(typeof b[c]==="number"){switch(d.charAt(c)){case"i":b[c]=Math.round(b[c]);break;case"o":b[c]=Math.min(255,Math.max(0,Math.round(b[c])));break;case"1":b[c]=Math.min(1,Math.max(0,b[c]));break}}}return b},self:function(b){return b},alpha:function(b){return b===undefined?1:b},palette:{},fns:[]}})(jQuery));(jQuery.color&&(function(a){a.color.RGB={fix:function(b){b=a.color.fix(b,"ooo1");return b},toRGB:a.color.self,toHEX:function(b){return"#"+(16777216+b[0]*65536+b[1]*256+b[2]).toString(16).slice(-6)},toCSS:function(b){if(a.color.alpha(b[3])===0){return"transparent"}if(a.color.alpha(b[3])<1){return"rgba("+b.join(",")+")"}return"rgb("+Array.prototype.slice.call(b,0,3).join(",")+")"},red:function(b){return b[0]},green:function(b){return b[1]},blue:function(b){return b[2]},alpha:function(b){return a.color.alpha(b[3])}};a.color.RGB.toString=a.color.RGB.toHEX;a.color.fns.push("RGB.toRGB","RGB.toHEX","RGB.toCSS","RGB.red","RGB.green","RGB.blue","RGB.alpha")})(jQuery));(jQuery.color&&(function(a){a.color.HueBased={fix:function(b){b[0]=(b[0]+1)%1;return a.color.fix(b,"1111")},complementary:function(c,b){return[(c[0]+0.5+(b||0))%1,c[1],c[2],c[3]]},analogous:function(c,b){return[(c[0]+1+(b||0))%1,c[1],c[2],c[3]]},hue:function(b){return b[0]},alpha:function(b){return a.color.alpha(b[3])}}})(jQuery));(jQuery.color&&(function(a){a.color.HSV=a.extend({toHSV:a.color.self,toRGB:function(d){var h=d[0]*6,e=Math.floor(h),g=h-e,l=d[1],j=d[2]*255,i=d[3],c=Math.round(j*(1-l)),b=Math.round(j*(1-g*l)),k=Math.round(j*(1-(1-g)*l));j=Math.round(j);switch(e%6){case 0:return[j,k,c,i];case 1:return[b,j,c,i];case 2:return[c,j,k,i];case 3:return[c,b,j,i];case 4:return[k,c,j,i];case 5:return[j,c,b,i]}},saturationV:function(b){return b[1]},value:function(b){return b[2]}},a.color.HueBased);a.color.RGB.toHSV=function(f){var j=f[0]/255,i=f[1]/255,e=f[2]/255,h=Math.min(j,i,e),c=Math.max(j,i,e),k=c-h;return[k===0?0:(i===c?(e-j)/k/6+(1/3):e===c?(j-i)/k/6+(2/3):(i-e)/k/6+1)%1,k===0?0:k/c,c,f[3]]};a.color.fns.push("HSV.toHSV","HSV.toRGB","RGB.toHSV","HSV.complementary","HSV.analogous","HSV.hue","HSV.saturationV","HSV.value","HSV.alpha")})(jQuery));(jQuery.color&&(function(a){a.color.HSL=a.extend({toHSL:a.color.self,toRGB:function(d){var f=d[0],e=d[1],b=d[2],g=b<0.5?b*(1+e):b+e-(b*e),i=2*b-g;function j(c){var h=c<0?c+1:c>1?c-1:c;return h<1/6?i+(g-i)*6*h:h<1/2?g:h<2/3?i+(g-i)*6*(2/3-h):i}return[Math.round(255*j(f+1/3)),Math.round(255*j(f)),Math.round(255*j(f-1/3)),d[3]]},saturationL:function(b){return b[1]},lightness:function(b){return b[2]}},a.color.HueBased);a.color.RGB.toHSL=function(f){var j=f[0]/255,i=f[1]/255,e=f[2]/255,h=Math.min(j,i,e),c=Math.max(j,i,e),l=c-h,k=c+h;return[l===0?0:(i===c?(e-j)/l/6+(1/3):e===c?(j-i)/l/6+(2/3):(i-e)/l/6+1)%1,l===0?0:k>1?l/(2-c-h):l/k,k/2,f[3]]};a.color.fns.push("HSL.toHSL","HSL.toRGB","RGB.toHSL","HSL.complementary","HSL.analogous","HSL.hue","HSL.saturationL","HSL.lightness","HSL.alpha")})(jQuery));(jQuery.color&&jQuery.Color||(function(a){a.Color=function(f,j,g){if(typeof this==="function"){return new a.Color(f,j,g)}if(typeof f==="string"&&a.color.parse){if(!g){g=f}f=a.color.parse(f)}if(f&&f.length){var h;h=this.length=f.length;while(h--){this[h]=f[h]}}if(f){this.space=j||f.space||"RGB";this.name=g||f.name}};function c(f,l){var h=a.Color.isInstance(f)&&f.space!==this.space?this.to(f.space):new a.Color(this),k=h.length,j=false;while(k--){if(typeof f[k]==="number"){var g=l?h[k]+f[k]:f[k];if(g!==h[k]){h[k]=g;j=true}}}return j?h.setName():this}a.Color.fn=a.Color.prototype={color:"0.6",util:function(){return a.color[this.space]},to:function(f){return this["to"+f]()},fix:function(){return this.util().fix(this)},modify:function(f){return c.call(this,f)},adjust:function(f){return c.call(this,f,true)},setName:function(f){this.name=f;return this},toString:function(){if(!this.space){return""}var f=this.util();return f.hasOwnProperty("toString")?f.toString(this):this.to("RGB").toString()},join:[].join,push:[].push};a.Color.isInstance=function(f){return f&&typeof f==="object"&&f.color===a.Color.fn.color&&f.space};a.Color.fnspace={};function e(g,h,i,j,f){return function(){var l=[g];Array.prototype.push.apply(l,arguments);var k=i.apply(h,l);return a.isArray(k)?new a.Color(k,j,f?g.name:undefined):k}}function d(g,h){var f=/^to/.test(h)?h.substring(2):false;return function(){var k=this,j=k.util();if(!j[h]){k=k.to(a.Color.fnspace[h]);j=k.util()}var l=e(k,j,j[h],f||k.space,!!f),i=l.apply(k,arguments);if(f){this[h]=function(){return i};if(a.Color.isInstance(i)){k=this;i["to"+this.space]=function(){return k}}}else{this[h]=l}return i}}function b(){var g=this.split("."),f=g[1],h=g[0];if(!a.Color.fnspace[f]&&f!=="to"+h){a.Color.fnspace[f]=h}if(!a.Color.fn[f]){a.Color.fn[f]=d(this,f)}}a.each(a.color.fns,b);a.color.fns.push=function(){a.each(arguments,b);return Array.prototype.push.apply(this,arguments)}})(jQuery));(jQuery.color&&(function(a){a.extend(a.color,{parse:function(c){var b;if(typeof c==="string"){if((b=/^\s*rgb(a)?\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*(?:,\s*([0-9]+(?:\.[0-9]+)?)\s*)?\)\s*$/.exec(c))&&!b[1]===!b[5]){return[parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10),b[5]?parseFloat(b[5]):1]}if((b=/^\s*rgb(a)?\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*(?:,\s*([0-9]+(?:\.[0-9]+)?)\s*)?\)\s*$/.exec(c))&&!b[1]===!b[5]){return[parseFloat(b[2])*255/100,parseFloat(b[3])*255/100,parseFloat(b[4])*255/100,b[5]?parseFloat(b[5]):1]}if((b=/^\s*#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})\s*$/.exec(c))){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16),1]}if((b=/^\s*#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])\s*$/.exec(c))){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16),1]}if((b=/^\s*hsl(a)?\(\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*(?:,\s*([0-9]+(?:\.[0-9]+)?)\s*)?\)\s*$/.exec(c))&&!b[1]===!b[5]){return[parseInt(b[2],10)/360,parseFloat(b[3])/100,parseFloat(b[4])/100,b[5]?parseFloat(b[5]):1]}return a.color.named(c)}if(c&&(c.length===3||c.length===4)){if(c.length===3){c.push(1)}return c}},named:function(c){var b;c=a.trim(c.toLowerCase());if(c==="transparent"){return[0,0,0,0]}a.each(a.color.palette,function(e,d){if(d[c]){b=d[c];return false}});return b}})})(jQuery));(jQuery.Color&&(function(a){a.Color.fn.related=function(d){var b=a.Color.fn.related.i18n,c=d||a.Color.fn.related.offset,e=Math.round(c*360)+b.deg;return{"anal-":this.analogous(-c).setName(b.anal+" -"+e),anal0:this.analogous().setName(b.orig),"anal+":this.analogous(c).setName(b.anal+" +"+e),"comp-":this.complementary(-c).setName(b.split+" -"+e),comp0:this.complementary().setName(b.comp),"comp+":this.complementary(c).setName(b.split+" +"+e),"triad-":this.analogous(-1/3).setName(b.triad+" -120"+b.deg),triad0:this.analogous().setName(b.orig),"triad+":this.analogous(1/3).setName(b.triad+" +120"+b.deg)}};a.Color.fn.related.offset=30/360;a.Color.fn.related.i18n={deg:"°",anal:"Analogous",orig:"Original",split:"Split Complementary",comp:"Complementary",triad:"Triadic"}})(jQuery));(jQuery.color&&(function(a){a.color.palette.css3={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})(jQuery));(function(a){a.fn.cssColor=function(b){return a.Color(this.css(b))};a.Color.fn.applyCSS=function(b,c){a(b).css(c,this.toCSS());return this}})(jQuery);/*
 * jScrollPane - v2.0.0beta9 - 2011-02-04
 * http://jscrollpane.kelvinluck.com/
 *
 * Copyright (c) 2010 Kelvin Luck
 * Dual licensed under the MIT and GPL licenses.
 */
(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);/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 * 
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);/** @license

 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.20110306
*/
(function($){function qa(Ga,Ha){function o(c){return function(a){return!this._t||!this._t._a?null:c.call(this,a)}}function ra(){if(b.debugURLParam.test(R))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.useGlobalHTML5Audio=true;this.requireFlash=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};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.version=null;this.versionNumber="V2.97a.20110306";this.movieURL=null;this.url=Ga||null;this.altURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=Ha||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",
swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",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 aa,b=this,D,t=navigator.userAgent,k=$,R=k.location.href.toString(),
l=this.flashVersion,j=document,ba,S,w=[],J=false,K=false,r=false,y=false,sa=false,L,s,ca,z,E,da,T,ta,ea,A,ua,M,F,fa,ga,U,ha,va,wa,V,xa,N=null,ia=null,B,ja,G,W,X,ka,p,Y=false,la=false,ya,za,C=null,Aa,Z,u=false,O,x,ma,Ba,q,Ia=Array.prototype.slice,P=false,na,H,Ca,Da=t.match(/pre\//i),Ja=t.match(/(ipad|iphone|ipod)/i);t.match(/mobile/i);var v=t.match(/msie/i),Ka=t.match(/webkit/i),Q=t.match(/safari/i)&&!t.match(/chrome/i),oa=!R.match(/usehtml5audio/i)&&!R.match(/sm2\-ignorebadua/i)&&Q&&t.match(/OS X 10_6_(3|4|5|6)/i),
pa=typeof j.hasFocus!=="undefined"?j.hasFocus():null,I=typeof j.hasFocus==="undefined"&&Q,Ea=!I;this._use_maybe=R.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=j.location?j.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;this._global_a=null;if(Ja||Da){b.useHTML5Audio=true;b.ignoreFlash=true;if(b.useGlobalHTML5Audio)P=true}if(Da||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;this.supported=this.ok=function(){return C?r&&!y:b.useHTML5Audio&&b.hasHTML5};this.getMovie=function(c){return v?
k[c]:Q?D(c)||j[c]:D(c)};this.createSound=function(c){function a(){g=W(g);b.sounds[e.id]=new aa(e);b.soundIDs.push(e.id);return b.sounds[e.id]}var g=null,h=null,e=null;if(!r||!b.ok()){ka("soundManager.createSound(): "+B(!r?"notReady":"notOK"));return false}if(arguments.length===2)c={id:arguments[0],url:arguments[1]};e=g=s(c);if(p(e.id,true))return b.sounds[e.id];if(Z(e)){h=a();h._setup_html5(e)}else{if(l>8&&b.useMovieStar){if(e.isMovieStar===null)e.isMovieStar=e.serverURL||(e.type?e.type.match(b.netStreamPattern):
false)||e.url.match(b.netStreamPattern)?true:false;if(e.isMovieStar)if(e.usePeakData)e.usePeakData=false}e=X(e,"soundManager.createSound(): ");h=a();if(l===8)b.o._createSound(e.id,e.onjustbeforefinishtime,e.loops||1,e.usePolicyFile);else{b.o._createSound(e.id,e.url,e.onjustbeforefinishtime,e.usePeakData,e.useWaveformData,e.useEQData,e.isMovieStar,e.isMovieStar?e.bufferTime:false,e.loops||1,e.serverURL,e.duration||null,e.autoPlay,true,e.autoLoad,e.usePolicyFile);if(!e.serverURL){h.connected=true;e.onconnect&&
e.onconnect.apply(h)}}if((e.autoLoad||e.autoPlay)&&!e.serverURL)h.load(e)}e.autoPlay&&!e.serverURL&&h.play();return h};this.destroySound=function(c,a){if(!p(c))return false;var g=b.sounds[c],h;g._iO={};g.stop();g.unload();for(h=0;h<b.soundIDs.length;h++)if(b.soundIDs[h]===c){b.soundIDs.splice(h,1);break}a||g.destruct(true);delete b.sounds[c];return true};this.load=function(c,a){if(!p(c))return false;return b.sounds[c].load(a)};this.unload=function(c){if(!p(c))return false;return b.sounds[c].unload()};
this.start=this.play=function(c,a){if(!r||!b.ok()){ka("soundManager.play(): "+B(!r?"notReady":"notOK"));return false}if(!p(c)){a instanceof Object||(a={url:a});if(a&&a.url){a.id=c;return b.createSound(a).play()}else return false}return b.sounds[c].play(a)};this.setPosition=function(c,a){if(!p(c))return false;return b.sounds[c].setPosition(a)};this.stop=function(c){if(!p(c))return false;return b.sounds[c].stop()};this.stopAll=function(){for(var c in b.sounds)b.sounds[c]instanceof aa&&b.sounds[c].stop()};
this.pause=function(c){if(!p(c))return false;return b.sounds[c].pause()};this.pauseAll=function(){for(var c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].pause()};this.resume=function(c){if(!p(c))return false;return b.sounds[c].resume()};this.resumeAll=function(){for(var c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].resume()};this.togglePause=function(c){if(!p(c))return false;return b.sounds[c].togglePause()};this.setPan=function(c,a){if(!p(c))return false;return b.sounds[c].setPan(a)};this.setVolume=
function(c,a){if(!p(c))return false;return b.sounds[c].setVolume(a)};this.mute=function(c){var a=0;if(typeof c!=="string")c=null;if(c){if(!p(c))return false;return b.sounds[c].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(c){if(typeof c!=="string")c=null;if(c){if(!p(c))return false;return b.sounds[c].unmute()}else{for(c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].unmute();b.muted=false}return true};
this.unmuteAll=function(){b.unmute()};this.toggleMute=function(c){if(!p(c))return false;return b.sounds[c].toggleMute()};this.getMemoryUse=function(){if(l===8)return 0;if(b.o)return parseInt(b.o._getMemoryUse(),10)};this.disable=function(c){if(typeof c==="undefined")c=false;if(y)return false;y=true;for(var a=b.soundIDs.length;a--;)wa(b.sounds[b.soundIDs[a]]);L(c);q.remove(k,"load",E);return true};this.canPlayMIME=function(c){var a;if(b.hasHTML5)a=O({type:c});return!C||a?a:c?c.match(b.mimePattern)?
true:false:null};this.canPlayURL=function(c){var a;if(b.hasHTML5)a=O(c);return!C||a?a:c?c.match(b.filePattern)?true:false:null};this.canPlayLink=function(c){if(typeof c.type!=="undefined"&&c.type)if(b.canPlayMIME(c.type))return true;return b.canPlayURL(c.href)};this.getSoundById=function(c){if(!c)throw Error("soundManager.getSoundById(): sID is null/undefined");return b.sounds[c]};this.onready=function(c,a){if(c&&c instanceof Function){a||(a=k);ca("onready",c,a);z();return true}else throw B("needFunction",
"onready");};this.ontimeout=function(c,a){if(c&&c instanceof Function){a||(a=k);ca("ontimeout",c,a);z({type:"ontimeout"});return true}else throw B("needFunction","ontimeout");};this.getMoviePercent=function(){return b.o&&typeof b.o.PercentLoaded!=="undefined"?b.o.PercentLoaded():null};this._wD=this._writeDebug=function(){return true};this._debug=function(){};this.reboot=function(){var c,a;for(c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].destruct();try{if(v)ia=b.o.innerHTML;N=b.o.parentNode.removeChild(b.o)}catch(g){}ia=
N=null;b.enabled=r=Y=la=J=K=y=b.swfLoaded=false;b.soundIDs=b.sounds=[];b.o=null;for(c in w)if(w.hasOwnProperty(c))for(a=w[c].length;a--;)w[c][a].fired=false;k.setTimeout(function(){b.beginDelayedInit()},20)};this.destruct=function(){b.disable(true)};this.beginDelayedInit=function(){sa=true;F();setTimeout(ua,20);T()};this._html5_events={abort:o(function(){}),canplay:o(function(){this._t._onbufferchange(0);var c=!isNaN(this._t.position)?this._t.position/1E3:null;this._t._html5_canplay=true;if(this._t.position&&
this.currentTime!==c)try{this.currentTime=c}catch(a){}}),load:o(function(){if(!this._t.loaded){this._t._onbufferchange(0);this._t._whileloading(this._t.bytesTotal,this._t.bytesTotal,this._t._get_html5_duration());this._t._onload(true)}}),emptied:o(function(){}),ended:o(function(){this._t._onfinish()}),error:o(function(){this._t._onload(false)}),loadeddata:o(function(){}),loadedmetadata:o(function(){}),loadstart:o(function(){this._t._onbufferchange(1)}),play:o(function(){this._t._onbufferchange(0)}),
playing:o(function(){this._t._onbufferchange(0)}),progress:o(function(c){if(this._t.loaded)return false;var a,g=0,h=c.type==="progress",e=c.target.buffered;a=c.loaded||0;var d=c.total||1;if(e&&e.length){for(a=e.length;a--;)g=e.end(a)-e.start(a);a=g/c.target.duration;h&&isNaN(a)}if(!isNaN(a)){this._t._onbufferchange(0);this._t._whileloading(a,d,this._t._get_html5_duration());a&&d&&a===d&&b._html5_events.load.call(this,c)}}),ratechange:o(function(){}),suspend:o(function(c){b._html5_events.progress.call(this,
c)}),stalled:o(function(){}),timeupdate:o(function(){this._t._onTimer()}),waiting:o(function(){this._t._onbufferchange(1)})};aa=function(c){var a=this,g,h,e;this.sID=c.id;this.url=c.url;this._iO=this.instanceOptions=this.options=s(c);this.pan=this.options.pan;this.volume=this.options.volume;this._lastURL=null;this.isHTML5=false;this._a=null;this.id3={};this._debug=function(){};this._debug();this.load=function(d){var f=null;if(typeof d!=="undefined"){a._iO=s(d);a.instanceOptions=a._iO}else{d=a.options;
a._iO=d;a.instanceOptions=a._iO;if(a._lastURL&&a._lastURL!==a.url){a._iO.url=a.url;a.url=null}}if(!a._iO.url)a._iO.url=a.url;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(Z(a._iO)){f=a._setup_html5(a._iO);if(!f._called_load){f.load();f._called_load=true;a._iO.autoPlay&&a.play()}}else try{a.isHTML5=false;a._iO=X(W(a._iO));l===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(i){ha()}return a};this.unload=function(){if(a.readyState!==0){if(a.isHTML5){h();if(a._a){a._a.pause();a._a.src=""}}else l===8?b.o._unload(a.sID,b.nullURL):b.o._unload(a.sID);g()}return a};this.destruct=function(d){if(a.isHTML5){h();if(a._a){a._a.pause();a._a.src="";P||a._remove_html5_events()}}else{a._iO.onfailure=null;b.o._destroySound(a.sID)}d||
b.destroySound(a.sID,true)};this.start=this.play=function(d,f){var i;f=f===undefined?true:f;d||(d={});a._iO=s(d,a._iO);a._iO=s(a._iO,a.options);a.instanceOptions=a._iO;if(a._iO.serverURL)if(!a.connected){a.getAutoPlay()||a.setAutoPlay(true);return a}if(Z(a._iO)){a._setup_html5(a._iO);e()}if(a.playState===1&&!a.paused)if(i=a._iO.multiShot)a.isHTML5&&a.setPosition(a._iO.position);else return a;if(!a.loaded)if(a.readyState===0){if(!a.isHTML5)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||l>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=X(W(a._iO));if(a._iO.onplay&&f){a._iO.onplay.apply(a);a._onplay_called=true}a.setVolume(a._iO.volume,true);a.setPan(a._iO.pan,true);if(a.isHTML5){e();a._setup_html5().play()}else b.o._start(a.sID,a._iO.loops||1,l===
9?a.position:a.position/1E3)}return a};this.stop=function(d){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(a._a){a.setPosition(0);a._a.pause();a.playState=0;a._onTimer();h();a.unload()}}else{b.o._stop(a.sID,d);a._iO.serverURL&&a.unload()}a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(d){a._iO.autoPlay=d;if(a.isHTML5)a._a&&d&&a.play();else b.o._setAutoPlay(a.sID,d);d&&!a.instanceCount&&
a.readyState===1&&a.instanceCount++};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(d){if(d===undefined)d=0;var f=a.isHTML5?Math.max(d,0):Math.min(a.duration||a._iO.duration,Math.max(d,0));a.position=f;d=a.position/1E3;a.resetOnPosition(a.position);a._iO.position=f;if(a.isHTML5){if(a._a)if(a._html5_canplay)if(a._a.currentTime!==d)try{a._a.currentTime=d}catch(i){}}else{d=l===9?a.position:d;if(a.readyState&&a.readyState!==2)b.o._setPosition(a.sID,d,a.paused||!a.playState)}a.isHTML5&&
a.paused&&a._onTimer(true);return a};this.pause=function(d){if(a.paused||a.playState===0&&a.readyState!==1)return a;a.paused=true;if(a.isHTML5){a._setup_html5().pause();h()}else if(d||d===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();e()}else{a._iO.isMovieStar&&a.setPosition(a.position);b.o._pause(a.sID)}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:l===9&&!a.isHTML5?a.position:a.position/1E3});return a}a.paused?a.resume():a.pause();return a};this.setPan=function(d,f){if(typeof d==="undefined")d=0;if(typeof f==="undefined")f=false;a.isHTML5||b.o._setPan(a.sID,d);a._iO.pan=d;if(!f)a.pan=d;return a};this.setVolume=function(d,f){if(typeof d==="undefined")d=100;if(typeof f==="undefined")f=false;if(a.isHTML5){if(a._a)a._a.volume=
d/100}else b.o._setVolume(a.sID,b.muted&&!a.muted||a.muted?0:d);a._iO.volume=d;if(!f)a.volume=d;return a};this.mute=function(){a.muted=true;if(a.isHTML5){if(a._a)a._a.muted=true}else b.o._setVolume(a.sID,0);return a};this.unmute=function(){a.muted=false;var d=typeof a._iO.volume!=="undefined";if(a.isHTML5){if(a._a)a._a.muted=false}else b.o._setVolume(a.sID,d?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(d,f,i){a._onPositionItems.push({position:d,
method:f,scope:typeof i!=="undefined"?i:a,fired:false});return a};this.processOnPosition=function(){var d,f;d=a._onPositionItems.length;if(!d||!a.playState||a._onPositionFired>=d)return false;for(d=d;d--;){f=a._onPositionItems[d];if(!f.fired&&a.position>=f.position){f.method.apply(f.scope,[f.position]);f.fired=true;b._onPositionFired++}}return true};this.resetOnPosition=function(d){var f,i;f=a._onPositionItems.length;if(!f)return false;for(f=f;f--;){i=a._onPositionItems[f];if(i.fired&&d<=i.position){i.fired=
false;b._onPositionFired--}}return true};this._onTimer=function(d){var f={};if(a._hasTimer||d)if(a._a&&(d||(a.playState>0||a.readyState===1)&&!a.paused)){a.duration=a._get_html5_duration();a.durationEstimate=a.duration;d=a._a.currentTime?a._a.currentTime*1E3:0;a._whileplaying(d,f,f,f,f);return true}else return false};this._get_html5_duration=function(){var d=a._a?a._a.duration*1E3:a._iO?a._iO.duration:undefined;return d&&!isNaN(d)&&d!==Infinity?d:a._iO?a._iO.duration:null};e=function(){a.isHTML5&&
ya(a)};h=function(){a.isHTML5&&za(a)};g=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._onplay_called=false;a._a=null;a._html5_canplay=false;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=[]};g();this._setup_html5=function(d){d=s(a._iO,d);var f=P?b._global_a:a._a;decodeURI(d.url);var i=f&&f._t?f._t.instanceOptions:null;if(f){if(f._t&&i.url===d.url)return f;P&&f._t.playState&&f._t&&d.url!==i.url&&f._t.stop();g();f.src=d.url}else{f=new Audio(d.url);if(P)b._global_a=f}f._called_load=false;a.isHTML5=true;a._a=f;f._t=a;a._add_html5_events();f.loop=d.loops>1?"loop":"";if(d.autoLoad||d.autoPlay){f.autobuffer=
"auto";f.preload="auto";a.load()}else{f.autobuffer=false;f.preload="none"}f.loop=d.loops>1?"loop":"";return f};this._add_html5_events=function(){if(a._a._added_events)return false;var d;a._a._added_events=true;for(d in b._html5_events)b._html5_events.hasOwnProperty(d)&&a._a&&a._a.addEventListener(d,b._html5_events[d],false);return true};this._remove_html5_events=function(){a._a._added_events=false;for(var d in b._html5_events)b._html5_events.hasOwnProperty(d)&&a._a&&a._a.removeEventListener(d,b._html5_events[d],
false)};this._whileloading=function(d,f,i,m){a.bytesLoaded=d;a.bytesTotal=f;a.duration=Math.floor(i);a.bufferLength=m;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(d,f){var i=[],m,n;m=0;for(n=d.length;m<
n;m++)i[d[m]]=f[m];a.id3=s(a.id3,i);a._iO.onid3&&a._iO.onid3.apply(a)};this._whileplaying=function(d,f,i,m,n){if(isNaN(d)||d===null)return false;if(a.playState===0&&d>0)d=0;a.position=d;a.processOnPosition();if(l>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof f!=="undefined"&&f)a.peakData={left:f.leftPeak,right:f.rightPeak};if(a._iO.useWaveformData&&typeof i!=="undefined"&&i)a.waveformData={left:i.split(","),right:m.split(",")};if(a._iO.useEQData)if(typeof n!=="undefined"&&n&&n.leftEQ){d=n.leftEQ.split(",");
a.eqData=d;a.eqData.left=d;if(typeof n.rightEQ!=="undefined"&&n.rightEQ)a.eqData.right=n.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(d){d=d===1;if(a.connected=
d){a.failures=0;if(p(a.sID))if(a.getAutoPlay())a.play(undefined,a.getAutoPlay());else a._iO.autoLoad&&a.load();a._iO.onconnect&&a._iO.onconnect.apply(a,[d])}};this._onload=function(d){d=d?true:false;a.loaded=d;a.readyState=d?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[d]);return true};this._onfailure=function(d,f,i){a.failures++;a._iO.onfailure&&a.failures===1&&a._iO.onfailure(a,d,f,i)};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._onfinish=function(){var d=a._iO.onfinish;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=
{};a._iO={};h()}if(!a.instanceCount||a._iO.multiShotEvents)d&&d.apply(a)}};this._onbufferchange=function(d){if(a.playState===0)return false;if(d&&a.isBuffering||!d&&!a.isBuffering)return false;a.isBuffering=d===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)}};ga=function(){return j.body?j.body:j._docElement?j.documentElement:j.getElementsByTagName("div")[0]};D=function(c){return j.getElementById(c)};
s=function(c,a){var g={},h,e;for(h in c)if(c.hasOwnProperty(h))g[h]=c[h];h=typeof a==="undefined"?b.defaultOptions:a;for(e in h)if(h.hasOwnProperty(e)&&typeof g[e]==="undefined")g[e]=h[e];return g};q=function(){function c(e){e=Ia.call(e);var d=e.length;if(g){e[1]="on"+e[1];d>3&&e.pop()}else d===3&&e.push(false);return e}function a(e,d){var f=e.shift(),i=[h[d]];g?f[i](e[0],e[1]):f[i].apply(f,e)}var g=k.attachEvent,h={add:g?"attachEvent":"addEventListener",remove:g?"detachEvent":"removeEventListener"};
return{add:function(){a(c(arguments),"add")},remove:function(){a(c(arguments),"remove")}}}();Z=function(c){return!c.serverURL&&(c.type?O({type:c.type}):O(c.url)||u)};O=function(c){if(!b.useHTML5Audio||!b.hasHTML5)return false;var a,g=b.audioFormats;if(!x){x=[];for(a in g)if(g.hasOwnProperty(a)){x.push(a);if(g[a].related)x=x.concat(g[a].related)}x=RegExp("\\.("+x.join("|")+")","i")}a=typeof c.type!=="undefined"?c.type:null;c=typeof c==="string"?c.toLowerCase().match(x):null;if(!c||!c.length)if(a){c=
a.indexOf(";");c=(c!==-1?a.substr(0,c):a).substr(6)}else return false;else c=c[0].substr(1);if(c&&typeof b.html5[c]!=="undefined")return b.html5[c];else{if(!a)if(c&&b.html5[c])return b.html5[c];else a="audio/"+c;a=b.html5.canPlayType(a);return b.html5[c]=a}};Ba=function(){function c(f){var i,m,n=false;if(!a||typeof a.canPlayType!=="function")return false;if(f instanceof Array){i=0;for(m=f.length;i<m&&!n;i++)if(b.html5[f[i]]||a.canPlayType(f[i]).match(b.html5Test)){n=true;b.html5[f[i]]=true}return n}else return(f=
a&&typeof a.canPlayType==="function"?a.canPlayType(f):false)&&(f.match(b.html5Test)?true:false)}if(!b.useHTML5Audio||typeof Audio==="undefined")return false;var a=typeof Audio!=="undefined"?new Audio(null):null,g,h={},e,d;H();e=b.audioFormats;for(g in e)if(e.hasOwnProperty(g)){h[g]=c(e[g].type);if(e[g]&&e[g].related)for(d=e[g].related.length;d--;)b.html5[e[g].related[d]]=h[g]}h.canPlayType=a?c:null;b.html5=s(b.html5,h);return true};B=function(){};W=function(c){if(l===8&&c.loops>1&&c.stream)c.stream=
false;return c};X=function(c){if(c&&!c.usePolicyFile&&(c.onid3||c.usePeakData||c.useWaveformData||c.useEQData))c.usePolicyFile=true;return c};ka=function(c){typeof console!=="undefined"&&typeof console.warn!=="undefined"&&console.warn(c)};ba=function(){return false};wa=function(c){for(var a in c)if(c.hasOwnProperty(a)&&typeof c[a]==="function")c[a]=ba};V=function(c){if(typeof c==="undefined")c=false;if(y||c)b.disable(c)};xa=function(c){var a=null;if(c)if(c.match(/\.swf(\?.*)?$/i)){if(a=c.substr(c.toLowerCase().lastIndexOf(".swf?")+
4))return c}else if(c.lastIndexOf("/")!==c.length-1)c+="/";return(c&&c.lastIndexOf("/")!==-1?c.substr(0,c.lastIndexOf("/")+1):"./")+b.movieURL};ea=function(){if(l!==8&&l!==9)b.flashVersion=8;var c=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.useHTML5Audio&&!u&&b.audioFormats.mp4.required&&b.flashVersion<9)b.flashVersion=9;l=b.flashVersion;b.version=b.versionNumber+(u?" (HTML5-only mode)":l===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(l>8){b.defaultOptions=s(b.defaultOptions,b.flash9Options);b.features.buffering=
true}if(l>8&&b.useMovieStar){b.defaultOptions=s(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[l!==8?"flash9":"flash8"];b.movieURL=(l===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",c);b.features.peakData=b.features.waveformData=b.features.eqData=l>8};va=function(c,
a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(c,a)};U=function(c,a){var g=a?a:b.url,h=b.altURL?b.altURL:g,e;e=ga();var d,f,i=G(),m,n=null;n=(n=j.getElementsByTagName("html")[0])&&n.dir&&n.dir.match(/rtl/i);c=typeof c==="undefined"?b.id:c;if(J&&K)return false;if(u){ea();b.oMC=D(b.movieID);S();K=J=true;return false}J=true;ea();b.url=xa(b._overHTTP?g:h);a=b.url;b.wmode=!b.wmode&&b.useHighPerformance&&!b.useMovieStar?"transparent":b.wmode;if(b.wmode!==null&&(t.match(/msie 8/i)||!v&&!b.useHighPerformance)&&
navigator.platform.match(/win32|win64/i)){b.specialWmodeCase=true;b.wmode=null}e={name:c,id:c,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,hasPriority:"true"};if(b.debugFlash)e.FlashVars="debug=1";b.wmode||delete e.wmode;if(v){g=j.createElement("div");f='<object id="'+c+'" data="'+a+'" type="'+e.type+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+
e.width+'" height="'+e.height+'"><param name="movie" value="'+a+'" /><param name="AllowScriptAccess" value="'+b.allowScriptAccess+'" /><param name="quality" value="'+e.quality+'" />'+(b.wmode?'<param name="wmode" value="'+b.wmode+'" /> ':"")+'<param name="bgcolor" value="'+b.bgColor+'" />'+(b.debugFlash?'<param name="FlashVars" value="'+e.FlashVars+'" />':"")+"</object>"}else{g=j.createElement("embed");for(d in e)e.hasOwnProperty(d)&&g.setAttribute(d,e[d])}ra();i=G();if(e=ga()){b.oMC=D(b.movieID)?
D(b.movieID):j.createElement("div");if(b.oMC.id){m=b.oMC.className;b.oMC.className=(m?m+" ":b.swfCSS.swfDefault)+(i?" "+i:"");b.oMC.appendChild(g);if(v){d=b.oMC.appendChild(j.createElement("div"));d.className=b.swfCSS.swfBox;d.innerHTML=f}K=true}else{b.oMC.id=b.movieID;b.oMC.className=b.swfCSS.swfDefault+" "+i;d=i=null;if(!b.useFlashBlock)if(b.useHighPerformance)i={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else{i={position:"absolute",width:"6px",height:"6px",
top:"-9999px",left:"-9999px"};if(n)i.left=Math.abs(parseInt(i.left,10))+"px"}if(Ka)b.oMC.style.zIndex=1E4;if(!b.debugFlash)for(m in i)if(i.hasOwnProperty(m))b.oMC.style[m]=i[m];try{v||b.oMC.appendChild(g);e.appendChild(b.oMC);if(v){d=b.oMC.appendChild(j.createElement("div"));d.className=b.swfCSS.swfBox;d.innerHTML=f}K=true}catch(La){throw Error(B("appXHTML"));}}}return true};p=this.getSoundById;M=function(){if(u){U();return false}if(b.o)return false;b.o=b.getMovie(b.id);if(!b.o){if(N){if(v)b.oMC.innerHTML=
ia;else b.oMC.appendChild(N);N=null;J=true}else U(b.id,b.url);b.o=b.getMovie(b.id)}b.oninitmovie instanceof Function&&setTimeout(b.oninitmovie,1);return true};da=function(c){if(c)b.url=c;M()};T=function(){setTimeout(ta,500)};ta=function(){if(Y)return false;Y=true;q.remove(k,"load",T);if(I&&!pa)return false;var c;r||(c=b.getMoviePercent());setTimeout(function(){c=b.getMoviePercent();if(!r&&Ea)if(c===null)if(b.useFlashBlock||b.flashLoadTimeout===0)b.useFlashBlock&&ja();else V(true);else b.flashLoadTimeout!==
0&&V(true)},b.flashLoadTimeout)};da=function(c){if(c)b.url=c;M()};G=function(){var c=[];b.debugMode&&c.push(b.swfCSS.sm2Debug);b.debugFlash&&c.push(b.swfCSS.flashDebug);b.useHighPerformance&&c.push(b.swfCSS.highPerf);return c.join(" ")};ja=function(){B("fbHandler");var c=b.getMoviePercent(),a=b.swfCSS;if(b.ok()){if(b.oMC)b.oMC.className=[G(),a.swfDefault,a.swfLoaded+(b.didFlashBlock?" "+a.swfUnblocked:"")].join(" ")}else{if(C)b.oMC.className=G()+" "+a.swfDefault+" "+(c===null?a.swfTimedout:a.swfError);
b.didFlashBlock=true;z({type:"ontimeout",ignoreInit:true});b.onerror instanceof Function&&b.onerror.apply(k)}};A=function(){function c(){q.remove(k,"focus",A);q.remove(k,"load",A)}if(pa||!I){c();return true}pa=Ea=true;Q&&I&&q.remove(k,"mousemove",A);Y=false;c();return true};L=function(c){if(r)return false;if(u){r=true;z();E();return true}b.useFlashBlock&&b.flashLoadTimeout&&!b.getMoviePercent()||(r=true);if(y||c){if(b.useFlashBlock)b.oMC.className=G()+" "+(b.getMoviePercent()===null?b.swfCSS.swfTimedout:
b.swfCSS.swfError);z({type:"ontimeout"});b.onerror instanceof Function&&b.onerror.apply(k);return false}q.add(k,"unload",ba);if(b.waitForWindowLoad&&!sa){q.add(k,"load",E);return false}else E();return true};ca=function(c,a,g){if(typeof w[c]==="undefined")w[c]=[];w[c].push({method:a,scope:g||null,fired:false})};z=function(c){c||(c={type:"onready"});if(!r&&c&&!c.ignoreInit)return false;var a={success:c&&c.ignoreInit?b.ok():!y},g=c&&c.type?w[c.type]||[]:[];c=[];var h,e=C&&b.useFlashBlock&&!b.ok();for(h=
0;h<g.length;h++)g[h].fired!==true&&c.push(g[h]);if(c.length){h=0;for(g=c.length;h<g;h++){c[h].scope?c[h].method.apply(c[h].scope,[a]):c[h].method(a);if(!e)c[h].fired=true}}return true};E=function(){k.setTimeout(function(){b.useFlashBlock&&ja();z();b.onload instanceof Function&&b.onload.apply(k);b.waitForWindowLoad&&q.add(k,"load",E)},1)};H=function(){if(na!==undefined)return na;var c=false,a=navigator,g=a.plugins,h,e=k.ActiveXObject;if(g&&g.length){if((a=a.mimeTypes)&&a["application/x-shockwave-flash"]&&
a["application/x-shockwave-flash"].enabledPlugin&&a["application/x-shockwave-flash"].enabledPlugin.description)c=true}else if(typeof e!=="undefined"){try{h=new e("ShockwaveFlash.ShockwaveFlash")}catch(d){}c=!!h}return na=c};Aa=function(){var c,a;if(t.match(/iphone os (1|2|3_0|3_1)/i)?true:false){b.hasHTML5=false;u=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(oa)if(H())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))c=true;if(b.ignoreFlash)c=false;u=b.useHTML5Audio&&b.hasHTML5&&!c&&!b.requireFlash;return H()&&c};S=function(){var c,a=[];if(r)return false;if(b.hasHTML5)for(c in b.audioFormats)b.audioFormats.hasOwnProperty(c)&&a.push(c+": "+b.html5[c]);if(u){if(!r){q.remove(k,"load",b.beginDelayedInit);b.enabled=true;L()}return true}M();try{b.o._externalInterfaceTest(false);if(b.allowPolling)va(true,
b.flashPollingInterval?b.flashPollingInterval:b.useFastPolling?10:50);b.debugMode||b.o._disableDebug();b.enabled=true}catch(g){V(true);L();return false}L();q.remove(k,"load",b.beginDelayedInit);return true};ua=function(){if(la)return false;U();M();return la=true};F=function(){if(fa)return false;fa=true;ra();if(!b.useHTML5Audio)if(!H())b.useHTML5Audio=true;Ba();b.html5.usingFlash=Aa();C=b.html5.usingFlash;fa=true;j.removeEventListener&&j.removeEventListener("DOMContentLoaded",F,false);da();return true};
ya=function(c){if(!c._hasTimer)c._hasTimer=true};za=function(c){if(c._hasTimer)c._hasTimer=false};ha=function(){b.onerror instanceof Function&&b.onerror();b.disable()};Ca=function(){if(!oa||!H())return false;var c=b.audioFormats,a,g;for(g in c)if(c.hasOwnProperty(g))if(g==="mp3"||g==="mp4"){b.html5[g]=false;if(c[g]&&c[g].related)for(;a--;)b.html5[c[g].related[a]]=false}};this._setSandboxType=function(){};this._externalInterfaceOK=function(){if(b.swfLoaded)return false;(new Date).getTime();b.swfLoaded=
true;I=false;oa&&Ca();v?setTimeout(S,100):S()};ma=function(){if(j.readyState==="complete"){F();j.detachEvent("onreadystatechange",ma)}return true};if(!b.hasHTML5||C){q.add(k,"focus",A);q.add(k,"load",A);q.add(k,"load",T);Q&&I&&q.add(k,"mousemove",A)}if(j.addEventListener)j.addEventListener("DOMContentLoaded",F,false);else j.attachEvent?j.attachEvent("onreadystatechange",ma):ha();j.readyState==="complete"&&setTimeout(F,100)}var Fa=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER)Fa=new qa;$.SoundManager=
qa;$.soundManager=Fa})(window);
var consumer_key="ePT3qXXTOjw4ZoZcN7ALQ",page_title=document.title,messageTimer=0;soundManager.url=soundmanager_url;soundManager.flashVersion=9;soundManager.useFlashBlock=false;soundManager.useHighPerformance=true;soundManager.wmode="transparent";soundManager.useFastPolling=true;$(function(){if(typeof tab!="undefined"){FB.Canvas.setSize({width:520,height:600})}ping=new Image();ping.src="http://bit.ly/el70-stats";if(url!=""){$("<div class='player'><div class='panel right'><div class='avatar'><img /></div><div class='description'></div><ol class='tracks'></ol></div><div class='panel left'><div class='artwork'><img /><div class='button'><div class='play'></div></div></div></div></div>").prependTo("body");$("<div class='header'><div class='time'><div class='track'></div><div class='buffer'></div><div class='played'></div><canvas id='waveform'></canvas><div class='waveform'><img /></div><div class='seekhead'></div></div><div class='comments'></div></div>").prependTo("body");$("<div class='message'></div>").appendTo("body");if(typeof lock!="undefined"){if(unlocked!=true){$(".button").hide();$('<div class="lock"><div class="instructions"></div><a class="submit" href="#"></a></div>').appendTo(".artwork");if(lock=="facebook"){var h="To unlock the full stream please like this page first.";$(".instructions").html(h);$(".submit").text("Like").bind("click",function(){alert("Please click the Like button at the top of the page to unlock the full stream.")})}else{var f="To unlock the full stream please login below first.",g="Click below to share a <a class='shared_message' title='"+message+"'>message</a><br>and unlock the full stream.";if(logged_in){$(".instructions").html(g);$(".submit").addClass("unlock").text("Share & Unlock");$(".submit").bind("click",function(){$(this).html("Unlocking");$.post("/unlock",{message:message},function(k){if(k){$(".lock").fadeOut("slow");d()}else{}})});$(".shared_message").bind("click",function(){alert('You will share "'+$(this).attr("title")+'" on Twitter.')})}else{$(".instructions").text(f);$(".submit").addClass("login").text("Twitter").attr("href","/auth/twitter")}}}}$(window).resize(function(){var n=$(".player"),l=$(".share"),k=$(".right"),m=$(".left");n.css({left:($(window).width()-n.outerWidth())/2,top:($(window).height()-n.outerHeight())/2});if(k.css("left")!=m.css("left")){k.css({left:$(".player").width()/2})}});$(window).resize();soundManager.onready(function(){$.getJSON("http://api.soundcloud.com/resolve?url="+url+"&format=json&consumer_key="+consumer_key+"&callback=?",function(k){if(k.artwork_url){$(".artwork img").attr("src",k.artwork_url.replace("-large","-crop"));$(".artwork").css("background-image","url("+k.artwork_url.replace("-large","-crop")+")")}else{$(".artwork").css("background-color","black")}$(".artwork").fadeIn("slow");$(".avatar img").attr("src",k.user.avatar_url.replace("-large","-badge"));$(".avatar").css("background-image","url("+k.user.avatar_url.replace("-large","-badge")+")");$(".description").html(k.title+"<br>by "+k.user.username);$.each(k.tracks,function(m,l){var o=$('<li class="track_'+l.id+'">'+(m+1)+". "+l.title+"</li>").data("track",l).appendTo(".tracks");url=l.stream_url;(url.indexOf("secret_token")==-1)?url=url+"?":url=url+"&";url=url+"consumer_key="+consumer_key;var n=soundManager.createSound({autoLoad:(m==0),id:"track_"+l.id,multiShot:false,url:url,volume:100,whileloading:function(){percent=this.bytesLoaded/this.bytesTotal*100;$(".buffer").css("width",percent+"%")},whileplaying:function(){percent=this.position/l.duration*100;$(".played").css("width",percent+"%")},onplay:function(){if(o.hasClass("preloaded")){o.removeClass("preloaded")}else{c(l);b(l);if(this.loaded==true){$(".buffer").css("width","100%")}}document.title="elSetenta | \u25B6 "+l.title},onresume:function(){document.title="elSetenta | \u25B6 "+l.title;if(this.loaded==true){$(".buffer").css("width","100%")}},onstop:function(){document.title=page_title;$(".message").hide();$(".buffer, .played").width(0)},onpause:function(){document.title=page_title
},onfinish:function(){a()}});if(m==0){c(l);b(l);o.addClass("active").addClass("preloaded")}});$(".tracks").jScrollPane({showArrows:false})})});$(".tracks li").live("click",function(){var m=$(this),l=m.data("track"),k=m.is(".playing");if(k){soundManager.pause("track_"+l.id)}else{if(m.siblings("li").hasClass("playing")){soundManager.stopAll()}m.addClass("active").siblings("li").removeClass("active");soundManager.play("track_"+l.id)}m.toggleClass("playing").siblings("li").removeClass("playing")});$(".button").live("click",function(){$(this).fadeOut();d()});var d=function(){$("li.active").click();if(typeof tab!="undefined"){$(".left").fadeOut("slow")}else{var k=4000,l="swing";$(".left").animate({left:0,BorderTopRightRadius:0,BorderBottomRightRadius:0,WebkitBorderTopRightRadius:0,WebkitBorderBottomRightRadius:0,MozBorderRadiusTopright:0,MozBorderRadiusBottomright:0},{duration:k,easing:l});$(".right").animate({left:$(".player").width()/2,BorderTopLeftRadius:0,BorderBottomLeftRadius:0,WebkitBorderTopLeftRadius:0,WebkitBorderBottomLeftRadius:0,MozBorderRadiusTopleft:0,MozBorderRadiusBottomleft:0},{duration:k,easing:l})}$(".header").live("click",function(m){if(m.pageY>$(".comments").height()){j(this,m.pageX)}else{if(m.target.className=="comments"){track=$("li.active").data("track");relative=Math.round(m.pageX/$(window).width()*track.duration);window.open(track.permalink_url+"#new-timed-comment-at-"+relative,"New Timed Comment")}else{}}return false})};var c=function(k){if($("html").hasClass("canvas")){var n=$.Color($(".time").css("background-color")),l=document.getElementById("waveform"),m=l.getContext("2d");m.clearRect(0,0,m.canvas.width,m.canvas.height);if(k.waveform_data){m.putImageData(k.waveform_data,0,0)}else{$.getJSON("http://premiere.heroku.com/waveform?callback=?",{url:k.waveform_url},function(o){var p=new Image;p.src=o.data;p.onload=function(){p.width=o.width;p.height=o.height;m.drawImage(p,0,0,m.canvas.width,m.canvas.height);var q=m.getImageData(0,0,m.canvas.width,m.canvas.height);var s=q.data;for(var r=0,t=s.length;r<t;r+=4){s[r]=n[0];s[r+1]=n[1];s[r+2]=n[2]}k.waveform_data=q;m.putImageData(k.waveform_data,0,0)}})}}else{$(".waveform").show();$(".waveform img").attr("src",k.waveform_url)}};var e=function(k,m){if(m.timestamp){position=m.timestamp/k.duration*100;var l=$('<div class="comment_'+m.id+' comment"></div>').css("left",position+"%").appendTo(".comments");$('<div class="avatar"><img src="'+m.user.avatar_url+'"></div>').css("background-image","url("+m.user.avatar_url+")").appendTo(l)}};var b=function(k){var m=$(".track_"+k.id).data("track"),l=soundManager.getSoundById("track_"+k.id);if(k.sharing=="public"){$(".comments").empty();if(k.comment_count!=0){if(m.comments){$.each(m.comments,function(n,o){e(k,o)})}else{m.comments=new Array();for(offset=0;offset<=k.comment_count;offset+=50){$.getJSON("http://api.soundcloud.com/tracks/"+k.id+"/comments.json?offset="+offset+"&consumer_key="+consumer_key+"&callback=?",function(n){$.each(n,function(o,p){if(p.timestamp){m.comments.push(p);e(k,p);l.onposition(p.timestamp,function(q){clearTimeout(messageTimer);messageTimer=setTimeout(function(){$(".message").fadeOut()},3000);position=p.timestamp/k.duration*$(".time").width();$(".message").text(p.body).fadeIn();if(position<($(".time").width()-$(".message").width())){$(".message").css({left:position,right:"auto"})}else{$(".message").css({left:"auto",right:$(".time").width()-position})}})}})})}}}}};var a=function(){soundManager.stopAll();if($("li.active").next().click().length==0){$(".tracks li:first").click()}};var j=function(k,l){relative=Math.min($(".buffer").width(),(l-$(".time").offset().left)/$(".time").width());i(relative)};var i=function(k){$track=$("li.active").data("track");position=$track.duration*k;if($("li").hasClass("playing")){soundManager.setPosition("track_"+$track.id,position).play()}else{soundManager.setPosition("track_"+$track.id,position)}}}});function getCORS(b,f,h,c){try{jQuery.get(b,f,h,c)}catch(g){if(jQuery.browser.msie&&window.XDomainRequest){var a=new XDomainRequest();a.open("get",b);a.onload=function(){h(handleXDROnload(this,c),"success",this)};a.send()}else{try{var d=function(){var e="error";var i="error";if((this.readyState==4)&&(this.status=="200")){e="success";i=this.responseText}h(i,e)};request=new proxy_xmlhttp();request.open("GET",b,true);request.onreadystatechange=d;request.send()}catch(g){}}}}function postCORS(b,d,h,c){try{jQuery.post(b,d,h,c)}catch(f){var g="";for(key in d){g=g+"&"+key+"="+d[key]}if(jQuery.browser.msie&&window.XDomainRequest){var a=new XDomainRequest();a.open("post",b);a.send(g);a.onload=function(){h(handleXDROnload(this,c),"success",this)}}else{try{request=new proxy_xmlhttp();request.open("POST",b,true);request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");request.send(g)}catch(f){}}}}function handleXDROnload(a,c){var d=a.responseText,b=c||"";if(b.toLowerCase()=="xml"&&typeof d=="string"){var g;try{if(window.ActiveXObject){g=new ActiveXObject("Microsoft.XMLDOM");g.async="false";g.loadXML(d)}else{var h=new DOMParser();g=h.parseFromString(d,"text/xml")}return g}catch(f){}}return d};$(document).ready(function(){$("a[href*=#]").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var a=$(this.hash);a=a.length&&a||$("[name="+this.hash.slice(1)+"]");if(a.length){var b=a.offset().top;$("html,body").animate({scrollTop:b},1000);return false}}})});
