
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++plonetruegallery-portlet.js - */
// http://www.gemeinde-immanuel.de/portal_javascripts/++resource++plonetruegallery-portlet.js?original=1
(function($){$.fn.imagesLoaded=function(callback){var elems=this.filter('img'),len=elems.length;elems.bind('load',function(){if(--len<=0){callback.call(elems,this)}}).each(function(){if(this.complete||this.complete===undefined){var src=this.src;this.src='#';this.src=src}})};
function set_controls_position(container){var width=container.find('img').width();var left=(width/2)-43;container.find('div.gallery-portlet-controls').css("left",left)}
function get_image(link){var linkele=link[0];if(linkele.active!=undefined&&linkele.active){return}
linkele.active=true;var container=link.parents('dl.applied-portlet-gallery');var controls=link.parents('div.gallery-portlet-controls');var portlet_item=link.parents('dd.portletItem');var next=controls.find('span.next a');var prev=controls.find('span.prev a');var img=container.find('img');$.ajax({url:'@@get-image-for-gallery-portlet',data:link.attr('href').split('?')[1],type:'GET',success: function(data,results){eval("var json="+data);var newimg=document.createElement('img');newimg.src=json.src;newimg.width=img.width();newimg=$(newimg);newimg.css('display','none');portlet_item.css('height',img.height());img.fadeOut(1000, function(){img.replaceWith(newimg);newimg.imagesLoaded(function(){portlet_item.animate({height:$(this).height()},500,'linear');$(this).fadeIn(1000, function(){linkele.active=false})},newimg)
var linked=newimg.parent()
linked.attr('href',json['image-link']);linked.attr('title',json['title']);linked.attr('alt',json['description']);next.attr('href',next.attr('href').split('?')[0]+'?'+json['next-url']);prev.attr('href',prev.attr('href').split('?')[0]+'?'+json['prev-url']);set_controls_position(container)})}})}
function get_timeout_ele(portlet){if(portlet.hasClass('portletItem')){portlet=portlet.parent()}
return portlet.find("input.timeout_id")}
function get_timeout_id(portlet){var timeout_id=get_timeout_ele(portlet);if(timeout_id.size()==0){return 0}else{return parseInt(timeout_id.attr('value'))}}
function set_timeout_id(portlet,val){var timeout_id=get_timeout_ele(portlet);if(timeout_id.size()==0){portlet.append('<input type="hidden" name="timeout_id" class="timeout_id" value="'+val+'" />')}else{timeout_id.attr('value',val)}}
function perform_play(portlet){portlet.find('span.next a').trigger('click');set_timeout_id(portlet,setTimeout(function(){perform_play(portlet)},5000))}
function play(portlet){portlet.find('span.play-pause').addClass('timed');set_timeout_id(portlet,setTimeout(function(){perform_play(portlet)},5000))}
function pause(portlet){clearTimeout(get_timeout_id(portlet));portlet.find('span.play-pause').removeClass('timed')}
$(document).ready(function(){$('dl.portletGallery span.next a,dl.portletGallery span.prev a').click(function(){get_image($(this));return false});$('dl.portletGallery span.play-pause').css({'display':'inline'});var portlets=$('dl.portletGallery');portlets.addClass('applied-portlet-gallery');portlets.each(function(){var portlet=$(this);set_controls_position(portlet);if(portlet.hasClass('timed')){play(portlet)}else{pause(portlet)}});$('dl.portletGallery span.play-pause a').click(function(){var portlet=$(this).parent().parent().parent();if(portlet.find('span.play-pause').hasClass('timed')){pause(portlet)}else{play(portlet)}
return false});$('dl.portletGallery').hover(
function(){var controls=$(this).find('div.gallery-portlet-controls:not(.hide)');controls.fadeIn()},
function(){var controls=$(this).find('div.gallery-portlet-controls:not(.hide)');controls.fadeOut()})})})(jQuery);

/* - ++resource++collective.flowplayer/flowplayer.min.js - */
/* 
 * flowplayer.js 3.2.6. The Flowplayer API
 * 
 * Copyright 2009-2011 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: 2011-02-04 05:45:28 -0500 (Fri, 04 Feb 2011)
 * Revision: 614 
 */
(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.6";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:false},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 e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k<c.ready.length;k++){c.ready[k].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(k){if(c.done){return k()}if(c.timer){c.ready.push(k)}else{c.ready=[k];c.timer=setInterval(j,13)}};function f(l,k){if(k){for(key in k){if(k.hasOwnProperty(key)){l[key]=k[key]}}}return l}function g(k){switch(h(k)){case"string":k=k.replace(new RegExp('(["\\\\])',"g"),"\\$1");k=k.replace(/^\s?(\d+)%/,"$1pct");return'"'+k+'"';case"array":return"["+b(k,function(n){return g(n)}).join(",")+"]";case"function":return'"function()"';case"object":var l=[];for(var m in k){if(k.hasOwnProperty(m)){l.push('"'+m+'":'+g(k[m]))}}return"{"+l.join(",")+"}"}return String(k).replace(/\s/g," ").replace(/\'/g,'"')}function h(l){if(l===null||l===undefined){return false}var k=typeof l;return(k=="object"&&l.push)?"array":k}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(k,n){var m=[];for(var l in k){if(k.hasOwnProperty(l)){m[l]=n(k[l])}}return m}function a(r,t){var q=f({},r);var s=document.all;var n='<object width="'+q.width+'" height="'+q.height+'"';if(s&&!q.id){q.id="_"+(""+Math.random()).substring(9)}if(q.id){n+=' id="'+q.id+'"'}if(q.cachebusting){q.src+=((q.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(q.w3c||!s){n+=' data="'+q.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(q.w3c||s){n+='<param name="movie" value="'+q.src+'" />'}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+='<param name="'+l+'" value="'+q[l]+'" />'}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+='<param name="flashvars" value=\''+o+"' />"}n+="</object>";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="<h2>Flash version "+q+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(m.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})();

/* - ++resource++collective.flowplayer/flowplayer.playlist.min.js - */
/*
 * 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 r}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);

/* - collective.flowplayer.js - */
var collective_flowplayer = {
  "params": {
    "src": "http://www.gemeinde-immanuel.de/++resource++collective.flowplayer/flowplayer.swf"
  }, 
  "config": {
    "toolbar_flash_controlsbar": true, 
    "clip": {
      "scaling": "fit", 
      "autoBuffering": false, 
      "autoPlay": false
    }, 
    "plugins": {
      "audio": {
        "url": "http%3A//www.gemeinde-immanuel.de/%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.audio.swf"
      }, 
      "controls": {
        "url": "http%3A//www.gemeinde-immanuel.de/%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.controls.swf", 
        "volume": true
      }
    }
  }, 
  "initialVolumePercentage": 50, 
  "loop": false
};

/* - ++resource++collective.flowplayer.js/init.js - */
/*global jQuery, flowplayer, window */
(function($) {
function initialVolume() {
    var volume = window.collective_flowplayer.initialVolumePercentage;
    if (volume !== null) {
        this.setVolume(volume);
    }
}
function loop() {
    return !window.collective_flowplayer.loop;
}
$(function() {
    $('.autoFlowPlayer').each(function() {
        // Take a copy of the global config
        var config = jQuery.extend(true, {}, window.collective_flowplayer.config);
        var $self = $(this);
        if ($self.is('.minimal')) {
            config.plugins.controls = null;
        }
        var audio = $self.is('.audio');
        if (audio && !$self.is('.minimal')) {
            config.plugins.controls.all = false;
            config.plugins.controls.play = true;
            config.plugins.controls.scrubber = true;
            config.plugins.controls.mute = true;
            config.plugins.controls.volume = true;
            config.plugins.controls.time = true;
            config.plugins.controls.autoHide = false;
        }
        if ($self.is('div')) {
            // comming from Kupu, there are relative urls
            config.clip.baseUrl = $('base').attr('href');
            config.clip.url = $self.find('a').attr('href');
            if (audio) {
              // force .mp3 extension
              config.clip.url = config.clip.url + '?e=.mp3';
            }
            // Ignore global autoplay settings
            if ($self.find('img').length === 0) {
                // no image. Don't autoplay, remove all elements inside the div to show player directly.
                config.clip.autoPlay = false;
                $self.empty();
            } else {
                // Clip is probably linked as image, so autoplay the clip after image is clicked
                config.clip.autoPlay = true;
            }
        }
        flowplayer(this, window.collective_flowplayer.params, config).onLoad(initialVolume).onBeforeFinish(loop);
        $('.flowPlayerMessage').remove();
    });
    $('.playListFlowPlayer').each(function() {
        // Take a copy of the global config
        var config = jQuery.extend(true, {}, window.collective_flowplayer.config);
        var $self = $(this);
        var audio = $self.is('.audio');
        if (audio) { config.plugins.controls.fullscreen = false; }
        if ($self.is('.minimal')) { config.plugins.controls = null; }
        if ($self.find('img').length > 0) {
            // has splash
            config.clip.autoPlay = true;
        }
        var portlet_parents = $self.parents('.portlet');
        var playlist_selector = 'div#flowPlaylist';
        var portlet;
        if (portlet_parents.length > 0) {
            portlet = true;
            // playlist has to be bound to unique item
            var playlist_selector_id = portlet_parents.parent().attr('id')+'-playlist';
            $self.parent().find('.flowPlaylist-portlet-marker').attr('id', playlist_selector_id);
            playlist_selector = '#'+playlist_selector_id;
            if (audio && !$self.is('.minimal')) {
                config.plugins.controls.all = false;
                config.plugins.controls.play = true;
                config.plugins.controls.scrubber = true;
                config.plugins.controls.mute = true;
                config.plugins.controls.volume = false;
            }
        } else {
            portlet = false;
        }
        if (!portlet) {
            $("#pl").scrollable({items:playlist_selector, size:4, clickable:false, prev:'a.prevPage', next:'a.nextPage'});
        }
        // manual = playlist is setup using HTML tags, not using playlist array in config
        flowplayer(this, window.collective_flowplayer.params, config).playlist(playlist_selector, {loop: true, manual: true}).onLoad(initialVolume).onBeforeFinish(loop);
        $self.show();
        $('.flowPlayerMessage').remove();

    });
});
}(jQuery));


/* - ++resource++flowplayer_toolbar_js/flowplayer.controls-3.0.2-fixed.js - */
// http://www.gemeinde-immanuel.de/portal_javascripts/++resource++flowplayer_toolbar_js/flowplayer.controls-3.0.2-fixed.js?original=1
$f.addPlugin("controls", function(wrap,options){
function fixE(e){if(typeof e=='undefined'){e=window.event}
if(typeof e.layerX=='undefined'){e.layerX=e.offsetX}
if(typeof e.layerY=='undefined'){e.layerY=e.offsetY}
return e}
function w(e){return e.clientWidth}
function offset(e){return e.offsetLeft}
function Draggable(o,min,max,offset){var dragging=false;
function foo(){}
o.onDragStart=o.onDragStart||foo;o.onDragEnd=o.onDragEnd||foo;o.onDrag=o.onDrag||foo;
function move(x){if(x>max){return false}
if(x<min){return false}
o.style.left=x+"px";return true}
function end(){document.onmousemove=null;document.onmouseup=null;o.onDragEnd(parseInt(o.style.left,10));dragging=false}
function drag(e){e=fixE(e);var x=e.clientX-offset;if(move(x)){dragging=true;o.onDrag(x)}
return false}
o.onmousedown=function(e){e=fixE(e);o.onDragStart(parseInt(o.style.left,10));document.onmousemove=drag;document.onmouseup=end;return false};this.dragTo=function(x){if(move(x)){o.onDragEnd(x)}};this.setMax=function(val){max=val};this.isDragging=function(){return dragging};return this}
function extend(to,from){if(from){for(key in from){if(key){to[key]=from[key]}}}}
function byClass(name){var els=wrap.getElementsByTagName("*");var re=new RegExp("(^|\\s)"+name+"(\\s|$)");for(var i=0;i<els.length;i++){if(re.test(els[i].className)){return els[i]}}}
function pad(val){val=parseInt(val,10);return val>=10?val:"0"+val}
function toTime(sec){var h=Math.floor(sec/3600);var min=Math.floor(sec/60);sec=sec-(min * 60);if(h>=1){min-=h * 60;return pad(h)+":"+pad(min)+":"+pad(sec)}
return pad(min)+":"+pad(sec)}
function getTime(time,duration){return "<span>"+toTime(time)+"</span> <strong>"+toTime(duration)+"</strong>"}
var self=this;var opts={playHeadClass:'playhead',trackClass:'track',playClass:'play',pauseClass:'pause',bufferClass:'buffer',progressClass:'progress',sliderClass:'slider',timeClass:'time',muteClass:'mute',unmuteClass:'unmute',duration:0,template:'<a class="play" href="javascript:;" title="play" role="button">play pause</a>'+'<div class="track">'+'<div class="buffer"></div>'+'<div class="progress"></div>'+'<div class="playhead"><button role="slider" class="slider">&nbsp;</button></div>'+'</div>'+'<div class="time"></div>'+'<a class="mute" href="javascript:;" title="mute" role="button">mute unmute</a>'};extend(opts,options);if(typeof wrap=='string'){wrap=document.getElementById(wrap)}
if(!wrap){return}
if(!wrap.innerHTML.replace(/\s/g,'')){wrap.innerHTML=opts.template}
var ball=byClass(opts.playHeadClass);var bufferBar=byClass(opts.bufferClass);var progressBar=byClass(opts.progressClass);var track=byClass(opts.trackClass);var time=byClass(opts.timeClass);var mute=byClass(opts.muteClass);var slider=byClass(opts.sliderClass);time.innerHTML=getTime(0,opts.duration);var trackWidth=w(track);var ballWidth=w(ball);var head=new Draggable(ball,0,0,offset(wrap)+offset(track)+(ballWidth/2));track.onclick=function(e){e=fixE(e);if(e.target==ball){return false}
head.dragTo(e.layerX-ballWidth/2)};slider.onkeydown=function(event){var event=event||window.event;var t=self.getTime();var totalDuration=self.getClip().fullDuration;switch(event.keyCode){case 37:t-=5;break;case 39:t+=5;break;case 33:t-=60;break;case 34:t+=60;break;case 36:t=0;break;case 35:t=totalDuration-1;break};if(t<0) t=0;var newPos=t*trackWidth/totalDuration;var to=parseInt(newPos/trackWidth * 100,10)+"%";progressBar.style.width=Math.floor(newPos)+"px";ball.style.left=(Math.floor(newPos)-ballWidth/2)+"px";self.seek(to)}
var play=byClass(opts.playClass);play.onclick=function(){if(self.isLoaded()){self.toggle()} else{self.play()}};mute.onclick=function(){if(self.getStatus().muted){self.unmute()} else{self.mute()}};var timer=null;
function getMax(len,total){return parseInt(Math.min(len/ total * trackWidth, trackWidth - ballWidth / 2),10)}
self.onStart(function(clip){var duration=clip.duration||0;clearInterval(timer);timer=setInterval(function(){var status=self.getStatus();if(status.time){time.innerHTML=getTime(status.time,clip.duration)}
if(status.time===undefined){clearInterval(timer);return}
var x=getMax(status.bufferEnd,duration);bufferBar.style.width=x+"px";head.setMax(x);if(!self.isPaused()&&!head.isDragging()){x=getMax(status.time,duration);progressBar.style.width=x+"px";ball.style.left=(x-ballWidth/2)+"px"}},500)});self.onBegin(function(){play.className=opts.pauseClass;play.title=opts.pauseClass});self.onPause(function(){play.className=opts.playClass;play.title=opts.playClass});self.onResume(function(){play.className=opts.pauseClass;play.title=opts.pauseClass});self.onMute(function(){mute.className=opts.unmuteClass;mute.title=opts.unmuteClass});self.onUnmute(function(){mute.className=opts.muteClass;mute.title=opts.muteClass});self.onFinish(function(clip){clearInterval(timer);play.className=opts.playClass;play.title=opts.playClass});self.onUnload(function(){time.innerHTML=getTime(0,opts.duration)});ball.onDragEnd=function(x){var to=parseInt(x/trackWidth * 100,10)+"%";progressBar.style.width=x+"px";if(self.isLoaded()){self.seek(to)}};ball.onDrag=function(x){progressBar.style.width=x+"px"};return self});

/* - ++resource++flowplayer_toolbar_js/flowplayer.accessible-controls.js - */
// http://www.gemeinde-immanuel.de/portal_javascripts/++resource++flowplayer_toolbar_js/flowplayer.accessible-controls.js?original=1
jQuery.flowplayer_toolbar={show_flash_controlsbar:false,slider_guide:{en:{intro:'How to control the slider',left_arrow_label:'Left arrow',left_arrow_help:'backward 5 seconds',right_arrow_label:'Right arrow',right_arrow_help:'forward 5 seconds',page_up_label:'Page up',page_up_help:'backward 1 minute',page_down_label:'Page down',page_down_help:'forward 1 minute',home_label:'Home key',home_help:'go to beginning of clip',end_label:'End key',end_help:'go to end of clip'},it:{intro:'Come controllare l\'avanzamento',left_arrow_label:'Freccia sinistra',left_arrow_help:'indietro 5 secondi',right_arrow_label:'Freccia destra',right_arrow_help:'avanti 5 secondi',page_up_label:'Pagina su',page_up_help:'indietro 1 minuto',page_down_label:'Pagina giù',page_down_help:'Avanti 1 minuto',home_label:'Tasto HOME',home_help:'vai all\'inizio del filmato',end_label:'Tasto FINE',end_help:'vai alla fine del filmato'},da:{intro:'Sådan spoler du',left_arrow_label:'venstre pil',left_arrow_help:'spol 5 sekunder tilbage',right_arrow_label:'højre pil',right_arrow_help:'spol 5 sekunder frem',page_up_label:'Side op',page_up_help:'spol 1 minut tilbage',page_down_label:'Side ned',page_down_help:'spol 1 minut frem',home_label:'Tasten Home',home_help:'gå til klippets start',end_label:'Tasten End',end_help:'gå til klippets slutning'}}};jq(document).ready(function(event){
function pad(val){val=parseInt(val,10);return val>=10?val:"0"+val}
var toTime=function(sec){var h=Math.floor(sec/3600);var min=Math.floor(sec/60);sec=sec-(min * 60);if(h>=1){min-=h * 60;return pad(h)+":"+pad(min)+":"+pad(sec)}
return pad(min)+":"+pad(sec)};var lang=jq("html").attr('lang')||'en';var help_info=jq.flowplayer_toolbar.slider_guide[lang]||jq.flowplayer_toolbar.slider_guide['en'];var help=jq('<div></div>').text(help_info.intro);var help_instr=jq('<dl></dl>').append('<dt>'+help_info.left_arrow_label+'</dt>\n').append('<dd>'+help_info.left_arrow_help+'</dd>\n').append('<dt>'+help_info.right_arrow_label+'</dt>\n').append('<dd>'+help_info.right_arrow_help+'</dd>\n').append('<dt>'+help_info.page_up_label+'</dt>\n').append('<dd>'+help_info.page_up_help+'</dd>\n').append('<dt>'+help_info.page_down_label+'</dt>\n').append('<dd>'+help_info.page_down_help+'</dd>\n').append('<dt>'+help_info.home_label+'</dt>\n').append('<dd>'+help_info.home_help+'</dd>\n').append('<dt>'+help_info.end_label+'</dt>\n').append('<dd>'+help_info.end_help+'</dd>\n');help.append(help_instr);$f("*").each(function(index){var player_index=index;this.onLoad(function(event){if(!this.getPlugin("controls")){return}
var intervalID=null;var hulu_id=null;this.getCommonClip().onBegin(function(event){var player=this;intervalID=setInterval(function(){var playingTime=Math.floor(player.getTime());var fullTime=Math.floor(player.getClip().fullDuration);jq('#'+hulu_id+' div[role=progressbar]').attr('aria-valuenow',playingTime).attr('aria-valuemin',0).attr('aria-valuemax',fullTime).attr('aria-valuetext',Math.round(playingTime * 100/fullTime)+"%");jq('#'+hulu_id+' .slider').attr('aria-valuenow',playingTime).attr('aria-valuemin',0).attr('aria-valuemax',fullTime).attr('aria-valuetext',toTime(playingTime))},500)}).onFinish(function(event){clearInterval(intervalID);jq('#'+hulu_id+' div[role=progressbar]').removeAttr('aria-valuenow').removeAttr('aria-valuemin').removeAttr('aria-valuemax').removeAttr('aria-valuetext');jq('#'+hulu_id+' .slider').removeAttr('aria-valuenow').removeAttr('aria-valuemin').removeAttr('aria-valuemax').removeAttr('aria-valuetext')});var p=jq(this.getParent());if(!jq.flowplayer_toolbar.show_flash_controlsbar){var flashControls=this.getPlugin("controls");flashControls.hide();if(p.hasClass('audio')){p.css('height','0px')}}
var p_width=p.width();var time_width=(p_width<400?99:129);hulu_id="hulu-"+player_index;p.after('<div id="'+hulu_id+'" style="width:'+p_width+'px" class="hulu">\n'+'<a class="play" href="javascript:;" role="button">Play</a>\n'+'<div class="track" role="progressbar" style="width:'+(p_width-46-46-time_width)+'px">\n'+'    <div class="buffer"></div>\n'+'    <div class="progress"></div>\n'+'    <div class="playhead"><button role="slider" class="slider">&nbsp;</button></div>\n'+'</div>\n'+'<div class="time" style="width:'+time_width+'px"></div>\n'+'<a class="mute" href="javascript:;" role="button">Mute</a>\n'+'</div>\n');this.controls(hulu_id);jq("#"+hulu_id+" a.mute").css('left',p_width-46);jq("#"+hulu_id+" div.time").css('left',p_width-46-time_width);var slider=jq(".slider",jq('#'+hulu_id));slider.append(help.clone().addClass("hiddenStructure")).focus(function(){slider.parent().addClass('focus').find("div").addClass("sliderHelp")}).blur(function(){slider.parent().removeClass('focus').find("div").removeClass("sliderHelp")});if(p.hasClass('playListFlowPlayer')){p.removeClass('playListFlowPlayer').addClass('playListFlowPlayerWithControls');jq("#"+hulu_id).addClass("forPlayList");p.nextAll('.playlist_wrap').addClass('playlistSpace')}})})});

