/*!
 * jQuery Tools v1.2.5 - The missing UI library for the Web
 * 
 * overlay/overlay.js
 * overlay/overlay.apple.js
 * scrollable/scrollable.js
 * scrollable/scrollable.autoscroll.js
 * scrollable/scrollable.navigator.js
 * tabs/tabs.js
 * tabs/tabs.slideshow.js
 * tooltip/tooltip.js
 * tooltip/tooltip.dynamic.js
 * tooltip/tooltip.slide.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */
(function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.overlay={addEffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addEffect("default",function(b,c){var d=this.getConf(),e=a(window);d.fixed||(b.top+=e.scrollTop(),b.left+=e.scrollLeft()),b.position=d.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=Math.random().toString().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"Could not find Overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventDefault()}),a.extend(f,{load:function(d){if(f.isOpened())return f;var i=c[e.effect];if(!i)throw"Overlay: cannot find effect : \""+e.effect+"\"";e.oneInstance&&a.each(b,function(){this.close(d)}),d=d||a.Event(),d.type="onBeforeLoad",g.trigger(d);if(d.isDefaultPrevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerWidth({margin:!0}),q=j.outerHeight({margin:!0});typeof n=="string"&&(n=n=="center"?Math.max((h.height()-q)/2,0):parseInt(n,10)/100*h.height()),o=="center"&&(o=Math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onLoad",g.trigger(d))}),l&&e.closeOnClick&&a.mask.getMask().one("click",f.close),e.closeOnClick&&a(document).bind("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeOnEsc&&a(document).bind("keydown."+m,function(a){a.keyCode==27&&f.close(a)});return f},close:function(b){if(!f.isOpened())return f;b=b||a.Event(),b.type="onBeforeClose",g.trigger(b);if(!b.isDefaultPrevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onClose",g.trigger(b)}),a(document).unbind("click."+m).unbind("keydown."+m),l&&a.mask.close();return f}},getOverlay:function(){return j},getTrigger:function(){return d},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a("<a class=\"close\"></a>"),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isFunction(c)&&(c={onBeforeLoad:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jQuery);
(function(a){var b=a.tools.overlay,c=a(window);a.extend(b.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function d(a){var b=a.offset();return{top:b.top+a.height()/2,left:b.left+a.width()/2}}var e=function(b,e){var f=this.getOverlay(),g=this.getConf(),h=this.getTrigger(),i=this,j=f.outerWidth({margin:!0}),k=f.data("img"),l=g.fixed?"fixed":"absolute";if(!k){var m=f.css("backgroundImage");if(!m)throw"background-image CSS property not set for overlay";m=m.slice(m.indexOf("(")+1,m.indexOf(")")).replace(/\"/g,""),f.css("backgroundImage","none"),k=a("<img src=\""+m+"\"/>"),k.css({border:0,display:"none"}).width(j),a("body").append(k),f.data("img",k)}var n=g.start.top||Math.round(c.height()/2),o=g.start.left||Math.round(c.width()/2);if(h){var p=d(h);n=p.top,o=p.left}g.fixed?(n-=c.scrollTop(),o-=c.scrollLeft()):(b.top+=c.scrollTop(),b.left+=c.scrollLeft()),k.css({position:"absolute",top:n,left:o,width:0,zIndex:g.zIndex}).show(),b.position=l,f.css(b),k.animate({top:f.css("top"),left:f.css("left"),width:j},g.speed,function(){f.css("zIndex",g.zIndex+1).fadeIn(g.fadeInSpeed,function(){i.isOpened()&&!a(this).index(f)?e.call():f.hide()})}).css("position",l)},f=function(b){var e=this.getOverlay().hide(),f=this.getConf(),g=this.getTrigger(),h=e.data("img"),i={top:f.start.top,left:f.start.left,width:0};g&&a.extend(i,d(g)),f.fixed&&h.css({position:"absolute"}).animate({top:"+="+c.scrollTop(),left:"+="+c.scrollLeft()},0),h.animate(i,f.closeSpeed,b)};b.addEffect("apple",e,f)})(jQuery);
(function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function b(a,b){var c=parseInt(a.css(b),10);if(c)return c;var d=a[0].currentStyle;return d&&d.width&&parseInt(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),a.extend(f,{getConf:function(){return e},getIndex:function(){return i},getSize:function(){return f.getItems().size()},getNaviButtons:function(){return m.add(n)},getRoot:function(){return b},getItemWrap:function(){return h},getItems:function(){return h.children(e.item).not("."+e.clonedClass)},move:function(a,b){return f.seekTo(i+a,b)},next:function(a){return f.move(1,a)},prev:function(a){return f.move(-1,a)},begin:function(a){return f.seekTo(0,a)},end:function(a){return f.seekTo(f.getSize()-1,a)},focus:function(){d=f;return f},addItem:function(b){b=a(b),e.circular?(h.children("."+e.clonedClass+":last").before(b),h.children("."+e.clonedClass+":first").replaceWith(b.clone().addClass(e.clonedClass))):h.append(b),g.trigger("onAddItem",[b]);return f},seekTo:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getSize()||b<-1)return f;var l=b;b.jquery?b=f.getItems().index(b):l=f.getItems().eq(b);var m=a.Event("onBeforeSeek");if(!k){g.trigger(m,[b,c]);if(m.isDefaultPrevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onSeek",[b])});return f}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}});if(e.circular){var k=f.getItems().slice(-1).clone().prependTo(h),l=f.getItems().eq(1).clone().appendTo(h);k.add(l).addClass(e.clonedClass),f.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1){f.seekTo(k,c,function(){f.end(0)});return a.preventDefault()}b==f.getSize()&&f.seekTo(l,c,function(){f.begin(0)})}}),f.seekTo(0,0,function(){})}var m=c(b,e.prev).click(function(){f.prev()}),n=c(b,e.next).click(function(){f.next()});!e.circular&&f.getSize()>1&&(f.onBeforeSeek(function(a,b){setTimeout(function(){a.isDefaultPrevented()||(m.toggleClass(e.disabledClass,b<=0),n.toggleClass(e.disabledClass,b>=f.getSize()-1))},1)}),e.initialIndex||m.addClass(e.disabledClass)),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelSpeed||50);return!1}});if(e.touch){var o={};h[0].ontouchstart=function(a){var b=a.touches[0];o.x=b.clientX,o.y=b.clientY},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=o.x-b.clientX,d=o.y-b.clientY;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventDefault()}}}e.keyboard&&a(document).bind("keydown.scrollable",function(b){if(e.keyboard&&!b.altKey&&!b.ctrlKey&&!a(b.target).is(":input")){if(e.keyboard!="static"&&d!=f)return;var c=b.keyCode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventDefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventDefault()}}}),e.initialIndex&&f.seekTo(e.initialIndex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jQuery);
(function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable");b&&(e=b);var c,f=!0;b.play=function(){c||(f=!1,c=setInterval(function(){b.next()},d.interval))},b.pause=function(){c=clearInterval(c)},b.stop=function(){b.pause(),f=!0},d.autopause&&b.getRoot().add(b.getNaviButtons()).hover(b.pause,b.play),d.autoplay&&b.play()});return d.api?e:this}})(jQuery);
(function(a){var b=a.tools.scrollable;b.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}a.fn.navigator=function(d){typeof d=="string"&&(d={navi:d}),d=a.extend({},b.navigator.conf,d);var e;this.each(function(){var b=a(this).data("scrollable"),f=d.navi.jquery?d.navi:c(b.getRoot(),d.navi),g=b.getNaviButtons(),h=d.activeClass,i=d.history&&a.fn.history;b&&(e=b),b.getNaviButtons=function(){return g.add(f)};function j(a,c,d){b.seekTo(c);if(i)location.hash&&(location.hash=a.attr("href").replace("#",""));else return d.preventDefault()}function k(){return f.find(d.naviItem||"> *")}function l(b){var c=a("<"+(d.naviItem||"a")+"/>").click(function(c){j(a(this),b,c)}).attr("href","#"+b);b===0&&c.addClass(h),d.indexed&&c.text(b+1),d.idPrefix&&c.attr("id",d.idPrefix+b);return c.appendTo(f)}k().length?k().each(function(b){a(this).click(function(c){j(a(this),b,c)})}):a.each(b.getItems(),function(a){l(a)}),b.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var c=k().eq(b);!a.isDefaultPrevented()&&c.length&&k().removeClass(h).eq(b).addClass(h)}},1)});function m(a,b){var c=k().eq(b.replace("#",""));c.length||(c=k().filter("[href="+b+"]")),c.click()}b.onAddItem(function(a,c){c=l(b.getItems().index(c)),i&&c.history(m)}),i&&k().history(m)});return d.api?e:this}})(jQuery);
(function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:!1,history:!1},addEffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){this.getPanes().slideUp(200),this.getPanes().eq(a).slideDown(400,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},c;a.tools.tabs.addEffect("horizontal",function(b,d){c||(c=this.getPanes().eq(0).width()),this.getCurrentPane().animate({width:0},function(){a(this).hide()}),this.getPanes().eq(b).animate({width:c},function(){a(this).show(),d.call()})});function d(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(c,d){var i=h.eq(c);typeof c=="string"&&c.replace("#","")&&(i=h.filter("[href*="+c.replace("#","")+"]"),c=Math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(c<0)return f.click(k,d);if(c>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;c=e.initialIndex,i=h.eq(c)}if(c===j)return f;d=d||a.Event(),d.type="onBeforeClick",g.trigger(d,[c]);if(!d.isDefaultPrevented()){b[e.effect].call(f,c,function(){d.type="onClick",g.trigger(d,[c])}),j=c,h.removeClass(e.current),i.addClass(e.current);return f}},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.unbind(e.event).removeClass(e.current),i.find("a[href^=#]").unbind("click.T");return f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){f.click(b,a);return a.preventDefault()})}),i.find("a[href^=#]").bind("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.fn.tabs=function(b,c){var e=this.data("tabs");e&&(e.destroy(),this.removeData("tabs")),a.isFunction(c)&&(c={onBeforeClick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){e=new d(a(this),b,c),a(this).data("tabs",e)});return c.api?e:this}})(jQuery);
(function(a){var b;b=a.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}};function c(b,c){var d=this,e=b.add(this),f=b.data("tabs"),g,h=!0;function i(c){var d=a(c);return d.length<2?d:b.parent().find(c)}var j=i(c.next).click(function(){f.next()}),k=i(c.prev).click(function(){f.prev()});a.extend(d,{getTabs:function(){return f},getConf:function(){return c},play:function(){if(g)return d;var b=a.Event("onBeforePlay");e.trigger(b);if(b.isDefaultPrevented())return d;g=setInterval(f.next,c.interval),h=!1,e.trigger("onPlay");return d},pause:function(){if(!g)return d;var b=a.Event("onBeforePause");e.trigger(b);if(b.isDefaultPrevented())return d;g=clearInterval(g),e.trigger("onPause");return d},stop:function(){d.pause(),h=!0}}),a.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(b,e){a.isFunction(c[e])&&a(d).bind(e,c[e]),d[e]=function(b){return a(d).bind(e,b)}}),c.autopause&&f.getTabs().add(j).add(k).add(f.getPanes()).hover(d.pause,function(){h||d.play()}),c.autoplay&&d.play(),c.clickable&&f.getPanes().click(function(){f.next()});if(!f.getConf().rotate){var l=c.disabledClass;f.getIndex()||k.addClass(l),f.onBeforeClick(function(a,b){k.toggleClass(l,!b),j.toggleClass(l,b==f.getTabs().length-1)})}}a.fn.slideshow=function(d){var e=this.data("slideshow");if(e)return e;d=a.extend({},b.conf,d),this.each(function(){e=new c(a(this),d),a(this).data("slideshow",e)});return d.api?e:this}})(jQuery);
(function(a){a.tools=a.tools||{version:"v1.2.5"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(a){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=b||a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=c||a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);
(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=e.classNames.split(/\s/),g;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,h){var i=this.getTip(),j=this.getConf();g||(g=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,g[4]),j.position=[g[0],g[1]],j.offset=[g[2],g[3]],i.css({visibility:"hidden",position:"absolute",top:h.top,left:h.left}).show();var k=c(i);if(!d(k)){k[2]&&(a.extend(j,e.top),j.position[0]="top",i.addClass(f[0])),k[3]&&(a.extend(j,e.right),j.position[1]="right",i.addClass(f[1])),k[0]&&(a.extend(j,e.bottom),j.position[0]="bottom",i.addClass(f[2])),k[1]&&(a.extend(j,e.left),j.position[1]="left",i.addClass(f[3]));if(k[0]||k[2])j.offset[0]*=-1;if(k[1]||k[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[g[0],g[1]],a.offset=[g[2],g[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery);
(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery);
;
/*!
 * projekktor zwei V 0.9.05 (r72) 
 * http://www.projekktor.com
 * Copyright 2010, 2011, Sascha Kluger, Spinning Airwhale Media, http://www.spinningairwhale.com
 * under GNU General Public License
 * http://www.projekktor.com/license/
 *
 * You can use, modify and distribute the software, but do so in the spirit of Open Source.
 * You need to leave the copyright notices intact.
 * You need to be able to share any modifications you make to the Projekktor source (not the software Projekktor is integrated to).
 * Give credit where credit is due, spread the word, link to us if you can.
 */jQuery(function($){if($.browser.msie){(function(){if(!
/*@cc_on!@*/
0){return}var e="div,audio,video,source".split(",");for(var i=0;i<e.length;i++){document.createElement(e[i])}})();if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,start){for(var i=(start||0),j=this.length;i<j;i++){if(this[i]==obj){return i}}return -1}}}var projekktors=[];function Iterator(arr){this.length=arr.length;this.each=function(fn){$.each(arr,fn)};this.size=function(){return arr.length}}if($.prop==undefined||$().jquery<"1.6"){$.fn.prop=function(arga,argb){return $(this).attr(arga,argb)}}projekktor=$p=function(){var arg=arguments[0],instances=[];if(!arguments.length){return projekktors[0]||null}if(typeof arg=="number"){return projekktors[arg]}if(typeof arg=="string"){if(arg=="*"){return new Iterator(projekktors)}for(var i=0;i<projekktors.length;i++){try{if(projekktors[i].getId()==arg.id){instances.push(projekktors[i]);continue}}catch(e){}try{for(var j=0;j<$(arg).length;j++){if(projekktors[i].env.playerDom.get(0)==$(arg).get(j)){instances.push(projekktors[i]);continue}}}catch(e){}try{if(projekktors[i].getParent()==arg){instances.push(projekktors[i]);continue}}catch(e){}try{if(projekktors[i].getId()==arg){instances.push(projekktors[i]);continue}}catch(e){}}if(instances.length>0){return(instances.length==1)?instances[0]:new Iterator(instances)}}if(instances.length==0){var cfg=arguments[1]||{};var callback=arguments[2]||{};if(typeof arg=="string"){var count=0,playerA;$.each($(arg),function(){playerA=new PPlayer($(this),cfg,callback);projekktors.push(playerA);count++});return(count>1)?new Iterator(projekktors):playerA}else{if(arg){projekktors.push(new PPlayer(arg,cfg,callback));return new Iterator(projekktors)}}}return null;function PPlayer(srcNode,cfg,onReady){this.config=new projekktorConfig("0.9.05");this._persCfg=["volume","enableNativePlayback","enableFlashFallback"];this._queue=[];this.env={inFullscreen:false,playerStyle:null,scrollTop:null,scrollLeft:null,bodyOverflow:null,playerDom:null,mediaContainer:null,agent:"standard",mouseIsOver:false,loading:false,autoSize:false};this.media=[null];this._plugins=[];this.listeners=[];this.playerModel={};this._isReady=false;this._compTableCache=false;this._currentItem=0;this._playlistServer="";this._id="";this._reelUpdate=function(obj){this.env.loading=true;switch(typeof obj){default:obj=[{file:"",type:"",errorCode:98}];break;case"object":if(obj.length==0){obj=[{file:"",type:"",errorCode:97}]}break;case"undefined":obj=[{file:"",type:"",errorCode:97}];break}var ref=this,data=obj;this.media=[];try{var changes=false;for(var props in data.config){if(typeof data.config[props].indexOf("objectfunction")>-1){continue}this.config[props]=this._cleanValue(data.config[props]);changes=true}delete (data.config);if(changes===true){this._debug("Updated config var: "+props+" to "+this.config[props]);this._promote("configModified")}}catch(e){}var files=data.playlist||data;for(var item in files){if(typeof files[item]=="function"){continue}if(typeof files[item]==undefined){continue}if(files[item]){this._addItem(this._prepareMedia({file:files[item],config:files[item].config||{},errorCode:files[item].errorCode}))}}this.env.loading=false;this._promote("scheduled",this.getItemCount());this._syncPlugins(function(){ref.setActiveItem(0)})};this._addItem=function(data,idx,replace){var resultIdx=0;if(this.media.length===1&&this.media[0].mediaModel=="NA"){this._detachplayerModel();this.media=[]}if(idx===undefined||idx<0||idx>this.media.length-1){this.media.push(data);resultIdx=this.media.length-1}else{this.media.splice(idx,(replace===true)?1:0,data);resultIdx=idx}if(this.env.loading===false){this._promote("scheduleModified",this.getItemCount())}return resultIdx};this._removeItem=function(idx){var resultIdx=0;if(this.media.length===1){if(this.media[0].mediaModel=="NA"){return 0}else{this.media[0]=this._prepareMedia({file:""});return 0}}if(idx===undefined||idx<0||idx>this.media.length-1){this.media.pop();resultIdx=this.media.length}else{this.media.splice(idx,1);resultIdx=idx}if(this.env.loading===false){this._promote("scheduleModified",this.getItemCount())}return resultIdx};this._prepareMedia=function(data){var mediaFile="",extTypes={},typesModels={},errorCode=data.errorCode||7,priority=[],modelSets=[];result={};var extRegEx=[];for(var i in $p.mmap){if($p.mmap[i].platform&&$p.mmap[i].platform.toUpperCase()=="FLASH"){if(!this.getFlashVersion()>0){continue}if(this.getConfig("enableFlashFallback")==false){continue}}if($p.mmap[i].platform&&$p.mmap[i].platform.toUpperCase()=="NATIVE"){if(!this.getCanPlayNatively($p.mmap[i].type)){continue}if(this.getConfig("enableNativePlayback")==false){continue}if(data.config&&data.config.flashStreamType=="rtmp"){continue}}$p.mmap[i].level=this.config._platformPriority.indexOf($p.mmap[i].platform);$p.mmap[i].level=($p.mmap[i].level<0)?100:$p.mmap[i].level;extRegEx.push("."+$p.mmap[i].ext);if(!extTypes[$p.mmap[i].ext]){extTypes[$p.mmap[i].ext]=new Array()}extTypes[$p.mmap[i].ext].push($p.mmap[i]);if(!typesModels[$p.mmap[i].type]){typesModels[$p.mmap[i].type]=new Array()}typesModels[$p.mmap[i].type].push($p.mmap[i])}extRegEx="^.*.("+extRegEx.join("|")+")$";if(typeof data.file=="string"){data.file=[{src:data.file}];if(typeof data.type=="string"){data.file=[{src:data.file,type:data.type}]}}if(data.file===false){data.file=[{src:""}]}for(var index in data.file){if(index=="config"){continue}if(typeof data.file[index]=="string"){data.file[index]={src:data.file[index]}}if(data.file[index].src==undefined){continue}try{data.file[index].ext=data.file[index].src.match(new RegExp(extRegEx))[1];data.file[index].ext=(!data.file[index].ext)?"NaN":data.file[index].ext.replace(".","")}catch(e){data.file[index].ext="NaN"}if(data.file[index].type!==undefined&&data.file[index].type!==""){try{var codecMatch=data.file[index].type.split(" ").join("").split(/[\;]codecs=.([a-zA-Z0-9\,]*)[\'|\"]/i);if(codecMatch[1]!==undefined){data.file[index].codec=codecMatch[1];data.file[index].type=codecMatch[0]}}catch(e){}if(typesModels[data.file[index].type]){modelSets=$.merge(modelSets,typesModels[data.file[index].type])}}else{if(extTypes[data.file[index].ext]){modelSets=$.merge(modelSets,extTypes[data.file[index].ext])}}}if(modelSets.length==0){modelSets=typesModels["none/none"]}else{modelSets.sort(function(a,b){return a.level-b.level})}for(var index in data.file){if(data.file[index].type==modelSets[0].type||modelSets[0].type=="none/none"){result={_originalConfig:data.file,_VALIDATED:true,ID:this.randomId(8),fileConfig:data.file[index],file:(data.config.flashStreamType!="rtmp")?this.toAbsoluteURL(data.file[index].src):data.file[index].src,mediaModel:modelSets[0].model||"NA",mediaType:modelSets[0].type||"none/none",errorCode:errorCode,config:data.config||{}};break}}return result};this._modelUpdateListener=function(type,value){var ref=this;if(!this.playerModel.init){return}if(type!="time"&&type!="progress"){this._debug("Received model Update: '"+type+"' ("+value+") while handling '"+this.playerModel.getFile()+"' using '"+this.playerModel.getModelName()+"'")}switch(type){case"state":this._promote("state",value);switch(value){case"IDLE":break;case"AWAKENING":break;case"BUFFERING":break;case"ERROR":this._promote("error",{});break;case"PLAYING":break;case"STOPPED":this._promote("stopped",{});break;case"PAUSED":if(this.getConfig("disablePause")===true){this.playerModel.applyCommand("play",0)}break;case"COMPLETED":if(this._currentItem+1>=this.media.length){if(this.getInFullscreen()===true){this.setFullscreen(false)}this._promote("done",{})}this.setActiveItem("next");break}break;case"buffer":this._promote("buffer",value);this._promote("time",value);break;case"modelReady":this._promote("item",ref._currentItem);break;case"displayReady":this._promote("displayReady",true);this._addGUIListeners();this._syncPlugins();break;case"FFreinit":break;case"seek":this._promote("seek",{dest:value});break;case"volume":this.setConfig({volume:value});this._promote("volume",value);break;case"progress":this._promote("progress",value);break;case"time":this._promote("time",value);break;case"fullscreen":this._promote("fullscreen",value);break;case"resize":this._promote("resize",value);break;case"playlist":this.setFile(value,true);break;case"config":this.setConfig(value);break;case"scaled":if(this.env.autoSize===true){this.env.playerDom.css({height:value.realHeight+"px",width:value.realWidth+"px"});this._promote("resize",value);this.env.autoSize=false;break}this._promote("scaled",value);break}};this._syncPlugins=function(callback){var ref=this;this.env.loading=true;(function(){try{if(ref._plugins.length>0){for(var i=0;i<ref._plugins.length;i++){if(ref._plugins[i].pluginReady!==true){setTimeout(arguments.callee,50);return}}}ref.env.loading=false;ref._promote("pluginsReady",{});if(ref._isReady===true){ref._promote("ready",{})}try{callback()}catch(e){}}catch(e){}})()};this._MD=function(event){projekktor("#"+event.currentTarget.id)._displayMousedownListener(event)};this._addGUIListeners=function(){var ref=this;if(this.env.playerDom.get(0).addEventListener){this.env.playerDom.get(0).addEventListener("mousedown",this._MD,true)}else{this.env.playerDom.mousedown(function(event){ref._displayMousedownListener(event)})}this.env.playerDom.mousemove(function(event){ref._displayMousemoveListener(event)});this.env.playerDom.mouseenter(function(event){ref._displayMouseEnterListener(event)});this.env.playerDom.mouseleave(function(event){ref._displayMouseLeaveListener(event)});$(window).bind("resize.projekktor"+this.getId(),function(){ref.playerModel.applyCommand("resize")});if(this.config.enableKeyboard===true){if(!$.browser.mozilla){$(document.documentElement).unbind("keydown.pp"+this._id);$(document.documentElement).bind("keydown.pp"+this._id,function(evt){ref._keyListener(evt)})}else{$(document.documentElement).unbind("keypress.pp"+this._id);$(document.documentElement).bind("keypress.pp"+this._id,function(evt){ref._keyListener(evt)})}}};this._removeGUIListeners=function(){$("#"+this.getId()).unbind();this.env.playerDom.unbind();if(this.env.playerDom.get(0).removeEventListener){this.env.playerDom.get(0).removeEventListener("mousedown",this._MD,true)}else{this.env.playerDom.get(0).detachEvent("onmousedown",this._MD)}$(window).unbind("resize.projekktor"+this.getId())};this._registerPlugins=function(){var plugins=$.merge($.merge([],this.config._plugins),this.config._addplugins);if(this._plugins.length>0){return}if(plugins==0){return}for(var i=0;i<plugins.length;i++){var pluginName="projekktor"+plugins[i];try{typeof eval(pluginName)}catch(e){continue}var pluginObj=$.extend(true,{},new projekktorPluginInterface(),eval(pluginName).prototype);pluginObj.name=plugins[i].toLowerCase();pluginObj.pp=this;pluginObj.playerDom=this.env.playerDom;pluginObj._init(this.config["plugin_"+plugins[i].toLowerCase()]||{});this._plugins.push(pluginObj)}};this.removePlugin=function(rmvPl){if(this._plugins.length==0){return}var pluginsToRemove=rmvPl||$.merge($.merge([],this.config._plugins),this.config._addplugins),pluginsRegistered=this._plugins.length;for(var j=0;j<pluginsToRemove.length;j++){for(var k=0;k<pluginsRegistered;k++){if(this._plugins[k]!=undefined){if(this._plugins[k].name==pluginsToRemove[j].toLowerCase()){this._plugins[k].deconstruct();this._plugins.splice(k,1)}}}}};this._promote=function(evt,value){var event=evt,pluginData={};if(typeof event=="object"){if(!event._plugin){return}value.PLUGIN=event._plugin+"";value.EVENT=event._event+"";event="pluginevent"}if(event!="time"&&event!="progress"&&event!="mousemove"){this._debug("Fireing :"+event)}if(this._plugins.length>0){for(var i in this._plugins){try{this._plugins[i][event+"Handler"](value,this)}catch(e){}}}if(this.listeners.length>0){for(var i in this.listeners){try{if(this.listeners[i]["event"]==event||this.listeners[i]["event"]=="*"){this.listeners[i]["callback"](value,this)}}catch(e){}}}};this._detachplayerModel=function(){this._removeGUIListeners();try{this.playerModel.destroy()}catch(e){}this._promote("detach",{})};this._displayMousedownListener=function(evt){switch(evt.which){case 1:this._promote("leftclick",evt);break;case 2:this._promote("middleclick",evt);break;case 3:evt.stopPropagation();evt.preventDefault();$(document).bind("contextmenu",function(evt){$(document).unbind("contextmenu");return false});this._promote("rightclick",evt);break}return false};this._displayMousemoveListener=function(evt){this._promote("mousemove",{});evt.stopPropagation()};this._displayMouseEnterListener=function(evt){this._promote("mouseenter",{});this.env.mouseIsOver=true;evt.stopPropagation()};this._displayMouseLeaveListener=function(evt){this._promote("mouseleave",{});this.env.mouseIsOver=false;evt.stopPropagation()};this._keyListener=function(evt){if(this.env.mouseIsOver!==true){return false}evt.stopPropagation();evt.preventDefault();this._debug("Keypress: "+evt.keyCode);this._promote("key",evt.keyCode);switch(evt.keyCode){case 27:this.setFullscreen(false);break;case 13:this.setFullscreen(true);break;case 39:this.setActiveItem("next");break;case 37:this.setActiveItem("previous");break;case 0:this.setPlayPause();break}return false};this._enterFullViewport=function(){if(this.env.inFullscreen===true){return}this.env.scrollTop=$(window).scrollTop();this.env.scrollLeft=$(window).scrollLeft();this.env.playerStyle=this.env.playerDom.attr("style");this.env.bodyOverflow=$("body").css("overflow");$(window).scrollTop(0);$(window).scrollLeft(0);$("body").css("overflow","hidden");this.env.playerDom.css({position:"fixed",display:"block",top:0,left:0,width:"100%",height:"100%",zIndex:99997});this.env.inFullscreen=true};this._exitFullViewport=function(){if(this.env.inFullscreen===false){return}this.env.playerDom.attr("style",this.env.playerStyle);$("body").css("overflow",this.env.bodyOverflow);$(window).scrollTop(this.env.scrollTop);$(window).scrollLeft(this.env.scrollLef);this.env.inFullscreen=false};this._enterIframeFullViewport=function(){if(this.env.inFullscreen===true){return}var win=this.getIframeWindow(),iframe=this.getIframe();if(!win||!iframe){return}this.env.scrollTop=win.scrollTop();this.env.scrollLeft=win.scrollLeft();this.env.playerStyle=iframe.attr("style");this.env.iframeWidth=iframe.attr("width");this.env.iframeHeight=iframe.attr("height");this.env.bodyOverflow=$(win[0].document.body).css("overflow");win.scrollTop(0);win.scrollLeft(0);$(win[0].document.body).css("overflow","hidden");iframe.css({position:"fixed",display:"block",top:0,left:0,width:"100%",height:"100%",zIndex:9999});this.env.inFullscreen=true};this._exitIframeFullViewport=function(){if(this.env.inFullscreen===false){return}var win=this.getIframeWindow();var iframe=this.getIframe();if(!win||!iframe){return}win.scrollTop(this.env.scrollTop);win.scrollLeft(this.env.scrollLef);$(win[0].document.body).css("overflow",this.env.bodyOverflow);iframe.attr("width",this.env.iframeWidth+"px");iframe.attr("height",this.env.iframeHeight+"px");iframe.attr("style",(this.env.playerStyle==undefined)?"":this.env.playerStyle);this.env.inFullscreen=false};this.getItemConfig=function(name,itemIdx){return this.getConfig(name,itemIdx)};this.getConfig=function(name,itemIdx){var idx=itemIdx||this._currentItem,result=undefined,playerCfg=(this.config["_"+name])?this.config["_"+name]:this.config[name];if(playerCfg!==undefined){result=playerCfg;if($.inArray(name,this._persCfg)>-1){if(this._cookie(name)!==null){result=this._cookie(name)}}if(this.config["_"+name]==undefined){try{if(this.media[idx]["config"][name]!==undefined){result=this.media[idx]["config"][name]}}catch(e){}}}else{if(name.indexOf("plugin_")>-1){try{if(this.media[idx]["config"][name]){result=this.media[idx]["config"][name]}}catch(e){}}}return result};this.getItemCount=function(){return this.media.length};this.getDC=function(){return this.env.playerDom};this.getState=function(){try{return this.playerModel.getState()}catch(e){return"IDLE"}};this.getLoadProgress=function(){try{return this.playerModel.getLoadProgress()}catch(e){return 0}};this.getKbPerSec=function(){try{return this.playerModel.getKbPerSec()}catch(e){return 0}};this.getItemId=function(idx){if(idx==undefined){return this.media[this._currentItem].ID}return this.media[idx].ID};this.getItemIdx=function(){return this._currentItem};this.getItem=function(){arg=arguments[0]||"current";switch(arg){case"next":return $.extend(true,[],this.media[this._currentItem+1]);case"prev":return $.extend(true,[],this.media[this._currentItem-1]);case"current":return $.extend(true,[],this.media[this._currentItem]);case"*":return $.extend(true,[],this.media);default:return $.extend(true,[],this.media[arg])}};this.getVolume=function(){return(this.getConfig("fixedVolume")===true)?this.config.volume:this.getConfig("volume")};this.getTrackId=function(){if(this.getConfig("trackId")){return this.config.trackId}if(this._playlistServer!=null){return"pl"+this._currentItem}return null};this.getLoadPlaybackProgress=function(){try{return this.playerModel.getLoadPlaybackProgress()}catch(e){return 0}};this.getDuration=function(){try{return this.playerModel.getDuration()}catch(e){return 0}};this.getPosition=function(){try{return this.playerModel.getPosition()||0}catch(e){return 0}};this.getTimeLeft=function(){try{return this.playerModel.getDuration()-this.playerModel.getPosition()}catch(e){return this.media[this._currentItem].duration}};this.getInFullscreen=function(){return this.env.inFullscreen};this.getMediaContainer=function(){if(this.env.mediaContainer==null){this.env.mediaContainer=$("#"+this.getMediaId())}if(this.env.mediaContainer.length==0){if(this.env.playerDom.find("."+this.config._cssClassPrefix+"display").length>0){this.env.mediaContainer=$(document.createElement("div")).attr({id:this.getId()+"_media"}).css({overflow:"hidden",height:"100%",width:"100%",top:0,left:0,padding:0,margin:0,display:"block"}).appendTo(this.env.playerDom.find("."+this.config._cssClassPrefix+"display"))}else{this.env.mediaContainer=$(document.createElement("div")).attr({id:this.getMediaId()}).css({width:"1px",height:"1px"}).appendTo($(document.body))}}return this.env.mediaContainer};this.getMediaId=function(){return this.getId()+"_media"};this.getMediaType=function(){return this.media[this._currentItem].mediaType};this.getUsesFlash=function(){return(this.playerModel.requiresFlash!==false)};this.getModel=function(){try{return this.media[this._currentItem].mediaModel}catch(e){return"NA"}};this.getIframeWindow=function(){try{return $(parent.window)}catch(e){return false}};this.getIframe=function(){try{return window.$(frameElement)}catch(e){return false}};this.getPlaylist=function(){return this.getItem("*")};this.getFlashVersion=function(){try{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{axo.AllowScriptAccess="always"}catch(e){return"6,0,0"}}catch(e){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}}catch(e){}}return"0,0,0".match(/\d+/g)[0]};this.getCanPlayNatively=function(type){var checkFor=[];if(this._compTableCache==false){this._compTableCache=this._testMediaSupport()}switch(typeof type){case"undefined":if(this._compTableCache.media.length>0){return true}case"string":checkFor.push(type);break;case"array":checkFor=type;break}for(var i in checkFor){if($.inArray(checkFor[i],this._compTableCache.all)>-1){return true}}return false};this.getId=function(){return this._id};this.getHasGUI=function(){try{return this.playerModel.getHasGUI()}catch(e){return false}};this.getCssPrefix=function(){return this.config._cssClassPrefix};this.getPlayerDimensions=function(){return{width:this.config._width,height:this.config._height}};this.getMediaDimensions=function(){return{width:this.config._width,height:this.config._height}};this.getFromUrl=function(url,dest,callback,customParser,dataType){var data=null,ref=this;if(dest==ref&&callback=="_reelUpdate"){this._promote("scheduleLoading",1+this.getItemCount())}this["_jsonp"+callback]=function(data){dest[callback](data)};if(dataType){if($.parseJSON==undefined&&dataType.indexOf("json")>-1){this._raiseError("Projekktor requires jQuery 1.4.2 in order to handle JSON playlists.");return this}dataType=(dataType.indexOf("/")>-1)?dataType.split("/")[1]:dataType}$.ajax({url:url,complete:function(xhr,status){if(dataType==undefined){try{if(xhr.getResponseHeader("Content-Type").indexOf("xml")>-1){dataType="xml"}if(xhr.getResponseHeader("Content-Type").indexOf("json")>-1){dataType="json"}}catch(e){}}switch(dataType){case"xml":if(window.DOMParser){data=new DOMParser();data=data.parseFromString(xhr.responseText,"text/xml")}else{data=new ActiveXObject("Microsoft.XMLDOM");data.async="false";data.loadXML(xhr.responseText)}break;case"json":data=xhr.responseText;if(typeof data=="string"){data=$.parseJSON(data)}break;case"jsonp":break;default:data=xhr.responseText;break}if(dest===ref){try{data=customParser(data,xhr.responseText)}catch(e){}}if(status!="error"&&dataType!="jsonp"){dest[callback](data)}},error:function(data){if(dataType!="jsonp"){dest[callback](false)}},cache:true,dataType:dataType,jsonpCallback:"projekktor('"+this.getId()+"')._jsonp"+callback,jsonp:"callback"});return this};this.setActiveItem=function(mixedData){var newItem=0;var lastItem=this._currentItem;if(this.env.loading===true){return this}if(typeof mixedData=="string"){switch(mixedData){case"previous":if(this.getConfig("disallowSkip")==true&&this.getState()!=="COMPLETED"){return this}newItem=this._currentItem-1;break;case"next":if(this.getConfig("disallowSkip")==true&&this.getState()!=="COMPLETED"){return this}newItem=this._currentItem+1;break;default:case"poster":result=0;break}}else{if(typeof mixedData=="number"){newItem=parseInt(mixedData)}else{newItem=0}}if(newItem!=this._currentItem){if(this.getConfig("disallowSkip")==true&&this.getState()!=="COMPLETED"){return this}this._detachplayerModel()}var ap=false;if(newItem===0&&lastItem==0&&this.config._autoplay===true){ap=true}else{if(this.getItemCount()>1&&newItem!=lastItem&&this.config._continuous===true&&newItem<this.getItemCount()){ap=true}}if(newItem>=this.getItemCount()||newItem<0){ap=this.config._loop;newItem=0}this._currentItem=newItem;var newModel=this.media[this._currentItem].mediaModel.toUpperCase();if(!$p.models[newModel]){newModel="NA";this.media[this._currentItem].mediaModel=newModel;this.media[this._currentItem].errorCode=8}this.playerModel=new playerModel();$.extend(this.playerModel,$p.models[newModel].prototype);this.playerModel._init({media:$.extend(true,{},this.media[this._currentItem]),model:newModel,pp:this,environment:$.extend(true,{},this.env),autoplay:ap});return this};this._enqueue=function(command,params,delay){this._queue.push({command:command,params:params,delay:delay});this._processQueue()};this._clearqueue=function(command,params){if(this._isReady!==true){return}this._queue=[]};this._processQueue=function(){var ref=this,modelReady=false;if(this._processing===true){return}if(this.env.loading===true){return}this._processing=true;(function(){modelReady=false;try{modelReady=ref.playerModel.getIsReady()}catch(e){}if(ref.env.loading!==true&&modelReady){var msg=ref._queue.shift();if(!msg){ref._processing=false;if(ref._isReady===false){ref._promote("ready",true);ref._isReady=true}return}if(typeof msg.command=="string"){if(msg.delay>0){setTimeout(function(){ref.playerModel.applyCommand(msg.command,msg.params)},msg.delay)}else{ref.playerModel.applyCommand(msg.command,msg.params)}}else{msg.command(ref)}arguments.callee();return}setTimeout(arguments.callee,100)})()};this.getIsLastItem=function(){return((this._currentItem==this.media.length-1)&&this.config._loop!==true)};this.getIsFirstItem=function(){return((this._currentItem==0)&&this.config._loop!==true)};this.getIsMobileClient=function(){var uagent=navigator.userAgent.toLowerCase();var mobileAgents=["android","windows ce","blackberry","palm","mobile"];for(var i=0;i<mobileAgents.length;i++){if(uagent.indexOf(mobileAgents[i])>-1){return true}}return false};this.setPlay=function(){this._enqueue("play",false);return this};this.setPause=function(){this._enqueue("pause",false);return this};this.setStop=function(toZero){var ref=this;this._enqueue("stop",false);if(toZero){this._enqueue(function(){ref._currentItem=0;ref.setActiveItem(0)})}return this};this.setPlayPause=function(){if(this.getState()!=="PLAYING"){this.setPlay()}else{this.setPause()}return this};this.setVolume=function(vol,fadeDelay){if(this.getConfig("fixedVolume")==true){return this}var initalVolume=this.getVolume();if(typeof vol=="string"){var dir=vol.substr(0,1);vol=parseFloat(vol.substr(1));vol=(vol>1)?vol/100:vol;if(dir=="+"){vol=this.getVolume()+vol}else{if(dir=="-"){vol=this.getVolume()-vol}else{vol=this.getVolume()}}}if(typeof vol=="number"){vol=(vol>1)?1:vol;vol=(vol<0)?0:vol}else{return this}if(vol>initalVolume&&fadeDelay){if(vol-initalVolume>0.03){for(var i=initalVolume;i<=vol;i=i+0.03){this._enqueue("volume",i,fadeDelay)}this._enqueue("volume",vol,fadeDelay);return this}}else{if(vol<initalVolume&&fadeDelay){if(initalVolume-vol>0.03){for(var i=initalVolume;i>=vol;i=i-0.03){this._enqueue("volume",i,fadeDelay)}this._enqueue("volume",vol,fadeDelay);return this}}}this._enqueue("volume",vol);return this};this.setPlayhead=function(position){if(this.getConfig("disallowSkip")==true){return this}if(typeof position=="string"){var dir=position.substr(0,1);position=parseFloat(position.substr(1));if(dir=="+"){position=this.getPosition()+position}else{if(dir=="-"){position=this.getPosition()-position}else{position=this.getPosition()}}}if(typeof position=="number"){this._enqueue("seek",position)}return this};this.setPlayerPoster=function(url){var ref=this;this._enqueue(function(){ref.setConfig({poster:url},0)});return this};this.setItemConfig=function(){var ref=this,args=arguments;this._enqueue(function(){ref._setConfig(args[0]||null,args[1]||null)});return this};this.setConfig=function(){var ref=this,args=arguments;this._enqueue(function(){ref._setConfig(args[0]||null,args[1]||null)});return this};this._setConfig=function(){if(!arguments.length){return result}var confObj=arguments[0],dest="*",value=false;if(typeof confObj!="object"){return this}if(arguments[1]=="string"||arguments[1]=="number"){dest=arguments[1]}else{dest=this._currentItem}for(var i in confObj){if($.inArray(i,this._persCfg)>-1){this._cookie(i,this._cleanValue(confObj[i]))}if(this.config["_"+i]!=undefined){continue}value=this._cleanValue(confObj[i]);if(dest=="*"){$.each(this.media,function(){if(this.config==undefined){this.config={}}this.config[i]=value});continue}if(this.media[dest]==undefined){return this}if(this.media[dest]["config"]==undefined){this.media[dest]["config"]={}}this.media[dest]["config"][i]=value}return this};this.setFullscreen=function(full){full=(full===undefined)?!this.getInFullscreen():full;if(full==this.getInFullscreen()||!this.config.enableFullscreen||this.getIsMobileClient()){return this}switch(full){case true:if(this.config._iframe===true){this._enterIframeFullViewport()}else{this._enterFullViewport()}break;case false:if(this.config._iframe===true){this._exitIframeFullViewport()}else{this._exitFullViewport()}break}this.playerModel.applyCommand("fullscreen",full);return this};this.setResize=function(){this._modelUpdateListener("resize");return this};this.addListener=function(evt,callback){var ref=this;this._enqueue(function(){ref._addListener(evt,callback)})};this._addListener=function(evt,callback){var listenerObj={event:evt,callback:callback};this.listeners.push(listenerObj);return this};this.removeListener=function(evt,callback){var len=this.listeners.length;for(var i=0;i<len;i++){if(this.listeners[i]==undefined){continue}if(this.listeners[i].event!=evt&&evt!=="*"){continue}if(this.listeners[i].callback!=callback&&callback!==undefined){continue}this.listeners.splice(i,1)}return this};this.setItem=function(){var itemData=arguments[0];var affectedIdx=0;this._clearqueue();if(this.env.loading===true){return this}if(itemData==null){affectedIdx=this._removeItem(arguments[1]);if(affectedIdx===this._currentItem){this.setActiveItem("previous")}}else{affectedIdx=this._addItem(this._prepareMedia({file:itemData,config:itemData.config||{}}),arguments[1],arguments[2]);if(affectedIdx===this._currentItem){this.setActiveItem(this._currentItem)}}return this};this.setFile=function(arg,ext,dataType){var data=arg||{},result={},externalData=ext||false;this._clearqueue();if(this.env.loading===true){return this}if(typeof data=="object"&&data.length==0){return false}this.env.loading=true;this._detachplayerModel();if(typeof data=="object"){if(data.length==0){this._reelUpdate({});return false}this._debug("Applying incoming JS Object",data);this._reelUpdate(data);return this}if(typeof data=="string"){var splt=[];splt[0]=data;if(data.indexOf(this.config._FilePosterSeparator)>-1){splt=data.split(this.config._FilePosterSeparator);data.config={poster:splt[1]}}else{result[0]={};result[0].file=data}if(externalData===false){this._debug("Applying incoming single file:"+result[0]["file"],data);this._reelUpdate(result)}else{this._debug("Loading external data from "+splt[0]+" supposed to be "+dataType);this._playlistServer=splt[0];this.getFromUrl(splt[0],this,"_reelUpdate",this.config._reelParser,dataType)}}return this};this.openUrl=function(cfg){cfg=cfg||{url:"",target:"",pause:false};window.open(cfg.url,cfg.target).focus();if(cfg.pause===true){this.setPause()}return this};this.selfDestruct=function(){var ref=this;this._enqueue(function(){ref._selfDestruct()});return this},this._selfDestruct=function(){var ref=this;$(this).unbind();this.removePlugin();this._removeGUIListeners();this.env.playerDom.replaceWith($(this.env.srcNode).clone());$.each(projekktors,function(idx){try{if(this.getId()==ref.getId()||this.getId()==ref.getId()||this.getParent()==ref.getId()){projekktors.splice(idx,1);return}}catch(e){}});return this};this.reset=function(){var ref=this;this._clearqueue();this._enqueue(function(){ref._reset()});return this},this._reset=function(){var cleanConfig={};$(this).unbind();this.removePlugin();this._removeGUIListeners();this.env.mediaContainer=null;for(var i in this.config){cleanConfig[(i.substr(0,1)=="_")?i.substr(1):i]=this.config[i]}this._init(this.env.playerDom,cleanConfig);return this},this._cookie=function(key,value){if(document.cookie===undefined){return null}if(document.cookie===false){return null}var options={};if(arguments.length>1&&(value===null||typeof value!=="object")){if(value===null){options.expires=-1}if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}return(document.cookie=[encodeURIComponent(this.config._cookieName+"_"+key),"=",options.raw?String(value):encodeURIComponent(String(value)),options.expires?"; expires="+this.config._cookieExpiry.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join(""))}options=value||{};var result,decode=options.raw?function(s){return s}:decodeURIComponent;var returnthis=(result=new RegExp("(?:^|; )"+encodeURIComponent(this.config._cookieName+"_"+key)+"=([^;]*)").exec(document.cookie))?decode(result[1]):null;return(returnthis!=null)?this._cleanValue(returnthis):null};this._testMediaSupport=function(){var nativeElementType="",result={all:[],media:[]};for(var i=0;i<$p.mmap.length;i++){if($.inArray($p.mmap[i]["type"],result.all)>-1){continue}if("all|internal".indexOf($p.mmap[i]["platform"])>-1){result.all.push($p.mmap[i]["type"]);continue}if($p.mmap[i]["fixed"]!==true){if(($p.mmap[i]["type"].indexOf("video")>-1||$p.mmap[i]["type"].indexOf("audio")>-1)){try{nativeElementType=($p.mmap[i]["type"].indexOf("video")>-1)?"video":"audio";var testObject=document.createElement(nativeElementType);if(testObject.canPlayType!=false){switch(testObject.canPlayType($p.mmap[i]["type"])){case"no":case"":break;case"maybe":if($.browser.opera){if($.browser.version.slice(0,2)<11){break}}case"probably":default:result.all.push($p.mmap[i]["type"]);result.media.push($p.mmap[i]["type"])}}}catch(e){}}}}return result};this.randomId=function(length){var chars="abcdefghiklmnopqrstuvwxyz";var result="";for(var i=0;i<length;i++){var rnum=Math.floor(Math.random()*chars.length);result+=chars.substring(rnum,rnum+1)}return result};this.toAbsoluteURL=function(s){var l=location,h,p,f,i;if(s==null||s==""){return""}if(/^\w+:/.test(s)){return s}h=l.protocol+"//"+l.host;if(s.indexOf("/")==0){return h+s}p=l.pathname.replace(/\/[^\/]*$/,"");f=s.match(/\.\.\//g);if(f){s=s.substring(f.length*3);for(i=f.length;i--;){p=p.substring(0,p.lastIndexOf("/"))}}return h+p+"/"+s};this.parseTemplate=function(template,data){if(data===undefined||data.length==0||typeof data!="object"){return template}for(var i in data){template=template.replace(new RegExp("%{"+i+"}","gi"),data[i])}template=template.replace(/%{(.*?)}/gi,"");return template};this._cleanValue=function(value){switch(value){case"false":return false;case"true":return true;case"null":return null;case"undefined":return"";case undefined:return false;default:return(typeof value!="string"&&typeof value!="number"&&typeof value!="boolean")?false:value}};this._getTypeFromFileExtension=function(url){var fileExt="",extRegEx=[],extTypes={},extRegEx=[];for(var i in $p.mmap){extRegEx.push("."+$p.mmap[i].ext);extTypes[$p.mmap[i].ext]=$p.mmap[i]}extRegEx="^.*.("+extRegEx.join("|")+")";try{fileExt=url.match(new RegExp(extRegEx))[1];fileExt=(!fileExt)?"NaN":fileExt.replace(".","")}catch(e){fileExt="NaN"}return extTypes[fileExt].type};this._debug=function(desc,data){if(this.config._debug===false){return}if(this.config._debug=="console"){try{if(desc){console.log(desc)}if(data){console.log(data)}}catch(e){}return}var result="<pre><b>"+desc+"</b>\n";if(data&&this.config.debugLevel>1){switch(typeof data){case"undefined":break;case"object":var temp="";if(temp==""){temp="";for(var i in data){temp+=i+" : "+data[i]+"\n"}}result+=temp;break;case"string":result+=data}result+="</pre>"}try{$("#"+this.config._debug).prepend(result)}catch(e){}};this._raiseError=function(txt){this.env.playerDom.html(txt).css({color:"#fdfdfd",backgroundColor:"#333",lineHeight:this.config.height+"px",textAlign:"center",display:"block"});this._promote("error")};this._readMediaTag=function(domNode){var result={},htmlTag="",attr=[],ref=this;if(domNode[0].tagName.toUpperCase()!="VIDEO"&&domNode[0].tagName.toUpperCase()!="AUDIO"){return false}result={autoplay:(domNode.prop("autoplay")!==undefined&&domNode.prop("autoplay")!==false)?true:false,controls:(domNode.prop("controls")!==undefined&&domNode.prop("controls")!==false)?true:false,loop:(domNode.prop("loop")!==undefined&&domNode.prop("loop")!==false)?true:false,title:(domNode.attr("title")!==undefined&&domNode.attr("title")!==false)?domNode.attr("title"):"",poster:(domNode.attr("poster")!==undefined&&domNode.attr("poster")!==false)?domNode.attr("poster"):"",width:(domNode.attr("width")!==undefined&&domNode.attr("width")!==false)?domNode.attr("width"):false,height:(domNode.attr("height")!==undefined&&domNode.attr("height")!==false)?domNode.attr("height"):false};if($.browser.msie){htmlTag=$($("<div></div>").html($(domNode).clone())).html();attr=["autoplay","controls","loop"];for(var i=0;i<attr.length;i++){if(htmlTag.indexOf(attr[i])==-1){continue}result[attr[i]]=true}}domNode.prop("autoplay",false);result.playlist=[];result.playlist[0]=[];if(srcNode.attr("src")){result.playlist[0].push({src:srcNode.attr("src"),type:srcNode.attr("type")||this._getTypeFromFileExtension(srcNode.attr("src"))})}if($.browser.msie&&$.browser.version<9){var childNode=srcNode;do{childNode=childNode.next("source");if(childNode.attr("src")){result.playlist[0].push({src:childNode.attr("src"),type:childNode.attr("type")||this._getTypeFromFileExtension(childNode.attr("src"))})}}while(childNode.attr("src"))}else{srcNode.children("source").each(function(){if($(this).attr("src")){result.playlist[0].push({src:$(this).attr("src"),type:$(this).attr("type")||ref._getTypeFromFileExtension($(this).attr("src"))})}})}return result};this.cDump=function(){try{JSON.stringify({})}catch(e){return}if($("#debug"+this.getId()).length>0){$("#debug"+this.getId()).remove();return}var result={timestamp:new Date().getTime(),agent:navigator.userAgent.toLowerCase(),dom:$($("<div></div>").html($(this.env.srcNode).clone())).html(),media:this.media,grid:{},config:this.config};var compTable=this._testMediaSupport();for(var i in compTable){result.grid[i]=compTable[i]}var w=$(document.createElement("div")).attr("id","debug"+this.getId()).css({backgroundColor:"#FF0000",color:"#fdfdfd",padding:"5px",width:(this.env.playerDom.width()-10)+"px",zIndex:99999,position:"absolute",top:this.env.playerDom.position().top,left:this.env.playerDom.position().left}).html("<b>"+this.config._messages[1000]+"</b>");var tA=$(document.createElement("textarea")).attr("id","debug"+this.getId()).css({backgroundColor:"#fdfdfd",width:"100%",height:"100px",border:0}).html(JSON.stringify(result)).appendTo(w);$("body").append(w);tA.select()};this._applyDimensions=function(){if(this.config._height!==false&&this.config._width!==false){if(this.config._width<=this.config._minWidth){this.config._width=this.config._minWidth;this.env.autoSize=true}if(this.config._height<=this.config._minHeight){this.config._height=this.config._minHeight;this.env.autoSize=true}}this.env.playerDom.css({overflow:"hidden"});if(this.config._width!==false&&this.config._height!==false){this.env.playerDom.css({width:this.config._width+"px",height:this.config._height+"px"})}};this._init=function(customNode,customCfg){var theNode=customNode||srcNode,theCfg=customCfg||cfg,cfgBySource=this._readMediaTag(theNode);this.env.srcNode=$.extend(true,{},theNode);if(cfgBySource!==false){this.env.playerDom=$(document.createElement("div")).attr({"class":theNode[0].className,style:theNode.attr("style")});theNode.replaceWith(this.env.playerDom)}else{cfgBySource={width:(theNode.attr("width"))?theNode.attr("width"):theNode.width(),height:(theNode.attr("height"))?theNode.attr("height"):theNode.height()};this.env.playerDom=theNode}theCfg=$.extend(true,{},cfgBySource,theCfg);for(var i in theCfg){if(this.config["_"+i]!=undefined){this.config["_"+i]=theCfg[i]}else{this.config[i]=theCfg[i]}}if(this.getIsMobileClient()){this.config._autoplay=false}this._id=theNode[0].id||this.randomId(8);this.env.playerDom.attr("id",this._id);if(this.config._theme){this.getFromUrl(this.parseTemplate(this.config._themeRepo,{id:this.config._theme,ver:this.config._version}),this,"_applyTheme",false,"jsonp")}else{this._start(false)}return this};this._start=function(data){var ref=this,files=[];this._applyDimensions();try{$("#projekktorver").html("V"+this.config._version)}catch(e){}this._registerPlugins();if(this.config._iframe===true){if(this.getIframeWindow()){this.getIframeWindow().ready(function(){ref._enterFullViewport();ref.env.inFullscreen=false})}else{ref._enterFullViewport();ref.env.inFullscreen=false;this.config.disableFullscreen=true}}if(typeof onReady==="function"){this._enqueue(function(){onReady(ref)})}for(var i in this.config._playlist[0]){if(this.config._playlist[0][i].type){if(this.config._playlist[0][i].type.indexOf("/json")>-1||this.config._playlist[0][i].type.indexOf("/xml")>-1){this.setFile(this.config._playlist[0][i].src,true,this.config._playlist[0][i].type);return this}}}this.setFile(this.config._playlist);return this};this._applyTheme=function(data){var ref=this;if(data===false){this._raiseError("The Projekktor theme-set specified could not be loaded.");return false}if(typeof data.version=="string"){if((parseInt(this.config._version.split(".")[0])||0)<(parseInt(data.version.split(".")[0])||0)||(parseInt(this.config._version.split(".")[1])||0)<(parseInt(data.version.split(".")[1])||0)){this._raiseError("You are using Projekktor V"+this.config._version+" but the applied theme requires at least V"+data.version+".");return false}}if(typeof data.config.plugins=="object"){for(var i=0;i<data.config.plugins.length;i++){try{typeof eval("projekktor"+data.config.plugins[i])}catch(e){this._raiseError("The applied theme requires the following Projekktor plugin(s): <b>"+data.config.plugins.join(", ")+"</b>");return false}}}if(typeof data.css=="string"){$("head").append('<style type="text/css">'+this.parseTemplate(data.css,{rp:data.baseURL})+"</style>")}if(typeof data.html=="string"){this.env.playerDom.html(this.parseTemplate(data.html,{p:this.config._cssClassPrefix}))}this.env.playerDom.addClass(data.id);if(typeof data.config=="object"){for(var i in data.config){if(this.config["_"+i]!=undefined){this.config["_"+i]=data.config[i]}else{this.config[i]=data.config[i]}}}if(data.onReady){this._enqueue(function(player){eval(data.onReady)})}return this._start()};return this._init()}};$p.mmap=[];$p.models={};$p.newModel=function(obj,ext){var result=false,extend=($p.models[ext]&&ext!=undefined)?$p.models[ext].prototype:{};if(typeof obj!="object"){return result}if(!obj.modelId){return result}if($p.models[obj.modelId]){return result}$p.models[obj.modelId]=function(){};$p.models[obj.modelId].prototype=$.extend({},extend,obj);for(var i=0;i<obj.iLove.length;i++){obj.iLove[i].model=obj.modelId.toLowerCase();$p.mmap.push(obj.iLove[i])}return true}});var projekktorConfig=function(a){this._version=a};var projekktorPluginInterface=function(){};jQuery(function(a){projekktorPluginInterface.prototype={pluginReady:false,name:"",pp:{},config:{},playerDom:null,canvas:{media:null,projekktor:null},_appliedDOMObj:[],_init:function(b){this.config=a.extend(true,this.config,b);this.initialize()},getConfig:function(b){var c=undefined;if(this.pp.getConfig("plugin_"+this.name)!=undefined){c=this.pp.getConfig("plugin_"+this.name)[b]}if(c==undefined){c=this.pp.getConfig(b)}if(c==undefined){c=(this.config[b]||false)}return c},sendEvent:function(b,c){this.pp._promote({_plugin:this.name,_event:b},c)},deconstruct:function(){this.pluginReady=false;a.each(this._appliedDOMObj,function(){a(this).remove()})},parseTemplate:function(b,c){return this.pp.parseTemplate(b,c)},blockSelection:function(b){if(!b){return}if(a.browser.mozilla){b.css("MozUserSelect","none")}else{if(a.browser.msie){b.bind("selectstart",function(){return false})}else{b.mousedown(function(){return false})}}},applyToPlayer:function(c,d){var e=this.getConfig("cssClassPrefix");if(!c){return null}if(this.playerDom.find("."+e+c.attr("class")).length==0){var b=c.attr("class");c.removeClass(b);c.addClass(e+b);if(d===true){c.prependTo(this.playerDom)}else{c.appendTo(this.playerDom)}this._appliedDOMObj.push(c);return c}var b=c.attr("class");c=this.playerDom.find("."+e+c.attr("class"));c.removeClass(b);c.addClass(e+b);return c}}});var playerModel=function(){};jQuery(function(a){playerModel.prototype={modelId:"player",iLove:[],_currentState:null,_currentBufferState:null,_KbPerSec:0,_bandWidthTimer:null,_isPoster:false,modelReady:true,requiresFlash:false,hasGUI:false,allowRandomSeek:false,flashVerifyMethod:"api_get",elementReady:false,mediaElement:null,pp:{},media:{duration:0,position:0,startOffset:0,file:false,poster:"",ended:false,message:"",error:null,mediaType:"",loadProgress:0,errorCode:0,message:"",type:"NA",volume:0},_init:function(b){this.pp=b.pp||null;this.media=b.media||this.media;this._ap=b.autoplay;this.init()},init:function(b){this.ready()},ready:function(){this.sendUpdate("modelReady");this.displayItem(this._ap)},displayItem:function(b){if(b!==true||this.getState()==="STOPPED"){this._setState("idle");this.applyImage(this.getPoster(),this.pp.getMediaContainer().html(""));this._isPoster=true;this.elementReady=true}else{if(this.hasGUI){this.pp.env.playerDom.children().not(".ppdisplay").addClass("inactive").removeClass("active")}if(this.requiresFlash!==false){if(this.requiresFlash>this.pp.getFlashVersion()){this.setTestcard(6);return}}this.elementReady=false;this._isPoster=false;this.applyMedia(this.pp.getMediaContainer().html("").show())}this.waitTillReady(b)},applyMedia:function(){},sendUpdate:function(b,c){this.pp._modelUpdateListener(b,c)},waitTillReady:function(c){var b=this;(function(){try{if(b.elementReady!==true){setTimeout(arguments.callee,70);return}}catch(d){}if(b.getState()!=="STOPPED"||c===true){try{b.addListeners()}catch(d){}}b.pp._modelUpdateListener("displayReady");if(c===true){if(b.pp.getIsMobileClient()){setTimeout(function(){b.setPlay()},500)}b.setPlay()}})()},addListeners:function(){},removeListeners:function(){try{this.mediaElement.unbind()}catch(b){}},detachMedia:function(){},destroy:function(){this.setPause();this.removeListeners();this.detachMedia();try{a("#"+this.mediaElement.id).empty()}catch(b){}try{a("#"+this.mediaElement.id).remove()}catch(b){}try{this.mediaElement.remove()}catch(b){}this.pp.getMediaContainer().html("");this.mediaElement=null;this.media.loadProgress=0;this.media.playProgress=0;this.media.position=0;this.media.duration=0;this._setState("stopped")},reInit:function(){if(this.requiresFlash===false||!(a.browser.mozilla)||this.getState()==="ERROR"||this.pp.getConfig("bypassFlashFFFix")===true){return}this.sendUpdate("FFreinit");this.removeListeners();this.displayItem((this.getState()!=="IDLE"))},applyCommand:function(c,b){switch(c){case"play":if(this.getState()==="IDLE"){this._setState("awakening");this.displayItem(true);break}this.setPlay();break;case"pause":this.setPause();break;case"volume":if(!this.setVolume(b)){this.sendUpdate("volume",b)}break;case"stop":this.setStop();break;case"seek":if(this.media.loadProgress==-1){break}this.setSeek(b);break;case"fullscreen":this.sendUpdate("fullscreen",b);this.setFullscreen(b);this.reInit();break;case"resize":this.setResize();this.sendUpdate("resize",b);break}},setSeek:function(b){},setPlay:function(){},setPause:function(){},setStop:function(){this.detachMedia();this.destroy();this.displayItem(false)},setVolume:function(b){},setFullscreen:function(b){},setResize:function(){},getVolume:function(){var b=this.mediaElement.prop("muted");return(b==true)?0:this.mediaElement.prop("volume")},getLoadProgress:function(){return this.media.loadProgress||0},getLoadPlaybackProgress:function(){return this.media.playProgress||0},getPosition:function(){return this.media.position||0},getDuration:function(){return this.media.duration||0},getInFullscreen:function(){return this.pp.getInFullscreen()},getKbPerSec:function(){return this._KbPerSec},getState:function(){return(this._currentState==null)?"IDLE":this._currentState},getFile:function(){return this.media.file||null},getModelName:function(){return this.modelId||null},getHasGUI:function(){return(this.hasGUI&&!this._isPoster)},getIsReady:function(){return this.elementReady},getPoster:function(){return this.pp.getConfig("poster")},timeListener:function(e){if(e==undefined){return}var d=(e.position!=undefined)?e.position:e.currentTime,c=e.duration,b=(d>0&&c>0)?d*100/c:0;this.media.duration=this._roundNumber(c,2);this.media.position=this._roundNumber(d,2);this.media.playProgress=b;this.sendUpdate("time",this.media.position);this.loadProgressUpdate()},loadProgressUpdate:function(){try{var d=this.mediaElement[0];if(typeof d.buffered!=="object"){return}if(typeof d.buffered.length<=0){return}var b=Math.round(d.buffered.end(d.buffered.length-1)*100)/100,c=b*100/this.media.duration;if(c==this.media.loadProgress){return}this.media.loadProgress=(this.allowRandomSeek===true)?100:-1;this.media.loadProgress=(this.media.loadProgress<100||this.media.loadProgress==undefined)?c:100;this.sendUpdate("progress",this.media.loadProgress)}catch(f){}},progressListener:function(c,h){try{if(typeof this.mediaElement[0].buffered=="object"){if(this.mediaElement[0].buffered.length>0){this.mediaElement.unbind("progress");return}}}catch(g){}if(this._bandWidthTimer==null){this._bandWidthTimer=(new Date()).getTime()}var f=0,d=0;if(!isNaN(c.loaded/c.total)){f=c.loaded;d=c.total}else{if(c.originalEvent&&!isNaN(c.originalEvent.loaded/c.originalEvent.total)){f=c.originalEvent.loaded;d=c.originalEvent.total}else{if(h&&!isNaN(h.loaded/h.total)){f=h.loaded;d=h.total}}}var b=(f>0&&d>0)?f*100/d:0;if(Math.round(b)>Math.round(this.media.loadProgress)){this._KbPerSec=((f/1024)/(((new Date()).getTime()-this._bandWidthTimer)/1000))}b=(this.media.loadProgress!==100)?b:100;b=(this.allowRandomSeek===true)?100:b;if(this.media.loadProgress!=b){this.media.loadProgress=b;this.sendUpdate("progress",b)}if(this.media.loadProgress>=100&&this.allowRandomSeek==false){this._setBufferState("full")}},endedListener:function(b){if(this.mediaElement===null){return}this._setState("completed")},waitingListener:function(b){this._setBufferState("empty")},canplayListener:function(b){this._setBufferState("full")},canplaythroughListener:function(b){this._setBufferState("full")},suspendListener:function(b){this._setBufferState("full")},playingListener:function(b){this._setState("playing")},startListener:function(b){this.applyCommand("volume",this.pp.getConfig("volume"));this._setState("playing")},pauseListener:function(b){this._setState("paused")},volumeListener:function(b){this.sendUpdate("volume",this.getVolume())},flashReadyListener:function(){this.elementReady=true},errorListener:function(b,d){try{switch(b.target.error.code){case b.target.error.MEDIA_ERR_ABORTED:this.setTestcard(1);break;case b.target.error.MEDIA_ERR_NETWORK:this.setTestcard(2);break;case b.target.error.MEDIA_ERR_DECODE:this.setTestcard(3);break;case b.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:this.setTestcard(4);break;default:this.setTestcard(5);break}}catch(c){}},metaDataListener:function(c){try{this.videoWidth=c.videoWidth;this.videoHeight=c.videoHeight}catch(b){}this._scaleVideo()},setTestcard:function(f,b){var e=this.pp.getMediaContainer(),d=this.pp.getConfig("messages"),c=(d[f]!=undefined)?d[f]:d[0];c=(b!=undefined&&b!="")?b:c;if(this.pp.getItemCount()>1){c+=d[99]}if(c.length<3){c="ERROR"}if(f==100){c=""}c=this.pp.parseTemplate(c,a.extend({},this.media.fileConfig,{flashver:this.requiresFlash}));e.css({width:"100%",height:"100%"}).html("");this.mediaElement=a(document.createElement("div")).addClass("pptestcard").attr("id",this.pp.getId()+"_testcard_media").appendTo(e);if(c.length>0){a(document.createElement("p")).appendTo(this.mediaElement).html(c)}this._setState("error")},applyImage:function(e,c){var g=a(document.createElement("img")).hide(),f=this;if(e==""||e==undefined){g=a(document.createElement("span")).attr({id:this.pp.getMediaId()+"_image"}).appendTo(c);return g}g.appendTo(c).attr({id:this.pp.getMediaId()+"_image",src:e}).css({position:"absolute"});g.error(function(h){a(this).remove()});var b=function(h){h.realWidth=h.prop("width");h.realHeight=h.prop("height");h.width=function(){return h.realWidth};h.height=function(){return h.realHeight}};if(a.browser.msie){(function(){try{if(g[0].complete==true){g.show();b(g);f.stretch(f.pp.getConfig("imageScaling"),g,c.width(),c.height());return}setTimeout(arguments.callee,100)}catch(h){setTimeout(arguments.callee,100)}})()}else{g.load(function(h){a(this).show();b(g);f.stretch(f.pp.getConfig("imageScaling"),a(this),c.width(),c.height())})}var d=function(i,h){if(h.is(":visible")===false){f.pp.removeListener("fullscreen",arguments.callee)}f.stretch(f.pp.getConfig("imageScaling"),i,h.width(),h.height())};this.pp.addListener("fullscreen",function(){d(g,c)});this.pp.addListener("resize",function(){d(g,c)});return g},stretch:function(b,d,m,k,f,h){if(d==undefined||d==null){return false}if(d._originalDimensions===undefined){d._originalDimensions={};d._originalDimensions={width:d.width(),height:d.height()}}var g=(f!==undefined)?f:d._originalDimensions.width;var c=(h!==undefined)?h:d._originalDimensions.height;var i=(m/g);var l=(k/c);var e=m;var j=k;switch(b){case"fill":if(i>l){e=g*i;j=c*i}else{if(i<l){e=g*l;j=c*l}}break;case"aspectratio":default:if(i>l){e=g*l;j=c*l}else{if(i<l){e=g*i;j=c*i}}break}m=this._roundNumber((e/m)*100,0);k=this._roundNumber((j/k)*100,0);if(m==0||k==0){return false}d.css({margin:0,padding:0,width:m+"%",height:k+"%",left:(100-m)/2+"%",top:(100-k)/2+"%"});if(d._originalDimensions.width!=d.width()||d._originalDimensions.height!=d.height()){return true}return false},toAttributeString:function(c){var d="";for(var b in c){if(b.toUpperCase()==="FLASHVARS"){continue}if(typeof c[b]!="function"){d+=b+'="'+c[b]+'" '}}return d},toFlashvarsString:function(d){var f="";var e="";for(var c in d){if(typeof d[c]!="function"){e=d[c];for(var b in this.media){if(typeof e!="string"){continue}e=e.replace("{"+b+"}",this.media[b])}f+=c+"="+encodeURIComponent(e)+"&"}}return f.replace(/&$/,"")},createFlash:function(h,b){var f=(h.FlashVars===null)?this.pp.getConfig("flashVars"):h.FlashVars;var e="",d="",c="",g="";if(f){f=this.toFlashvarsString(f);if(f.length>0){h.src+="?"+f}}if(a.browser.msie){g=' id="'+h.id+'" '}var d="<object"+g+' codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"  name="'+h.name+'" width="'+h.width+'" height="'+h.height+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">';d+='<param name="movie" value="'+h.src+'"></param>';d+='<param name="allowScriptAccess" value="'+h.allowScriptAccess+'"></param>';d+='<param name="allowFullScreen" value="'+h.allowFullScreen+'"></param>';d+='<param name="wmode" value="'+h.wmode+'"></param>';var c="<embed "+this.toAttributeString(h)+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>';e=d+c;e+="</object>";if(a.browser.mozilla){e=c}b[0].innerHTML=e;this.mediaElement=a("#"+h.id)[0];this._waitforPlayer()},_waitforPlayer:function(){if(this.elementReady==true){return}var b=this;this._setBufferState("empty");(function(){try{if(b.mediaElement==undefined){setTimeout(arguments.callee,100)}else{if(b.mediaElement[b.flashVerifyMethod]==undefined){setTimeout(arguments.callee,100)}else{b._setBufferState("full");b.flashReadyListener()}}}catch(c){setTimeout(arguments.callee,100)}})()},_roundNumber:function(b,c){if(b<=0||isNaN(b)){return 0}return Math.round(b*Math.pow(10,c))/Math.pow(10,c)},_setState:function(b){if(this._currentState!=b){this._currentState=b.toUpperCase();this.sendUpdate("state",this._currentState)}},_setBufferState:function(b){if(this._currentBufferState!=b){this._currentBufferState=b.toUpperCase();this.sendUpdate("buffer",this._currentBufferState)}},_scaleVideo:function(h){var d=this.pp.getMediaContainer();if(this.pp.getIsMobileClient()){return}try{var f=d.width(),i=d.height(),b=this.videoWidth,c=this.videoHeight;if(this.stretch(this.pp.getConfig("videoScaling"),this.mediaElement,f,i,b,c)){this.sendUpdate("scaled",{realWidth:b,realHeight:c,displayWidth:f,displayHeight:i})}}catch(g){}}}});jQuery(function(a){$p.newModel({modelId:"NA",iLove:[{ext:"NaN",type:"none/none",platform:"all"}],hasGUI:true,applyMedia:function(b){if(this.pp.getConfig("enableTestcard")&&!this.pp.getIsMobileClient()){this.setTestcard((this.media.file!==""&&this.media.errorCode===7)?5:this.media.errorCode);this.elementReady=true}else{this.elementReady=true;this.applyCommand("stop");window.location.href=this.media.file}},setPlay:function(){this.sendUpdate("start")},setPause:function(){if(this._hasEnded==false){this._hasEnded=true;this.sendUpdate("ended")}}})});jQuery(function(a){$p.newModel({modelId:"PLAYLIST",iLove:[{ext:"json",type:"text/json",platform:"internal"},{ext:"jsonp",type:"text/jsonp",platform:"internal"},{ext:"xml",type:"text/xml",platform:"internal"},{ext:"json",type:"application/json",platform:"internal"},{ext:"jsonp",type:"application/jsonp",platform:"internal"},{ext:"xml",type:"application/xml",platform:"internal"}],applyMedia:function(b){this.elementReady=true},setPlay:function(){this.sendUpdate("playlist",this.media.file)}})});jQuery(function(a){$p.newModel({modelId:"VIDEOFLASH",iLove:[{ext:"flv",type:"video/x-flv",platform:"flash",fixed:true},{ext:"flv",type:"video/flv",platform:"flash",fixed:true},{ext:"mp4",type:"video/mp4",platform:"flash",fixed:"maybe"},{ext:"mov",type:"video/quicktime",platform:"flash"},{ext:"m4v",type:"video/mp4",platform:"flash",fixed:"maybe"}],requiresFlash:9,allowRandomSeek:false,flashVerifyMethod:"api_get",_jarisVolume:0,applyMedia:function(b){var c={id:this.pp.getMediaId()+"_flash",name:this.pp.getMediaId()+"_flash",src:this.pp.getConfig("playerFlashMP4"),width:"100%",height:"100%",allowScriptAccess:"always",allowFullScreen:"true",allowNetworking:"all",wmode:"transparent",bgcolor:"#000000",FlashVars:{source:this.media.file,type:"video",streamtype:this.pp.getConfig("flashStreamType"),server:(this.pp.getConfig("flashStreamType")=="rtmp")?this.pp.getConfig("flashRTMPServer"):"",autostart:"false",hardwarescaling:"true",controls:"false",jsapi:"true"}};switch(this.pp.getConfig("flashStreamType")){case"rtmp":case"http":this.allowRandomSeek=true;this.media.loadProgress=100;break}this.createFlash(c,b)},addListeners:function(){this.mediaElement.api_addlistener("onprogress","projekktor('"+this.pp.getId()+"').playerModel.progressListener");this.mediaElement.api_addlistener("ontimeupdate","projekktor('"+this.pp.getId()+"').playerModel.timeListener");if(this.getModelName().indexOf("VIDEO")>-1){this.mediaElement.api_addlistener("ondatainitialized","projekktor('"+this.pp.getId()+"').playerModel.metaDataListener")}if(this.getModelName().indexOf("AUDIO")>-1){this.mediaElement.api_addlistener("onconnectionsuccess","projekktor('"+this.pp.getId()+"').playerModel.startListener")}this.mediaElement.api_addlistener("onplaypause","projekktor('"+this.pp.getId()+"').playerModel._playpauseListener");this.mediaElement.api_addlistener("onplaybackfinished","projekktor('"+this.pp.getId()+"').playerModel.endedListener");this.mediaElement.api_addlistener("onmute","projekktor('"+this.pp.getId()+"').playerModel.volumeListener");this.mediaElement.api_addlistener("onvolumechange","projekktor('"+this.pp.getId()+"').playerModel.volumeListener");this.mediaElement.api_addlistener("onbuffering","projekktor('"+this.pp.getId()+"').playerModel.waitingListener");this.mediaElement.api_addlistener("onnotbuffering","projekktor('"+this.pp.getId()+"').playerModel.canplayListener");this.mediaElement.api_addlistener("onconnectionfailed","projekktor('"+this.pp.getId()+"').playerModel.errorListener")},removeListeners:function(){try{this.mediaElement.api_removelistener("*")}catch(b){}},_playpauseListener:function(b){if(b.isplaying){this.playingListener()}else{this.pauseListener()}},metaDataListener:function(c){this.startListener(c);try{this.videoWidth=c.width;this.videoHeight=c.height;this.sendUpdate("scaled",{width:this.videoWidth,height:this.videoHeight})}catch(b){}},setSeek:function(c){try{this.mediaElement.api_seek(c)}catch(b){}},setVolume:function(b){try{this.mediaElement.api_volume(b)}catch(c){return false}return true},setPause:function(b){try{this.mediaElement.api_pause()}catch(c){}},setPlay:function(b){try{this.mediaElement.api_play()}catch(c){}},getVolume:function(){return this._jarisVolume},errorListener:function(b){this.setTestcard(4)},volumeListener:function(b){if(this._jarisVolume!=b.volume){this._jarisVolume=b.volume;this.sendUpdate("volume",b.volume)}},detachMedia:function(){try{a(this.mediaElement).remove()}catch(b){}}});$p.newModel({modelId:"AUDIOFLASH",iLove:[{ext:"mp3",type:"audio/mp3",platform:"flash"},{ext:"m4a",type:"audio/mp4",platform:"flash"}],applyMedia:function(b){this.imageElement=this.applyImage(this.pp.getConfig("cover")||this.pp.getConfig("poster"),b);var c=a("#"+this.pp.getMediaId()+"_flash_container");if(c.length==0){c=a(document.createElement("div")).css({width:"1px",height:"1px"}).attr("id",this.pp.getMediaId()+"_flash_container").appendTo(a(document.body))}var d={id:this.pp.getMediaId()+"_flash",name:this.pp.getMediaId()+"_flash",src:this.pp.getConfig("playerFlashMP3"),width:"1px",height:"1px",allowScriptAccess:"always",allowFullScreen:"true",allowNetworking:"all",wmode:"transparent",bgcolor:"#000000",FlashVars:{source:this.media.file,type:"audio",streamtype:this.pp.getConfig("flashStreamType"),server:(this.pp.getConfig("flashStreamType")=="rtmp")?this.pp.getConfig("flashRTMPServer"):"",autostart:"false",hardwarescaling:"false",controls:"false",jsapi:"true"}};this.createFlash(d,c)}},"VIDEOFLASH")});jQuery(function(a){$p.newModel({modelId:"VIDEO",iLove:[{ext:"ogv",type:"video/ogg",platform:"native"},{ext:"webm",type:"video/webm",platform:"native"},{ext:"ogg",type:"video/ogg",platform:"native"},{ext:"anx",type:"video/ogg",platform:"native"},{ext:"mp4",type:"video/mp4",platform:"native",fixed:"maybe"}],allowRandomSeek:false,videoWidth:0,videoHeight:0,element:"video",init:function(b){if(this.pp.getIsMobileClient()&&this.element=="video"){this.hasGUI=true}this.ready()},applyMedia:function(d){this.elementReady=false;if(this.media.mediaType.indexOf("/ogg")>-1||this.media.mediaType.indexOf("/webm")>-1){this.allowRandomSeek=true}if(this.element=="audio"){this.imageElement=this.applyImage(this.pp.getConfig("cover")||this.pp.getConfig("poster"),d)}var b=(this.element=="video")?d:a("body");b.append(a(document.createElement(this.element)).attr({id:this.pp.getMediaId()+"_html",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi/v//PwNAgAEACQsDAUdpTjcAAAAASUVORK5CYII=",loop:false,autoplay:true,"x-webkit-airplay":"allow"}).prop({controls:(this.hasGUI&&this.element=="video")}).css({width:((this.element=="video")?"100%":"1px"),height:((this.element=="video")?"100%":"1px"),position:"absolute",top:0,left:0}));this.mediaElement=a("#"+this.pp.getMediaId()+"_html");for(var c in this.media._originalConfig){if(this.media._originalConfig[c].src){a(document.createElement("source")).appendTo(this.mediaElement).attr({src:this.media._originalConfig[c].src,type:this.media._originalConfig[c].type})}}this.waitforPlayer()},waitforPlayer:function(){if(this.elementReady==true){return}var d=this,c=a("#"+this.pp.getMediaId()+"_html");try{if(c==undefined){setTimeout(function(){d.waitforPlayer()},200);return}if(c[0].networkState==undefined){setTimeout(function(){d.waitforPlayer()},200);return}this.elementReady=true}catch(b){setTimeout(function(){d.waitforPlayer()},200);return}},addListeners:function(){var b=this;if(this.element=="video"){this.mediaElement.bind("loadedmetadata",function(){b.metaDataListener(this)})}this.mediaElement.bind("pause",function(){b.pauseListener(this)});this.mediaElement.bind("playing",function(){b.startListener(this)});this.mediaElement.bind("play",function(){b.playingListener(this)});this.mediaElement.bind("volumechange",function(){b.volumeListener(this)});this.mediaElement.bind("progress",function(c){b.progressListener(c,this)});this.mediaElement.bind("timeupdate",function(){b.timeListener(this)});this.mediaElement.bind("ended",function(){b.endedListener(this)});this.mediaElement.bind("waiting",function(){b.waitingListener(this)});this.mediaElement.bind("canplaythrough",function(){b.canplayListener(this)});this.mediaElement.bind("canplay",function(){b.canplayListener(this)});this.mediaElement.bind("error",function(c){b.errorListener(c,this)});this.mediaElement.bind("suspend",function(){b.suspendListener(this)})},updatePlayerInfo:function(){if(this.mediaElement==null){return}var b=this,c=this.mediaElement[0];if(this.getState()=="PLAYING"){switch(c.networkState){case c.NETWORK_EMPTY:break;case c.NETWORK_IDLE:break;case c.NETWORK_LOADING:break;case c.NETWORK_NO_SOURCE:this.setTestcard(4);break}}if("PAUSED|ERROR".indexOf(this.getState())==-1){setTimeout(function(){b.updatePlayerInfo()},500)}},detachMedia:function(){try{this.mediaElement[0].pause();a(this.mediaElement[0]).prop("src","");this.mediaElement[0].load()}catch(b){}},setPlay:function(){try{this.mediaElement[0].play()}catch(b){}this.updatePlayerInfo()},setPause:function(){try{this.mediaElement[0].pause()}catch(b){}},setVolume:function(b){try{this.mediaElement.prop("volume",b)}catch(c){}return true},setSeek:function(c){try{this.mediaElement.prop("currentTime",c)}catch(b){}},setFullscreen:function(b){if(this.element=="audio"){return}this._scaleVideo()},setResize:function(){if(this.element=="audio"){return}this._scaleVideo(false)}});$p.newModel({modelId:"AUDIO",iLove:[{ext:"ogg",type:"audio/ogg",platform:"native"},{ext:"oga",type:"audio/ogg",platform:"native"}],imageElement:{},element:"audio"},"VIDEO")});jQuery(function(a){$p.newModel({modelId:"IMAGE",iLove:[{ext:"jpg",type:"image/jpeg",platform:"all"},{ext:"gif",type:"image/gif",platform:"all"},{ext:"png",type:"image/png",platform:"all"}],allowRandomSeek:true,_interval:null,_position:0,_duration:0,applyMedia:function(b){this.mediaElement=this.applyImage(this.media.file,b);this.elementReady=true;this._duration=this.pp.getConfig("duration")},setPlay:function(){var b=this;this._setBufferState("full");this.progressListener(100);this.playingListener();if(this._duration>0){this._interval=setInterval(function(){b._position=b._position+0.5;if(b._position>b._duration){clearInterval(b._interval);b._setState("completed")}b.timeListener({duration:b._duration,position:b._position})},500)}else{b._setState("completed")}},detachMedia:function(){clearInterval(this._interval);this.mediaElement.remove()},setPause:function(){this.pauseListener();clearInterval(this._interval)},setSeek:function(b){if(b<this._duration){this._position=b}}});$p.newModel({modelId:"HTML",iLove:[{ext:"html",type:"text/html",platform:"all"}],applyMedia:function(c){var b=this;this.mediaElement=a(document.createElement("iframe")).attr({id:this.pp.getMediaId()+"_iframe",name:this.pp.getMediaId()+"_iframe",src:this.media.file,scrolling:"no",frameborder:"0",width:"100%",height:"100%"}).css({overflow:"hidden",border:"0px",width:"100%",height:"100%"}).appendTo(c);this.mediaElement.load(function(d){b.success()});this.mediaElement.error(function(d){b.remove()});this._duration=this.pp.getConfig("duration")},success:function(){this.elementReady=true},remove:function(){this.mediaElement.remove();this.elementReady=true}},"IMAGE")});jQuery(function(a){$p.newModel({modelId:"YTVIDEO",iLove:[{ext:"youtube.com",type:"video/youtube",platform:"flash",fixed:true}],modelReady:false,allowRandomSeek:true,useIframeAPI:true,_updateTimer:null,init:function(c){var b=this;this.useIframeAPI=this.pp.getConfig("useYTIframeAPI")||this.pp.getIsMobileClient();if(this.useIframeAPI!==true){this.requiresFlash=8;this.flashVerifyMethod="cueVideoById";this.ready();return}var d=this.pp.getId();if(window.ProjekktorYoutubePlayerAPIReady!==true){a.getScript("http://www.youtube.com/player_api");(function(){try{if(window.ProjekktorYoutubePlayerAPIReady==true){b.ready();return}setTimeout(arguments.callee,50)}catch(f){setTimeout(arguments.callee,50)}})()}else{this.ready()}window.onYouTubePlayerAPIReady=function(){window.ProjekktorYoutubePlayerAPIReady=true}},applyMedia:function(c){this._setBufferState("empty");var b=this;if(this.useIframeAPI===true){this.mediaElement=new YT.Player(this.pp.getId()+"_media",{width:(this.pp.getIsMobileClient())?this.pp.config._width:"100%",height:(this.pp.getIsMobileClient())?this.pp.config._height:"100%",playerVars:{autoplay:0,disablekb:1,start:0,controls:0,enablejsapi:1,wmode:"opaque"},videoId:this.youtubeGetId(),events:{onReady:function(e){b.onReady(e)},onStateChange:function(e){b.stateChange(e)},onError:function(e){b.errorListener(e)}}});a(this.mediaElement.a).prop("ALLOWTRANSPARENCY",true).attr({scrolling:"no",frameborder:0}).css({overflow:"hidden",border:"0px",display:"block"});if(a.browser.mozilla){this.requiresFlash=8}}else{var d={id:this.pp.getId()+"_media_youtube",name:this.pp.getId()+"_media_youtube",src:"http://www.youtube.com/apiplayer",width:"100%",height:"100%",bgcolor:"#000000",allowScriptAccess:"always",wmode:"transparent",FlashVars:{enablejsapi:1,autoplay:1}};this.createFlash(d,c)}},flashReadyListener:function(){this._youtubeResizeFix();this.addListeners();this.mediaElement.cueVideoById(this.youtubeGetId())},flashReinitListener:function(){this._youtubeResizeFix();this.addListeners();if(a.browser.mozilla){this.mediaElement.cueVideoById(this.youtubeGetId());if(this.getState()==="PLAYING"){this.setPlay()}}this.elementReady=true},_youtubeResizeFix:function(){a(this.mediaElement).attr({width:"99.99999%",height:"99.9999%"});this.applyCommand("volume",this.pp.getConfig("volume"))},addListeners:function(){if(this.useIframeAPI===true){return}this.mediaElement.addEventListener("onStateChange","projekktor('"+this.pp.getId()+"').playerModel.stateChange");this.mediaElement.addEventListener("onError","projekktor('"+this.pp.getId()+"').playerModel.errorListener")},setSeek:function(c){try{this.mediaElement.seekTo(c,true)}catch(b){}},setVolume:function(b){try{this.mediaElement.setVolume(b*100)}catch(c){}},setPause:function(b){try{this.mediaElement.pauseVideo()}catch(c){}},setPlay:function(b){try{this.mediaElement.playVideo()}catch(c){}},getVolume:function(){try{return this.mediaElement.getVolume()}catch(b){}return 0},getPoster:function(){return this.media.config["poster"]||this.pp.config.poster||"http://img.youtube.com/vi/"+this.youtubeGetId()+"/0.jpg"},errorListener:function(b){switch((b.data==undefined)?b:b.data){case 100:this.setTestcard(500);break;case 101:case 150:this.setTestcard(501);break;case 2:this.setTestcard(502);break}},stateChange:function(b){clearTimeout(this._updateTimer);if(this.mediaElement===null){return}switch((b.data==undefined)?b:b.data){case -1:this.setPlay();break;case 0:this.endedListener({});break;case 1:this._setBufferState("full");this.playingListener({});this.canplayListener({});this.updateInfo();break;case 2:this.pauseListener({});break;case 3:this.waitingListener({});break;case 5:if(this.useIframeAPI!==true){this.onReady()}break}},onReady:function(){this.setVolume(this.pp.getVolume());this.elementReady=true;if(this.media.title||this.pp.config.title||this.elementReady){return}var b=this;a.ajax({url:"http://gdata.youtube.com/feeds/api/videos/"+this.youtubeGetId()+"?v=2&alt=jsonc",complete:function(f,c){try{data=f.responseText;if(typeof data=="string"){data=a.parseJSON(data)}if(data.data.title){b.sendUpdate("config",{title:data.data.title+" ("+data.data.uploader+")"})}}catch(d){}b.elementReady=true}})},youtubeGetId:function(){return encodeURIComponent(this.media.file.replace(/^[^v]+v.(.{11}).*/,"$1"))},updateInfo:function(){var b=this;clearTimeout(this._updateTimer);(function(){if(b.mediaElement==null){clearTimeout(b._updateTimer);return}try{if(b.getState()!=="IDLE"&&b.getState()!=="COMPLETED"){b.timeListener({position:b.mediaElement.getCurrentTime(),duration:b.mediaElement.getDuration()});b.progressListener({loaded:b.mediaElement.getVideoBytesLoaded(),total:b.mediaElement.getVideoBytesTotal()})}}catch(c){}b._updateTimer=setTimeout(arguments.callee,500)})()}});$p.newModel({modelId:"YTAUDIO",iLove:[{ext:"youtube.com",type:"audio/youtube",platform:"flash",fixed:"maybe"}],applyMedia:function(b){this.imageElement=this.applyImage(this.pp.getConfig("cover")||this.pp.getConfig("poster"),b);this._setBufferState("empty");this.mediaElement=new YT.Player(this.pp.getId()+"_media",{width:"100px",height:"100px",playerVars:{autoplay:10,disablekb:1,start:0,controls:0,enablejsapi:1,playerapiid:this.pp.getId(),origin:location.host},videoId:this.youtubeGetId(),events:{onReady:"onReady"+this.pp.getId(),onStateChange:"onStateChange"+this.pp.getId(),onError:"onError"+this.pp.getId()}})}},"YTVIDEO")});var projekktorControlbar=function(){};jQuery(function(a){projekktorControlbar.prototype={_cTimer:null,_noCHide:false,_cFading:false,_vSliderAct:false,_storeVol:0,_timeTags:{},cb:null,cbFS:null,_pos:{left:0,right:0},controlElements:{},controlElementsConfig:{cb:null,playhead:{on:null,call:null},loaded:{on:"click",call:"scrubberClk"},scrubber:{on:"click",call:"scrubberClk"},play:{on:"click",call:"playClk"},pause:{on:"click",call:"pauseClk"},stop:{on:"click",call:"stopClk"},prev:{on:"click",call:"prevClk"},next:{on:"click",call:"nextClk"},rewind:{on:"click",call:"rewindClk"},forward:{on:"click",call:"forwardClk"},fsexit:{on:"click",call:"exitFullscreenClk"},fsenter:{on:"click",call:"enterFullscreenClk"},vslider:{on:"click",call:"vsliderClk"},vmarker:{on:"click",call:"vsliderClk"},vknob:{on:"mousedown",call:"vknobStartDragListener"},mute:{on:"click",call:"muteClk"},unmute:{on:"click",call:"unmuteClk"},vmax:{on:"click",call:"vmaxClk"},open:{on:"click",call:"openCloseClk"},close:{on:"click",call:"openCloseClk"},loopon:{on:"click",call:"loopClk"},loopoff:{on:"click",call:"loopClk"},draghandle:{on:"mousedown",call:"handleStartDragListener"},controls:{on:null,call:null},title:null,sec_dur:null,min_dur:null,hr_dur:null,sec_elp:null,min_elp:null,hr_elp:null,sec_rem:null,min_rem:null,hr_rem:null},config:{controlsDisableFade:false,controlsTemplate:"<div %{fsexit}></div><div %{fsenter}></div><div %{play}></div><div %{pause}></div><div %{prev}></div><div %{next}></div><div %{title}></div><div %{timeleft}>%{min_dur}:%{sec_dur} | %{min_rem}:%{sec_rem}</div><div %{scrubber}><div %{loaded}></div><div %{playhead}></div></div><div %{vslider}><div %{vmarker}></div><div %{vknob}></div></div><div %{mute}></div><div %{vmax}></div>",controlsTemplateFull:null,toggleMute:false},initialize:function(){var e=this,d=this.playerDom.html(),c=true,f=this.getConfig("cssClassPrefix");for(var b in this.controlElementsConfig){if(d.match(new RegExp(f+b,"gi"))){c=false;break}}if(c){this.cb=this.applyToPlayer(a(document.createElement("div")).addClass("controls"));this.cbFS=this.applyToPlayer(a(document.createElement("div")).addClass("controls").addClass("fullscreen").removeClass("active").addClass("inactive"));if(this.getConfig("controlsDisableFade")!==true){this.cb.addClass("fade");this.cbFS.addClass("fade")}this.applyTemplate(this.cb,this.getConfig("controlsTemplate"));this.applyTemplate(this.cbFS,this.getConfig("controlsTemplateFull")||this.getConfig("controlsTemplate"))}else{this.cb=this.playerDom.find("."+f+"controls:not(.fullscreen)");this.cbFS=this.playerDom.children("."+f+"controls.fullscreen");if(this.cbFS.length==0){this.cbFS=this.cb}}for(var b in this.controlElementsConfig){this.controlElements[b]=a(this.playerDom).find("."+f+b);this.blockSelection(this.controlElements[b])}this.addGuiListeners();this._storeVol=this.getConfig("volume");this.drawUpdateControls();this.hidecb(true);this.pluginReady=true},applyTemplate:function(d,c){var e=this,f=this.getConfig("cssClassPrefix");if(c){var b=c.match(/\%{[a-zA-Z_]*\}/gi);if(b!=null){a.each(b,function(g,h){var i=h.replace(/\%{|}/gi,"");if(h.match(/\_/gi)){c=c.replace(h,'<span class="'+f+i+'"></span>')}else{c=c.replace(h,'class="'+f+i+'"')}})}d.html(c)}},itemHandler:function(b){this.pluginReady=true;this.hidecb(true)},displayReadyHandler:function(b){this.pluginReady=true;this.showcb(true)},drawUpdateControls:function(){var b=this,c=this.pp.getState();clearTimeout(this._cTimer);if(this.pp.getHasGUI()){return}if(this.getConfig("controls")==false){this.hidecb(true);return}var d=(this.pp.getItemCount()<2||this.getConfig("disallowSkip"));if(!d){this.controlElements.prev.removeClass("inactive").addClass("active");this.controlElements.next.removeClass("inactive").addClass("active")}else{this.controlElements.prev.removeClass("active").addClass("inactive");this.controlElements.next.removeClass("active").addClass("inactive")}if(this.pp.getItemIdx()<1){this.controlElements.prev.removeClass("active").addClass("inactive")}if(this.pp.getItemIdx()>=this.pp.getItemCount()-1){this.controlElements.next.removeClass("active").addClass("inactive")}if(this.getConfig("disablePause")){this.controlElements.pause.removeClass("active").addClass("inactive");this.controlElements.play.removeClass("active").addClass("inactive")}else{if(c==="PLAYING"){this.drawPauseButton()}if(c==="PAUSED"){this.drawPlayButton()}if(c==="IDLE"){this.drawPlayButton()}}if(c=="IDLE"){this.controlElements.stop.removeClass("active").addClass("inactive")}else{this.controlElements.stop.removeClass("inactive").addClass("active")}if(c=="IDLE"){this.controlElements.forward.removeClass("active").addClass("inactive");this.controlElements.rewind.removeClass("active").addClass("inactive")}else{this.controlElements.forward.removeClass("inactive").addClass("active");this.controlElements.rewind.removeClass("inactive").addClass("active")}if(this.pp.getInFullscreen()===true){this.drawExitFullscreenButton()}else{this.drawEnterFullscreenButton()}if(!this.getConfig("enableFullscreen")){this.controlElements.fsexit.removeClass("active").addClass("inactive");this.controlElements.fsenter.removeClass("active").addClass("inactive")}if(this.pp.config._loop!=true){this.controlElements.loopoff.removeClass("active").addClass("inactive");this.controlElements.loopon.removeClass("inactive").addClass("active")}else{this.controlElements.loopoff.removeClass("inactive").addClass("active");this.controlElements.loopon.removeClass("active").addClass("inactive")}this.drawTitle(this.getConfig("title"));this.drawUpdateTimeDisplay();this.drawUpdateVolumeDisplay(this.pp.getVolume()||this._storeVol)},stateHandler:function(b){this.drawUpdateControls();if("STOPPED|STARTING|AWAKENING|IDLE".indexOf(b)>-1){this.drawUpdateTimeDisplay(0,0,0);this.drawUpdateProgressDisplay(0);this.hidecb(true)}else{this.drawUpdateProgressDisplay()}},scheduleModifiedHandler:function(){if(this.pp.getState()==="IDLE"){return}this.drawUpdateControls();this.drawUpdateTimeDisplay();this.drawUpdateProgressDisplay()},volumeHandler:function(b){this.drawUpdateVolumeDisplay(b)},progressHandler:function(b){this.drawUpdateProgressDisplay()},timeHandler:function(b){this.drawUpdateTimeDisplay();this.drawUpdateProgressDisplay()},fullscreenHandler:function(d){var b=this,c=this.getConfig("cssClassPrefix");this._noCHide=false;this._cFading=false;this._vSliderAct=false;clearTimeout(this._cTimer);if(!this.getConfig("controls")){return}if(!this.getConfig("enableFullscreen")){return}if(this.pp.getInFullscreen()===true){this.playerDom.children("."+c+"controls:not(.fullscreen)").stop(true,true).removeClass("active").addClass("inactive").css("display","");this.playerDom.children("."+c+"controls.fullscreen").stop(true,true).removeClass("inactive").addClass("active").css("display","")}else{this.playerDom.children("."+c+"controls:not(.fullscreen)").stop(true,true).removeClass("inactive").addClass("active").css("display","");this.playerDom.children("."+c+"controls.fullscreen").stop(true,true).removeClass("active").addClass("inactive").css("display","")}this.drawUpdateControls();if(this.pp.getState()=="IDLE"){this.hidecb(true)}else{this._cTimer=setTimeout(function(){b.hidecb()},2500)}},addGuiListeners:function(){var b=this;a.each(this.controlElementsConfig,function(c,d){if(!d){return}if(d.on!=null){b.controlElements[c][d.on](function(e){b.clickCatcher(e,d.call,b.controlElements[c])})}});this.cbFS.mouseenter(function(c){b.controlsMouseEnterListener(c)});this.cbFS.mouseleave(function(c){b.controlsMouseLeaveListener(c)});this.cb.mouseenter(function(c){b.controlsMouseEnterListener(c)});this.cb.mouseleave(function(c){b.controlsMouseLeaveListener(c)})},clickCatcher:function(b,d,c){if(a.browser.msie){b.cancelBubble=true}else{b.stopPropagation()}if(!c.hasClass("inactive")){this[d](b,c)}return false},drawTitle:function(b){this.controlElements.title.html(b)},hidecb:function(c){var d=this.getConfig("cssClassPrefix"),b=(this.pp.getInFullscreen()===true)?this.cbFS:this.cb;clearTimeout(this._cTimer);if(b==null){return}b.stop(true,true);if(this.pp.getHasGUI()||this.getConfig("controls")==false){b.removeClass("active").addClass("inactive").css("display","");return}if(!b.is(":visible")){return}if(c===true||!b.hasClass("fade")){this._noCHide=false;this._cFading=false;b.removeClass("active").addClass("inactive").css("display","");return}else{if(this._noCHide==true&&this.getConfig("controls")==true){return}}if(this.getConfig("controls")==false){b.removeClass("active").addClass("inactive")}else{b.fadeOut("slow",function(){a(this).removeClass("active").addClass("inactive").css("display","")})}},showcb:function(c){if(this.pp.getHasGUI()||this.getConfig("controls")==false){b.removeClass("active").addClass("inactive").css("display","");return}var d=this,b=(this.pp.getInFullscreen()===true)?this.cbFS:this.cb,e=this.getConfig("cssClassPrefix");clearTimeout(this._cTimer);if(b==null){return}if("IDLE|AWAKENING|ERROR".indexOf(this.pp.getState())>-1){return}b.stop(true,true);if((!b.hasClass("fade")&&c==true)){b.removeClass("inactive").addClass("active").css("display","");return}if(b.is(":visible")||this._cFading==true){b.removeClass("inactive").addClass("active").css("display","");this._cTimer=setTimeout(function(){d.hidecb()},2500);return}this._cFading=true;b.fadeIn("fast",function(){d._cFading=false;a(this).removeClass("inactive").addClass("active").css("display","")})},drawUpdateTimeDisplay:function(f,d,j){if(this.pp.getHasGUI()){return}try{var c=(f!=undefined)?f:this.pp.getLoadPlaybackProgress(),i=(d!=undefined)?d:this.pp.getDuration(),b=(j!=undefined)?j:this.pp.getPosition()}catch(g){var c=f||0,i=d||0,b=j||0}this.controlElements.playhead.css("width",c+"%");var h=a.extend({},this._clockDigits(i,"dur"),this._clockDigits(b,"elp"),this._clockDigits(i-b,"rem"));a.each(this.controlElements,function(e,k){if(h[e]){a.each(k,function(){a(this).html(h[e])})}})},drawUpdateProgressDisplay:function(){this.controlElements.loaded.css("width",this.pp.getLoadProgress()+"%")},drawUpdateVolumeDisplay:function(b){if(this._vSliderAct==true){return}if(b==undefined){return}clearTimeout(this._cTimer);var d=(this.pp.getInFullscreen()===true)?this.cbFS:this.cb,f=d.is(":visible"),e=this,c=(this.controlElements.mute.hasClass("toggle")||this.controlElements.unmute.hasClass("toggle")||this.getConfig("toggleMute"));d.stop(true,true).show();switch(b){case 0:this.controlElements.vknob.css("left",0);break;case 1:this.controlElements.vknob.css("left",(this.controlElements.vslider.width()-(this.controlElements.vknob.width()/2))+"px");break;default:this.controlElements.vknob.css("left",b*(this.controlElements.vslider.width()-(this.controlElements.vknob.width()/2))+"px");break}if(c){if(b){this.controlElements.mute.removeClass("inactive").addClass("active");this.controlElements.unmute.removeClass("active").addClass("inactive")}else{this.controlElements.mute.removeClass("active").addClass("inactive");this.controlElements.unmute.removeClass("inactive").addClass("active");this.controlElements.vmax.removeClass("inactive").addClass("active")}if(b==1){this.controlElements.vmax.removeClass("active").addClass("inactive")}else{this.controlElements.vmax.removeClass("inactive").addClass("active")}}else{this.controlElements.vmax.removeClass("inactive").addClass("active");this.controlElements.unmute.removeClass("inactive").addClass("active");this.controlElements.mute.removeClass("inactive").addClass("active")}this.controlElements.vmarker.css("width",b*100+"%");this._cTimer=setTimeout(function(){e.hidecb()},3500);if(!f){d.hide()}},drawPauseButton:function(b){this.controlElements.pause.removeClass("inactive").addClass("active");this.controlElements.play.removeClass("active").addClass("inactive")},drawPlayButton:function(b){this.controlElements.pause.removeClass("active").addClass("inactive");this.controlElements.play.removeClass("inactive").addClass("active")},drawEnterFullscreenButton:function(b){this.controlElements.fsexit.removeClass("active").addClass("inactive");this.controlElements.fsenter.removeClass("inactive").addClass("active")},drawExitFullscreenButton:function(b){this.controlElements.fsexit.removeClass("inactive").addClass("active");this.controlElements.fsenter.removeClass("active").addClass("inactive")},playClk:function(b){this.pp.setPlay()},pauseClk:function(b){this.pp.setPause()},stopClk:function(b){this.pp.setStop()},controlsMouseEnterListener:function(b){this._noCHide=true},controlsMouseLeaveListener:function(b){this._noCHide=false},controlsClk:function(b){},mousemoveHandler:function(b){this.showcb()},mouseleaveHandler:function(b){var c=this;this._cTimer=setTimeout(function(){c.hidecb()},2500)},prevClk:function(b){this.pp.setActiveItem("previous")},nextClk:function(b){this.pp.setActiveItem("next")},forwardClk:function(b){this.pp.setPlayhead("+10")},rewindClk:function(b){this.pp.setPlayhead("-10")},muteClk:function(b){this._storeVol=(this.pp.getVolume()==0)?this.getConfig("volume"):this.pp.getVolume();this.pp.setVolume(0)},unmuteClk:function(b){if(this._storeVol<=0){this._storeVol=1}this.pp.setVolume(this._storeVol)},vmaxClk:function(b){this.pp.setVolume(1)},enterFullscreenClk:function(b){this.pp.setFullscreen(true)},exitFullscreenClk:function(b){this.pp.setFullscreen(false)},openCloseClk:function(b){var c=this;a(a(b.currentTarget).attr("class").split(/\s+/)).each(function(d,e){if(e.indexOf("toggle")==-1){return}c.playerDom.find("."+e.substring(6)).slideToggle("slow",function(){c.pp.setResize()});c.controlElements.open.toggle();c.controlElements.close.toggle()})},loopClk:function(b){if(a.inArray(this.getConfig("cssClassPrefix")+"loopon",a(b.currentTarget).attr("class").split(/\s+/))>-1){this.pp.config._loop=true}else{this.pp.config._loop=false}this.drawUpdateControls()},startClk:function(b){this.pp.setPlay()},scrubberClk:function(b){var e=0;if(this.getConfig("disallowSkip")==true){return}var g=(this.pp.getInFullscreen()===true)?1:0,d=a(this.controlElements.scrubber[g]).width(),c=a(this.controlElements.loaded[g]).width(),f=b.pageX-a(this.controlElements.scrubber[g]).offset().left;if(f<0||f=="NaN"||f==undefined){e=0}else{if(c!=undefined){if(f>c){f=c-1}e=((f*100/d)*this.pp.getDuration()/100)*1}}this.pp.setPlayhead(e)},vmarkerClk:function(b){vsliderClk(b)},vsliderClk:function(c){if(this._vSliderAct==true){return}var f=(this.pp.getInFullscreen()===true)?1:0,b=a(this.controlElements.vslider[f]),d=b.width(),e=c.pageX-b.offset().left;if(e<0||e=="NaN"||e==undefined){result=0}else{result=(e/d)}this.pp.setVolume(result);this._storeVol=result},vknobStartDragListener:function(b,i){this._vSliderAct=true;var d=this,f=(this.pp.getInFullscreen()===true)?1:0,c=a(i[f]),h=a(this.controlElements.vslider[f]),k=Math.abs(parseInt(c.position().left)-b.clientX),e=0,g=function(l){if(a.browser.msie){l.cancelBubble=true}else{l.stopPropagation()}d.playerDom.unbind("mouseup",g);h.unbind("mousemove",j);h.unbind("mouseup",g);c.unbind("mousemove",j);c.unbind("mouseup",g);d._vSliderAct=false;return false},j=function(l){clearTimeout(d._cTimer);if(a.browser.msie){l.cancelBubble=true}else{l.stopPropagation()}var m=(l.clientX-k);m=(m>h.width()-c.width()/2)?h.width()-(c.width()/2):m;m=(m<0)?0:m;c.css("left",m+"px");e=Math.abs(m/(h.width()-(c.width()/2)));d.pp.setVolume(e);d._storeVol=e;a(d.controlElements.vmarker[f]).css("width",e*100+"%");return false};this.playerDom.mouseup(g);h.mousemove(j);h.mouseup(g);c.mousemove(j);c.mouseup(g)},handleStartDragListener:function(d,g){var h=this;var f=Math.abs(parseInt(this.cb.position().left)-d.clientX);var c=Math.abs(parseInt(this.cb.position().top)-d.clientY);var b=function(i){if(a.browser.msie){i.cancelBubble=true}else{i.stopPropagation()}h.playerDom.unbind("mouseup",b);h.playerDom.unbind("mouseout",b);h.playerDom.unbind("mousemove",e);return false};var e=function(j){if(a.browser.msie){j.cancelBubble=true}else{j.stopPropagation()}clearTimeout(h._cTimer);var k=(j.clientX-f);k=(k>h.playerDom.width()-h.cb.width())?h.playerDom.width()-h.cb.width():k;k=(k<0)?0:k;h.cb.css("left",k+"px");var i=(j.clientY-c);i=(i>h.playerDom.height()-h.cb.height())?h.playerDom.height()-h.cb.height():i;i=(i<0)?0:i;h.cb.css("top",i+"px");return false};this.playerDom.mousemove(e);this.playerDom.mouseup(b)},errorHandler:function(b){this.hidecb(true)},_clockDigits:function(d,i){if(d<0||isNaN(d)||d==undefined){d=0}var f=Math.floor(d/(60*60));var g=d%(60*60);var c=Math.floor(g/60);var b=g%60;var e=Math.floor(b);var h={};h["min_"+i]=(c<10)?"0"+c:c;h["sec_"+i]=(e<10)?"0"+e:e;h["hr_"+i]=(f<10)?"0"+f:f;return h}}});var projekktorDisplay=function(){};jQuery(function(a){projekktorDisplay.prototype={logo:null,logoIsFading:false,display:null,displayClicks:0,buffIcn:null,buffIcnSprite:null,bufferDelayTimer:null,bufferIconDelay:1,config:{onclick:{callback:"setPlayPause",value:null},onclick_playing:{callback:"setPlayPause",value:null},ondblclick:{callback:"setFullscreen",value:null},bufferIconDelay:200,spriteUrl:"",spriteWidth:50,spriteHeight:50,spriteTiles:25,spriteOffset:1,spriteCountUp:false,logoImage:"",logoDelay:0,logoPosition:"tl",onlogoclick:{callback:"",value:{url:"",target:"_blank",pause:true}}},initialize:function(){var c=this;var b={position:"absolute",overflow:"hidden",height:"100%",width:"100%",top:0,left:0,padding:0,margin:0,display:"block"};this.startButton=this.applyToPlayer(a(document.createElement("div")).addClass("start")).addClass("inactive");this.buffIcn=this.applyToPlayer(a(document.createElement("div")).addClass("buffering")).addClass("inactive");if(this.config.spriteUrl!=""){this.buffIcnSprite=a(document.createElement("div")).appendTo(this.buffIcn).css({width:this.config.spriteWidth,height:this.config.spriteHeight,marginLeft:((this.buffIcn.width()-this.config.spriteWidth)/2)+"px",marginTop:((this.buffIcn.height()-this.config.spriteHeight)/2)+"px",backgroundColor:"transparent",backgroundImage:"url("+this.config.spriteUrl+")",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"}).addClass("inactive")}this.display=this.applyToPlayer(a(document.createElement("div")).addClass("display").css(b));this.pp.getMediaContainer();this.logo=this.applyToPlayer(a(document.createElement("img")).addClass("logo").attr("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi/v//PwNAgAEACQsDAUdpTjcAAAAASUVORK5CYII=").css("position","absolute").css(((this.getConfig("logoPosition").indexOf("r")>-1)?"right":"left"),"2%").css(((this.getConfig("logoPosition").indexOf("t")>-1)?"top":"bottom"),"2%"));this.pluginReady=true},displayReadyHandler:function(){var b=this;this.startButton.unbind();this.startButton.click(function(){b.pp.setPlay()})},bufferHandler:function(b){if(b=="EMPTY"){this.showBufferIcon()}else{this.hideBufferIcon()}},stateHandler:function(b){if(b==="IDLE"){this.startButton.addClass("active").removeClass("inactive")}else{this.startButton.addClass("inactive").removeClass("active")}if(b=="AWAKENING"||b=="COMPLETED"||b=="ERROR"){this.hideBufferIcon()}if(b=="ERROR"||b==="STOPPED"){this.logo.addClass("inactive").removeClass("active")}},stoppedHandler:function(){this.hideBufferIcon()},scheduleLoadingHandler:function(){this.startButton.addClass("inactive").removeClass("active");this.showBufferIcon()},scheduledHandler:function(){if(!this.getConfig("autoplay")){this.startButton.addClass("active").removeClass("inactive")}this.hideBufferIcon()},itemHandler:function(){var b=this;this.hideBufferIcon();this.logoIsFading=false;this.logo.stop(true,true).addClass("inactive").removeClass("active").unbind();if(this.getConfig("logoImage")!=false){this.logo.attr("src",this.getConfig("logoImage")).css({cursor:(this.getConfig("logoURL")!="")?"pointer":"normal"}).click(function(){try{b.pp[b.getConfig("onlogoclick").callback](b.getConfig("onlogoclick").value)}catch(c){}return false})}else{this.logo.attr("src","").addClass("inactive").removeClass("active")}},timeHandler:function(){if(this.getConfig("logoImage")==false){return}if(this.pp.getIsMobileClient()){return}var b=this.pp.getPosition(),d=this.pp.getDuration(),c=this;if(!this.logo.is(":visible")&&!this.logoIsFading&&b+this.config.logoDelay<d){if(b>this.config.logoDelay&&d>(this.config.logoDelay*2)){this.logoIsFading=true;this.logo.fadeIn("slow",function(){c.logoIsFading=false;a(this).addClass("active").removeClass("inactive").css("display","")})}}if(this.logo.is(":visible")&&!this.logoIsFading){if(b+this.config.logoDelay>d){this.logoIsFading=true;this.logo.fadeOut("slow",function(){a(this).addClass("inactive").removeClass("active").css("display","");c.logoIsFading=false})}}},leftclickHandler:function(b){var c=this;if(a(b.target).attr("id").indexOf("_media")==-1){return false}if(this.pp.getState()=="ERROR"){this.pp.setActiveItem("next");return false}if(this.pp.getHasGUI()==true){return}this.displayClicks++;if(this.displayClicks>0){setTimeout(function(){if(c.displayClicks==1){if(c.pp.getState()=="PLAYING"){try{c.pp[c.getConfig("onclick_playing").callback](c.getConfig("onclick_playing").value)}catch(d){}}else{try{c.pp[c.getConfig("onclick").callback](c.getConfig("onclick").value)}catch(d){}}}else{if(c.displayClicks==2){try{c.pp[c.getConfig("ondblclick").callback](c.getConfig("ondblclick").value)}catch(d){}}}c.displayClicks=0},250)}},hideBufferIcon:function(){var b=this;clearTimeout(this.bufferDelayTimer);this.buffIcn.stop(true,true);this.buffIcn.fadeOut("fast",function(){a(this).addClass("inactive").removeClass("active").css("display","")})},showBufferIcon:function(b){var c=this;clearTimeout(this.bufferDelayTimer);if(this.pp.getHasGUI()){return}if(this.pp.getModel()==="YTAUDIO"||this.pp.getModel()==="YTVIDEO"){b=true}if(b!=true&&this.config.bufferIconDelay>0){this.bufferDelayTimer=setTimeout(function(){c.showBufferIcon(true)},c.config.bufferIconDelay);return}this.buffIcn.stop(true,true);if(this.buffIcn.hasClass("active")){return}this.buffIcn.fadeIn("fast",function(){if(c.buffIcnSprite==null){return}var d=(c.config.spriteCountUp==true)?0:(c.config.spriteHeight+c.config.spriteOffset)*c.config.spriteTiles;c.buffIcnSprite.addClass("active").removeClass("inactive").css("display","");(function(){if(!c.buffIcn.is(":visible")){return}c.buffIcnSprite.css("backgroundPosition","0px -"+d+"px");if(c.config.spriteCountUp==true){d+=c.config.spriteHeight+c.config.spriteOffset}else{d-=c.config.spriteHeight+c.config.spriteOffset}if(d>=c.config.spriteHeight*c.config.spriteTiles){d=0}setTimeout(arguments.callee,60)})()})}}});projekktorConfig.prototype={_cookieName:"projekktor",_cookieExpiry:356,_plugins:["Display","Controlbar"],_addplugins:[],_reelParser:function(a){return a},_cssClassPrefix:"pp",_platformPriority:["native","flash"],_bypassFlashFFFix:false,_iframe:false,_loop:false,_autoplay:false,_continuous:true,_playlist:[],_theme:false,_themeRepo:"http://repo.projekktorxl.com/api/themes/live/format/jsonp/id/%{id}/version/%{ver}",_messages:{0:"An error occurred.",1:"You aborted the media playback. ",2:"A network error caused the media download to fail part-way. ",3:"The media playback was aborted due to a corruption problem. ",4:"The media (%{src}) could not be loaded because the server or network failed.",5:"Sorry, your browser does not support the media format of the requested file (%{type}).",6:"Your client is in lack of the Flash Plugin V%{flashver} or higher.",7:"No media scheduled.",8:"! Invalid media model configured !",9:"File (%{src}) not found.",97:"No media scheduled.",98:"Invalid or malformed playlist data!",99:"Click display to proceed. ",500:"This Youtube video has been removed or set to private",501:"The Youtube user owning this video disabled embedding.",502:"Invalid Youtube Video-Id specified.",1000:"Copy this text and send it to your webmaster:"},_debug:false,_width:0,_height:0,_minHeight:160,_minWidth:160,ID:0,title:"",poster:false,controls:false,start:false,stop:false,volume:0.5,cover:"",disablePause:false,disallowSkip:false,fixedVolume:false,imageScaling:"aspectratio",videoScaling:"aspectratio",playerFlashMP4:"jarisplayer.swf",playerFlashMP3:"jarisplayer.swf",flashStreamType:"file",flashRTMPServer:"",flashVars:null,useYTIframeAPI:false,enableFlashFallback:true,enableNativePlayback:true,enableKeyboard:true,enableFullscreen:true,enableTestcard:true,duration:0};;
(function($){
  fade_speed = 300;
  waiting_time = 400;

  $(document).ready(function(){
    $('#header .block-menu li.expanded ul').hide();
      
    // Delayed mouseout.
    $('#header .block-menu li.expanded').hover(function(){
      // Stop the timer.
      clearTimeout(this.sfTimer);
           
      $('> a', this).css({'backgroundColor': '#F2F1F0'});
      
      // Display child lists.
      $('> ul', this).fadeIn(fade_speed)
        
      // Immediately hide nephew lists.
      .parent().siblings('li').children('ul').fadeOut(fade_speed);
        
      // Also hide main-topic-title
      $('#main-topic-title').fadeOut(fade_speed);
      clearTimeout(titleTimer);
      
      // Immediately hide other submenus in header
      $('#header .block-menu ul').not($(this).parent()).find('li.expanded ul').hide();
        
      }, function(){
        // Start the timer.
        var uls = $('> ul', this);
        var link = $('> a', this);
        
        titleTimer = setTimeout(function(){
          $('#main-topic-title').fadeIn(fade_speed);
        }, waiting_time);
        
        this.sfTimer = setTimeout(function(){
          uls.fadeOut(fade_speed);
          link.animate({'backgroundColor': '#ffffff'}, fade_speed);
        }, waiting_time);
      }
    );
  });
})(jQuery);;
(function($){
  $(document).ready(function(){   
	  $(".accordion").accordion({ 
	    header: 'h4',
		  active: false,
			collapsible: true, 
			autoHeight: false,
			change: function(event, ui) {        
        $('.accordion-bottom').removeClass('active');
        if(typeof $(ui.newContent).attr('class') != 'undefined')
        {
          $(ui.newContent).parent().find('.accordion-bottom').addClass('active');
        }
			}
		});
		
		$('.accordion-bottom').click(function(){
		  $(this).parent().find('h4').click();
		});
  });
})(jQuery);;
(function($){
  $(document).ready(function(){
    $(window).scroll(function(){
      var window_scroll = parseInt($(this).scrollTop());
      if(window_scroll > 0)
      {
        $('#header').addClass('header-scrolling');
      }
      else
      {
        $('#header').removeClass('header-scrolling');
      }
    });
  });
})(jQuery);;
/** 
 * Content Slider Javascript
 */

(function($){
  $(document).ready(function(){
    //kleine slider initialisieren
    if($('.content-slider-small').html() != null)
    {
      $('.content-slider-small').each(function(){
        if($(this).find('.content-slider-item').size() > 1)
        {
          $(this).scrollable({
            circular: true,
          }).navigator().autoscroll({
            autoplay: true,
            autopause: true,
            interval: 5000,
         }).addClass('scroller-active');
        }
        else
        {
          $(this).find('.content-slider-navigation').hide();
        }
      });
    }
    
    //große slider initialisieren
    if($('.content-slider-large').html() != null)
    {
      $('.content-slider-large').each(function(){
        var items = $(this).find('.content-slider-item img').not('.content-slider-item.cloned img');
        
        $(this).find('.content-slider-info').html($(this).find('.content-slider-item-0 img').attr('alt')).show();
        if($(this).find('.content-slider-item').size() > 1)
        {
          $(this).scrollable({
            circular: true,
            onSeek: function(event, index) {
              // $(this).find('.content-slider-info').html($(this).find('.content-slider-item-'+index+' img').attr('alt'));
              $('.content-slider-large').find('.content-slider-info').html($('.content-slider-large').find('.content-slider-item-'+index+' img').attr('alt'));
            },
          }).navigator().autoscroll({
            autoplay: false,
            autopause: true,
            interval: 5000,
         }).addClass('scroller-active');
        }
        else
        {
          $(this).find('.content-slider-navigation').hide();
        }
      });
    }
  });
})(jQuery);;
(function($){
  $(document).ready(function(){
    //footer relative position geben, für spätere pos-bestimmung
    $('#footer').css('position', 'relative');
    
    //tooltip-div hinzufügen
    $('<div/>').attr('id', 'tooltip').css('display', 'none').appendTo('#footer');
    $('<div/>').attr('id', 'tooltip-head').appendTo('#tooltip');
    $('<div/>').attr('id', 'tooltip-body').appendTo('#tooltip');
    $('<div/>').attr('id', 'tooltip-foot').appendTo('#tooltip');
    
    //hover für tooltip
    $('.tooltip').mouseover(function(){
      var new_left = $(this).position().left + ($(this).width() / 2) + 10;
      $('#tooltip-foot').css('left', new_left);
      $('#tooltip-body').html($(this).html());
      $('#tooltip').show();
      
      $('#tooltip-body').stop().animate({'height': 128}, 150);
    }).mouseout(function(){
      $('#tooltip-body').stop().animate({'height': 0}, 150, function(){
        $('#tooltip').hide();
      });
    });
  });
})(jQuery);;
(function($){
  $(document).ready(function(){
    projekktor('video', {
      /* path to the MP4 Flash-player fallback component */
      playerFlashMP4: scom_theme_url+'/js/projekktor/jarisplayer.swf',
      /* path to the MP3 Flash-player fallback component */
      playerFlashMP3: scom_theme_url+'/js/projekktor/jarisplayer.swf'
    });
  });
})(jQuery);;
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 */

(function(jQuery){

	// We override the animation for all of these color styles
	jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
		jQuery.fx.step[attr] = function(fx){
			if ( fx.state == 0 ) {
				fx.start = getColor( fx.elem, attr );
				fx.end = getRGB( fx.end );
			}

			fx.elem.style[attr] = "rgb(" + [
				Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
				Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
				Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
			].join(",") + ")";
		}
	});

	// Color Conversion functions from highlightFade
	// By Blair Mitchelmore
	// http://jquery.offput.ca/highlightFade/

	// Parse strings looking for color tuples [255,255,255]
	function getRGB(color) {
		var result;

		// Check if we're already dealing with an array of colors
		if ( color && color.constructor == Array && color.length == 3 )
			return color;

		// Look for rgb(num,num,num)
		if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
			return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];

		// Look for rgb(num%,num%,num%)
		if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
			return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];

		// Look for #a0b1c2
		if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
			return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];

		// Look for #fff
		if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
			return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];

		// Otherwise, we're most likely dealing with a named color
		return colors[jQuery.trim(color).toLowerCase()];
	}
	
	function getColor(elem, attr) {
		var color;

		do {
			color = jQuery.curCSS(elem, attr);

			// Keep going until we find an element that has color, or we hit the body
			if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
				break; 

			attr = "backgroundColor";
		} while ( elem = elem.parentNode );

		return getRGB(color);
	};
	
	// Some named colors to work with
	// From Interface by Stefan Petre
	// http://interface.eyecon.ro/

	var colors = {
		aqua:[0,255,255],
		azure:[240,255,255],
		beige:[245,245,220],
		black:[0,0,0],
		blue:[0,0,255],
		brown:[165,42,42],
		cyan:[0,255,255],
		darkblue:[0,0,139],
		darkcyan:[0,139,139],
		darkgrey:[169,169,169],
		darkgreen:[0,100,0],
		darkkhaki:[189,183,107],
		darkmagenta:[139,0,139],
		darkolivegreen:[85,107,47],
		darkorange:[255,140,0],
		darkorchid:[153,50,204],
		darkred:[139,0,0],
		darksalmon:[233,150,122],
		darkviolet:[148,0,211],
		fuchsia:[255,0,255],
		gold:[255,215,0],
		green:[0,128,0],
		indigo:[75,0,130],
		khaki:[240,230,140],
		lightblue:[173,216,230],
		lightcyan:[224,255,255],
		lightgreen:[144,238,144],
		lightgrey:[211,211,211],
		lightpink:[255,182,193],
		lightyellow:[255,255,224],
		lime:[0,255,0],
		magenta:[255,0,255],
		maroon:[128,0,0],
		navy:[0,0,128],
		olive:[128,128,0],
		orange:[255,165,0],
		pink:[255,192,203],
		purple:[128,0,128],
		violet:[128,0,128],
		red:[255,0,0],
		silver:[192,192,192],
		white:[255,255,255],
		yellow:[255,255,0]
	};
	
})(jQuery);
;
(function($){
  $(document).ready(function(){
  
  // kalkulation von position/abstand zum content
  rand_links = ($(window).width() - 960) / 2;
  rand_links = rand_links - 170; 
  
  //höhe ab der, der link angezeigt werden soll
  max_y_scroll = 100;
  scroll_top_speed = 400;

  //link ruhezustand positionieren
  x_pos_px = rand_links; y_pos_px = -400;
  $('a#scroll-top').css({'left': x_pos_px, 'bottom': y_pos_px, 'display': 'block'});
  
  //onscroll-listener hinzufügen
  $(window).scroll(function(){
    if(parseInt($(this).scrollTop()) >= max_y_scroll)
    {
      if(parseInt($('a#scroll-top').css('left')) != rand_links  || parseInt($('a#scroll-top').css('bottom')) != rand_links )
      {
        $('a#scroll-top').stop().animate({
          'left': rand_links,
          'bottom': 80
        }, scroll_top_speed);
      }
    }
    else if(parseInt($('a#scroll-top').css('left')) != x_pos_px || parseInt($('a#scroll-top').css('bottom')) != y_pos_px)
    {
      $('a#scroll-top').stop().animate({
        'left': x_pos_px,
        'bottom': y_pos_px
      }, scroll_top_speed);
    }
  });
  
  //onclick für scroll-top-link
  $('a#scroll-top').click(function(){
     $('html:not(:animated),body:not(:animated)').animate({'scrollTop': 0}, 250);
     return false;
  }).mouseover(function(){
    $(this).find('#scroll-top-text').stop().animate({'top': -12}, 150);
  }).mouseout(function(){
    $(this).find('#scroll-top-text').stop().animate({'top': 30}, 150);
  });
  
  });
})(jQuery);;
(function($){
  var scom_hide_elements = function(dies){
    $(dies).find('.views-row').each(function(index){
      if(index > 1) $(this).hide();
    });
    
    $(dies).find('.main-topic-right-body.less').hide();
    $(dies).find('.main-topic-right-body.more').show();
  };

  $(document).ready(function(){
    if($('.main-topic-right-body').html() != null)
    {  
      //title bei hover, cursor pointer, onclick
      $('.main-topic-right-body').not('.main-topic-right-body.more, .main-topic-right-body.less').each(function(){
        $(this).attr('title', $(this).find('a').html()).addClass('clickable').click(function(){
          location.href = $(this).find('a').attr('href');
          return false;
        });
      });
    
      $('.main-topic-right-content').each(function(){
        if($(this).find('.views-row').size() > 2)
        {
          $(this).find('.main-topic-right-body.more').show().click(function(){
            $(this).parent().find('.views-row, .main-topic-right-body.less').show();
            $(this).hide();
          });
          
          $(this).find('.main-topic-right-body.less').click(function(){
            scom_hide_elements($(this).parent());
          });
          
          scom_hide_elements($(this));
        }
      });
    }
  });
})(jQuery);;
(function($){
  $(document).ready(function(){
    var elements = '.homepage-news-body, .content-slider-item .main-topic-center-body';
    
    $(elements).addClass('clickable').click(function(){
      location.href = $(this).find('a').attr('href');
      return false;
    });
    
    $(elements).each(function(){
      $(this).attr('title', $(this).find('a').attr('title'));
    });
  });
})(jQuery);;
(function($){
  $(document).ready(function(){   

		$('.admin-menu .filefield-source-imce').css({display: 'block'});

  });
})(jQuery);;

