 $(document).ready(function() {

   var isInEditor = document.getElementsByTagName("input")[0].value;

   if(isInEditor == null || isInEditor =='') isInEditor = 1;

     
  if(isInEditor == 0) {

     //    $("dt").prepend('<img src="/ALBA_en/img/minus.png" class="statusicon"> ');
     $("dt").css({display:"list-item",listStyle:"square url(/ALBA_de/img/plus.png) ", marginLeft:"15px"});
     $("dd:not(:first)").hide("normal",bildAusblenden);
     $("dt").click(function(){
	var aux = $(this).parent().parent().children("dd").slideToggle("normal",bildToggle);
         	return false;
     });


//     var auxHTML = $(".elementStandardLeistungen > .text").html();

//     auxHTML = auxHTML.replace('<!-- web:text:start editor="box" -->','');
//     auxHTML = auxHTML.replace('<!-- web:text:stop -->','');
 //    alert($(".elementStandardLeistungen > .text").html());
 //    alert(auxHTML.replace('<!-- web:text:start editor="box" -->',''));
//     $(".elementStandardLeistungen > .text").html(auxHTML);

      var auxHTML = '';

      for(i=0;i<$(".elementStandardLeistungen").length;i++) {


         auxHTML = $(".elementStandardLeistungen").get(i).innerHTML;
         auxHTML = auxHTML.replace('<!-- web:text:start editor="box" -->','');
         auxHTML = auxHTML.replace('<!-- web:text:stop -->','');
         $(".elementStandardLeistungen").get(i).innerHTML = auxHTML;
      }
  }

  


  if($.browser.msie == false) {


   var hspace = $("div.text img").attr("hspace");
   var vspace = $("div.text img").attr("vspace");
     $("div.text img").css("margin-left", hspace);
     $("div.text img").css("margin-right", hspace);
     $("div.text img").css("margin-top", vspace);
     $("div.text img").css("margin-bottom", vspace);
  }
 });



function bildAusblenden () {
    $(this).prev().find("img").attr("src","/ALBA_de/img/plus.png");

}

function bildToggle () {
   if($(this).prev().find("img").attr("src") == "/ALBA_de/img/plus.png") {

       $(this).prev().find("img").attr("src","/ALBA_de/img/minus.png")
   }
   else {

       $(this).prev().find("img").attr("src","/ALBA_de/img/plus.png")
   }


}
