//Universalfuksjon som henter  html  asynkront (Ajax, og kaller på CB når ferdig innlastet)
function hentData(bane, type, callBack)
{   	
   
        $.ajax(
        {
            type: "GET",
            url: bane,
            dataType: type,
            success: callBack,
			error:AjaxFailed
        });    
}

jQuery.fn.removeAll = function() {
	this.each(function() {
		var newEl = this.cloneNode(false);
		this.parentNode.replaceChild(newEl, this);

		//Copy back events if they haven't been copied already by IE
		if(jQuery.support.noCloneEvent) {
			cloneCopyEvent($(this), $(newEl));
		}
	});
};

//For testing
function AjaxFailed(result) {
      //alert("FAILED : " + result.status + ' ' + result.statusText);
    }

