/**
 * @author b7studio.com
 */
$(document).ready(function(){
	$("a.trigger").tooltip({
		position: "top center",
		relative : 1
	});

	$(".a_motdepasse").click(function() {
					$("#fCustomerLostpwd").toggle();
					$("#fCustomerLogin").toggle();
					return false;
	});
	
    $('ul.sf-menu').superfish({
        delay: 1000, // one second delay on mouseout 
        animation: {
            opacity: 'show',
            height: 'show'
        }, // fade-in and slide-down animation 
        speed: 'fast', // faster animation speed 
        autoArrows: true, // disable generation of arrow mark-up 
        dropShadows: true // disable drop shadows 
    });
    
    
    $('#select1, #select2, #select3, #select4, #select5').sSelect().change(function(){
        window.open($(this).getSetSSValue(), '_self');
    });
    $('.proimg').cycle({
        fx: 'fade'
    });
	$('#image-rotator').cycle({
        fx: 'fade'
    });
	$('#lieux10,#lieux10col2,.faq,#team').accordion({
			autoheight: false,
			header: "dt",
			collapsible : true,
			active : false,
            selectedClass: "myAccordionActive"
		});
		$('#ontour').accordion({
			autoheight: false,
			header: "dt",
			active : false,
			collapsible : true,
            selectedClass: "myAccordionActive"
		});
		// toggle sidebox content
//$(".sidebox h3,.shop_head").click(function(){ 	// element clicable
	//    $(this).next().toggle('fast'); 				// affiche/masque element DOM suivant
	  //  $(this).children('.plus').toggle(); 
		//$(this).children('.moins').toggle(); 
		//$(this).toggleClass("active");		// change la classe
	    //return false;
//	});
    
});




function hideHeader(){
    document.getElementById('theHead').style.display = 'none';
}

/*menu de la page video*/
function highlightVdoMenu(idOn){
    /*
     alert (vdoArray.length);
     */
    for (var j = 0; j < vdoArray.length; j++) {
        /*alert(j);*/
        document.getElementById(vdoArray[j]).style.color = "#45A12B";
    }
    document.getElementById(idOn).style.color = "#000000";
}

/*menu de la page audio*/
function highlightMp3Menu(idOn){
    /*alert (vdoArray.length);*/
    for (var j = 0; j < mp3Array.length; j++) {
        /*alert(j);*/
        document.getElementById(mp3Array[j]).style.color = "#000000";
    }
    document.getElementById(idOn).style.color = "#ED687E";
}

function actif(idOn){
    document.getElementById(idOn).style.color = "#000000";
    
}


// Jw player For Mp3 on programme page 




function deletePlayer(theWrapper, thePlaceholder, thePlayerId) { 
        swfobject.removeSWF(thePlayerId);
        var tmp=document.getElementById(theWrapper);
        if (tmp) { tmp.innerHTML = "<div id=" + thePlaceholder + "></div>"; }
}


function createPlayer(thePlaceholder, thePlayerId, theFile, theStart) {
        var flashvars = {
               // skin:'assets/flash/mediaplayer-5.2/glow.zip',
                file:theFile, 
                autostart:theStart
        }
        var params = {
                allowfullscreen:"true", 
                allowscriptaccess:"always"
        }
        var attributes = {
                id:thePlayerId,  
                name:thePlayerId
        }
        swfobject.embedSWF("assets/flash/mediaplayer-5.2/player.swf", thePlaceholder, "320", "24", "9.0.115", false, flashvars, params, attributes);
}


function initPlayer(theFile,theStart) { 
        deletePlayer('musicwrapper', 'jw52', 'player1'); 
        createPlayer('jw52', 'player1', theFile, theStart);
}

// \Jw player 

