title: Call jQuery function from Javascript function
body: <p>how can i call JQuery from plain Javascript ?</p>
  
  <p>the file.js i have:</p>
  
  <pre><code>function setLanguageScript(lang) { 
  messages = new Array();
  if (typeof(lang) != 'undefined' &amp;&amp; lang != null) {
      sessvars.lang = lang;
  }
  //setting default lang
  if (typeof(sessvars.lang) == 'undefined' || sessvars.lang == null) {
      sessvars.lang = 'ro';
  }
  
  loadResources(sessvars.lang);
  } 
  
  
  function loadResources(language) {
  jQuery().ajax({
  type: "GET",
  url: language + ".xml",
  dataType: "xml",
  success:function(xml) {
      alert("sucess");
          jQuery(xml).find('resource').each(
                  function() {
                      var name = $(this).attr('name');
                      var content = (this).text();
                      alert(name + "-" + content);
                  }
              );
          }
  });
  }
  </code></pre>
  
  <p>now in my html i have:</p>
  
  <pre><code>&lt;script type="text/javascript" src="js/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/i18n.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and call to the JS function:</p>
  
  <pre><code>&lt;a href="#" onclick="setLanguageScript('en');"&gt;EN&lt;/a&gt;
  &lt;a href="#" onclick="setLanguageScript('ro');"&gt;RO&lt;/a&gt;
  </code></pre>
  
  <p>FireBug gives the message: jQuery().ajax is not a function   </p>