// Menu
$(function(){ $(".lavalamp").lavaLamp({fx: "backout", speed: 600, click: function(event, menuItem) {return false;}});});

// Slide
$(document).ready(function(){$(".openAbout").click(function(){$("#about").slideToggle("slow"); $(this).toggleClass("active"); return false;});});

// Lightbox
$(document).ready(function(){$("a.lightbox").lightBox();});


// Target _blank
$(document).ready(function(){$('a[href^="http://"]').attr("target", "_blank");});

// Popup
function popup(page,largeur,hauteur,options) {     

	var top=(screen.height-hauteur)/2;     
	var left=(screen.width-largeur)/2;     
	window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); 
}

// Player
function read(id){

	$('#clip').load("../ajax/read.php?id="+id);
}

function read2(id){

	$('#clip').load("../ajax/read2.php?id="+id);
}

// Visits counter
function visit(id){
	
	$.ajax({
	  type: "GET",
	  url: '../ajax/visit.php',
	  data: "id="+id
	});	
}

// Slide
function view(id){
	
	for(i = 1; i < 4; i++){
		
		if(i != id){
			$("#tab"+i).hide();
			document.getElementById('lien'+i).className = "";
		}
		else {
			$("#tab"+i).show();
			document.getElementById('lien'+i).className = "active";
		}
	}
}

