title: jQuery not running correctly on Joomla
body: <p>I am working on a website and I cannot find the reason why the jQuery code doesn't show as it shows on my local server, without using Joomla.
  I am using Joomla 2.5.1 and I am trying to run the following piece of code on this website: <strong><a href="http://www.elitartravel.com" rel="nofollow">http://www.elitartravel.com</a></strong></p>
  
  <p><strong>Code:</strong> </p>
  
  <pre><code>&lt;script&gt;
  (function(a){if(typeof define==='function'&amp;&amp;define.amd){define(['jquery'],a)}else{a(jQuery)}}(function($){if($.support.cors||!$.ajaxTransport||!window.XDomainRequest){return}var n=/^https?:\/\//i;var o=/^get|post$/i;var p=new RegExp('^'+location.protocol,'i');$.ajaxTransport('* text html xml json',function(j,k,l){if(!j.crossDomain||!j.async||!o.test(j.type)||!n.test(j.url)||!p.test(j.url)){return}var m=null;return{send:function(f,g){var h='';var i=(k.dataType||'').toLowerCase();m=new XDomainRequest();if(/^\d+$/.test(k.timeout)){m.timeout=k.timeout}m.ontimeout=function(){g(500,'timeout')};m.onload=function(){var a='Content-Length: '+m.responseText.length+'\r\nContent-Type: '+m.contentType;var b={code:200,message:'success'};var c={text:m.responseText};try{if(i==='html'||/text\/html/i.test(m.contentType)){c.html=m.responseText}else if(i==='json'||(i!=='text'&amp;&amp;/\/json/i.test(m.contentType))){try{c.json=$.parseJSON(m.responseText)}catch(e){b.code=500;b.message='parseerror'}}else if(i==='xml'||(i!=='text'&amp;&amp;/\/xml/i.test(m.contentType))){var d=new ActiveXObject('Microsoft.XMLDOM');d.async=false;try{d.loadXML(m.responseText)}catch(e){d=undefined}if(!d||!d.documentElement||d.getElementsByTagName('parsererror').length){b.code=500;b.message='parseerror';throw'Invalid XML: '+m.responseText;}c.xml=d}}catch(parseMessage){throw parseMessage;}finally{g(b.code,b.message,c,a)}};m.onprogress=function(){};m.onerror=function(){g(500,'error',{text:m.responseText})};if(k.data){h=($.type(k.data)==='string')?k.data:$.param(k.data)}m.open(j.type,j.url);m.send(h)},abort:function(){if(m){m.abort()}}}})}));
  
      jQuery.ajax({
          type: "post",
          url: "http://www.e-tsw.com/Search/Box?af=AF-ASB&amp;ln=ESP&amp;cu=PE",
          success: function (data) {
              jQuery("#liquidBoxContainer").html(data);
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>The lightbox shows faulty when ran on the webserver, as you can see. But when I run it on Xampp, and without using Joomla, it works just fine. Also, I installed a plugin to force the 2.1.4 version of jQuery to run, as I thought it was conflicting with the 1.8 jQuery version that the Joomla was running, but it didn't solve anything.</p>
  
  <p>Can somebody tell me why is this happening? Maybe some of you might have encountered some similar problems with jQuery and Joomla.</p>
  
  <p>Thank you.</p>