Cut tile javascript in div : i have code cut tile:
TITL1 - TITLE2 [XXX] 

       var Enumber1 = new Array();
               $("#id").each(function(i){
               var text = $(this).text();
               if(text.indexOf('[') != -1 || text.indexOf(']') != -1){
                 var Ntext1      = text.split('[')[0];
                 Enumber1[i] = text.split('[')[1].split(']')[0];
                 $(this).text(Ntext1);
               }
             });
             $("#id").each(function(i){         
               $(this).fadeIn("slow");
               if(Enumber1[i] != undefined){
                 $(this).text(Enumber1[i]);
               }else{
                 $(this).css('N/A');
               }

        
        });

 

 - TITLE1 -TITL2  
 - [XXX]

Help me fix it

 - TILE1 in >>> in div class"title"
 - 2.TITLE >>> in div class"title2"
 - XXX >>> in div class"cut"

thanks!!!