(function() {

	// default case
	
	if (typeof buzzthis == 'undefined') {
		buzzthis = {};
	}
	var src = 'http://buzzth.is/buzzcount';
	src += '?buttontype=';
	switch(buzzthis.buzzthis_button_type) {
		case 'COMPACT':
			src += 'COMPACT';
			width = 112;
			height = 20;
			break
	    case 'NORMAL':
	    default:
		src += 'NORMAL';
	    	width = 50;
	    	height = 66;
	    	break;  
	}
	src += "&url=";
	if ( buzzthis.buzzthis_url ) {
		src += encodeURI(buzzthis.buzzthis_url);
	} else {
		src += encodeURI(location.href);
	}
	
	src += "&title=";
	if ( buzzthis.buzzthis_title ) {
		src += encodeURI(buzzthis.buzzthis_title);
	} else {
		src += encodeURI(document.title);
	}
	
	if (buzzthis.buzzthis_profile_url) {
		src += "&profileUrl=";
		src += encodeURI(buzzthis.buzzthis_profile_url);
	}
	
	if (buzzthis.buzzthis_profile_name) {
		src += "&profileName=";
		src += encodeURI(buzzthis.buzzthis_profile_name);
	}
	
	
	document.write('<iframe src="' + src + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency="true"></iframe>'); 
})();