String.prototype.replaceAll = function(stringToFind,stringToReplace){
	var temp = this;
	var index = temp.indexOf(stringToFind);
    while(index != -1) {
        temp = temp.replace(stringToFind,stringToReplace);
        index = temp.indexOf(stringToFind);
    }

    return temp;
};

function debug(o) {
	var s = '';
	for(var i in o) {
		s+= i+': '+o[i]+"\n";
	}
	return s;
};



(function( $ ) {
	$.fn.hoverAlpha = function(alpha) {
		$(this).find('div.hover').each(function() {
			$(this).css('opacity', alpha);
			$(this).css('filter', 'alpha(opacity='+alpha+')');
		});
	};
	$.fn.cssn = function(attr) {
		var v = jQuery(this).css(attr);
		if(v == 'auto') {
			return 0;
		}
		return parseInt(v.substring(0,v.indexOf("px")));
	};

})( jQuery );


