diff --git a/webconsole/src/main/resources/res/ui/license.css b/webconsole/src/main/resources/res/ui/license.css
index f371c35..b2bcba4 100644
--- a/webconsole/src/main/resources/res/ui/license.css
+++ b/webconsole/src/main/resources/res/ui/license.css
@@ -13,37 +13,28 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ /* CSS Document */
+ */
+
 #licenseContent {
-    position: relative;
-    margin-top: 25px; padding : 5px;
-    width: 100%;
-    padding: 5px;
+	width: 100%;
 }
-
 #licenseLeft {
-    width: 300px;
-    border-right: 1px black solid;
+	float: left;
+	width: 25%;
+	padding: 0;
+	margin-right: 1em;
 }
-
+#licenseLeft a {
+	display: block;
+	width: 100%;
+	margin: 0;
+	text-decoration: none;
+}
 #licenseRight {
-    position: absolute;
-    top: 5px;
-    left: 305px;
-    padding: 5px;
-    width: 650px;
-    border-left: 1px black solid;
+	float: left;
+	width: 70%;
 }
-
-#licenseClear {
-    clear: both;
-    height: 1px;
+#licenseDetails {
+	width: 100%;
+	height: 100%;
 }
-
-.licenseButtons {
-    padding: 5px;
-}
-
-.licenseDetails {
-    padding: 5px;
-}
\ No newline at end of file
diff --git a/webconsole/src/main/resources/res/ui/license.js b/webconsole/src/main/resources/res/ui/license.js
index a8cbb1f..35018d4 100644
--- a/webconsole/src/main/resources/res/ui/license.js
+++ b/webconsole/src/main/resources/res/ui/license.js
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+var licenseButtons = false;
+var licenseDetails = false;
+
 function displayBundle(/* String */ bundleId)
 {
     var theBundleData = bundleData[bundleId];
@@ -25,7 +28,6 @@
 
     var title = theBundleData.title;
     
-    var licenseButtons = document.getElementById('licenseButtons');
     if (licenseButtons) {
         
         var innerHTML = "";
@@ -36,47 +38,42 @@
             for (var idx in entry)
             {
                 var descr = entry[idx];
-                buttons += "<a href='javascript:displayFile(\"" + bundleId + "\", \"" + name + "\", " + idx + ");'"
-                   + " >" + descr.url + "</a> ";
+				var jar = descr.jar ? '&jar=' + descr.jar : ''; // inner jar attribute
+				buttons += '<a href="' + pluginRoot + '?bid=' + bundleId + '&url=' + descr.path + jar + '" target="licenseDetails">' + descr.url + '</a> ';
             }
             if (buttons)
             {
+				// apply i18n
+				name =  '__res__' == name ? i18n.resources : i18n.resources_emb.msgFormat( name );
                 innerHTML += name + ": " + buttons + "<br />";
             }
         }
-        
-        if (!innerHTML)
-        {
-            innerHTML = "<em>The Bundle contains neither LICENSE nor NOTICE files</em>";
-        }
-        
-        licenseButtons.innerHTML = "<h1>" + title + "</h1>" + innerHTML;
+
+        licenseButtons.html("<h1>" + title + "</h1>" + innerHTML);
     }
     
-    var licenseDetails = document.getElementById('licenseDetails');
-    if (licenseDetails)
-    {
-        licenseDetails.innerHTML = "";
-    }
+    licenseDetails.html("");
+	$("#licenseLeft a").removeClass('ui-state-default ui-corner-all');
+	$("#licenseLeft #" +bundleId).addClass('ui-state-default ui-corner-all');
 }
 
-function displayFile ( /* String */ bundleId, /* String */ name, /* int */ idx )
-{
-    var theBundleData = bundleData[bundleId];
-    if (!theBundleData)
-    {
-        return;
-    }
-    
-    var file = theBundleData.files[name][idx];
-    if (!file)
-    {
-        return;
-    }
-    
-    var licenseDetails = document.getElementById('licenseDetails');
-    if (licenseDetails)
-    {
-        licenseDetails.innerHTML = "<h3>" + name + ": " + file.url + "</h3><pre>" + file.data + "</pre>";
-    }
-}
+
+$(document).ready(function() {
+	// init elements cache
+	licenseButtons = $("#licenseButtons");
+	licenseDetails = $("#licenseDetails")
+
+	// render list of bundles
+	var txt = "";
+	for(id in bundleData) {
+		txt += '<a id="' + id + '" href="javascript:displayBundle(\'' + id + '\')">' + bundleData[id]['title'] + '</a>';
+	}
+	if (txt) {
+		$("#licenseLeft").html(txt);
+	} else {
+		$(".statline").html(i18n.status_none);
+	}
+
+	// display first element
+	for(i in bundleData) {displayBundle(i);break;}
+});
\ No newline at end of file
