$(document).ready(function() {
	$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'facebook'
		});
	});
	
	$('.showtipinfo').livequery(function(){
        $(this).each(function() {
            $(this).bt({
				  fill: '#F7F7F7', 
				  strokeStyle: '#B7B7B7', 
				  spikeLength: 10, 
				  spikeGirth: 10, 
				  padding: 8, 
				  cornerRadius: 0, 
				  ajaxPath: ["$(this).attr('itemid')"],
				  positions: ['right', 'left'],
				  cssStyles: {
					fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif', 
					fontSize: '11px',
					color: '#000'
				  }
			});
        });
	});
 	
	$('#info').livequery(function(){
        $(this).each(function() {
    		$(this).bt({
				contentSelector: "$(this).attr('text')",
				fill: '#F7F7F7', 
				strokeStyle: '#B7B7B7', 
				spikeLength: 10, 
				spikeGirth: 10, 
				padding: 8, 
				cornerRadius: 0, 
				positions: ['bottom', 'left', 'right'],
				cssStyles: {
				fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif', 
					fontSize: '11px',
					color: '#000'
				  }
				});
			});
		});
	});


function checkses() {
	$.ajax({
		type: 'get',
		url: 'tjekses.php',
		success: function(result) {
			if (result == "1") {
				location.href = "index.php";
			} else if(result == "2") {	
				setTimeout("checkses()", 10000);
			} else if(result == "") {
				setTimeout("checkses()", 5000);
			} else {
				location.href = result;
			}
		}
	});
}
checkses();


function confirm_del() {
	if (confirm ("Sikker på at du ønsker at slette denne?")) {
		return true;
	}else{
		return false;
	} 
}
