var JSON;if(!JSON){JSON={}}(function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];if(i&&typeof i==="object"&&typeof i.toJSON==="function"){i=i.toJSON(a)}if(typeof rep==="function"){i=rep.call(b,a,i)}switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i){return"null"}gap+=indent;h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1){h[c]=str(c,i)||"null"}e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]";gap=g;return e}if(rep&&typeof rep==="object"){f=rep.length;for(c=0;c<f;c+=1){if(typeof rep[c]==="string"){d=rep[c];e=str(d,i);if(e){h.push(quote(d)+(gap?": ":":")+e)}}}}else{for(d in i){if(Object.prototype.hasOwnProperty.call(i,d)){e=str(d,i);if(e){h.push(quote(d)+(gap?": ":":")+e)}}}}e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}";gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict";if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;if(typeof JSON.stringify!=="function"){JSON.stringify=function(a,b,c){var d;gap="";indent="";if(typeof c==="number"){for(d=0;d<c;d+=1){indent+=" "}}else if(typeof c==="string"){indent=c}rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":a})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e==="object"){for(c in e){if(Object.prototype.hasOwnProperty.call(e,c)){d=walk(e,c);if(d!==undefined){e[c]=d}else{delete e[c]}}}}return reviver.call(a,b,e)}var j;text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();(function(){function n(a){this.length=a.length;this.each=function(b){c(a,b)};this.size=function(){return a.length}}function l(f,l,n){function C(){function d(){if(r.replace(/\s/g,"")!==""){if(f.addEventListener){f.addEventListener("click",b,false)}else{if(f.attachEvent){f.attachEvent("onclick",b)}}}else{if(f.addEventListener){f.addEventListener("click",g,false)}o.load()}}function b(a){var b=o.hasiPadSupport&&o.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(t[0].url)&&!b){return true}if(!o.isLoaded()&&o._fireEvent("onBeforeClick")!==false){o.load()}return g(a)}if($f(f)){$f(f).getParent().innerHTML="";y=$f(f).getIndex();m[y]=o}else{m.push(o);y=m.length-1}B=parseInt(f.style.height,10)||f.clientHeight;w=f.id||"fp"+i();x=l.id||w+"_api";l.id=x;n.playerId=w;if(typeof n=="string"){n={clip:{url:n}}}if(typeof n.clip=="string"){n.clip={url:n.clip}}n.clip=n.clip||{};if(f.getAttribute("href",2)&&!n.clip.url){n.clip.url=f.getAttribute("href",2)}s=new j(n.clip,-1,o);n.playlist=n.playlist||[n.clip];var a=0;c(n.playlist,function(){var b=this;if(typeof b=="object"&&b.length){b={url:""+b}}c(n.clip,function(a,c){if(c!==undefined&&b[a]===undefined&&typeof c!="function"){b[a]=c}});n.playlist[a]=b;b=new j(b,a,o);t.push(b);a++});c(n,function(a,b){if(typeof b=="function"){if(s[a]){s[a](b)}else{h(v,a,b)}delete n[a]}});c(n.plugins,function(a,b){if(b){u[a]=new k(a,b,o)}});if(!n.plugins||n.plugins.controls===undefined){u.controls=new k("controls",null,o)}u.canvas=new k("canvas",null,o);r=f.innerHTML;setTimeout(d,0)}var o=this,p=null,q=false,r,s,t=[],u={},v={},w,x,y,z,A,B;e(o,{id:function(){return w},isLoaded:function(){return p!==null&&p.fp_play!==undefined&&!q},getParent:function(){return f},hide:function(a){if(a){f.style.height="0px"}if(o.isLoaded()){p.style.height="0px"}return o},show:function(){f.style.height=B+"px";if(o.isLoaded()){p.style.height=A+"px"}return o},isHidden:function(){return o.isLoaded()&&parseInt(p.style.height,10)===0},load:function(a){if(!o.isLoaded()&&o._fireEvent("onBeforeLoad")!==false){var b=function(){r=f.innerHTML;if(r&&!flashembed.isSupported(l.version)){f.innerHTML=""}if(a){a.cached=true;h(v,"onLoad",a)}flashembed(f,l,{config:n})};var d=0;c(m,function(){this.unload(function(a){if(++d==m.length){b()}})})}return o},unload:function(a){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(a){a(false)}return o}if(r.replace(/\s/g,"")!==""){if(o._fireEvent("onBeforeUnload")===false){if(a){a(false)}return o}q=true;try{if(p){p.fp_close();o._fireEvent("onUnload")}}catch(b){}var c=function(){p=null;f.innerHTML=r;q=false;if(a){a(true)}};setTimeout(c,50)}else{if(a){a(false)}}return o},getClip:function(a){if(a===undefined){a=z}return t[a]},getCommonClip:function(){return s},getPlaylist:function(){return t},getPlugin:function(a){var b=u[a];if(!b&&o.isLoaded()){var c=o._api().fp_getPlugin(a);if(c){b=new k(a,c,o);u[a]=b}}return b},getScreen:function(){return o.getPlugin("screen")},getControls:function(){return o.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return o.getPlugin("logo")._fireEvent("onUpdate")}catch(a){}},getPlay:function(){return o.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(a){return a?b(n):n},getFlashParams:function(){return l},loadPlugin:function(a,b,c,d){if(typeof c=="function"){d=c;c={}}var e=d?i():"_";o._api().fp_loadPlugin(a,b,c,e);var f={};f[e]=d;var g=new k(a,null,o,f);u[a]=g;return g},getState:function(){return o.isLoaded()?p.fp_getState():-1},play:function(a,b){var c=function(){if(a!==undefined){o._api().fp_play(a,b)}else{o._api().fp_play()}};if(o.isLoaded()){c()}else{if(q){setTimeout(function(){o.play(a,b)},50)}else{o.load(function(){c()})}}return o},getVersion:function(){var a="flowplayer.js 3.2.6";if(o.isLoaded()){var b=p.fp_getVersion();b.push(a);return b}return a},_api:function(){if(!o.isLoaded()){throw"Flowplayer "+o.id()+" not loaded when calling an API method"}return p},setClip:function(a){o.setPlaylist([a]);return o},getIndex:function(){return y},_swfHeight:function(){return p.clientHeight}});c("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){a=a.slice(0,a.length-1);var b="onBefore"+a.slice(2);o[b]=function(a){h(v,b,a);return o}}o[a]=function(b){h(v,a,b);return o}});c("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled".split(","),function(){var a=this;o[a]=function(b,c){if(!o.isLoaded()){return o}var d=null;if(b!==undefined&&c!==undefined){d=p["fp_"+a](b,c)}else{d=b===undefined?p["fp_"+a]():p["fp_"+a](b)}return d==="undefined"||d===undefined?o:d}});o._fireEvent=function(b){if(typeof b=="string"){b=[b]}var e=b[0],f=b[1],g=b[2],h=b[3],i=0;if(n.debug){a(b)}if(!o.isLoaded()&&e=="onLoad"&&f=="player"){p=p||d(x);A=o._swfHeight();c(t,function(){this._fireEvent("onLoad")});c(u,function(a,b){b._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(e=="onLoad"&&f!="player"){return}if(e=="onError"){if(typeof f=="string"||typeof f=="number"&&typeof g=="number"){f=g;g=h}}if(e=="onContextMenu"){c(n.contextMenu[f],function(a,b){b.call(o)});return}if(e=="onPluginEvent"||e=="onBeforePluginEvent"){var k=f.name||f;var l=u[k];if(l){l._fireEvent("onUpdate",f);return l._fireEvent(g,b.slice(3))}return}if(e=="onPlaylistReplace"){t=[];var m=0;c(f,function(){t.push(new j(this,m++,o))})}if(e=="onClipAdd"){if(f.isInStream){return}f=new j(f,g,o);t.splice(g,0,f);for(i=g+1;i<t.length;i++){t[i].index++}}var q=true;if(typeof f=="number"&&f<t.length){z=f;var r=t[f];if(r){q=r._fireEvent(e,g,h)}if(!r||q!==false){q=s._fireEvent(e,g,h,r)}}c(v[e],function(){q=this.call(o,f,g);if(this.cached){v[e].splice(i,1)}if(q===false){return false}i++});return q};if(typeof f=="string"){var D=d(f);if(!D){throw"Flowplayer cannot access element: "+f}f=D;C()}else{C()}}function i(){return"_"+(""+Math.random()).slice(2,10)}function h(a,b,c){a[b]=a[b]||[];a[b].push(c)}function g(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function f(a){var b=a.indexOf(".");if(b!=-1){var d=a.slice(0,b)||"*";var e=a.slice(b+1,a.length);var f=[];c(document.getElementsByTagName(d),function(){if(this.className&&this.className.indexOf(e)!=-1){f.push(this)}});return f}}function e(a,b,d){if(typeof b!="object"){return a}if(a&&b){c(b,function(b,c){if(!d||typeof c!="function"){a[b]=c}})}return a}function d(a){return document.getElementById(a)}function c(a,b){if(!a){return}var c,d=0,e=a.length;if(e===undefined){for(c in a){if(b.call(a[c],c,a[c])===false){break}}}else{for(var f=a[0];d<e&&b.call(f,d,f)!==false;f=a[++d]){};}return a}function b(a){if(!a||typeof a!="object"){return a}var c=new a.constructor;for(var d in a){if(a.hasOwnProperty(d)){c[d]=b(a[d])}}return c}function a(a){console.log("$f.fireEvent",[].slice.call(a))}var j=function(a,b,d){var f=this,g={},j={};f.index=b;if(typeof a=="string"){a={url:a}}e(this,a,true);c("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){a=a.slice(0,a.length-1);var c="onBefore"+a.slice(2);f[c]=function(a){h(j,c,a);return f}}f[a]=function(b){h(j,a,b);return f};if(b==-1){if(f[c]){d[c]=f[c]}if(f[a]){d[a]=f[a]}}});e(this,{onCuepoint:function(a,c){if(arguments.length==1){g.embedded=[null,a];return f}if(typeof a=="number"){a=[a]}var e=i();g[e]=[a,c];if(d.isLoaded()){d._api().fp_addCuepoints(a,b,e)}return f},update:function(a){e(f,a);if(d.isLoaded()){d._api().fp_updateClip(a,b)}var c=d.getConfig();var g=b==-1?c.clip:c.playlist[b];e(g,a,true)},_fireEvent:function(a,h,i,k){if(a=="onLoad"){c(g,function(a,c){if(c[0]){d._api().fp_addCuepoints(c[0],b,a)}});return false}k=k||f;if(a=="onCuepoint"){var l=g[h];if(l){return l[1].call(d,k,i)}}if(h&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(a)!=-1){e(k,h);if(h.metaData){if(!k.duration){k.duration=h.metaData.duration}else{k.fullDuration=h.metaData.duration}}}var m=true;c(j[a],function(){m=this.call(d,k,h,i)});return m}});if(a.onCuepoint){var k=a.onCuepoint;f.onCuepoint.apply(f,typeof k=="function"?[k]:k);delete a.onCuepoint}c(a,function(b,c){if(typeof c=="function"){h(j,b,c);delete a[b]}});if(b==-1){d.onCuepoint=this.onCuepoint}};var k=function(a,b,d,f){var g=this,h={},j=false;if(f){e(h,f)}c(b,function(a,c){if(typeof c=="function"){h[a]=c;delete b[a]}});e(this,{animate:function(c,e,f){if(!c){return g}if(typeof e=="function"){f=e;e=500}if(typeof c=="string"){var j=c;c={};c[j]=e;e=500}if(f){var k=i();h[k]=f}if(e===undefined){e=500}b=d._api().fp_animate(a,c,e,k);return g},css:function(c,f){if(f!==undefined){var h={};h[c]=f;c=h}b=d._api().fp_css(a,c);e(g,b);return g},show:function(){this.display="block";d._api().fp_showPlugin(a);return g},hide:function(){this.display="none";d._api().fp_hidePlugin(a);return g},toggle:function(){this.display=d._api().fp_togglePlugin(a);return g},fadeTo:function(b,c,e){if(typeof c=="function"){e=c;c=500}if(e){var f=i();h[f]=e}this.display=d._api().fp_fadeTo(a,b,c,f);this.opacity=b;return g},fadeIn:function(a,b){return g.fadeTo(1,a,b)},fadeOut:function(a,b){return g.fadeTo(0,a,b)},getName:function(){return a},getPlayer:function(){return d},_fireEvent:function(b,f,i){if(b=="onUpdate"){var k=d._api().fp_getPlugin(a);if(!k){return}e(g,k);delete g.methods;if(!j){c(k.methods,function(){var b=""+this;g[b]=function(){var c=[].slice.call(arguments);var e=d._api().fp_invoke(a,b,c);return e==="undefined"||e===undefined?g:e}});j=true}}var l=h[b];if(l){var m=l.apply(g,f);if(b.slice(0,1)=="_"){delete h[b]}return m}return g}})};var m=[];window.flowplayer=window.$f=function(){var a=null;var g=arguments[0];if(!arguments.length){c(m,function(){if(this.isLoaded()){a=this;return false}});return a||m[0]}if(arguments.length==1){if(typeof g=="number"){return m[g]}else{if(g=="*"){return new n(m)}c(m,function(){if(this.id()==g.id||this.id()==g||this.getParent()==g){a=this;return false}});return a}}if(arguments.length>1){var h=arguments[1],i=arguments.length==3?arguments[2]:{};if(typeof h=="string"){h={src:h}}h=e({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},h);if(typeof g=="string"){if(g.indexOf(".")!=-1){var j=[];c(f(g),function(){j.push(new l(this,b(h),b(i)))});return new n(j)}else{var k=d(g);return new l(k!==null?k:g,h,i)}}else{if(g){return new l(g,h,i)}}}return null};e(window.$f,{fireEvent:function(){var a=[].slice.call(arguments);var b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){l.prototype[a]=b;return $f},each:c,extend:e});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(a,c){if(!arguments.length||typeof arguments[0]=="number"){var d=[];this.each(function(){var a=$f(this);if(a){d.push(a)}});return arguments.length?d[arguments[0]]:new n(d)}return this.each(function(){$f(this,b(a),c?b(c):{})})}}})();(function(){function j(c,d,e){if(h.isSupported(d.version)){c.innerHTML=h.getHTML(d,e)}else{if(d.expressInstall&&h.isSupported([6,65])){c.innerHTML=h.getHTML(f(d,{src:d.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!c.innerHTML.replace(/\s/g,"")){c.innerHTML="<h2>Flash version "+d.version+" or greater is required</h2><h3>"+(i[0]>0?"Your version is "+i:"You have no flash plugin installed")+"</h3>"+(c.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+b+"'>here</a></p>");if(c.tagName=="A"){c.onclick=function(){location.href=b}}}if(d.onFail){var g=d.onFail.call(this);if(typeof g=="string"){c.innerHTML=g}}}}if(a){window[d.id]=document.getElementById(d.id)}f(this,{getRoot:function(){return c},getOptions:function(){return d},getConf:function(){return e},getApi:function(){return c.firstChild}})}function g(a,b){var c=[];for(var d in a){if(a.hasOwnProperty(d)){c[d]=b(a[d])}}return c}function f(a,b){if(b){for(var c in b){if(b.hasOwnProperty(c)){a[c]=b[c]}}}return a}var a=document.all,b="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",d=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,e={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}window.flashembed=function(a,b,c){if(typeof a=="string"){a=document.getElementById(a.replace("#",""))}if(!a){return}if(typeof b=="string"){b={src:b}}return new j(a,f(f({},e),b),c)};var h=f(window.flashembed,{conf:e,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");b=a&&a.GetVariable("$version")}catch(e){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=a&&a.GetVariable("$version")}catch(f){}}}b=d.exec(b);return b?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined){return null}var b=typeof a;if(b=="object"&&a.push){b="array"}switch(b){case"string":a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1");a=a.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+a+'"';case"array":return"["+g(a,function(a){return h.asString(a)}).join(",")+"]";case"function":return'"function()"';case"object":var c=[];for(var d in a){if(a.hasOwnProperty(d)){c.push('"'+d+'":'+h.asString(a[d]))}}return"{"+c.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(b,c){b=f({},b);var d='<object width="'+b.width+'" height="'+b.height+'" id="'+b.id+'" name="'+b.id+'"';if(b.cachebusting){b.src+=(b.src.indexOf("?")!=-1?"&":"?")+Math.random()}if(b.w3c||!a){d+=' data="'+b.src+'" type="application/x-shockwave-flash"'}else{d+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}d+=">";if(b.w3c||a){d+='<param name="movie" value="'+b.src+'" />'}b.width=b.height=b.id=b.w3c=b.src=null;b.onFail=b.version=b.expressInstall=null;for(var e in b){if(b[e]){d+='<param name="'+e+'" value="'+b[e]+'" />'}}var g="";if(c){for(var i in c){if(c[i]){var j=c[i];g+=i+"="+(/function|object/.test(typeof j)?h.asString(j):j)+"&"}}g=g.slice(0,-1);d+='<param name="flashvars" value=\''+g+"' />"}d+="</object>";return d},isSupported:function(a){return i[0]>a[0]||i[0]==a[0]&&i[1]>=a[1]}});var i=h.getVersion();if(c){jQuery.tools=jQuery.tools||{version:"3.2.6"};jQuery.tools.flashembed={conf:e};jQuery.fn.flashembed=function(a,b){return this.each(function(){jQuery(this).data("flashembed",flashembed(this,a,b))})}}})();if(!Array.prototype.forEach){Array.prototype.forEach=function(a){var b=this.length;if(typeof a!="function")throw new TypeError;var c=arguments[1];for(var d=0;d<b;d++){if(d in this)a.call(c,this[d],d,this)}}}(function(){if(!window.laut){window.laut={}}if(!window.laut.fm){function a(a,b,c){var d;if(c){var e=new Date;e.setTime(e.getTime()+c*1e3);d="; expires="+e.toGMTString()}else{d=""}document.cookie=a+"="+b+d+"; path=/"}function b(a){var b=a+"=";var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(b)==0)return e.substring(b.length,e.length)}return null}var c=function(c){var d;if(d=parseInt(b("__lautfm__offset__"),10)){c(d)}else{j(function(b){d=parseInt(new Date-b,10);a("__lautfm__offset__",d,60*60*24);c(d)})}};var d=function(){var a=this.getHours();var b=this.getMinutes();var c=this.getSeconds();b=b<10?"0"+b:b;c=c<10?"0"+c:c;return a+":"+b+":"+c};var e=function(){var a=this.getHours();var b=this.getMinutes();b=b<10?"0"+b:b;return a+":"+b};var f=function(a,b){var c;var f=/.+_at$/.exec(a);if(a==""||f){if(typeof b==="string"){c=/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])\d(\d)\d\d$/.exec(b);if(c){var g=new Date(Date.UTC(+c[1],+c[2]-1,+c[3],c[7]=="+"?+c[4]-c[8]:+c[4]+c[8],+c[5],+c[6]));g.humanTimeLong=d;g.humanTimeShort=e;return g}}}return b};var g=function(a){try{return JSON.parse(a,f)}catch(b){b.message="JSON parsing error: "+b.message;throw b}};var h=function(a){return typeof a.ends_at!="undefined"&&a.ends_at||typeof a[0]!="undefined"&&a[0].ends_at!="undefined"&&a[0].ends_at};__tmplCache__={};parseTemplate=function(a,b){try{var c=__tmplCache__[a];if(!c){var d="var p=[];\n"+"var print = function(){p.push.apply(p,arguments);};\n"+"p.push('"+a.replace(/[\r\t\n]/g," ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("\n p.push('")+"');return p.join('');";c=new Function(d);__tmplCache__[a]=c}return c.call(b)}catch(e){return"< # ERROR: "+e.message+": "+e.stack+" # >"}};var i=function(a,b,d,e){var f=laut.fm.apiServer+"/"+a;var j;if(typeof b=="function"){j=b}else{var k=b.template;var l=b.container;j=function(a){if(b.callback){b.callback(a)}if(k&&l){if(typeof l=="string"){l=document.getElementById(l)}if(typeof k=="string"){k=document.getElementById(k)}}l.innerHTML=parseTemplate(k.innerHTML,a)}}if(window.XDomainRequest){var m=new XDomainRequest;m.open("GET",f);m.timeout=1e4;m.onprogress=function(){};m.onerror=function(a){};m.ontimeout=function(){};m.onload=function(){var b=g(this.responseText);j(b);if(typeof d!="undefined"&&d){var f=h(b);if(f){c(function(b){var c=Math.max(5e3,f-new Date+b);var d=setTimeout(function(){i(a,j,true,e)},c);e.timers.push(d)})}}};setTimeout(function(){m.send("")},0)}else{try{var n=new XMLHttpRequest;n.open("GET",f,true);n.onreadystatechange=function(){if(n.readyState==4){if(parseInt(n.status,10)>=200&&parseInt(n.status,10)<300){var b=g(this.responseText);j(b);if(typeof d!="undefined"&&d){c(function(b){var c=Math.max(5e3,Date.parse(n.getResponseHeader("Expires"))-new Date+b);var d=setTimeout(function(){i(a,j,true,e)},c);e.timers.push(d)})}}else{e.errorcallback("Not a 200-ish response: "+n.status)}}};n.send()}catch(o){e.errorcallback(o.message)}}};var j=function(a){i("time",a,false,this);return this};var k=function(a){i("server_status",a,false,this);return this};var l=function(a){i("letters",a,false,this);return this};var m=function(a){i("genres",a,false,this);return this};var n=function(a){i("station_names",a,false,this);return this};var o=function(a,b){i("station/"+this.station,a,b,this);return this};var p=function(a,b){i("station/"+this.station+"/current_song",a,b,this);return this};var q=function(a,b){i("station/"+this.station+"/last_songs",a,b,this);return this};var r=function(a){i("station/"+this.station+"/playlists",a,false,this);return this};var s=function(a){i("station/"+this.station+"/schedule",a,false,this);return this};var t=function(a){i("station/"+this.station+"/network",a,false,this);return this};var u=function(){for(var a in this.timers){clearTimeout(this.timers[a])}this.timers=[]};var v=function(a){var b=[];for(var c in a){b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]))}return b.join("&")};var w=function(a,b,c){a=a==""?"stations":"stations/"+a;if(c){a=a+"?"+v(c)}i(a,b,false,this)};var x=function(a,b,c,d){url="search/"+a+"?query="+encodeURIComponent(b);if(d){url=url+"&"+v(d)}i(url,c,false,this)};var y=function(a,b){w("",a,b);return this};var z=function(a,b,c){w(a=="#"?"numbers":"letter/"+a,b,c);return this};var A=function(a,b){w("numbers",a,b);return this};var B=function(a,b,c){w("genre/"+a,b,c);return this};var C=function(a,b,c){w(a.toString(),b,c);return this};var D=function(a,b,c){x("stations",a,b,c);return this};var E=function(a,b,c,d,e,f){if(c>0&&a>b){if(f){f()}return}if(c<0&&a<b){if(f){f()}return}setTimeout(function(){e(a);E(a+c,b,c,d,e,f)},d)};function F(a){var b,c;var d=this;var e,f,g;if(a){if(a.status){e=document.getElementById(a.status)}f=a.onSongChange;g=a.buttons}for(var h in g){elm=document.getElementById(g[h]);if(elm){(function(a){elm.onclick=function(){d[a]()}})(h)}}var i=function(a,b){if(e){e.innerHTML=a;if(b){setTimeout(function(){e.innerHTML=""},b)}}};var j=function(a){var c=$f().getVolume();var e=Math.max(Math.min(c+a,100),0);d.volume=e;if(!b){return false}b.setVolume(e);i("Lautstärke: "+e,5e3)};var k=function(a){var c=Math.max(Math.min(a,100),0);d.volume=c;if(!b){return false}b.setVolume(c);i("Lautstärke: "+c,5e3)};this.play=function(a,e){if(c==a){return false}if(typeof a=="undefined"){a=c}c=a;var g="player_holder";var h=document.createElement("a");h.setAttribute("class","player");h.setAttribute("id",g);h.setAttribute("style","display:block;width:0px;height:0px;");document.body.appendChild(h);$("#player_loader").show();$f(h,"http://www.laut.fm/js/flowplayer-3.2.7.swf",{clip:{url:"http://stream.laut.fm/"+a+"?type=.flv",onBegin:function(a){var c=this;c.setVolume(0);if(typeof d.volume=="undefined"){d.volume=99}E(0,d.volume,11,120,function(a){c.setVolume(a)});$f("*").each(function(a){a=$f(a);if(a!=c&&a.getState()!=-1){d.stop(a)}});b=this;$("#player_loader").hide();$("#btn_stop").show()},onMetaData:function(){f(a)}}});return true};this.stop=function(a){if(typeof a=="undefined"){a=b}$("#player_loader").hide();$("#btn_play").show();if(!a){$f("*").each(function(a){$f(a).stop();$f(a).unload()});i("");try{var c=document.getElementById("player_holder");c.parentNode.removeChild(c)}catch(d){}return false}E(a.getVolume(),0,-11,240,function(b){a.setVolume(b)},function(){a.stop();a.unload();try{var b=document.getElementById("player_holder");b.parentNode.removeChild(b);document.body.removeChild(a.getParent())}catch(c){}})};this.mute=function(){b.mute()};this.unmute=function(){b.unmute()};this.volUp=function(){j(+10)};this.volDown=function(){j(-10)};this.setVol=function(a){k(a)}}window.laut.fm={errorcallback:function(a){},apiServer:"http://api.laut.fm",time:j,server_status:k,letters:l,genres:m,station_names:n,stations:{all:y,letter:z,numbers:A,genre:B,names:C},station:function(a){return{errorcallback:window.laut.fm.errorcallback,station:a,info:o,current_song:p,last_songs:q,playlists:r,schedule:s,network:t,unwatch:u,timers:[]}},player:function(a){return new F(a)},search:{stations:D}}}if(!window.$l){window.$l=laut.fm}})()
