// Put all your lovely jQuery / Javascript goodies right down here.

// zebra tabellen mitglieder JQUERY --------------------------------
$(document).ready(function(){

   $("tr:even").addClass("even");
});


// redirect selectbox onChange -------------------------------------
function changeUrl() {
var redirect;
redirect = document.getElementById('newUrl').value;
document.location.href = redirect;
}


// Pop-Up-Fenster ---------------------------------------------------
function openPOP(theURL,winName,features) {
  window.open(theURL,winName,features);
}


function popup(theURL,winName,features) {
window.open(theURL,"newwindow","height=300,width=400,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=1,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,z-lock=0,screenX=100,screeny=100,left=100,top=100");
}

// clear suchfeld --------------------------------------------------
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}


// MP3-player mit JQUERY --------------------------------
$(document).ready(function () {

            $('a.media').each(function (i) {
                var audioPlayer = '<object type="application/x-shockwave-flash" data="addons/audioplayer/player.swf" height="24" width="290">';
                audioPlayer += '<param name="movie" value="addons/audioplayer/player.swf">';
                audioPlayer += '<param name="FlashVars" value="playerID=' + i + '&amp;soundFile=' + $(this).attr('href') + '&titles=' + $(this).html() + '">';
                audioPlayer += '<param name="quality" value="high">';
                audioPlayer += '<param name="menu" value="false">';
                audioPlayer += '<param name="wmode" value="transparent">';
                audioPlayer += '</object>';
                /*audioPlayer += '<br/><a href=\"' + $(this).attr('href') + '\" target=\"_blank\">download mp3</a>';*/
                $(this).after(audioPlayer).remove();
            });

});
