(function() {
	if (typeof delicious == 'undefined') {
		delicious = {};
	}
	var src2 = 'http://badges.del.icio.us/feeds/json/url/data?url=';

	if ( delicious.url ) {
		src2 += delicious.url;
		myURL = delicious.url;
	} else {
		src2 += location.href;
		myURL = location.href;
	}
	src2 += "&amp;callback=displayURL";
	if ( delicious.title ) {
		myTitle = delicious.title;
	} else {
		myTitle =  document.title;
	}
	var myText = '';
	if ( delicious.customText ) {
		myText = delicious.customText;
	}
	if ( delicious.pageId ) {
		myId = 'delicious' + delicious.pageId;
	} else {
		myId = 'deliciousCount';
	}
	var src = 'http://delicious.com/save?v=5&noui&jump=close&url=' + encodeURIComponent(myURL) + "&title=" + encodeURIComponent(myTitle);  ;
	var html = '';
	if (myText == ''){
		html += '<div style="background:#999999;width:55px;height:45px;padding:1px 1px;"><center><span style="font-family:Arial;font-weight:bold;font-size:18px;color:#FFFFFF;" id="' + myId +'">0</span><div style="font-family:Arial;font-size:12px;color:#FFFFFF;">saves</div></center></div>';
		html += '<div style="background:#3333CC;width:55px;padding:1px 1px;"><center><a href="http://delicious.com/save" title="Save on Delicious" onclick="window.open(\'' + src + '\', \'delicious\',\'toolbar=no,width=550,height=550\'); return false;"><span style= "font-family:Arial;font-weight:bold;font-size:12px;color:#FFFFFF;">Delicious</span></a></center></div>'
	} else {
		var link = '<a href="http://delicious.com/save" title="Save on Delicious" onclick="window.open(\'' + src + '\', \'delicious\',\'toolbar=no,width=550,height=550\'); return false;">';
		html += link + '<span id="' + myId +'">0</span></a>&nbsp;' + link + myText +'</a>';
	}

		html += '<script>function displayURL(data) { var urlinfo = data[0]; try{document.getElementById(\'' + myId+ '\').innerHTML = urlinfo.total_posts;} catch(e){}}</script>'
		html += '<script src = "' + src2 +'"></script>';
		document.write(html);
})();

