
/******** Load jQuery if not present *********/
if (typeof jQuery === "undefined") {
	var script_tag = document.createElement('script');
	script_tag.setAttribute("type","text/javascript");
	script_tag.setAttribute("src", "http://code.jquery.com/jquery-1.6.2.min.js");
	document.getElementsByTagName("head")[0].appendChild(script_tag);
}           


function $_waitForJQuery(){
  
  /* @ put here all jQuery code @ */
  
  $(document).ready(function(){
    // load Jackpots. refresh every 10 sec.
    JPload();
    var refreshId = setInterval(JPload, 10000);
    function JPload() {
      $("#pjdisplay").load("/include/progjackpots.php?d=" + 1*new Date());
    } 
  });
  
}

function isJQ() {
  if (typeof jQuery !== "undefined") {
    clearTimeout(checkJQ);
    $_waitForJQuery();      
  }
}

function intJQ() {
  checkJQ = setInterval(isJQ, 100);  
}

function bookmarksite(url,title) {
	if (!url) {url = window.location} if (!title) {title = document.title}
	var browser=navigator.userAgent.toLowerCase();
	if (window.sidebar) { // Mozilla, Firefox, Netscape
		window.sidebar.addPanel(title, url,"");
	} else if( window.external) { // IE or chrome
		if (browser.indexOf('chrome')==-1){ // ie
			window.external.AddFavorite( url, title); 
		} else { // chrome
			alert('Please Press CTRL+D (or Command+D for macs) to bookmark this page');}}
	else if(window.opera && window.print) { // Opera - automatically adds to sidebar if rel=sidebar in the tag
		return true;}
	else if (browser.indexOf('konqueror')!=-1) { // Konqueror
		alert('Please press CTRL+B to bookmark this page.');}
	else if (browser.indexOf('webkit')!=-1){ // safari
		alert('Please press CTRL+B (or Command+D for macs) to bookmark this page.');
	} else {
		alert('Your browser cannot add bookmarks using this link. Please add this link manually.')}}	
