  $(document).ready(function(){
      $("a[@id*=narticle]").click(function(){
          var nr=$(this).attr("id").split('_');
          var article=nr[1]; 
          
          if (article == 0){
            var nid=new Array();
            nid[1]=$("#first").val();
          }
          else {
            var nid=$("#news_"+article).attr("href").split('-');
          }
                  
          $.getJSON("data.php?action=getNewsArticle&news="+nid[1], function(json){
              if (json.Result){
                  $("#teaser").html(stripslashes(json.Teaser));
                  $("#title_href").html(json.Title);
                  $("#data").html(json.Data);
                  if (json.Pic)
                    $("#img").attr("src",fileroot+"/news/thumb/"+json.Pic);
                  else
                    $("#img").attr("src","http://img.grad.bg/thumb/"+json.Img);
                  
                  $("#title_href").attr("href","http://"+subdomain['news']+"."+domain+"/n-"+json.Nid);
                  $("#img_href").attr("href","http://"+subdomain['news']+"."+domain+"/n-"+json.Nid);
      
               }
          });
      });
  });
 