var global_at=" @ ",global_dt=" ";function jmp(f,a){if(f.trg){f.trg.value=a;}}function locrep(a){window.location.replace(a);}function cuttext(lng,field){if(field.value.length>lng){field.value=field.value.substring(0,lng);}}function get_browser(obj){if(typeof obj.selectionStart!='undefined'){return'noIE';}if(typeof document.getSelection!='undefined'){return;}if(typeof document.selection!='undefined'){return'IE';}return;}function set_focus(f,s,v){if(f){f.focus();if(s){f.select();}if(v&&(sel=v.value.length)){if(get_browser(v.value)=='IE'){_r=document.selection.createRange();_r.moveStart('character',sel);_r.select();}else{f.selectionStart=sel;}}}}var _new;function winp(href,w,h){rs=(_new)?1:0;if(h>screen.availHeight){h=screen.availHeight;}if(w>screen.availWidth){w=screen.availWidth;}if(h=="auto"){h=screen.availHeight;}if(w=="auto"){w=screen.availWidth;}_new=window.open(href,"neu"+global_ftt,"width="+w+",height="+h+",top=0,left=0,statusbar=no,menubar=yes,resizable=yes,scrollbars=yes");_new.focus();}function preview(href,width,height){width=(width>screen.availHeight-100)?screen.availWidth-100:width;height=(height>screen.availHeight-200)?screen.availHeight-200:height;_win=window.open(href,"preview"+global_ftt,"width="+width+",height="+height+",top=0,left=0,menubar=yes,statusbar=no,resizable=yes,scrollbars=no");_win.focus();}function set_selection(form){if(form.select_all.checked===true){if(!form['auswahl[]'].length){form['auswahl[]'].checked=true;}else{for(i=0;i<form['auswahl[]'].length;i++){form['auswahl[]'][i].checked=true;}}}else if(form.select_all.checked===false){if(!form['auswahl[]'].length){form['auswahl[]'].checked=false;}else{for(i=0;i<form['auswahl[]'].length;i++){form['auswahl[]'][i].checked=false;}}}}function check_ats(s){var a=false,res=false;if(typeof(RegExp)=="function"){var b=new RegExp("abc");if(b.test("abc")===true){a=true;}}if(a===true){reg=new RegExp("^([a-zA-Z0-9\\-\\.\\_]+)(\\@)([a-zA-Z0-9\\-\\_\\.]+)(\\.)([a-zA-Z]{2,4}|museum|travel|[0-9]{1,3})$");res=(reg.test(s));}else{res=(s.search("@")>=1 && s.lastIndexOf(".")>s.search("@")&&s.lastIndexOf(".")>=s.length-5);}return (res);}function ats_testen(f){var errstring="";if(global_atskey=='0'&&check_ats(f['newsletter['+global_atsa_id+'][email]'].value)===false){errstring=global_atserr1;}if(global_atskey==1&&check_ats(f['newsletter['+global_atsa_id+'][emailan]'].value)===false){errstring=global_atserr2;}if(global_atskey>1&&check_ats(f['newsletter['+global_atsa_id+'][emailvon]'].value)===false){errstring+=global_atserr3;}if(global_atskey>2&&!f['newsletter['+global_atsa_id+'][nachricht]'].value.length){errstring+=global_atserr4;}if(errstring){document.getElementById("atserr").innerHTML='<table class="error" summary="versandfehler" cellspacing="'+global_atscsp+'" cellpadding="0"><tr'+'><td class="kalender">'+errstring+'<'+'/td><'+'/tr><'+'/table>';return false;}return true;}function ats_remove(){if(document.getElementById("atsform")){document.getElementById("atsform").innerHTML="";}}function setp(f,p,left,abbestellen,abonnieren){var _f1name=global_actform+'[p'+p+']',_f2name=global_kennung+'_dontsubmit['+p+']';if(f[_f1name].value>0){f[_f1name].value=0;document.getElementById("p"+p).innerHTML="&#160;";f[_f2name].value=abonnieren;}else if(f[_f1name].value<1){f[_f1name].value=(left)?2:1;f[_f2name].value=abbestellen;document.getElementById("p"+p).innerHTML=(left)?left:"&#160;";}}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var version,axo;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e0){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e1){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch (e2){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e3){version=-1;}}return version;}function GetSwfVer(){var flashVer=-1;if(navigator.plugins!==null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}flashVer=versionMajor;}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){flashVer=4;}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){flashVer=3;}else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){flashVer=2;}else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}return flashVer;}function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision){versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!==0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}var versionMajor=versionArray[0],versionMinor=versionArray[1],versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer)){return true;}else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision)){return true;}}}return false;}}global_useflash=GetSwfVer();if(global_useflash<=0){global_useflash=0;}else{global_useflash=parseInt(global_useflash.replace(/[^0-9,\.]/gi,""),10);}global_allflash=global_useflash;function play_flash(src,width,height,scale,salign,quality,play,name,bgcolor,id,fv){var str='<embed src="'+src+'" menu="false" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"';str+=(fv)?' FlashVars="'+fv+'"':'';str+=(width)?' width="'+width+'"':'';str+=(height)?' height="'+height+'"':'';str+=(quality)?' quality="'+quality+'"':'';str+=(scale)?' scale="'+scale+'"':'';str+=(salign)?' salign="'+salign+'"':'';str+=(play)?' play="'+play+'"':'';str+=(name)?' name="'+name+'"':'';str+=(bgcolor)?' bgcolor="#ffffff"':'';str+=' type="application/x-shockwave-flash"';str+=' pluginspage="http://www.macromedia.com/go/getflashplayer"><'+'/embed>';var _adm=0;if(id.indexOf("adm_")!==-1){_adm=1;}if(id.indexOf("clp_")!==-1){_adm=2;}if(id.indexOf("ax_")!==-1){_adm=3;}if(!_adm){return str;}$("#"+id).append(str);if(_adm===1){$("#"+id).css("background","#fff");}}function str_rot13(str){return str.replace(/[A-Za-z]/g,function(c){return String.fromCharCode((((c=c.charCodeAt(0))& 223)-52)%26+(c&32)+65);});}function prml(b,a,c,d,bl){return '<a href="mailto:'+str_rot13(a)+'@'+str_rot13(b)+'.'+str_rot13(c)+str_rot13(d)+'" onclick="'+bl+'">'+str_rot13(a)+global_at+str_rot13(b)+global_dt+str_rot13(c)+'<'+'/a>';}function ntc(obj_count,msg,wd){var _obc=obj_count,_obn='ntc'+obj_count,_obcontainer='tc'+obj_count,_objbody='tcbody'+obj_count,ntc_content=unescape(msg),ntc_width=wd,ntc_paused=false,ntc_left=0,tcwidth;function write_ticker(){if(document.getElementById(_obcontainer)!==null){document.getElementById(_obcontainer).className='ohidden';}}write_ticker();this.ntc_start=function(){if(document.getElementById(_obcontainer)!==null){ntc_left=document.getElementById(_obcontainer).scrollLeft;document.getElementById(_obcontainer).innerHTML='<table class="newsticker" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap">'+ntc_content+'&#160;<'+'/td><td nowrap="nowrap" id="'+_objbody+'">'+ntc_content+'&#160;<'+'/td><'+'/tr><'+'/table>';tcwidth=document.getElementById(_objbody).scrollWidth;while(tcwidth<=ntc_width){ntc_content+=' '+unescape(msg);document.getElementById(_obcontainer).innerHTML='<table class="newsticker" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap">'+ntc_content+'&#160;<'+'/td><td nowrap="nowrap" id="'+_objbody+'">'+ntc_content+'&#160;<'+'/td><'+'/tr><'+'/table>';tcwidth=document.getElementById(_objbody).scrollWidth;}}};this.ntc_tick=function(){if(document.getElementById(_obcontainer)!==null){if(!ntc_paused){ntc_left+=2;}if(ntc_left>=tcwidth){ntc_left=0;}document.getElementById(_obcontainer).scrollLeft=ntc_left;window.setTimeout(_obn+".ntc_tick()",36);}this.ntc_pause=function(x){ntc_paused=(x)?true:false;};};}function play_ntc(src,width,height,scale,salign,quality,play,name,bgcolor,id,swattr){str='<span class="flashc block" style="overflow:hidden;'+swattr+'"><span class="flash" style="'+swattr+'"><embed src="'+src+'"menu="false" wmode="transparent"';str+=(width)?' width="'+width+'"':'';str+=(height)?' height="'+height+'"':'';str+=(quality)?' quality="'+quality+'"':'';str+=(scale)?' scale="'+scale+'"':'';str+=(salign)?' salign="'+salign+'"':'';str+=(play)?' play="'+play+'"':'';str+=(name)?' name="'+name+'"':'';str+=(bgcolor)?' bgcolor="'+bgcolor+'"':'';str+='type="application/x-shockwave-flash"';str+=' pluginspage="http://www.macromedia.com/go/getflashplayer"><'+'/embed><'+'/span><'+'/span>';document.getElementById(id).innerHTML=str;}var xmlHttp=null,_fallback=(global_fbk!==undefined)?global_fbk:"";if(window.ActiveXObject){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(f){}}}else if(window.XMLHttpRequest){try{xmlHttp=new XMLHttpRequest();}catch(g){}}function connectionclose(){if(xmlHttp){xmlHttp.open('GET',"./css/__ping",false);xmlHttp.setRequestHeader('304','Not Modified');xmlHttp.send(null);}}function check_close(closearray){if(closearray.length){$.each(closearray,function(i,val){var p=unescape(val).split(",");axinfo(p[0],p[1],p[2]);});}}function check_flh(str){var rexp=/<\!--:(.*?):-->/gi,flp=rexp.exec(str);if(flp){var fl=unescape(flp[1]).split(",");if(fl&&fl.length){if(!global_useflash||global_useflash<fl[0]){$("#"+fl[1]).html(global_gfplayer);$("#"+fl[2]).css('display','none');$("#"+fl[3]).css('display','block');}else{if(fl[7].match("videopath=")||fl[7].match("youtubepath=")){var rexp2=/((video|youtube)path=[^&]+)(.*)/,vp=rexp2.exec(fl[7]);fl[7]=vp[1]+".flv"+vp[3];}$("#"+fl[2]).append(play_flash(global_rdir+fl[4],fl[5],fl[6],"exactfit","","best","true","","",fl[2],fl[7])).css('zIndex','1001');$("#"+fl[1]).attr("src",global_flbgimg);}}}}function axinfo(inf,kennung,val){if(inf){$("#"+inf).load(global_rdir+"/js/switch.php?use=info&"+global_param+"&rsv_reset="+global_rsv+"&inf["+inf+"]="+val+"&div_id="+kennung+"&"+Math.random()+_fallback,function(response,status,xhr){var rexp=/<\!--;(.*?);-->/gi,cl=rexp.exec(response);if(cl){check_close(cl[1].split("-;-"));}$("#"+inf).html(response);check_flh(response);});}}function replace_class(tag,sclass,rclass){$(tag+'.'+sclass).removeClass(sclass).addClass(rclass);}function bdb_next(t_id,alt,id){var container='bdb_info';$('#'+container).load(global_rdir+"/js/switch.php?use=bild_db&"+global_param+"&rsv_reset="+global_rsv+"&t_id="+t_id+"&alt="+alt+"&"+Math.random()+_fallback,function(response,status,xhr){$('#'+container).css('display','none');$('#'+id).html(response);});}function bdb_theme(t_id){var container='bdb_theme';$('#'+container).load(global_rdir+"/js/switch.php?use=bild_db_theme&"+global_param+"&rsv_reset="+global_rsv+"&t_id="+t_id+"&"+Math.random()+_fallback,function(response,status,xhr){$('#'+container).html(response);});}function bdb_download(bild_id,t_id,alt,id){var container='bdb_info';$('#'+container).load(global_rdir+"/js/switch.php?use=bild_db_dl&"+global_param+"&rsv_reset="+global_rsv+"&t_id="+t_id+"&bild_id="+bild_id+"&alt="+alt+"&"+Math.random()+_fallback,function(response,status,xhr){if(document.getElementById(container)){$('#'+container).css('display','block').html(response);if(!alt){replace_class("div","picture_selected","picture");$('#'+id).removeClass('picture').addClass('picture_selected');}location.replace("#bild_db");}});}function bdb_closedl(){$('#bdb_info').css('display','none');replace_class("div","picture_selected","picture");}var _udata=0;function in_array(needle,haystack,argStrict){var found=false,key,strict=!!argStrict;for(key in haystack){if((strict&&haystack[key]===needle)||(!strict&&haystack[key]==needle)){found=true;break;}}return found;}function get_kat(n){if(n<4){return 0;}if(n<6){return 1;}if(n<7){return 2;}if(n<9){return 3;}return 4;}function get_udata(){_udata=["","",""];if(xmlHttp){xmlHttp.open('GET',global_rdir+"/js/switch.php?use=est_ses&"+Math.random()+_fallback,true);xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){_udata=xmlHttp.responseText.split("-;-");}};xmlHttp.send(null);}}function set_qpw(qpw,form,flag){var _y=0,_x=0,_test=0,_upper="",_qid='',_reallen=0,_len=qpw.length,_testpw=qpw,_chk=[[],[],[],[],[]],_amp=["rot","gelb","gruen"],_kat=[0,0,0,0,0];var _nop=["113119101114116122117105111112112111105117122116114101119113","9711510010210310410610710810810710610410310210011597","1211209911898110109444646441091109811899120121","898867866678774446464477786686678889","8187698284908573798080797385908482698781","658368707172747576767574727170688365","4950515253545556574848575655545352515049","1211209911898110109444646441091109811899120121","898867866678774446464477786686678889","8222161822018216288001919193124123125923939921251231249391191880016218282201618222","1718721836417482249371688260248960822617717782269602488260168937822417483648721171","229821887064021691701868710339230821664648216230339871018617016940287068218229","88041658776231873087471818734823082111261268211823087341818747873023187761658804","82201728221351636425794927321831757297307307291751837329294642571633582211728220","1878222824018473371119321921687191766374363743176871921621919371173318482408222187","19720584822072042113057106425833819882178217198338642587103052112042078482205197","880582252171999674824982507287312478212821224773172882508249967419921782258805"];var _chs=[[32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],[49,50,51,52,53,54,55,56,57,48],[33,64,35,36,37,94,38,42,40,41,96,126,45,95,61,43,91,123,93,125,92,124,59,58,44,60,46,62,47,63,39,34]];var _ncnt=_nop.length,_ausgabe="";if(_udata===0){get_udata();}if(_len){if(_testpw.replace(/^(\s+)([^$]+)/g,'$2')!=qpw){qpw=qpw.replace(/^(\s+)([^$]+)/g,'$2');_test=1;}_testpw=qpw;if(_testpw.replace(/(\S*)(\s+)(\S*|$)/g,'$1 $3')!=qpw){qpw=qpw.replace(/(\S*)(\s+)(\S*|$)/g,'$1 $3');_test=1;}if(_test){form[global_actform+'[pw1]'].value=qpw;_len=qpw.length;}if(qpw.charAt((_len-1))===" "){_len--;}}if(_len){_reallen=_len;_upper=qpw.toUpperCase();for(h=0;h<_len;h++){_cd=qpw.charCodeAt(h);_qid+=String(_cd);_set=0;for(i=0;i<4;i++){if(in_array(_cd,_chs[i])){_kat[i]=(i==2)?2:1;_chk[i][_cd]=_cd;_set=1;}}if(!_set){_kat[4]=1.5;_chk[4][_cd]=_cd;}}}for(i=0;i<_ncnt;i++){_lth=_nop[i].length;_off=parseInt((_lth/4),10);_cnt=_lth-_off;for(h=0;h<_cnt;h++){_test=_nop[i].substr(h,_off);if(_qid.indexOf(_test)!==-1){n=get_kat(i);_ausgabe+=n+" ";_chk[n]=[];_kat[n]=0;break;}}}for(i=0;i<5;i++){for(var hx in _chk[i]){if(_chk[i][hx]!==undefined){_x+=1;}}}for(var hi in _kat){if(_kat[hi]!==undefined){_y+=(_kat[hi]*1);}}if(_reallen>5&&flag){document.getElementById("axerr").innerHTML=global_pwmes[0];}if(_udata[0]&&_upper.indexOf(_udata[0].toUpperCase())!==-1){_x=1;_y=1;if(flag){document.getElementById("axerr").innerHTML=global_pwmes[1];}}if(_udata[1]&&_upper.indexOf(_udata[1].toUpperCase())!==-1){_x=1;_y=1;if(flag){document.getElementById("axerr").innerHTML=global_pwmes[2];}}if(_udata[2]&&_upper.indexOf(_udata[2].toUpperCase())!==-1){_x=1;_y=1;if(flag){document.getElementById("axerr").innerHTML=global_pwmes[2];}}if(check_ats(qpw)){_x=1;_y=1;if(flag){document.getElementById("axerr").innerHTML=global_pwmes[3];}}_prod=_x*_y/5;if(global_lpws!==undefined&&global_lpws){_reallen=_len;_prod=(_reallen>5&&_prod<5.9)?6:_prod;}_ampel=(_reallen>5)?((_prod<5.9)?0:((_prod<11.9)?1:2)):0;document.getElementById("ampel").className=_amp[_ampel];if(parseInt(_reallen,10)<6){document.getElementById("axplen").innerHTML=global_pwlen+" "+global_pwmin+" "+(6-parseInt(_reallen,10))+" "+global_pwsig;}else{document.getElementById("axplen").innerHTML=global_pwlen+" "+parseInt(_reallen,10)+" "+global_pwsig+" "+global_pwmax;}document.getElementById("axprod").innerHTML=global_pwsav+' <b class="'+_amp[_ampel]+'">'+global_pwst[_ampel]+'<'+'/b><input type="hidden" name="'+global_actform+'[pwst]" value="'+_prod+'" />';}(function($){var jQbrowser=navigator.userAgent.toLowerCase();$.os={mac:/mac/.test(jQbrowser),win:/win/.test(jQbrowser),linux:/linux/.test(jQbrowser)};$.printResult=function(str){if(window.console){console.log(str);}else{alert(str);}};})(jQuery);/*  * flowplayer.js 3.2.2. The Flowplayer API *  * Copyright 2010 Flowplayer Oy *  * This file is part of Flowplayer. *  * Flowplayer is free software:you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation,either version 3 of the License,or * (at your option) any later version. *  * Flowplayer is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY;without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with Flowplayer.  If not,see <http://www.gnu.org/licenses/>. *  * Date:2010-05-20 17:15:38 +0000 (Thu,20 May 2010) * Revision:480  */(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=""}flashembed(q,G,{config:t});if(J){J.cached=true;j(x,"onLoad",J)}};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.0";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}});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=v.clientHeight;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 H=0;m(t.playlist,function(){var J=this;if(typeof J=="object"&&J.length){J={url:""+J}}m(t.clip,function(K,L){if(L!==undefined&&J[K]===undefined&&typeof L!="function"){J[K]=L}});t.playlist[H]=J;J=new h(J,H,w);F.push(J);H++});m(t,function(J,K){if(typeof K=="function"){if(s[J]){s[J](K)}else{j(x,J,K)}delete t[J]}});m(t.plugins,function(J,K){if(K){y[J]=new l(J,K,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);function I(J){if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(J)}u=q.innerHTML;if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",I,false)}else{if(q.attachEvent){q.attachEvent("onclick",I)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element:"+q}else{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(l,f){if(f){for(key in f){if(f.hasOwnProperty(key)){l[key]=f[key]}}}return l}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 f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(n){try{var l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=l&&l.GetVariable("$version")}catch(m){}}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.0"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();/* * flowplayer.playlist 3.0.8. Flowplayer JavaScript plugin. *  * This file is part of Flowplayer,http://flowplayer.org * * Author:Tero Piirainen,<info@flowplayer.org> * Copyright (c) 2008-2010 Flowplayer Ltd * * Dual licensed under MIT and GPL 2+ licenses * SEE:http://www.opensource.org/licenses *  * Date:2010-05-04 05:33:23 +0000 (Tue,04 May 2010) * Revision:3405  */(function(a){$f.addPlugin("playlist",function(d,q){var o=this;var b={playingClass:"playing",pausedClass:"paused",progressClass:"progress",template:'<a href="${url}">${title}</a>',loop:false,playOnClick:true,manual:false};a.extend(b,q);d=a(d);var j=o.getPlaylist().length<=1||b.manual;var k=null;function e(s){var r=n;a.each(s,function(t,u){if(!a.isFunction(u)){r=r.replace("${"+t+"}",u).replace("$%7B"+t+"%7D",u)}});return "<li>"+unescape(r)+"<"+"/li>"}function i(){k=p().unbind("click.playlist").bind("click.playlist",function(){return h(a(this),k.index(this))})}function c(){d.empty();a.each(o.getPlaylist(),function(){d.append(e(this))});i()}function h(r,s){if(r.hasClass(b.playingClass)||r.hasClass(b.pausedClass)){o.toggle()}else{r.addClass(b.progressClass);o.play(s)}return false}function m(){if(j){k=p()}k.removeClass(b.playingClass);k.removeClass(b.pausedClass);k.removeClass(b.progressClass)}function f(r){return(j)?k.filter("[href="+r.originalUrl+"]"):k.eq(r.index)}function p(){var r=d.find("a");return r.length?r:d.children()}if(!j){var n=d.is(":empty")?b.template:d.html();c()}else{k=p();if(a.isFunction(k.live)){var l=a(d.selector+" a");if(!l.length){l=a(d.selector+" > *")}l.live("click",function(){var r=a(this);return h(r,r.attr("href"))})}else{k.click(function(){var r=a(this);return h(r,r.attr("href"))})}var g=o.getClip(0);if(!g.url&&b.playOnClick){g.update({url:k.eq(0).attr("href")})}}o.onBegin(function(r){m();f(r).addClass(b.playingClass)});o.onPause(function(r){f(r).removeClass(b.playingClass).addClass(b.pausedClass)});o.onResume(function(r){f(r).removeClass(b.pausedClass).addClass(b.playingClass)});if(!b.loop&&!j){o.onBeforeFinish(function(r){if(!r.isInStream&&r.index<k.length-1){return false}})}if(j&&b.loop){o.onBeforeFinish(function(s){var r=f(s);if(r.next().length){r.next().click()}else{k.eq(0).click()}return false})}o.onUnload(function(){m()});if(!j){o.onPlaylistReplace(function(){c()})}o.onClipAdd(function(s,r){k.eq(r).before(e(s));i()});return o})})(jQuery);(function($){$.flowplayerlists=function(o){var options=$.extend({id:"",au:false,ac:false,fb:global_rdir,wd:514},o);var fid=options.id;var autoplay=(options.au)?options.au:false;var autocontinue=(options.ac)?options.ac:false;var fpbase=(options.fb)?options.fb:"";var spwidth=(options.wd)?options.wd:514;var dpc=(spwidth<388)?false:true;var stopped=true;function makePlayList(){var list=[];$("#flowlist_"+fid+" li a").each(function(){list.push({url:$(this).attr("href"),title:escape($(this).text()),subtitle:escape($(this).text())});});return list;}function pausePlayers(){if(global_ytactive){$.ytreset();}if(global_jpl.length){$("*").jPlayer("pause");}$.each(global_flowplayer,function(i,val){if(val.id!=fid){$f("player_"+val.id).pause();}});}var fplist=makePlayList();var showplist=(fplist.length>1)?true:false;$("#player_"+fid+"").removeClass('nostyle').addClass('flowplayer');if(showplist){$("#flowlist_"+fid+"").removeClass('nostyle').addClass('flowplayer');}$("#flowlist_"+fid+"").html('<li><a href="${url}" title="play:${subtitle}">${title}</a></'+'li>');$f("player_"+fid+"",fpbase+"/bilder/flowplayer/flowplayer.swf",{clip:{autoPlay:autoplay,scaling:"fit",autoBuffering:true,baseUrl:fpbase+"/flp/"},onStart:function(){stopped=false;},onResume:function(){pausePlayers();},playlist:fplist,plugins:{controls:{height:20,time:dpc,scrubber:dpc,playlist:showplist}}}).playlist("#flowlist_"+fid+" li",{playingClass:'flplaying',pausedClass:'flpaused',loop:autocontinue});$("#flowlist_"+fid+" li a:first").addClass('flpaused');$("#flowlist_"+fid+" li a").click(function(){pausePlayers();if (stopped){$f("player_"+fid).play();}locrep("#"+fid);return false;});$("#player_"+fid+"").click(function(){pausePlayers();});return this;};})(jQuery);/* jQuery SWFObject v1.1.1 MIT/GPL @jon_nealhttp://jquery.thewikies.com/swfobject */(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);/** youtube playlist jquery plugin Created by dan@geckonm.com www.geckonewmedia.com v1.1 - updated to allow fullscreen  - thanks Ashraf for the request*/(function($){$.ytplaylist=function(o){var options=$.extend({id:"",au:false,fv:"",sl:"ul.youtube"},o);var tid=options.id,selector="ul.youtube",autoPlay=false,FlashVars="",height="100%",current="",auto=true;if (options.au){autoPlay=true;}if (options.fv){FlashVars+=options.fv;}if (options.sl){selector=options.sl;}FlashVars=FlashVars.replace(/\&amp;/g,"&").replace(/\?/g,"");var fullscreen=(FlashVars.match(/fs=0/))?'false':'true';var isNotPlaying=(autoPlay)?false:true;if (fullscreen=='true'){FlashVars+="&fs=1";}function play(id,auto){FlashVars=FlashVars.replace(/\&autoplay\=1/g,"");if(auto){FlashVars+="&autoplay=1&";}var urlp=checkurlparam(FlashVars);if($.browser.opera&&$.os.win){height=$("#list_"+tid).width()/4*2.8;};$("#list_"+tid+"").flash({id:"flash_list_"+tid,swf:"http://www.youtube.com/v/"+id+(urlp?"?"+urlp:""),params:{allowScriptAccess:"always"},height:height,width:"100%",wmode:"transparent",encodeParams:false,allowscriptaccess:"allways",allowfullscreen:fullscreen});/*$.printResult($("#list_"+tid+"").html());*/}function checkvars(str){var result={};if(str.length){var check=str.split('&');var res=[];$.each(check,function(i,val){if(val){res=val.split('=');if(res[0]){result[res[0]]=""+res[1];}}});}return result;}function checkurlparam(str){var result=[];if(str.length){var check=str.split('&');$.each(check,function(i,val){if(val){result.push(val);}});}return result.join('&');}function pausePlayers(all){if(global_flowplayer.length){$f("*").each(function(){if(this.isPlaying()){this.pause();}});}if(global_jpl.length){$("*").jPlayer("pause");}if(all==undefined){all=true;}if(all&&global_ytactive){$.ytreset();}}function youtubeid(url){var ytid=url.match('([\\?&]v=|\\/v\\/)([^\\?&#]*)');ytid=ytid[2];return ytid;}function getState(id,isList){var ac=global_ytactive;if(!isList){pausePlayers(false);if(ac&&ac.cssid!=tid){isNotPlaying=true;pausePlayers(true);}global_ytactive={cssid:tid,id:id};if(isNotPlaying){auto=true;isNotPlaying=false;}else if (ac&&ac.cssid==tid){auto=false;isNotPlaying=true;}}else{if(ac&&ac.cssid!=tid||!ac){isNotPlaying=true;}pausePlayers(true);global_ytactive={cssid:tid,id:id};if(isNotPlaying){auto=true;isNotPlaying=false;}else if(!isNotPlaying&&current==id){auto=false;isNotPlaying=true;}else{auto=true;isNotPlaying=false;}}}$("#list_"+tid+"").css('display','block');var firstVid=$("#yt_"+tid+"").children(selector).children("li:first-child").addClass("currentvideo").children("a").attr("href");var first=youtubeid(firstVid);if(autoPlay){current=first;}$("#list_"+tid+"").append(function(){play(first,autoPlay);});$("#list_"+tid+"").click(function(){if(!current){current=first;}getState(current,false);global_ytactive={cssid:tid,id:current};return false;});$("#yt_"+tid+"").children(selector).css('margin-top','12px');$("#yt_"+tid+"").children(selector).children("li").children("a").click(function(){var id=youtubeid($(this).attr("href"));getState(id,true);current=id;$("#list_"+tid+"").append(function(){play(id,auto);});$(this).parent().parent("ul").find("li.currentvideo").removeClass("currentvideo");$(this).parent("li").addClass("currentvideo");locrep("#"+tid);return false;});return this;};$.ytreset=function(){function checkurlparam(str){var result=[];if(str.length){var check=str.split('&');$.each(check,function(i,val){if(val){result.push(val);}});}return result.join('&');}if(global_ytactive){$.each(global_youtube,function(i,val){if(val.id==global_ytactive.cssid){var height="100%";var urlp=val.fv;urlp=urlp.replace(/\&amp;/g,"&").replace(/\?/g,"");var fullscreen=(urlp.match(/fs=0/))?'false':'true';urlp=checkurlparam(urlp).replace(/\&autoplay\=1/g,"");if (fullscreen=='true'){urlp+="&fs=1";}urlp=(urlp)?"?"+urlp:"";if($.browser.opera&&$.os.win){height=$("#list_"+val.id).width()/4*2.8;};$("#list_"+val.id+"").flash({id:"flash_list_"+val.id,swf:"http://www.youtube.com/v/"+global_ytactive.id+urlp,params:{allowScriptAccess:"always"},height:height,width:"100%",wmode:"transparent",encodeParams:false,allowscriptaccess:"allways",allowfullscreen:fullscreen});/*$.printResult($("#list_"+val.id+"").html());*/global_ytactive="";return;}});}return this;};})(jQuery);
