/**
* Moke Video 
*
* Moke Video is a joomla video component built specificaly for youJoomla templates
* @author: Kemal Kvakic <kkvakic@gmail.com>
*/var my_width=null;var my_height=null;var my_bgcolor=null;var my_videos=new Array();mokeCall=function(){this.defaultWidth=500;this.defaultheight=240;this.defaultBgColor="000000";this.swfPath="FAVideo";};mokeCall.prototype.stopVideo=function(moke_player){moke_player.stop();isPlaying=false;};mokeCall.prototype.seekVideo=function(moke_player,p_seek){moke_player.seek(p_player.getPlayheadTime()+p_seek);};mokeCall.prototype.playVideo=function(moke_player){moke_player.play();};mokeCall.prototype.changeVideo=function(moke_player,p_path){stopVideo(p_player);moke_player.videoPath=p_path;loadVideo("moke_video",p_path);};mokeCall.prototype.loadVideo=function(my_div,my_path){local_width=(this.my_width)?this.my_width:this.defaultWidth;local_height=(this.my_height)?this.my_height:this.defaultheight;local_bgcolor=(this.my_bgcolor)?this.my_bgcolor:this.defaultBgColor;moke_player=new MOKEVideo(my_div,my_path,local_bgcolor,this.swfPath);moke_player.DEFAULT_SWF_PATH=this.swfPath;moke_player.setSize(local_width,local_height);moke_player.setSkinVisible(true);moke_player.setSkinAutoHide(true);moke_player.setAutoPlay(true);};mokeCall.prototype.makeScrollbar=function(content,scrollbar,handle,horizontal,ignoreMouse){alert(content.getScrollSize());var steps=(horizontal?(content.getScrollSize().x-content.getSize().x):(content.getScrollSize().y-content.getSize().y));var slider=new Slider(scrollbar,handle,{steps:steps,mode:(horizontal?"horizontal":"vertical"),onChange:function(step){var x=(horizontal?step:0);var y=(horizontal?0:step);content.scrollTo(x,y);}}).set(0);if(!(ignoreMouse)){$$(content,scrollbar).addEvent("mousewheel",function(e){e=new Event(e).stop();var step=slider.step-e.wheel*50;slider.set(step);});}$(document.body).addEvent("mouseleave",function(){slider.drag.stop();});};mokeCall.prototype.addToList=function(content){this.my_video.push(content);};