function vForAll(){
    
	var _$this$_ = this;
    /*link to video*/
    this.url = "";
    this.videoFile = "";
	
    this.flashvars = false;
    this.params = false;
    
    /**************************************************************************/
    /* PARAMETERS */
    
    /*interval after which video is embedded to stage.
     *This is needed because of Lightbox animation.
     *If the value of timeout is smaller than animation time
     *video may be embedded on wrong position, or it won't be 
     *visible. If You experience such a problems than try to 
     *increase this value.
     */
    this.timeout = 1500; // milliseconds;
	this.interval = 0;
    /* END OF PARAMETERS */
    /**************************************************************************/
    

    /***************************************************************************
     * Method for embeding video
     */
    this.embedVideos = function(flashvars, vidSrc, swfUrl){
		this.url = swfUrl;
		this.videoFile = vidSrc.substr( 0, vidSrc.lastIndexOf( "." ) );
		//alert(this.videoFile+'\n'+this.url);
		this.a = setInterval(function(){
            _$this$_.writePlayers();
        }, this.timeout);
	};
	
	this.writePlayers = function(){
		clearInterval(this.a);
		var imageContainer = document.getElementById("imageContainer");
		
		try{
			imageContainer.removeChild(document.getElementById("_vid"));
		}catch(e){};
		var _vid = document.createElement("div");
		_vid.setAttribute("id", "_vid");
		_vid.setAttribute("style", "position:absolute;top:30px;left:0px;width:100%;");
		imageContainer.appendChild(_vid);
		//_vid.onclick = this.close;
		
		_vid.innerHTML = '<video id="_vid_player" width="auto" height="auto" controls autoplay> <source src="' + this.videoFile + '.mp4"  type="video/mp4" /> <source src="' + this.videoFile + '.ogv"  type="video/ogg" /> <object width="640" height="360" type="application/x-shockwave-flash" data="' + this.url + '">	<param name="movie" value="' + this.url + '" /> <param name="flashvars" value="autostart=true&amp;controlbar=over&amp;image=' + this.videoFile + '.jpg&amp;file=' + this.videoFile + '.flv" /> <img src="' + this.videoFile + '.JPG" width="640" height="360" alt="No video playback" title="No video playback capabilities, please download the video below" /> </object></video> <p style="font-size:15px; color:#fff;"><strong>Download Video:</strong> <a href="' + this.videoFile + '.MP4" style="color:#999999;">"MP4"</a> or <a href="' + this.videoFile + '.OGV" style="color:#999999;">"Ogg"</a></p>';
				
    };

    this.close = function(){
		$('overlay').hide();
		document.getElementById('lightbox').hide();
        //document.getElementById('_vid_player').pause();
		document.getElementById('_vid').innerHTML = "";
    };

}

var vlb = new vForAll();

