var data = '<img src="data/images/loading.gif" alt="Lädt...">';
$("#loadings").html(data);
 $("#loadings").ajaxStart(function(){
   $(this).show();
 });
  $("#loadings").ajaxStop(function(){
   $(this).hide();
 });

function navil(vari, datei)
 {
$.get("index.php", { request: "datei", vari: vari, datei: datei }, function(data){
 

  document.getElementById("content-1").innerHTML = data;


});


}


  
 function navireload(navi)
 {
$.get("index.php", { request: "navi", navi: navi }, function(data){
  document.getElementById("navit-1").innerHTML = data;
});


}

 /*function boxreload(box)
 {
$.get("index.php", { request: "box", box: box }, function(data){
  document.getElementById("boxt-1").innerHTML = data;
});


}
*/
function regist_2()
 {
// prepare the form when the DOM is ready 
$(document).ready(function() { 
    // bind form using ajaxForm 
    $('#formRegist').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#meldungRegist', 
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() { 
            $('#meldungRegist').fadeIn('slow'); 
        } 
    }); 
});
}
function einloggen()
 {
// prepare the form when the DOM is ready 
$(document).ready(function() { 
    // bind form using ajaxForm 
    $('#formLogin').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#meldungLogin', 
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        success: function() { 
            $('#meldungLogin').fadeIn('slow'); 
        } 
    }); 
});
}


function toogle(elem)
 {
 var hish = document.getElementById(elem).style.visibility;
 alert(hish);
 if(hish == "hidden")
  {
  $(document).ready(function(){
    
$("#" + elem).click(function () {
      $(this).hide("slide", { direction: "up" }, 1000);
});

  });
  }
 else
  {
    $(document).ready(function(){
    
$("#" + elem).click(function () {
      $(this).show("slide", { direction: "down" }, 1000);
});

  });
  }

 }



