function getPage(page, params){
	params = params || {ajax:true};
	if(lang == 'en'){
		page= translate_url+site_url + page;
	}
	switch (page){
	case '/confirmNewsLetter':
		jQuery.post(page, params);
		$('#dialog').jqmHide();
		$('#response').html('');
	break;
	case '/newsletter': case '/about-Aurasky': case '/mentions-legales': case '/credits': case '/partenaires': case '/contact':
		$("#response").load(page, params, function(){
			$('#dialog').jqm({});
  			$('#dialog').jqmShow();
 		});
	break;
	default:
		 $("#feeds").load(page, params, function(){
	 	});
	break;
	}
}

function rollOver(page){
	$('#menu').attr('class', page+'-over');
}

function rollOut(page){
	$('#menu').attr('class', '');
}

function setToLang(l){
	lang = l;
}

function showVideo(v){
	$('#player_video').html(player_video[v]);
	//document.getElementById("video_player").SetVariable("player:jsUrl", v);
	//document.getElementById("video_player").SetVariable("player:jsPlay", "2");
}
//document.getElementById("myFlash").SetVariable("player:jsStartImage", "foo.jpg");

function getPlaylist(i){
		$('#player_mp3').html(player_html[i]);	
}


function hideToolTip(t){
	$("#"+t).hide();
}

function sendContact(){
	var nom = $('#nom').val();
	var email = $('#email').val();
	var message = $('#message').val();
	var params = {nom:nom, email:email, message:message, ajax:true}
	jQuery.post('/sendContact', params);
	$('#dialog').jqmHide();
	$('#response').html('');
}


function startAnim(css_rule, min_height, max_height){
	var max_height = max_height || 215;
	var min_height = min_height || 50;
	//Lorsque la souris survole un lien
    $(css_rule).mouseover(function(){
        $(this).stop().animate(
            {height: max_height + 'px'},
            {queue: false,
            duration: 600
          })
    });
    //Lorsque la souris quitte le lien
    $(css_rule).mouseout(function(){
        $(this).stop().animate(
            {height: min_height + 'px'},
            {queue: false,
            duration: 600      
          })
    });

}

function popup(url){
    window.open(url, 'buy', "menubar=no, status=no, scrollbars=yes, menubar=no, width=310, height=800");   
}

