
typeof defaultRegistry!='undefined'?defaultRegistry.addEntry({fileName:'jquery.s2.flashplayer.js',url:'/ccf/plugins/js/jquery.s2.flashplayer.js',plugins:[{"parameter":["options"],"name":"bindVideoPlayer","alias":"bindVideoPlayer"}]}):true;defaultRegistry.addResource('/ccf/plugins/js/jquery.s2.swfobject.js');defaultRegistry.addResource('/ccf/plugins/js/jquery.s2.tween.js');(function(){function ComDirektVideoPlayer(containerId,options){var ccf_s2_version="$Id: jquery.s2.flashplayer.js 12937 2009-08-18 13:24:48Z giaser $";this.containerId=containerId;containerId_txt=this.containerId.attr('id');this.textlink=$('#startMovie'+options.pos);this.player=$("#player"+options.pos);this.mediaplayerId=options.mediaplayerId;this.mediaplayer=document.getElementById(this.mediaplayerId);this.desc=$("#desc"+options.pos);this.playing=false;this.play=function(){ComDirektVideoPlayers.play(this);};this.stop=function(){ComDirektVideoPlayers.stop();};this.trackVideo=function(value){};this._setupPlayer=function(){options.previewWidth=options.previewWidth||154;options.previewHeight=options.previewHeight||129;options.playerWidth=options.playerWidth||384;options.playerHeight=options.playerHeight||322;this.textlink.bind('click',this,function(e){e.data.play();});this.desc.show();};this._setupPlayer();this._play=function(){var self=this;this.playing=true;this.desc.fadeOut('fast');var tweenWidth=new jQuery.Tween(self.movie(self.mediaplayerId),'width',Tween.strongEaseInOut,options.previewWidth,options.playerWidth,1,'px');var tweenHeight=new jQuery.Tween(self.movie(self.mediaplayerId),'height',Tween.strongEaseInOut,options.previewHeight,options.playerHeight,1,'px');tweenHeight.onMotionFinished=function(){self.movie(self.mediaplayerId).onOpenFinished();};tweenWidth.start();tweenHeight.start();};this._stop=function(){var self=this;if(!this.playing){return;}this.playing=false;this.desc.fadeIn('fast');var tweenWidth=new Tween(this.movie(this.mediaplayerId),'width',Tween.strongEaseInOut,options.playerWidth,options.previewWidth,1,'px');var tweenHeight=new Tween(this.movie(this.mediaplayerId),'height',Tween.strongEaseInOut,options.playerHeight,options.previewHeight,1,'px');tweenHeight.onMotionFinished=function(){self.movie(self.mediaplayerId).onCloseFinished();};tweenWidth.start();tweenHeight.start();};this.movie=function(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName];}else{return document[movieName];}};}function _ComDirektVideoPlayers(){this.jsIsReady=function(){return true;};this.players=[];this.createPlayer=function(containerId,options){var player=new ComDirektVideoPlayer(containerId,options);this.players.push(player);return player;};this.play=function(current){var players=this.players;for(var i=players.length;i>0;--i){(players[i-1]==current)?players[i-1]._play():players[i-1]._stop();}};this.stop=function(){this.play(null);};}ComDirektVideoPlayers=new _ComDirektVideoPlayers();jQuery.fn.bindVideoPlayer=function(options){ComDirektVideoPlayers.createPlayer(this,options);};})(jQuery);
