// mouseOvers.js

/***************
Functions for the front_theme_block images
**********************/

/*image preloading*/
/* Moved this functionality to sub_map_mouseovers.js */



function mouseOverb1() {
    document.getElementById("b1").src="/map_project/images/crm-hover.jpg"
}
function mouseOutb1() {
    document.getElementById("b1").src="/map_project/images/crm.jpg"
}

function mouseOverb2() {
    document.getElementById("b2").src="/map_project/images/shumate-hover.jpg"
}
function mouseOutb2() {
    document.getElementById("b2").src="/map_project/images/shumate.jpg"
}

function mouseOverb3() {
    document.getElementById("b3").src="/map_project/images/moth-hover.jpg"
}
function mouseOutb3() {
    document.getElementById("b3").src="/map_project/images/moth.jpg"
}

function mouseOverb4() {
    document.getElementById("b4").src="/map_project/images/prenter_comm-hover.jpg"
}
function mouseOutb4() {
    document.getElementById("b4").src="/map_project/images/prenter_comm.jpg"
}

function mouseOverb5() {
    document.getElementById("b5").src="/map_project/images/mtr4-hover.jpg"
}
function mouseOutb5() {
    document.getElementById("b5").src="/map_project/images/mtr4.jpg"
}

function mouseOverb6() {
    document.getElementById("b6").src="/map_project/images/WindTurbine_WebSmall-hover.jpg"
}
function mouseOutb6() {
    document.getElementById("b6").src="/map_project/images/WindTurbine_WebSmall.jpg"
}

function mouseOverb7() {
    document.getElementById("b7").src="/map_project/images/cresources-hover.png"
}
function mouseOutb7() {
    document.getElementById("b7").src="/map_project/images/cresources.png"
}


/*Functions for collage mouse-overs*/

function writeText(txt)
{
    document.getElementById("desc").innerHTML=txt;
}




/* Menus */

function showmenu(elmnt)
{
    document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
    document.getElementById(elmnt).style.visibility="hidden"
}
function showsearch(elmnt) {
    document.getElementById(elmnt).style.visibility="visible"
}
function hidesearch(elmnt) {
    document.getElementById(elmnt).style.visibility="hidden"
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
} 



/* Maps Teaser */

// $(function(){
//   $('#map_teaser_wrapper').hover(over, out);
// });
// 
// function over(event)
// {
//   $('img.map_teaser_image').attr("src", "/map_project/images/maps_thumb400.png");
// }
// 
// function out(event)
// {
//   $('img.map_teaser_image').attr("src", "/map_project/images/maps_thumb400-hover.png");
// }



/** jPlayer test **/
var placeholder;
var cut;
var title;

function load_audio_player( placeholder, cut, title ) {
//     $(placeholder).replaceWith('<div id="jquery_jplayer_1" class="jp-jplayer"></div><div class="jp-audio"><div class="jp-type-single"><div id="jp_interface_1" class="jp-interface"><ul class="jp-controls"><li><a href="#" class="jp-play" tabindex="1">play</a></li><li><a href="#" class="jp-pause" tabindex="1">pause</a></li><li><a href="#" class="jp-stop" tabindex="1">stop</a></li><li><a href="#" class="jp-mute" tabindex="1">mute</a></li><li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li></ul><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div><div class="jp-current-time"></div><div class="jp-duration"></div></div><div id="jp_playlist_1" class="jp-playlist"><ul><li>'+title+'</li></ul></div></div></div>');
    
//     $(document).ready(function(){
//       $("#jquery_jplayer_1").jPlayer({
//         ready: function () {
//           $(this).jPlayer("setMedia", {
//             mp3: cut
// //             oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
//           });
//         },
//         swfPath: "/js",
//         supplied: "mp3"
//       });
//     });
    
    $(placeholder).replaceWith( '<script type="text/javascript">AudioPlayer.embed("'+cut+'", {  soundFile: "'+cut+'",  titles: "'+title+'", autostart: "no"  }); </script>' );
    
}

function load_audio_player_sidebar( placeholder, cut, title ) {
  $(placeholder).insertAfter( '<div id="'+cut+'">&nbsp;</div><script type="text/javascript">AudioPlayer.embed("'+cut+'", {  soundFile: "'+cut+'",  titles: "'+title+'", autostart: "no"  }); </script>' );
}
