function include_css(file) {
	var v_css  = document.createElement('link');
	v_css.rel = 'stylesheet'
	v_css.type = 'text/css';
	v_css.href = file;
	document.getElementsByTagName('head')[0].appendChild(v_css);
}

include_css('http://litlist.net/widgets/fancybox/jquery.fancybox-1.3.4.css');

var jQueryScriptOutputted = false;
function initJQuery() {
    
    //if the jQuery object isn't available
    if (typeof(jQuery) == 'undefined') {    
    
        if (!jQueryScriptOutputted) {
            //only output the script once..
            jQueryScriptOutputted = true;
            
            //output the script (load it from google api)
            document.write("<scr" + "ipt type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js\"></scr" + "ipt>");
            document.write("<scr" + "ipt type=\"text/javascript\" src=\"http://litlist.net/widgets/fancybox/jquery.fancybox-1.3.4.pack.js\"></scr" + "ipt>");
        }
        setTimeout("initJQuery()", 30);
		
    } else {
		
		$(document).ready(function() {
								   
			// IE caches all ajax requests
			$.ajaxSetup ({
				cache: false
			});			
								   								   			
			var hash = $("#litlist-share-button").attr("class");		
			$("#litlist-share-button").html('<iframe src="http://litlist.net/like/index/'+hash+'" frameborder="0" scrolling="no" height="24" width="115" id="frame_btn"></iframe>');
						
		});
		
		return false;
		
	}
            
}

initJQuery();
