$(document).ready(function() {
   
   /*
   $("#corpsList").modal(
            title: "Liste der 100 To Unternehmen",
            buttons: "right",
            overflow: false,
            width: 600,
            height: 500,
            animation: "fade",
            outRemove: false,
            open: function () {},
            close: function () {}
        
        );
    
   })
   */
   $("#typotemplate").css("height","0px");
   test = $("[name='tx_pbsurvey_pi1[257][0][0]']");
   //console.log(test);
   test[0].style.display='none';
   
   bodytext = document.createElement("div");
   bodytext.setAttribute("class","bodytext");
   
   
   //$(".bodytext").children().unwrap().wrapAll(bodytext);
   
   
   $("#showModalCorpsList").click (function (e) {
        list= $("#corpsList");
        $.prompt(list.html()); 
   
   		$(".anchor").click ( function (e) {
	      e.preventDefault();
		  target=$("input[name='tx_pbsurvey_pi1[257][0][0]']");
		  //console.log(this);
		  lastIndex=this.href.lastIndexOf("/");
		  target[0].value=this.href.substring(lastIndex+1);
		  $.prompt.close();
	    
	   });
	   
   
   });
   
  
   
  
   
 });

