/**
 * Class ImageReplacer
 * 
 * This class can register players to start onclick. When the target div of the
 * player is clicked, the default content will be replaced by the player instance
 * 
 * The underscore is used to declare classes, attributes and methods 
 * as private by naming convention.
 * 
 * Created:		2010_03-03	
 * Modified:	2010_03-03
 *
 * @version 0.1
 * @author Jan Völker
 * @copyright ARD.de
 */

/** 
 * Class constructor
 * @access public
 * @param void
 * @return ImageReplacer
 */
var ImageReplacer = function() {
	
};

ImageReplacer.prototype = {
	/** 
	 * Add a player to start on click
	 * @access public
	 * @param Player
	 * @return void
	 */
	addPlayer: function (player) {
		var playerClickId = player.getId();
		
		$j("#" + playerClickId).click(function(event) {
			event.preventDefault();
			$j(this).unbind("click");
			$j(this).empty();
			player.init();
	    });
		return this;
	}
};
