var ajaxableTips = Tips.extend(
{
    buildmore: function()
    {
    	// get all toolTipElements that have a title attribute
        var moreelements = $$('.toolTipElement[title]');
        moreelements.each(this.build, this);
    }
});

var contentloadedcssassets=new Array();
var contentloadedjavascriptassets=null;
var pageloadedjavascriptassets=null;
var nassetstoload=0;

function onallassetsloaded()
{
	window.alert("Assets have been loaded");
}

function setassetstoload(n)
{
	nassetstoload=n;
}

function onassetloaded()
{
	nassetstoload--;
	if(nassetstoload==0)
	{
		onallassetsloaded();
	}
}

Asset.extend({
    javascripts: function(sources, options){
		options = $merge({
			onComplete: null
		}, options);
		if (!sources.push) sources = [sources];
		var scripts = [];
		var counter = 0;
		sources.each(function(source){
//window.alert(source+" : " +sources.length);		
			var script = new Asset.javascript(source);
			scripts.push(script);
		});
		return new Elements(scripts);
	}		 
});
