diff --git a/__encode/config.php b/__encode/config.php
index 6953249..fce939a 100644
--- a/__encode/config.php
+++ b/__encode/config.php
@@ -279,4 +279,22 @@
//
$_CONFIG['session_name'] = "";
+//
+// Defines where to find the JQuery file.
+// Allowed values:
+// * "local": use the locally hosted file (at __encode/static/jquery.min.js)
+// * "cdn" : use the CDN url provided by $_CONFIG['jquery_cdn_url']
+// * "none" : don't use JQuery (Warning: limited functionnality)
+//
+$_CONFIG['jquery_source'] = "cdn";
+
+//
+// URL to the JQuery javascript file (Usually a CDN).
+// You can use the CDN of your choice or any custom URL. See:
+// https://jquery.com/download/#using-jquery-with-a-cdn
+// Respected only when $_CONFIG['jquery_source'] == "cdn".
+// Default: $_CONFIG['session_name'] = "";
+//
+$_CONFIG['jquery_cdn_url'] = "https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js";
+
?>
diff --git a/index.php b/index.php
index 4b1dee0..024eac0 100644
--- a/index.php
+++ b/index.php
@@ -395,32 +395,50 @@ function outputHtml()
getConfig('log_file') != null && strlen($this->getConfig('log_file')) > 0)
- || ($this->getConfig('thumbnails') != null && $this->getConfig('thumbnails') == true && $this->mobile == false)
- || (GateKeeper::isDeleteAllowed()))
+if($this->getConfig('jquery_source') != null && $this->getConfig('jquery_source') != "none")
{
-?>
-
-
-\n";
+ echo "\n";
}
-?>
-});
-//]]>
-
-