(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!==undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}if(J){J.cached=true;j(x,"onLoad",J)}flashembed(q,G,{config:t})};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J){J(false)}return w}if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};setTimeout(I,50)}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.4";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p},_swfHeight:function(){return v.clientHeight}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("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 H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=w._swfHeight();m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string"){t={clip:{url:t}}}if(typeof t.clip=="string"){t.clip={url:t.clip}}t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var I=0;m(t.playlist,function(){var K=this;if(typeof K=="object"&&K.length){K={url:""+K}}m(t.clip,function(L,M){if(M!==undefined&&K[L]===undefined&&typeof M!="function"){K[L]=M}});t.playlist[I]=K;K=new h(K,I,w);F.push(K);I++});m(t,function(K,L){if(typeof L=="function"){if(s[K]){s[K](L)}else{j(x,K,L)}delete t[K]}});m(t.plugins,function(K,L){if(L){y[K]=new l(K,L,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);u=q.innerHTML;function J(L){var K=w.hasiPadSupport&&w.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(F[0].url)&&!K){return true}if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(L)}function H(){if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",J,false)}else{if(q.attachEvent){q.attachEvent("onclick",J)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}setTimeout(H,0)}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}q=z;B()}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:true},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={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(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='<object width="'+o.width+'" height="'+o.height+'" id="'+o.id+'" name="'+o.id+'"';if(o.cachebusting){o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(o.w3c||!h){n+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(o.w3c||h){n+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+='<param name="'+m+'" value="'+o[m]+'" />'}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='<param name="flashvars" value=\''+p+"' />"}n+="</object>";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+n.version+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>");if(f.tagName=="A"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.4"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();;(function($){$f.addPlugin("playlist",function(wrap,options){var self=this;var opts={playingClass:'playing',pausedClass:'paused',progressClass:'progress',template:'<a href="${url}">${title}</a>',loop:false,playOnClick:true,manual:false};$.extend(opts,options);wrap=$(wrap);var manual=self.getPlaylist().length<=1||opts.manual;var els=null;function toString(clip){var el=template;$.each(clip,function(key,val){if(!$.isFunction(val)){el=el.replace("$\{"+key+"\}",val).replace("$%7B"+key+"%7D",val);}});return el;}
function bindClicks(){els=getEls().unbind("click.playlist").bind("click.playlist",function(){return play($(this),els.index(this));});}
function buildPlaylist(){wrap.empty();$.each(self.getPlaylist(),function(){wrap.append(toString(this));});bindClicks();}
function play(el,clip){if(el.hasClass(opts.playingClass)||el.hasClass(opts.pausedClass)){self.toggle();}else{el.addClass(opts.progressClass);self.play(clip);}
return false;}
function clearCSS(){if(manual){els=getEls();}
els.removeClass(opts.playingClass);els.removeClass(opts.pausedClass);els.removeClass(opts.progressClass);}
function getEl(clip){return(manual)?els.filter("[href="+clip.originalUrl+"]"):els.eq(clip.index);}
function getEls(){var els=wrap.find("a");return els.length?els:wrap.children();}
if(!manual){var template=wrap.is(":empty")?opts.template:wrap.html();buildPlaylist();}else{els=getEls();if($.isFunction(els.live)){var foo=$(wrap.selector+" a");if(!foo.length){foo=$(wrap.selector+" > *");}
foo.live("click",function(){var el=$(this);return play(el,el.attr("href"));});}else{els.click(function(){var el=$(this);return play(el,el.attr("href"));});}
var clip=self.getClip(0);if(!clip.url&&opts.playOnClick){clip.update({url:els.eq(0).attr("href")});}}
self.onBegin(function(clip){clearCSS();getEl(clip).addClass(opts.playingClass);});self.onPause(function(clip){getEl(clip).removeClass(opts.playingClass).addClass(opts.pausedClass);});self.onResume(function(clip){getEl(clip).removeClass(opts.pausedClass).addClass(opts.playingClass);});if(!opts.loop&&!manual){self.onBeforeFinish(function(clip){if(!clip.isInStream&&clip.index<els.length-1){return false;}});}
if(manual&&opts.loop){self.onBeforeFinish(function(clip){var el=getEl(clip);if(el.next().length){el.next().click();}else{els.eq(0).click();}
return false;});}
self.onUnload(function(){clearCSS();});if(!manual){self.onPlaylistReplace(function(){buildPlaylist();});}
self.onClipAdd(function(clip,index){els.eq(index).before(toString(clip));bindClicks();});return self;});})(jQuery);;function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js'];c=b.join(' ');h.className+=' '+c;return c;};css_browser_selector(navigator.userAgent);;window.innerShiv=(function(){var d,r;return function(h,u){if(!d){d=document.createElement('div');r=document.createDocumentFragment();/*@cc_on d.style.display = 'none'@*/}var e=d.cloneNode(true);/*@cc_on document.body.appendChild(e);@*/e.innerHTML=h;/*@cc_on document.body.removeChild(e);@*/if(u===false)return e.childNodes;var f=r.cloneNode(true),i=e.childNodes.length;while(i--)f.appendChild(e.firstChild);return f}}());;(function($){function getter(plugin,method,args){function getMethods(type){var methods=$[plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');return($.inArray(method,methods)!=-1);}
$.fn.jPlayer=function(options){var name="jPlayer";var isMethodCall=(typeof options=='string');var args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(!instance&&!isMethodCall){$.data(this,name,new $[name](this,options))._init();}
(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$.jPlayer=function(element,options){this.options=$.extend({},options);this.element=$(element);};$.jPlayer.getter="jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";$.jPlayer.defaults={cssPrefix:"jqjp",swfPath:"js",volume:80,oggSupport:false,nativeSupport:true,preload:'none',customCssIds:false,graphicsFix:true,errorAlerts:false,warningAlerts:false,position:"absolute",width:"0",height:"0",top:"0",left:"0",quality:"high",bgcolor:"#ffffff"};$.jPlayer._config={version:"1.2.0",swfVersionRequired:"1.2.0",swfVersion:"unknown",jPlayerControllerId:undefined,delayedCommandId:undefined,isWaitingForPlay:false,isFileSet:false};$.jPlayer._diag={isPlaying:false,src:"",loadPercent:0,playedPercentRelative:0,playedPercentAbsolute:0,playedTime:0,totalTime:0};$.jPlayer._cssId={play:"jplayer_play",pause:"jplayer_pause",stop:"jplayer_stop",loadBar:"jplayer_load_bar",playBar:"jplayer_play_bar",volumeMin:"jplayer_volume_min",volumeMax:"jplayer_volume_max",volumeBar:"jplayer_volume_bar",volumeBarValue:"jplayer_volume_bar_value"};$.jPlayer.count=0;$.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};$.jPlayer.convertTime=function(mSec){var myTime=new Date(mSec);var hour=myTime.getUTCHours();var min=myTime.getUTCMinutes();var sec=myTime.getUTCSeconds();var strHour=($.jPlayer.timeFormat.padHour&&hour<10)?"0"+hour:hour;var strMin=($.jPlayer.timeFormat.padMin&&min<10)?"0"+min:min;var strSec=($.jPlayer.timeFormat.padSec&&sec<10)?"0"+sec:sec;return(($.jPlayer.timeFormat.showHour)?strHour+$.jPlayer.timeFormat.sepHour:"")+(($.jPlayer.timeFormat.showMin)?strMin+$.jPlayer.timeFormat.sepMin:"")+(($.jPlayer.timeFormat.showSec)?strSec+$.jPlayer.timeFormat.sepSec:"");};$.jPlayer.prototype={_init:function(){var self=this;var element=this.element;this.config=$.extend({},$.jPlayer.defaults,this.options,$.jPlayer._config);this.config.diag=$.extend({},$.jPlayer._diag);this.config.cssId={};this.config.cssSelector={};this.config.cssDisplay={};this.config.clickHandler={};this.element.data("jPlayer.config",this.config);$.extend(this.config,{id:this.element.attr("id"),swf:this.config.swfPath+((this.config.swfPath!=""&&this.config.swfPath.slice(-1)!="/")?"/":"")+"Jplayer.swf",fid:this.config.cssPrefix+"_flash_"+$.jPlayer.count,aid:this.config.cssPrefix+"_audio_"+$.jPlayer.count,hid:this.config.cssPrefix+"_force_"+$.jPlayer.count,i:$.jPlayer.count,volume:this._limitValue(this.config.volume,0,100),autobuffer:this.config.preload!='none'});$.jPlayer.count++;if(this.config.ready!=undefined){if($.isFunction(this.config.ready)){this.jPlayerReadyCustom=this.config.ready;}else{this._warning("Constructor's ready option is not a function.");}}
this.config.audio=document.createElement('audio');this.config.audio.id=this.config.aid;$.extend(this.config,{canPlayMP3:!!((this.config.audio.canPlayType)?((""!=this.config.audio.canPlayType("audio/mpeg"))&&("no"!=this.config.audio.canPlayType("audio/mpeg"))):false),canPlayOGG:!!((this.config.audio.canPlayType)?((""!=this.config.audio.canPlayType("audio/ogg"))&&("no"!=this.config.audio.canPlayType("audio/ogg"))):false),aSel:$("#"+this.config.aid)});$.extend(this.config,{html5:!!((this.config.oggSupport)?((this.config.canPlayOGG)?true:this.config.canPlayMP3):this.config.canPlayMP3)});$.extend(this.config,{usingFlash:!(this.config.html5&&this.config.nativeSupport),usingMP3:!(this.config.oggSupport&&this.config.canPlayOGG&&this.config.nativeSupport)});var events={setButtons:function(e,playing){self.config.diag.isPlaying=playing;if(self.config.cssId.play!=undefined&&self.config.cssId.pause!=undefined){if(playing){self.config.cssSelector.play.css("display","none");self.config.cssSelector.pause.css("display",self.config.cssDisplay.pause);}else{self.config.cssSelector.play.css("display",self.config.cssDisplay.play);self.config.cssSelector.pause.css("display","none");}}
if(playing){self.config.isWaitingForPlay=false;}}};var eventsForFlash={setFile:function(e,mp3,ogg){try{self._getMovie().fl_setFile_mp3(mp3);if(self.config.autobuffer){element.trigger("jPlayer.load");}
self.config.diag.src=mp3;self.config.isFileSet=true;element.trigger("jPlayer.setButtons",false);}catch(err){self._flashError(err);}},clearFile:function(e){try{element.trigger("jPlayer.setButtons",false);self._getMovie().fl_clearFile_mp3();self.config.diag.src="";self.config.isFileSet=false;}catch(err){self._flashError(err);}},load:function(e){try{self._getMovie().fl_load_mp3();}catch(err){self._flashError(err);}},play:function(e){try{if(self._getMovie().fl_play_mp3()){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},pause:function(e){try{if(self._getMovie().fl_pause_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},stop:function(e){try{if(self._getMovie().fl_stop_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},playHead:function(e,p){try{if(self._getMovie().fl_play_head_mp3(p)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},playHeadTime:function(e,t){try{if(self._getMovie().fl_play_head_time_mp3(t)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},volume:function(e,v){self.config.volume=v;try{self._getMovie().fl_volume_mp3(v);}catch(err){self._flashError(err);}}};var eventsForHtmlAudio={setFile:function(e,mp3,ogg){if(self.config.usingMP3){self.config.diag.src=mp3;}else{self.config.diag.src=ogg;}
if(self.config.isFileSet&&!self.config.isWaitingForPlay){element.trigger("jPlayer.pause");}
self.config.audio.autobuffer=self.config.autobuffer;self.config.audio.preload=self.config.preload;if(self.config.autobuffer){self.config.audio.src=self.config.diag.src;self.config.audio.load();}else{self.config.isWaitingForPlay=true;}
self.config.isFileSet=true;self.jPlayerOnProgressChange(0,0,0,0,0);clearInterval(self.config.jPlayerControllerId);if(self.config.autobuffer){self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(false);},100);}
clearInterval(self.config.delayedCommandId);},clearFile:function(e){self.setFile("","");self.config.isWaitingForPlay=false;self.config.isFileSet=false;},load:function(e){if(self.config.isFileSet){if(self.config.isWaitingForPlay){self.config.audio.autobuffer=true;self.config.audio.preload='auto';self.config.audio.src=self.config.diag.src;self.config.audio.load();self.config.isWaitingForPlay=false;clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(false);},100);}}},play:function(e){if(self.config.isFileSet){if(self.config.isWaitingForPlay){self.config.audio.src=self.config.diag.src;self.config.audio.load();}
self.config.audio.play();element.trigger("jPlayer.setButtons",true);clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(false);},100);clearInterval(self.config.delayedCommandId);}},pause:function(e){if(self.config.isFileSet){self.config.audio.pause();element.trigger("jPlayer.setButtons",false);clearInterval(self.config.delayedCommandId);}},stop:function(e){if(self.config.isFileSet){try{element.trigger("jPlayer.pause");self.config.audio.currentTime=0;clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(true);},100);}catch(err){clearInterval(self.config.delayedCommandId);self.config.delayedCommandId=window.setTimeout(function(){self.stop();},100);}}},playHead:function(e,p){if(self.config.isFileSet){try{element.trigger("jPlayer.load");if((typeof self.config.audio.buffered=="object")&&(self.config.audio.buffered.length>0)){self.config.audio.currentTime=p*self.config.audio.buffered.end(self.config.audio.buffered.length-1)/100;}else if(self.config.audio.duration>0&&!isNaN(self.config.audio.duration)){self.config.audio.currentTime=p*self.config.audio.duration/100;}else{throw"e";}
element.trigger("jPlayer.play");}catch(err){element.trigger("jPlayer.play");element.trigger("jPlayer.pause");self.config.delayedCommandId=window.setTimeout(function(){self.playHead(p);},100);}}},playHeadTime:function(e,t){if(self.config.isFileSet){try{element.trigger("jPlayer.load");self.config.audio.currentTime=t/1000;element.trigger("jPlayer.play");}catch(err){element.trigger("jPlayer.play");element.trigger("jPlayer.pause");self.config.delayedCommandId=window.setTimeout(function(){self.playHeadTime(t);},100);}}},volume:function(e,v){self.config.volume=v;self.config.audio.volume=v/100;self.jPlayerVolume(v);}};if(this.config.usingFlash){$.extend(events,eventsForFlash);}else{$.extend(events,eventsForHtmlAudio);}
for(var event in events){var e="jPlayer."+event;this.element.unbind(e);this.element.bind(e,events[event]);}
if(this.config.usingFlash){if(this._checkForFlash(8)){if($.browser.msie){var html_obj='<object id="'+this.config.fid+'"';html_obj+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';html_obj+=' codebase="'+document.URL.substring(0,document.URL.indexOf(':'))+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';html_obj+=' type="application/x-shockwave-flash"';html_obj+=' width="'+this.config.width+'" height="'+this.config.height+'">';html_obj+='</object>';var obj_param=new Array();obj_param[0]='<param name="movie" value="'+this.config.swf+'" />';obj_param[1]='<param name="quality" value="high" />';obj_param[2]='<param name="FlashVars" value="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'" />';obj_param[3]='<param name="allowScriptAccess" value="always" />';obj_param[4]='<param name="bgcolor" value="'+this.config.bgcolor+'" />';var ie_dom=document.createElement(html_obj);for(var i=0;i<obj_param.length;i++){ie_dom.appendChild(document.createElement(obj_param[i]));}
this.element.html(ie_dom);}else{var html_embed='<embed name="'+this.config.fid+'" id="'+this.config.fid+'" src="'+this.config.swf+'"';html_embed+=' width="'+this.config.width+'" height="'+this.config.height+'" bgcolor="'+this.config.bgcolor+'"';html_embed+=' quality="high" FlashVars="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'"';html_embed+=' allowScriptAccess="always"';html_embed+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.html(html_embed);}}else{this.element.html("<p>Flash 8 or above is not installed. <a href='http://get.adobe.com/flashplayer'>Get Flash!</a></p>");}}else{this.config.audio.autobuffer=this.config.autobuffer;this.config.audio.preload=this.config.preload;this.config.audio.addEventListener("canplay",function(){var rnd=0.1*Math.random();var fix=(self.config.volume<50)?rnd:-rnd;self.config.audio.volume=(self.config.volume+fix)/100;},false);this.config.audio.addEventListener("ended",function(){clearInterval(self.config.jPlayerControllerId);self.jPlayerOnSoundComplete();},false);this.element.append(this.config.audio);}
this.element.css({'position':this.config.position,'top':this.config.top,'left':this.config.left});if(this.config.graphicsFix){var html_hidden='<div id="'+this.config.hid+'"></div>';this.element.append(html_hidden);$.extend(this.config,{hSel:$("#"+this.config.hid)});this.config.hSel.css({'text-indent':'-9999px'});}
if(!this.config.customCssIds){$.each($.jPlayer._cssId,function(name,id){self.cssId(name,id);});}
if(!this.config.usingFlash){this.element.css({'left':'-9999px'});window.setTimeout(function(){self.volume(self.config.volume);self.jPlayerReady();},100);}},jPlayerReady:function(swfVersion){if(this.config.usingFlash){this.config.swfVersion=swfVersion;if(this.config.swfVersionRequired!=this.config.swfVersion){this._error("jPlayer's JavaScript / SWF version mismatch!\n\nJavaScript requires SWF : "+this.config.swfVersionRequired+"\nThe Jplayer.swf used is : "+this.config.swfVersion);}}else{this.config.swfVersion="n/a";}
this.jPlayerReadyCustom();},jPlayerReadyCustom:function(){},setFile:function(mp3,ogg){this.element.trigger("jPlayer.setFile",[mp3,ogg]);},clearFile:function(){this.element.trigger("jPlayer.clearFile");},load:function(){this.element.trigger("jPlayer.load");},play:function(){this.element.trigger("jPlayer.play");},pause:function(){this.element.trigger("jPlayer.pause");},stop:function(){this.element.trigger("jPlayer.stop");},playHead:function(p){this.element.trigger("jPlayer.playHead",[p]);},playHeadTime:function(t){this.element.trigger("jPlayer.playHeadTime",[t]);},volume:function(v){v=this._limitValue(v,0,100);this.element.trigger("jPlayer.volume",[v]);},cssId:function(fn,id){var self=this;if(typeof id=='string'){if($.jPlayer._cssId[fn]){if(this.config.cssId[fn]!=undefined){this.config.cssSelector[fn].unbind("click",this.config.clickHandler[fn]);}
this.config.cssId[fn]=id;this.config.cssSelector[fn]=$("#"+id);this.config.clickHandler[fn]=function(e){self[fn](e);$(this).blur();return false;}
this.config.cssSelector[fn].click(this.config.clickHandler[fn]);var display=this.config.cssSelector[fn].css("display");if(fn=="play"){this.config.cssDisplay["pause"]=display;}
if(!(fn=="pause"&&display=="none")){this.config.cssDisplay[fn]=display;if(fn=="pause"){this.config.cssSelector[fn].css("display","none");}}}else{this._warning("Unknown/Illegal function in cssId\n\njPlayer('cssId', '"+fn+"', '"+id+"')");}}else{this._warning("cssId CSS Id must be a string\n\njPlayer('cssId', '"+fn+"', "+id+")");}},loadBar:function(e){if(this.config.cssId.loadBar!=undefined){var offset=this.config.cssSelector.loadBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.loadBar.width();var p=100*x/w;this.playHead(p);}},playBar:function(e){this.loadBar(e);},onProgressChange:function(fn){if($.isFunction(fn)){this.onProgressChangeCustom=fn;}else{this._warning("onProgressChange parameter is not a function.");}},onProgressChangeCustom:function(){},jPlayerOnProgressChange:function(lp,ppr,ppa,pt,tt){this.config.diag.loadPercent=lp;this.config.diag.playedPercentRelative=ppr;this.config.diag.playedPercentAbsolute=ppa;this.config.diag.playedTime=pt;this.config.diag.totalTime=tt;if(this.config.cssId.loadBar!=undefined){this.config.cssSelector.loadBar.width(lp+"%");}
if(this.config.cssId.playBar!=undefined){this.config.cssSelector.playBar.width(ppr+"%");}
this.onProgressChangeCustom(lp,ppr,ppa,pt,tt);this._forceUpdate();},jPlayerController:function(override){var pt=0,tt=0,ppa=0,lp=0,ppr=0;if(this.config.audio.readyState>=1){pt=this.config.audio.currentTime*1000;tt=this.config.audio.duration*1000;tt=isNaN(tt)?0:tt;ppa=(tt>0)?100*pt/tt:0;if((typeof this.config.audio.buffered=="object")&&(this.config.audio.buffered.length>0)){lp=100*this.config.audio.buffered.end(this.config.audio.buffered.length-1)/this.config.audio.duration;ppr=100*this.config.audio.currentTime/this.config.audio.buffered.end(this.config.audio.buffered.length-1);}else{lp=100;ppr=ppa;}}
if(!this.config.diag.isPlaying&&lp>=100){clearInterval(this.config.jPlayerControllerId);}
if(override){this.jPlayerOnProgressChange(lp,0,0,0,tt);}else{this.jPlayerOnProgressChange(lp,ppr,ppa,pt,tt);}},volumeMin:function(){this.volume(0);},volumeMax:function(){this.volume(100);},volumeBar:function(e){if(this.config.cssId.volumeBar!=undefined){var offset=this.config.cssSelector.volumeBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.volumeBar.width();var p=100*x/w;this.volume(p);}},volumeBarValue:function(e){this.volumeBar(e);},jPlayerVolume:function(v){if(this.config.cssId.volumeBarValue!=null){this.config.cssSelector.volumeBarValue.width(v+"%");this._forceUpdate();}},onSoundComplete:function(fn){if($.isFunction(fn)){this.onSoundCompleteCustom=fn;}else{this._warning("onSoundComplete parameter is not a function.");}},onSoundCompleteCustom:function(){},jPlayerOnSoundComplete:function(){this.element.trigger("jPlayer.setButtons",false);this.onSoundCompleteCustom();},getData:function(name){var n=name.split(".");var p=this.config;for(var i=0;i<n.length;i++){if(p[n[i]]!=undefined){p=p[n[i]];}else{this._warning("Undefined data requested.\n\njPlayer('getData', '"+name+"')");return undefined;}}
return p;},_getMovie:function(){return document[this.config.fid];},_checkForFlash:function(version){var flashIsInstalled=false;var flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true;}
catch(e){}}
else if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version){flashIsInstalled=true;}}}
return flashIsInstalled;},_forceUpdate:function(){if(this.config.graphicsFix){this.config.hSel.text(""+Math.random());}},_limitValue:function(value,min,max){return(value<min)?min:((value>max)?max:value);},_flashError:function(e){this._error("Problem with Flash component.\n\nCheck the swfPath points at the Jplayer.swf path.\n\nswfPath = "+this.config.swfPath+"\nurl: "+this.config.swf+"\n\nError: "+e.message);},_error:function(msg){if(this.config.errorAlerts){this._alert("Error!\n\n"+msg);}},_warning:function(msg){if(this.config.warningAlerts){this._alert("Warning!\n\n"+msg);}},_alert:function(msg){alert("jPlayer "+this.config.version+" : id='"+this.config.id+"' : "+msg);}};})(jQuery);;var stackTimeout;var currentUserClip;var playItem=0;var userPausedAudio=false;var myPlayList=[{name:"EVIL 3",mp3:"http://del.interoute.com/?id=bbe8d046-ba2b-4733-8b02-a42c8312e3dc&delivery=download"},{name:"MARS",mp3:"http://del.interoute.com/?id=cafdc931-9838-4aa0-9868-159bba22eff2&delivery=download"}];$(document).ready(function(){pageEnhance();});function pageEnhance(){jPlayerInit();newWindowLinks();playlist();logo();nav();async();$(window).resize(function(){resizer()})
buyButtonInit();videoSection();toggle();jPlayerInit();clickable();signupBlock();validation();defaultText();}
function defaultText(){$(".defaultText").unbind("focus,blur").focus(function(){if($(this).val()==$(this)[0].defaultValue){$(this).val("");}}).blur(function(){if($(this).val()==""){$(this).val($(this)[0].defaultValue);}});}
function nav(){$("#nav a").click(function(){$("#nav a").removeClass("selected");$(this).addClass("selected")})}
function clickable(){$(".clickable:has(a)").css({"cursor":"pointer"}).live("click",function(){var link=$("a",this).eq(0);var href=link.attr("href");link.click();}).hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");})}
function newWindowLinks(){$('a[rel=external]').live("click",function(){window.open($(this).attr('href'));return false;});}
var currentPosition=0;var currentSelected=0;function playlist(){var vp=getVPWidth();var pl=getPlaylistWidth();if(vp>=pl){$("#left,#right").addClass("disabled");}
$("#left:not(.disabled)").addClass("disabled")
$("#playlist li a").click(function(){$("#playlist li a").removeClass('selected');currentSelected=$("#playlist li a").index($(this));$(this).addClass("selected")
var url=$(this).attr("href").split("?v=")[1];var clip={url:unescape(url),loop:true,onBeforeFinish:function(){return false;}}
$f("flashPlayer").play(clip);return false;});$("#left").click(function(){var vp=getVPWidth();var pl=getPlaylistWidth();var positionsToMove=Math.floor(vp/110);var nextX=-(110*(currentPosition-1));if(pl>vp){if(nextX<0){$("#playlist").animate({left:nextX+"px"});currentPosition-=positionsToMove;}else{$("#playlist").animate({left:"0px"})
currentPosition=0;$("#left").addClass("disabled");}
$("#right").removeClass("disabled");}else{$("#playlist").animate({left:"0px"});currentPosition=0;$("#left,#right").addClass("disabled");}})
$("#right").click(function(){var vp=getVPWidth();var pl=getPlaylistWidth();var positionsToMove=Math.floor(vp/110);var nextX=(110*positionsToMove)*(currentPosition+1);if(pl>vp){if(pl-nextX>vp){$("#playlist").animate({left:-nextX+"px"})
currentPosition+=positionsToMove;}else{$("#playlist").animate({left:-(pl-vp)+"px"})
$("#right").addClass("disabled");}
$("#left").removeClass("disabled");}else{$("#playlist").animate({left:"0px"});currentPosition=0;$("#left,#right").addClass("disabled");}})}
function getPlaylistWidth(){return $("#playlist").width();}
function getVPWidth(){return $("#playlistVP").width();}
function resizer(){var vp=getVPWidth();var pl=getPlaylistWidth();if(vp>=pl){$("#playlist").stop().animate({left:"0px"});$("#left:not(.disabled),#right:not(.disabled)").addClass("disabled");}else{if(pl-(110*(currentPosition))>vp){$("#right").removeClass("disabled");}else{$("#right").addClass("disabled");$("#playlist").stop().animate({left:"0px"});currentPosition=0;}}}
function logo(){var bg=$("#logo b").css("background-image").replace(/"/g,"").replace(/url\(|\)$/ig,"");newImage=new Image();newImage.onload=function(){stackShow($("#logo b"));}
newImage.src=bg;$("#smallLogo").live("click",function(){endFullScreen();})}
function async(){$(".async").live("click",function(){var path=$(this).attr("href");loadPage(path);return false;})}
function stackShow(jQueryCollection){if(jQueryCollection.length>0){var jQueryImgObj=$(jQueryCollection.splice(0,1));jQueryImgObj.show();setTimeout(function(){stackShow(jQueryCollection)},250);}}
function setTitle(pageTitle){document.title=pageTitle==""?"Grinderman 2":"Grinderman 2"+pageTitle}
function loadPage(path){var t=$("#pageLoader");var w=$("#contentWrapper");cHeight=t.height();w.css({height:cHeight+"px"});t.fadeOut(300,function(){$(this).empty().show();$.ajax({type:"GET",url:path,data:"mode=ajax",dataType:'json',success:function(json){setTitle(json['title'])
var content=$.browser.msie?$(innerShiv(json['content'],false)):$(json['content']);content.css({visibility:"hidden"});t.html(content);var currentHeight=w.height();var newHeight=content.outerHeight(true);var difference=currentHeight-newHeight<0?(currentHeight-newHeight)*-1:currentHeight-newHeight;var duration=difference/1;content.hide().css({visibility:"visible"});if(/mailinglist/.test(path)){validation();}
if(/(audio)/.test(path)){$("#jPlayer").jPlayer("pause");}else if(!userPausedAudio){$("#jPlayer").jPlayer("play");}
buyButtonInit();if($("#scrollTop").length>0){var offset=$("#scrollTop").offset();$('html,body').animate({scrollTop:offset.top+"px"},1000)}else{$('html,body').animate({scrollTop:0},1000)}
w.animate({height:newHeight+"px"},duration,function(){$(".threeCol .col").css({visibility:"hidden"});blockShow($(".threeCol .col"));content.fadeIn(700);});if(window.Trackit){Trackit("UA-2050605-6","UKI","GB","EMI","Mute","Grinderman",json['title']);}}});})}
var stackTimeout;function blockShow(jQueryCollection){if(jQueryCollection.length>0){var jQueryImgObj=$(jQueryCollection.splice(0,1));jQueryImgObj.css({visibility:"visible"});stackTimeout=setTimeout(function(){blockShow(jQueryCollection)},200);}}
function buyButtonInit(){try{$(".emiBBTarget").each(function(){var targID=$(this).attr("id")
var tag=targID.split("emiBB-")[1];if(tag){new EMIBuyButton({buttonID:tag,buttonText:'<span class="buyButton">Buy</span>'}).replaceDiv(targID);}})}catch(e){}}
function videoSection(){$("#videos a, .fullscreenVideo").live("click",function(){var videoURL=$(this).attr("href");fullScreen(videoURL);return false;})}
function fullScreen(clipURL){$("#wrapper2,#bottomBar,#lines").hide()
var clip={url:unescape(clipURL),loop:true,onBeforeFinish:function(){return false;}}
$("#jPlayer").jPlayer("pause");$f("flashPlayer").play(clip);$("#smallLogo").fadeIn();}
function endFullScreen(){$("#wrapper2,#bottomBar,#lines").show()
var clip={url:unescape(currentUserClip),loop:true,onBeforeFinish:function(){return false;}}
if(!userPausedAudio){$("#jPlayer").jPlayer("play");}
$f("flashPlayer").play(clip);$("#smallLogo").hide();}
function toggle(){$('#fullscreen').toggle(function(){$("#wrapper2").hide()
$(this).removeClass('show').addClass('hide').attr("title","Click here to restore content");return false},function(){$("#wrapper2").show()
$(this).removeClass('hide').addClass('show').attr("title","Click here to reveal video");return false});}
function jPlayerInit(){$("#jplayer_pause").click(function(){userPausedAudio=true;});$("#jplayer_play").click(function(){userPausedAudio=false;});$("#jPlayer").jPlayer({swfPath:"/j/jQuery.jPlayer.1.2.0",nativeSupport:true,volume:60,ready:function(){playListInit(true);},oggSupport:false,customCssIds:false}).jPlayer("onProgressChange",function(loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime){}).jPlayer("onSoundComplete",function(){playListNext();});$(".jp-previous").live("click",function(){playListPrev();$(this).blur();return false;});$(".jp-next").live("click",function(){playListNext();$(this).blur();return false;});}
function playListInit(autoplay){if(autoplay){playListChange(playItem);}else{playListConfig(playItem);}}
function playListConfig(index){playItem=index;$("#jPlayer").jPlayer("setFile",myPlayList[playItem].mp3,myPlayList[playItem].ogg);$("#nowPlaying").html(myPlayList[playItem].name)}
function playListChange(index){playListConfig(index);$("#jPlayer").jPlayer("cssId","playBar","jplayer_play_bar").jPlayer("play");}
function playListNext(){var index=(playItem+1<myPlayList.length)?playItem+1:0;playListChange(index);}
function playListPrev(){var index=(playItem-1>=0)?playItem-1:myPlayList.length-1;playListChange(index);}
function signupBlock(){$("#signupBlockForm").submit(function(){var email=$("#email").val()
if(email=="your@email.com"||email==null||email==""||!/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email)){alert("Please enter a valid Email Address");}else{loadPage($(this).attr("action")+"/?email="+email);}
return false;})}
function validation(){$("#largesignupform").unbind().submit(function(){var errors=new Array();if($("#lffirstname").val()==""){errors.push("Please enter a valid First Name");}
var email=$("#lfemail").val()
if(email==null||email==""||!/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email)){errors.push("Please enter a valid Email Address");}
if($("#lfcountry").val()==""){errors.push("Please choose a Country");}
if(errors.length>0){var msg="Please fix the following problems:\n"
for(error in errors){msg+=" - "+errors[error]+"\n";}
alert(msg)
return false;}else{$("#signupBlock,#nv8").fadeOut()
return true;}})}
