public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
		if (is_array($js)) {
			$js=implode("\n\t\t", $js);
		}
		if ($preventDefault===true) {
			$js="event.preventDefault();\n".$js;
		}
		if ($stopPropagation===true) {
			$js="event.stopPropagation();\n".$js;
		}
		if (array_search($event, $this->jquery_events)===false)
			$event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
		else
			$event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
		if($immediatly)
			$this->jquery_code_for_compile[]=$event;
		return $event;
	}