accurator/commit

refactored mainly the naming of files in js, getting rid of accurator in file naming and also putting objects and reused files from js in a components folder. Also, library js files were put in a lib folder

authorCristina-Iulia Bucur
Mon Mar 21 12:30:04 2016 +0100
committerCristina-Iulia Bucur
Mon Mar 21 12:30:04 2016 +0100
commit99984153c5aeba8b8d05d5ec0fdfd57936338727
treea487266a7732b08c6e016cfa441a9c68ed4a1c1a
parent4a4d4a653213af518491c5b47db4ca0b9188fe4b
Diff style: patch stat
diff --git a/api/accurator.pl b/api/accurator.pl
index 125cd6a..618193a 100644
--- a/api/accurator.pl
+++ b/api/accurator.pl
@@ -352,7 +352,7 @@ html({|html||
 <title>Item</title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link rel="shortcut icon" href="img/favicon.ico">
-<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 <link type="text/css" rel="stylesheet" href="css/annotorious.css" />
 <link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 |}).
@@ -464,17 +464,16 @@ html({|html(ImageUrl)||
 <div class="itemDivHidden"></div>
 
 <!-- Added Script -->
-<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-<script type="text/javascript" src="js/accurator.laconic.js"></script>
-<script type="text/javascript" src="js/bloodhound.js"></script>
-<script type="text/javascript" src="js/typeahead.js"></script>
-<script type="text/javascript" src="js/annotorious.min.js"></script>
-<script type="text/javascript" src="js/deniche-plugin.js"></script>
-<script type="text/javascript" src="js/search.js"></script>
-<script type="text/javascript" src="js/accurator_utilities.js"></script>
-<script type="text/javascript" src="js/annotations.js"></script>
-<script type="text/javascript" src="js/field.js"></script>
-<script type="text/javascript" src="js/accurator_item.js"></script>
+<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+<script type="text/javascript" src="js/lib/laconic.js"></script>
+<script type="text/javascript" src="js/lib/bloodhound.js"></script>
+<script type="text/javascript" src="js/lib/typeahead.js"></script>
+<script type="text/javascript" src="js/lib/annotorious.min.js"></script>
+<script type="text/javascript" src="js/components/deniche-plugin.js"></script>
+<script type="text/javascript" src="js/components/utilities.js"></script>
+<script type="text/javascript" src="js/components/annotations.js"></script>
+<script type="text/javascript" src="js/components/field.js"></script>
+<script type="text/javascript" src="js/item.js"></script>
 <script>itemInit()</script>
 |}).
diff --git a/lib/accurator/annotate_page.pl b/lib/accurator/annotate_page.pl
index e1a9286..505c748 100644
--- a/lib/accurator/annotate_page.pl
+++ b/lib/accurator/annotate_page.pl
@@ -106,13 +106,12 @@ navigation_bar -->
 annotate_javascript -->
     html({|html||
 	<!-- Added Script -->
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
 	<script type="text/javascript" src="js/pengines.js"></script>
 	<script type="text/javascript" src="js/result.js"></script>
-	<script type="text/javascript" src="js/search.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
 	<script type="text/javascript" src="js/accurator_annotate.js"></script>
 	<script>annotateInit()</script>
 	|}).
diff --git a/web/css/accurator.bootstrap-slider.min.css b/web/css/accurator.bootstrap-slider.min.css
deleted file mode 100755
index 096bf02..0000000
--- a/web/css/accurator.bootstrap-slider.min.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/*! =======================================================
-                      VERSION  4.4.0              
-========================================================= */
-/*! =========================================================
- * bootstrap-slider.js
- *
- * Maintainers: 
- *		Kyle Kemp 
- *			- Twitter: @seiyria
- *			- Github:  seiyria
- *		Rohit Kalkur
- *			- Twitter: @Rovolutionary
- *			- Github:  rovolution
- *
- * =========================================================
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- * ========================================================= */.slider{display:inline-block;vertical-align:middle;position:relative}.slider.slider-horizontal{width:210px;height:20px}.slider.slider-horizontal .slider-track{height:10px;width:100%;margin-top:-5px;top:50%;left:0}.slider.slider-horizontal .slider-selection{height:100%;top:0;bottom:0}.slider.slider-horizontal .slider-handle{margin-left:-10px;margin-top:-5px}.slider.slider-horizontal .slider-handle.triangle{border-width:0 10px 10px 10px;width:0;height:0;border-bottom-color:#0480be;margin-top:0}.slider.slider-vertical{height:210px;width:20px}.slider.slider-vertical .slider-track{width:10px;height:100%;margin-left:-5px;left:50%;top:0}.slider.slider-vertical .slider-selection{width:100%;left:0;top:0;bottom:0}.slider.slider-vertical .slider-handle{margin-left:-5px;margin-top:-10px}.slider.slider-vertical .slider-handle.triangle{border-width:10px 0 10px 10px;width:1px;height:1px;border-left-color:#0480be;margin-left:0}.slider.slider-disabled .slider-handle{background-image:-webkit-linear-gradient(top,#dfdfdf 0,#bebebe 100%);background-image:-o-linear-gradient(top,#dfdfdf 0,#bebebe 100%);background-image:linear-gradient(to bottom,#dfdfdf 0,#bebebe 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdfdfdf',endColorstr='#ffbebebe',GradientType=0)}.slider.slider-disabled .slider-track{background-image:-webkit-linear-gradient(top,#e5e5e5 0,#e9e9e9 100%);background-image:-o-linear-gradient(top,#e5e5e5 0,#e9e9e9 100%);background-image:linear-gradient(to bottom,#e5e5e5 0,#e9e9e9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe5e5e5',endColorstr='#ffe9e9e9',GradientType=0);cursor:not-allowed}.slider input{display:none}.slider .tooltip.top{margin-top:-36px}.slider .tooltip-inner{white-space:nowrap}.slider .hide{display:none}.slider-track{position:absolute;cursor:pointer;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#f9f9f9 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#f9f9f9 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#f9f9f9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);border-radius:4px}.slider-selection{position:absolute;background-image:-webkit-linear-gradient(top,#f9f9f9 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#f9f9f9 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#f9f9f9 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9',endColorstr='#fff5f5f5',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-radius:4px}.slider-handle{position:absolute;width:20px;height:20px;background-color:#3a94a5;background-image:-webkit-linear-gradient(top,#149bdf 0,#0480be 100%);background-image:-o-linear-gradient(top,#149bdf 0,#0480be 100%);background-image:linear-gradient(to bottom,#149bdf 0,#0480be 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);filter:none;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);opacity:.8;border:0 solid transparent}.slider-handle.round{border-radius:50%}.slider-handle.triangle{background:transparent none}.slider-handle.custom{background:transparent none}.slider-handle.custom::before{line-height:20px;font-size:20px;content:'\2605';color:#726204}
\ No newline at end of file
diff --git a/web/css/accurator.bootstrap.min.css b/web/css/accurator.bootstrap.min.css
deleted file mode 100644
index cd1c616..0000000
--- a/web/css/accurator.bootstrap.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/web/html/about.html b/web/html/about.html
index f8cf57b..3eacbd1 100644
--- a/web/html/about.html
+++ b/web/html/about.html
@@ -4,7 +4,7 @@
 	<title>About Accurator</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -109,11 +109,11 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_about.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/about.js"></script>
 	<script>aboutInit()</script>
 </body>
 </html>
diff --git a/web/html/domain.html b/web/html/domain.html
index 714bdef..5e1c638 100644
--- a/web/html/domain.html
+++ b/web/html/domain.html
@@ -4,7 +4,7 @@
 	<title>Select Domain</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -73,11 +73,11 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_domain.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/domain.js"></script>
 	<script>domainInit()</script>
 </body>
 </html>
diff --git a/web/html/end.html b/web/html/end.html
index 7197a50..785f0e9 100644
--- a/web/html/end.html
+++ b/web/html/end.html
@@ -4,7 +4,7 @@
 	<title>Accurator</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -126,11 +126,11 @@
 	</div>
 
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_end.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/end.js"></script>
 	<script>endInit()</script>
 </body>
 </html>
diff --git a/web/html/expertise.html b/web/html/expertise.html
index 5bd8b8d..f656a94 100644
--- a/web/html/expertise.html
+++ b/web/html/expertise.html
@@ -4,8 +4,8 @@
 	<title>Expertise</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap-slider.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap-slider.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -139,12 +139,12 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap-slider.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_expertise.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap-slider.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/expertise.js"></script>
 	<script>expertiseInit();</script>
 </body>
 </html>
diff --git a/web/html/form.html b/web/html/form.html
index b163ac8..cdb54d6 100644
--- a/web/html/form.html
+++ b/web/html/form.html
@@ -4,7 +4,7 @@
 	<title>Additional info</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -316,11 +316,11 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_form.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/form.js"></script>
 	<script>formInit();</script>
 </body>
 </html>
diff --git a/web/html/intro.html b/web/html/intro.html
index 2db9d5d..d2c5de2 100644
--- a/web/html/intro.html
+++ b/web/html/intro.html
@@ -4,7 +4,7 @@
 	<title>Accurator</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -170,11 +170,11 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_intro.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/intro.js"></script>
 	<script>introInit()</script>
 </body>
 </html>
diff --git a/web/html/profile.html b/web/html/profile.html
index d9da6a4..f514e39 100644
--- a/web/html/profile.html
+++ b/web/html/profile.html
@@ -4,7 +4,7 @@
 	<title>Profile</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -168,15 +168,15 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/cluster.js"></script>
-	<script type="text/javascript" src="js/pagination.js"></script>
-	<script type="text/javascript" src="js/thumbnail.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/cluster.js"></script>
+	<script type="text/javascript" src="js/components/pagination.js"></script>
+	<script type="text/javascript" src="js/components/thumbnail.js"></script>
 	<script type="text/javascript" src="js/pengines.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_profile.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/profile.js"></script>
 	<script>profileInit();</script>
 </body>
 </html>
diff --git a/web/html/results.html b/web/html/results.html
index 3101abe..247e0ca 100644
--- a/web/html/results.html
+++ b/web/html/results.html
@@ -4,7 +4,7 @@
 	<title>Recommendations</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -79,16 +79,15 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/search.js"></script>
-	<script type="text/javascript" src="js/pagination.js"></script>
-	<script type="text/javascript" src="js/thumbnail.js"></script>
-	<script type="text/javascript" src="js/path.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/pagination.js"></script>
+	<script type="text/javascript" src="js/components/thumbnail.js"></script>
+	<script type="text/javascript" src="js/components/path.js"></script>
 	<script type="text/javascript" src="js/pengines.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_results.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/results.js"></script>
 	<script>resultsInit();</script>
 </body>
 </html>
diff --git a/web/html/search.html b/web/html/search.html
index fdd1c56..183e73b 100644
--- a/web/html/search.html
+++ b/web/html/search.html
@@ -4,7 +4,7 @@
 	<title>Search Accurator</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="img/favicon.ico">
-	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.bootstrap.min.css" />
+	<link type="text/css" rel="stylesheet" media="screen" href="css/bootstrap.min.css" />
 	<link type="text/css" rel="stylesheet" media="screen" href="css/accurator.css" />
 </head>
 
@@ -120,11 +120,11 @@
 		</div>
 	</div>
 
-	<script type="text/javascript" src="js/accurator.jquery.min.js"></script>
-	<script type="text/javascript" src="js/accurator.bootstrap.min.js"></script>
-	<script type="text/javascript" src="js/accurator.laconic.js"></script>
-	<script type="text/javascript" src="js/accurator_utilities.js"></script>
-	<script type="text/javascript" src="js/accurator_search.js"></script>
+	<script type="text/javascript" src="js/lib/jquery.min.js"></script>
+	<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
+	<script type="text/javascript" src="js/lib/laconic.js"></script>
+	<script type="text/javascript" src="js/components/utilities.js"></script>
+	<script type="text/javascript" src="js/search.js"></script>
 	<script>searchInit()</script>
 </body>
 </html>
diff --git a/web/js/accurator.bootstrap-slider.min.js b/web/js/accurator.bootstrap-slider.min.js
deleted file mode 100755
index a298861..0000000
--- a/web/js/accurator.bootstrap-slider.min.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*! =======================================================
-                      VERSION  4.4.0              
-========================================================= */
-/*! =========================================================
- * bootstrap-slider.js
- *
- * Maintainers:
- *		Kyle Kemp
- *			- Twitter: @seiyria
- *			- Github:  seiyria
- *		Rohit Kalkur
- *			- Twitter: @Rovolutionary
- *			- Github:  rovolution
- *
- * =========================================================
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- * ========================================================= */
-!function(a,b){if("function"==typeof define&&define.amd)define(["jquery"],b);else if("object"==typeof module&&module.exports){var c;try{c=require("jquery")}catch(d){c=null}module.exports=b(c)}else a.Slider=b(a.jQuery)}(this,function(a){var b;return function(a){"use strict";function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l&&l!==k)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}var m=this.map(function(){var d=a.data(this,b);return d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d)),a(this)});return!m||m.length>1?m:m[0]}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;c(a)}(a),function(a){function c(b,c){function d(a,b){var c="data-slider-"+b,d=a.getAttribute(c);try{return JSON.parse(d)}catch(e){return d}}"string"==typeof b?this.element=document.querySelector(b):b instanceof HTMLElement&&(this.element=b);var e,f,g,h=this.element.style.width,i=!1,j=this.element.parentNode;if(this.sliderElem)i=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var k=document.createElement("div");k.className="slider-track",e=document.createElement("div"),e.className="slider-selection",f=document.createElement("div"),f.className="slider-handle min-slider-handle",g=document.createElement("div"),g.className="slider-handle max-slider-handle",k.appendChild(e),k.appendChild(f),k.appendChild(g);var l=function(a){var b=document.createElement("div");b.className="tooltip-arrow";var c=document.createElement("div");c.className="tooltip-inner",a.appendChild(b),a.appendChild(c)},m=document.createElement("div");m.className="tooltip tooltip-main",l(m);var n=document.createElement("div");n.className="tooltip tooltip-min",l(n);var o=document.createElement("div");o.className="tooltip tooltip-max",l(o),this.sliderElem.appendChild(k),this.sliderElem.appendChild(m),this.sliderElem.appendChild(n),this.sliderElem.appendChild(o),j.insertBefore(this.sliderElem,this.element),this.element.style.display="none"}a&&(this.$element=a(this.element),this.$sliderElem=a(this.sliderElem)),c=c?c:{};for(var p=Object.keys(this.defaultOptions),q=0;q<p.length;q++){var r=p[q],s=c[r];s="undefined"!=typeof s?s:d(this.element,r),s=null!==s?s:this.defaultOptions[r],this.options||(this.options={}),this.options[r]=s}this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.tooltip=this.sliderElem.querySelector(".tooltip-main"),this.tooltipInner=this.tooltip.querySelector(".tooltip-inner"),this.tooltip_min=this.sliderElem.querySelector(".tooltip-min"),this.tooltipInner_min=this.tooltip_min.querySelector(".tooltip-inner"),this.tooltip_max=this.sliderElem.querySelector(".tooltip-max"),this.tooltipInner_max=this.tooltip_max.querySelector(".tooltip-inner"),i===!0&&(this._removeClass(this.sliderElem,"slider-horizontal"),this._removeClass(this.sliderElem,"slider-vertical"),this._removeClass(this.tooltip,"hide"),this._removeClass(this.tooltip_min,"hide"),this._removeClass(this.tooltip_max,"hide"),["left","top","width","height"].forEach(function(a){this._removeProperty(this.trackSelection,a)},this),[this.handle1,this.handle2].forEach(function(a){this._removeProperty(a,"left"),this._removeProperty(a,"top")},this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach(function(a){this._removeProperty(a,"left"),this._removeProperty(a,"top"),this._removeProperty(a,"margin-left"),this._removeProperty(a,"margin-top"),this._removeClass(a,"right"),this._removeClass(a,"top")},this)),"vertical"===this.options.orientation?(this._addClass(this.sliderElem,"slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight",this._addClass(this.tooltip,"right"),this.tooltip.style.left="100%",this._addClass(this.tooltip_min,"right"),this.tooltip_min.style.left="100%",this._addClass(this.tooltip_max,"right"),this.tooltip_max.style.left="100%"):(this._addClass(this.sliderElem,"slider-horizontal"),this.sliderElem.style.width=h,this.options.orientation="horizontal",this.stylePos="left",this.mousePos="pageX",this.sizePos="offsetWidth",this._addClass(this.tooltip,"top"),this.tooltip.style.top=-this.tooltip.outerHeight-14+"px",this._addClass(this.tooltip_min,"top"),this.tooltip_min.style.top=-this.tooltip_min.outerHeight-14+"px",this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=-this.tooltip_max.outerHeight-14+"px"),this.options.value instanceof Array?this.options.range=!0:this.options.range&&(this.options.value=[this.options.value,this.options.max]),this.trackSelection=e||this.trackSelection,"none"===this.options.selection&&this._addClass(this.trackSelection,"hide"),this.handle1=f||this.handle1,this.handle2=g||this.handle2,i===!0&&(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"));var t=["round","triangle","custom"],u=-1!==t.indexOf(this.options.handle);u&&(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle)),this.offset=this._offset(this.sliderElem),this.size=this.sliderElem[this.sizePos],this.setValue(this.options.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener("keydown",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener("keydown",this.handle2Keydown,!1),this.touchCapable?(this.mousedown=this._mousedown.bind(this),this.sliderElem.addEventListener("touchstart",this.mousedown,!1)):(this.mousedown=this._mousedown.bind(this),this.sliderElem.addEventListener("mousedown",this.mousedown,!1)),"hide"===this.options.tooltip?(this._addClass(this.tooltip,"hide"),this._addClass(this.tooltip_min,"hide"),this._addClass(this.tooltip_max,"hide")):"always"===this.options.tooltip?(this._showTooltip(),this._alwaysShowTooltip=!0):(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.sliderElem.addEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.addEventListener("mouseleave",this.hideTooltip,!1),this.handle1.addEventListener("focus",this.showTooltip,!1),this.handle1.addEventListener("blur",this.hideTooltip,!1),this.handle2.addEventListener("focus",this.showTooltip,!1),this.handle2.addEventListener("blur",this.hideTooltip,!1)),this.options.enabled?this.enable():this.disable()}var d={formatInvalidInputErrorMsg:function(a){return"Invalid input value '"+a+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"};if(b=function(a,b){return c.call(this,a,b),this},b.prototype={_init:function(){},constructor:b,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,handle:"round",reversed:!1,enabled:!0,formatter:function(a){return a instanceof Array?a[0]+" : "+a[1]:a},natural_arrow_keys:!1},over:!1,inDrag:!1,getValue:function(){return this.options.range?this.options.value:this.options.value[0]},setValue:function(a,b){a||(a=0);var c=this.getValue();this.options.value=this._validateInputValue(a);var d=this._applyPrecision.bind(this);this.options.range?(this.options.value[0]=d(this.options.value[0]),this.options.value[1]=d(this.options.value[1]),this.options.value[0]=Math.max(this.options.min,Math.min(this.options.max,this.options.value[0])),this.options.value[1]=Math.max(this.options.min,Math.min(this.options.max,this.options.value[1]))):(this.options.value=d(this.options.value),this.options.value=[Math.max(this.options.min,Math.min(this.options.max,this.options.value))],this._addClass(this.handle2,"hide"),this.options.value[1]="after"===this.options.selection?this.options.max:this.options.min),this.diff=this.options.max-this.options.min,this.percentage=this.diff>0?[100*(this.options.value[0]-this.options.min)/this.diff,100*(this.options.value[1]-this.options.min)/this.diff,100*this.options.step/this.diff]:[0,0,100],this._layout();var e=this.options.range?this.options.value:this.options.value[0];return b===!0&&this._trigger("slide",e),c!==e&&this._trigger("change",{oldValue:c,newValue:e}),this._setDataVal(e),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),a&&(this._unbindJQueryEventHandlers(),this.$element.removeData("slider"))},disable:function(){return this.options.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this.options.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this.options.enabled?this.disable():this.enable(),this},isEnabled:function(){return this.options.enabled},on:function(b,c){return a?(this.$element.on(b,c),this.$sliderElem.on(b,c)):this._bindNonQueryEventHandler(b,c),this},getAttribute:function(a){return a?this.options[a]:this.options},setAttribute:function(a,b){return this.options[a]=b,this},refresh:function(){return this._removeSliderEventHandlers(),c.call(this,this.element,this.options),a&&a.data(this.element,"slider",this),this},relayout:function(){return this._layout(),this},_removeSliderEventHandlers:function(){this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle1.removeEventListener("focus",this.showTooltip,!1),this.handle1.removeEventListener("blur",this.hideTooltip,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.handle2.removeEventListener("focus",this.handle2Keydown,!1),this.handle2.removeEventListener("blur",this.handle2Keydown,!1),this.sliderElem.removeEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,!1),this.sliderElem.removeEventListener("touchstart",this.mousedown,!1),this.sliderElem.removeEventListener("mousedown",this.mousedown,!1)},_bindNonQueryEventHandler:function(a,b){void 0===this.eventToCallbackMap[a]&&(this.eventToCallbackMap[a]=[]),this.eventToCallbackMap[a].push(b)},_cleanUpEventCallbacksMap:function(){for(var a=Object.keys(this.eventToCallbackMap),b=0;b<a.length;b++){var c=a[b];this.eventToCallbackMap[c]=null}},_showTooltip:function(){this.options.tooltip_split===!1?this._addClass(this.tooltip,"in"):(this._addClass(this.tooltip_min,"in"),this._addClass(this.tooltip_max,"in")),this.over=!0},_hideTooltip:function(){this.inDrag===!1&&this.alwaysShowTooltip!==!0&&(this._removeClass(this.tooltip,"in"),this._removeClass(this.tooltip_min,"in"),this._removeClass(this.tooltip_max,"in")),this.over=!1},_layout:function(){var a;if(a=this.options.reversed?[100-this.percentage[0],this.percentage[1]]:[this.percentage[0],this.percentage[1]],this.handle1.style[this.stylePos]=a[0]+"%",this.handle2.style[this.stylePos]=a[1]+"%","vertical"===this.options.orientation)this.trackSelection.style.top=Math.min(a[0],a[1])+"%",this.trackSelection.style.height=Math.abs(a[0]-a[1])+"%";else{this.trackSelection.style.left=Math.min(a[0],a[1])+"%",this.trackSelection.style.width=Math.abs(a[0]-a[1])+"%";var b=this.tooltip_min.getBoundingClientRect(),c=this.tooltip_max.getBoundingClientRect();b.right>c.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="-30px")}var d;if(this.options.range){d=this.options.formatter(this.options.value),this._setText(this.tooltipInner,d),this.tooltip.style[this.stylePos]=(a[1]+a[0])/2+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px"),"vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px");var e=this.options.formatter(this.options.value[0]);this._setText(this.tooltipInner_min,e);var f=this.options.formatter(this.options.value[1]);this._setText(this.tooltipInner_max,f),this.tooltip_min.style[this.stylePos]=a[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip_min,"margin-top",-this.tooltip_min.offsetHeight/2+"px"):this._css(this.tooltip_min,"margin-left",-this.tooltip_min.offsetWidth/2+"px"),this.tooltip_max.style[this.stylePos]=a[1]+"%","vertical"===this.options.orientation?this._css(this.tooltip_max,"margin-top",-this.tooltip_max.offsetHeight/2+"px"):this._css(this.tooltip_max,"margin-left",-this.tooltip_max.offsetWidth/2+"px")}else d=this.options.formatter(this.options.value[0]),this._setText(this.tooltipInner,d),this.tooltip.style[this.stylePos]=a[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px")},_removeProperty:function(a,b){a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(b)},_mousedown:function(a){if(!this.options.enabled)return!1;this._triggerFocusOnHandle(),this.offset=this._offset(this.sliderElem),this.size=this.sliderElem[this.sizePos];var b=this._getPercentage(a);if(this.options.range){var c=Math.abs(this.percentage[0]-b),d=Math.abs(this.percentage[1]-b);this.dragged=d>c?0:1}else this.dragged=0;this.percentage[this.dragged]=this.options.reversed?100-b:b,this._layout(),this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),this.mousemove&&document.removeEventListener("mousemove",this.mousemove,!1),this.mouseup&&document.removeEventListener("mouseup",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener("touchmove",this.mousemove,!1),document.addEventListener("touchend",this.mouseup,!1)),document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1),this.inDrag=!0;var e=this._calculateValue();return this._trigger("slideStart",e),this._setDataVal(e),this.setValue(e),this._pauseEvent(a),!0},_triggerFocusOnHandle:function(a){0===a&&this.handle1.focus(),1===a&&this.handle2.focus()},_keydown:function(a,b){if(!this.options.enabled)return!1;var c;switch(b.keyCode){case 37:case 40:c=-1;break;case 39:case 38:c=1}if(c){if(this.options.natural_arrow_keys){var d="vertical"===this.options.orientation&&!this.options.reversed,e="horizontal"===this.options.orientation&&this.options.reversed;(d||e)&&(c=-1*c)}var f=c*this.percentage[2],g=this.percentage[a]+f;g>100?g=100:0>g&&(g=0),this.dragged=a,this._adjustPercentageForRangeSliders(g),this.percentage[this.dragged]=g,this._layout();var h=this._calculateValue();return this._trigger("slideStart",h),this._setDataVal(h),this.setValue(h,!0),this._trigger("slideStop",h),this._setDataVal(h),this._pauseEvent(b),!1}},_pauseEvent:function(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.returnValue=!1},_mousemove:function(a){if(!this.options.enabled)return!1;var b=this._getPercentage(a);this._adjustPercentageForRangeSliders(b),this.percentage[this.dragged]=this.options.reversed?100-b:b,this._layout();var c=this._calculateValue();return this.setValue(c,!0),!1},_adjustPercentageForRangeSliders:function(a){this.options.range&&(0===this.dragged&&this.percentage[1]<a?(this.percentage[0]=this.percentage[1],this.dragged=1):1===this.dragged&&this.percentage[0]>a&&(this.percentage[1]=this.percentage[0],this.dragged=0))},_mouseup:function(){if(!this.options.enabled)return!1;this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this.inDrag=!1,this.over===!1&&this._hideTooltip();var a=this._calculateValue();return this._layout(),this._trigger("slideStop",a),this._setDataVal(a),!1},_calculateValue:function(){var a;return this.options.range?(a=[this.options.min,this.options.max],0!==this.percentage[0]&&(a[0]=Math.max(this.options.min,this.options.min+Math.round(this.diff*this.percentage[0]/100/this.options.step)*this.options.step),a[0]=this._applyPrecision(a[0])),100!==this.percentage[1]&&(a[1]=Math.min(this.options.max,this.options.min+Math.round(this.diff*this.percentage[1]/100/this.options.step)*this.options.step),a[1]=this._applyPrecision(a[1]))):(a=this.options.min+Math.round(this.diff*this.percentage[0]/100/this.options.step)*this.options.step,a<this.options.min?a=this.options.min:a>this.options.max&&(a=this.options.max),a=parseFloat(a),a=this._applyPrecision(a)),a},_applyPrecision:function(a){var b=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(a,b)},_getNumDigitsAfterDecimalPlace:function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},_applyToFixedAndParseFloat:function(a,b){var c=a.toFixed(b);return parseFloat(c)},_getPercentage:function(a){!this.touchCapable||"touchstart"!==a.type&&"touchmove"!==a.type||(a=a.touches[0]);var b=100*(a[this.mousePos]-this.offset[this.stylePos])/this.size;return b=Math.round(b/this.percentage[2])*this.percentage[2],Math.max(0,Math.min(100,b))},_validateInputValue:function(a){if("number"==typeof a)return a;if(a instanceof Array)return this._validateArray(a),a;throw new Error(d.formatInvalidInputErrorMsg(a))},_validateArray:function(a){for(var b=0;b<a.length;b++){var c=a[b];if("number"!=typeof c)throw new Error(d.formatInvalidInputErrorMsg(c))}},_setDataVal:function(a){var b="value: '"+a+"'";this.element.setAttribute("data",b),this.element.setAttribute("value",a)},_trigger:function(b,c){c=c||0===c?c:void 0;var d=this.eventToCallbackMap[b];if(d&&d.length)for(var e=0;e<d.length;e++){var f=d[e];f(c)}a&&this._triggerJQueryEvent(b,c)},_triggerJQueryEvent:function(a,b){var c={type:a,value:b};this.$element.trigger(c),this.$sliderElem.trigger(c)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(a,b){"undefined"!=typeof a.innerText?a.innerText=b:"undefined"!=typeof a.textContent&&(a.textContent=b)},_removeClass:function(a,b){for(var c=b.split(" "),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp("(?:\\s|^)"+f+"(?:\\s|$)");d=d.replace(g," ")}a.className=d.trim()},_addClass:function(a,b){for(var c=b.split(" "),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp("(?:\\s|^)"+f+"(?:\\s|$)"),h=g.test(d);h||(d+=" "+f)}a.className=d.trim()},_offset:function(a){var b=0,c=0;if(a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return{left:b,top:c}},_css:function(b,c,d){if(a)a.style(b,c,d);else{var e=c.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,b){return b.toUpperCase()});b.style[e]=d}}},a){var e=a.fn.slider?"bootstrapSlider":"slider";a.bridget(e,b)}}(a),b});
\ No newline at end of file
diff --git a/web/js/accurator.bootstrap.min.js b/web/js/accurator.bootstrap.min.js
deleted file mode 100644
index c8f82e5..0000000
--- a/web/js/accurator.bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
-var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/web/js/accurator.jquery.min.js b/web/js/accurator.jquery.min.js
deleted file mode 100644
index e6a051d..0000000
--- a/web/js/accurator.jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
-return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)
-}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/web/js/accurator.laconic.js b/web/js/accurator.laconic.js
deleted file mode 100644
index a283cbe..0000000
--- a/web/js/accurator.laconic.js
+++ /dev/null
@@ -1,195 +0,0 @@
-// Laconic simplifies the generation of DOM content.
-(function(context) {
-
-  // properly-cased attribute names for IE setAttribute support
-  var attributeMap = {
-    'acceptcharset'     : 'acceptCharset',
-    'accesskey'         : 'accessKey',
-    'allowtransparency' : 'allowTransparency',
-    'bgcolor'           : 'bgColor',
-    'cellpadding'       : 'cellPadding',
-    'cellspacing'       : 'cellSpacing',
-    'class'             : 'className',
-    'classname'         : 'className',
-    'colspan'           : 'colSpan',
-    'csstext'           : 'style',
-    'defaultchecked'    : 'defaultChecked',
-    'defaultselected'   : 'defaultSelected',
-    'defaultvalue'      : 'defaultValue',
-    'for'               : 'htmlFor',
-    'frameborder'       : 'frameBorder',
-    'hspace'            : 'hSpace',
-    'htmlfor'           : 'htmlFor',
-    'longdesc'          : 'longDesc',
-    'maxlength'         : 'maxLength',
-    'marginwidth'       : 'marginWidth',
-    'marginheight'      : 'marginHeight',
-    'noresize'          : 'noResize',
-    'noshade'           : 'noShade',
-    'readonly'          : 'readOnly',
-    'rowspan'           : 'rowSpan',
-    'tabindex'          : 'tabIndex',
-    'valign'            : 'vAlign',
-    'vspace'            : 'vSpace'
-  };
-
-  // The laconic function serves as a generic method for generating
-  // DOM content, and also as a placeholder for helper functions.
-  //
-  // The first parameter MUST be a string specifying the element's 
-  // tag name.  
-  // 
-  // An optional object of element attributs may follow directly 
-  // after the tag name.  
-  // 
-  // Additional arguments will be considered children of the new 
-  // element and may consist of elements, strings, or numbers.
-  // 
-  // for example:
-  // laconic('div', {'class' : 'foo'}, 'bar');
-  function laconic() {
-
-    // create a new element of the requested type
-    var el = document.createElement(arguments[0]);
-    
-    // walk through the rest of the arguments
-    for(var i=1; i<arguments.length; i++) {
-      var arg = arguments[i];
-      if(arg === null || arg === undefined) continue;
-
-      // if the argument is a dom node, we simply append it
-      if(arg.nodeType === 1) {
-        el.appendChild(arg); 
-      }
-
-      // if the argument is a string or a number, we append it as
-      // a new text node
-      else if(
-          (!!(arg === '' || (arg && arg.charCodeAt && arg.substr))) ||
-          (!!(arg === 0  || (arg && arg.toExponential && arg.toFixed)))) {
-
-        el.appendChild(document.createTextNode(arg));
-      }
-
-      // if the argument is a plain-old object, and we're processing the first 
-      // argument, then we apply the object's values as element attributes
-      else if(i === 1 && typeof(arg) === 'object') {
-        for(var key in arg) {
-          if(arg.hasOwnProperty(key)) {
-            var value = arg[key];
-            if(value !== null && value !== undefined) {
-              key = key.toLowerCase();
-              key = attributeMap[key] || key;
-
-              // if the key represents an event (onclick, onchange, etc)
-              // we'll set the href to '#' if none is given, and we'll apply
-              // the attribute directly to the element for IE7 support.
-              var isEvent = key.charAt(0) === 'o' && key.charAt(1) === 'n';
-              if(isEvent) {
-                if(arg.href === undefined && key === 'onclick') {
-                  el.setAttribute('href', '#');
-                }
-                el[key] = value;
-              }
-
-              // if we're setting the style attribute, we may need to 
-              // use the cssText property
-              else if(key === 'style' && el.style.setAttribute) {
-                el.style.setAttribute('cssText', value);
-              }
-
-              // if we're setting an attribute that's not properly supported 
-              // by IE7's setAttribute implementation, then we apply the 
-              // attribute directly to the element
-              else if(key === 'className' || key === 'htmlFor') {
-                el[key] = value;
-              }
-
-              // otherwise, we use the standard setAttribute
-              else {
-                el.setAttribute(key, value);
-              }
-            }
-          }
-        }
-      }
-
-      // if the argument is an array, we append each element
-      else if(Object.prototype.toString.call(arg) === '[object Array]') {
-        for(var j=0; j<arg.length; j++) {
-          var child = arg[j];
-          if(child.nodeType === 1) {
-            el.appendChild(child);
-          }
-        }
-      }
-    }
-
-    // Add an appendTo method to the newly created element, which will allow
-    // the DOM insertion to be method chained to the creation.  For example:
-    // $el.div('foo').appendTo(document.body);
-    el.appendTo = function(parentNode) {
-      if(parentNode.nodeType === 1 && this.nodeType === 1) {
-        parentNode.appendChild(this);
-      }
-      return el;
-    };
-    
-    return el;
-  }
-
-  // registers a new 'tag' that can be used to automate
-  // the creation of a known element hierarchy
-  laconic.registerElement= function(name, renderer) {
-    if(!laconic[name]) {
-      laconic[name] = function() {
-        var el = laconic('div', {'class' : name});
-        renderer.apply(el, Array.prototype.slice.call(arguments));
-        return el;
-      };
-    }
-  };
-
-  // html 4 tags 
-  var deprecatedTags = ['acronym', 'applet', 'basefont', 'big', 'center', 'dir',
-    'font', 'frame', 'frameset', 'noframes', 'strike', 'tt', 'u', 'xmp'];
-
-  // html 5 tags
-  var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b',
-    'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption',
-    'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del',
-    'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset',
-    'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5',
-    'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img',
-    'input', 'ins', 'keygen', 'kbd', 'label', 'legend', 'li', 'link', 'map',
-    'mark', 'menu', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol',
-    'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp',
-    'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small',
-    'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table',
-    'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr',
-    'ul', 'var', 'video', 'wbr'].concat(deprecatedTags);
-
-  // add our tag methods to the laconic object 
-  var makeApply = function(tagName) {
-    return function() {
-      return laconic.apply(this, 
-        [tagName].concat(Array.prototype.slice.call(arguments)));
-    };
-  };
-
-  for(var i=0; i<tags.length; i++) {
-    laconic[tags[i]] = makeApply(tags[i]);
-  }
-
-  // If we're in a CommonJS environment, we export our laconic methods
-  if(typeof module !== 'undefined' && module.exports) {
-    module.exports = laconic;
-  } 
-
-  // otherwise, we attach them to the top level $.el namespace
-  else {
-    var dollar = context.$ || {};
-    dollar.el = laconic;
-    context.$ = dollar;
-  }
-}(this));
diff --git a/web/js/accurator_about.js b/web/js/accurator_about.js
deleted file mode 100644
index 68130ba..0000000
--- a/web/js/accurator_about.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
-Accurator About
-Code for showing the about page.
-*******************************************************************************/
-"use strict";
-
-function aboutInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		setLinkLogo("profile");
-		var userName = getUserName(userData.user);
-		populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
-		return domainSettings(domain);
-	}, function() {
-		return domainSettings(domain);
-	})
-	.then(function(domainSettings) {
-		var ui = getUI(domainSettings, "about");
-		return getLabels(locale, ui);
-	})
-	.then(function(labels) {
-		initLabels(labels);
-		addButtonEvents();
-	});
-}
-
-function initLabels(labels) {
-	document.title = labels.aboutPageTitle;
-	$("#aboutHdrAccuratorSlogan").append(labels.aboutHdrAccuratorSlogan);
-	$("#aboutTxtAccurator").append(labels.aboutTxtAccurator);
-	$("#aboutHdrSealincMediaSlogan").append(labels.aboutHdrSealincMediaSlogan);
-	$("#aboutTxtSealincMedia").append(labels.aboutTxtSealincMedia);
-	$("#aboutHdrSealincResearchSlogan").append(labels.aboutHdrSealincResearchSlogan);
-	$("#aboutTxtSealincResearch").append(labels.aboutTxtSealincResearch);
-	$("#aboutBtnGoBackHome").append(labels.aboutBtnGoBackHome);
-}
-
-function addButtonEvents() {
-	$("#aboutBtnGoBackHome").click(function() {
-		document.location.href="intro.html";
-	});
-}
diff --git a/web/js/accurator_domain.js b/web/js/accurator_domain.js
deleted file mode 100644
index b3d18b8..0000000
--- a/web/js/accurator_domain.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
-Accurator Domain
-This code loads domain options into the page, where the options depend on the
-domains loaded in the triple store.
-*******************************************************************************/
-function domainInit() {
-	var locale = getLocale();
-	// be domain agnostic on domain selection screen
-	var domain = "generic";
-
-	// add language switch to navbar
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		drawPage(userData);
-	}, function() {
-		// user is not logged in, show modal
-		var onDismissal = function() {document.location.href="intro.html"};
-		login(drawPage, onDismissal);
-	});
-
-	function drawPage(userData) {
-		setLinkLogo("profile");
-
-		getAvailableDomains()
-		.then(function(domains) {
-			// draw all domains
-			populateDomains(locale, domains);
-			return domainSettings(domain);
-		})
-		.then(function(domainSettings) {
-			var ui = getUI(domainSettings, "domain");
-			return getLabels(locale, ui);
-		})
-		.then(function(labels) {
-			document.title = labels.domainPageTitle;
-			$("#domainTxtTitle").append(labels.domainTxtTitle);
-			var userName = getUserName(userData.user);
-			populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
-		});
-	}
-}
-
-function populateDomains(locale, domainLabels) {
-	var row;
-
-	// get domain settings for all the domains
-	for(var i=0; i<domainLabels.length; i++) {
-		if(!(i%2===0)) {
-			row = parseInt((i/2) + 0.5);
-			// Add a new row for every two domains
-			$(".domainDiv").append(
-				$.el.div({'class':'row',
-						  'id':'domain' + row}));
-		}
-
-		// add domain specific html to rows
-		$.getJSON("domains", {domain:domainLabels[i]})
-		.then(function(domainData) {
-			if(!(domainData.domain === "generic")) {
-				domainHtml(domainData, row, locale);
-			}
-		});
-	}
-}
-
-function domainHtml(domainData, row, locale) {
-	var domain = domainData.domain;
-	getLabels(locale, domainData.ui + "domain")
-	.then(function(labels) {
-		$("#domain" + row).append(
-			$.el.div({'class':'noPadding col-md-6'},
-				$.el.h3({'class':'domainHdr',
-						 'id':'domainTxt' + domain},
-						 labels.domainLabel),
-				$.el.img({'class':'domainImg',
-						  'id':'domainImg' + domain,
-						  'src':domainData.image})));
-		if(domainData.image_brightness === "dark")
-			$("#domainTxt" + domainData.domain).css('color', '#fff');
-		addDomainEvent(domain);
-	});
-}
-
-function addDomainEvent(domain) {
-	$("#domainImg" + domain).click(function() {
-		setDomain(domain)
-		.then(function() {
-			document.location.href="expertise.html"
-		});
-	});
-	$("#domainTxt" + domain).click(function() {
-		setDomain(domain)
-		.then(function() {
-			document.location.href="expertise.html"
-		});
-	});
-}
diff --git a/web/js/accurator_end.js b/web/js/accurator_end.js
deleted file mode 100644
index 9a4c7d6..0000000
--- a/web/js/accurator_end.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
-Accurator End
-Code for showing the last page, adapts to the domain and locale setting.
-*******************************************************************************/
-var locale, domain, experiment, ui, domainSettings;
-
-function endInit() {
-	// Get settings
-	locale = getLocale();
-	domain = getDomain();
-	experiment = getExperiment();
-
-	// Add language switch to navbar
-	populateFlags(locale);
-
-	// Get domain settings before populating ui
-	onDomain = function(domainSettings) {
-		ui = getUI(domainSettings, "end");
-		setBackground(domainSettings.last_image,
-					  domainSettings.last_image_brightness);
-		populateUI();
-	};
-	domainSettings = domainSettings(domain, onDomain);
-	// If user is logged in go to profile page
-	onLoggedIn = function() {
-
-	};
-	// If user is not logged in populate end page
-	onNotLoggedIn = function() {};
-	userLoggedIn(onLoggedIn, onNotLoggedIn);
-}
-
-function setBackground(backgroundUrl, imageBrightness) {
-	$(".endImgBackground").attr("src", backgroundUrl);
-
-	if (imageBrightness === "dark") {
-	   // Make font lighter to make it readable
-	   $("#endTxtSlogan").css('color', '#FFFFFF');
-	}
-}
-
-function populateUI() {
-	// Retrieve labels from server according to locale and ui
-	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"labels"})
-		.done(function(labels){
-			  addButtonEvents();
-			  initLabels(labels);});
-}
-
-function addButtonEvents() {
-	$("#endBtnContinue").click(function() {
-		window.location.href="http://annotate.accurator.nl";
-	});
-}
-
-function initLabels(labels) {
-	// Add retrieved labels to html elements
-	$("#endTxtSlogan").prepend(labels.endTxtSlogan);
-	$("#endTxtSubSlogan").prepend(labels.endTxtSubSlogan);
-	$("#endBtnContinue").append(labels.endBtnContinue);
-	$("#endLnkAbout").append(labels.endLnkAbout);
-}
diff --git a/web/js/accurator_expertise.js b/web/js/accurator_expertise.js
deleted file mode 100644
index b81ac53..0000000
--- a/web/js/accurator_expertise.js
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
-Accurator Expertise
-Show expertise topics for the selected domain. Expertise topics are retrieved
-from triple store and sliders are used for providing values.
-*******************************************************************************/
-"use strict";
-
-function expertiseInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-
-	// add language switch to navbar
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		drawPage(userData);
-	}, function() {
-		// user is not logged in, show modal
-		var onDismissal = function() {document.location.href="intro.html"};
-		login(drawPage, onDismissal);
-	});
-
-	function drawPage(userData) {
-		setLinkLogo("profile");
-		var domainData;
-
-		domainSettings(domain)
-		.then(function(data) {
-			domainData = data;
-			var user = userData.user;
-			var userName = getUserName(user);
-			populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
-			return getLabels(locale, domainData.ui + "expertise");
-		})
-		.then(function(labels) {
-			var labelArray = initLabels(labels);
-			return initExpertiseTopics(domainData, locale, labelArray)
-		})
-		.then(function(topics) {
-			registerEvents(topics);
-		});
-	}
-}
-
-function initLabels(data) {
-	$("#expertiseTxtHeader").prepend(data.expertiseTxtHeader);
-	$("#expertiseTxtSubHeader").prepend(data.expertiseTxtSubHeader);
-	$("#expertiseBtnSubmit").append(data.expertiseBtnSubmit);
-	$("#expertiseBtnSkip").append(data.expertiseBtnSkip);
-
-	var labels = {
-		sldALot: data.expertiseSldALot,
-		sldNothing: data.expertiseSldNothing,
-		txtChangeAll: data.expertiseTxtChangeAll
-	}
-
-	return labels;
-}
-
-function registerEvents(topics) {
-	$("#expertiseBtnSubmit").click(function() {processExpertiseValues(topics);});
-	$("#expertiseBtnSkip").click(function() {document.location.href="results.html"});
-}
-
-function initExpertiseTopics(domainData, locale, labels) {
-	return $.getJSON("expertise_topics", {
-		locale:locale,
-		taxonomy:domainData.taxonomy,
-		top_concept:domainData.top_concept,
-		number_of_topics:domainData.number_of_topics,
-		number_of_children_shown:domainData.number_of_children_shown
-	})
-	.then(function(data){
-		var topics = generateIds(data.topics);
-		var sliderIds = [];
-		var halfTheTopics = parseInt(topics.length/2, 10);
-
-		addMasterSlider(sliderIds, labels);
-
-		for(var i=0; i<halfTheTopics; i++) {
-			$("#expertiseDivExpertiseLeft").append(
-				$.el.div({'class':'row'},
-					$.el.div({'class':'col-md-10 col-md-offset-1'},
-						$.el.h5({'id':'expertiseLblExpertise'},
-							topics[i].label,
-							$.el.small(printArray(topics[i].childrens_labels))))));
-			$("#expertiseDivExpertiseLeft").append(
-				$.el.div({'class':'row'},
-					$.el.div({'class':'col-md-10 col-md-offset-1'},
-						$.el.small({'class':'expertiseLblSlider'}, labels.sldNothing),
-									expertiseSlider(topics[i].id),
-							$.el.small({'class':'expertiseLblSlider'}, labels.sldALot))));
-			initSlider(topics[i].id);
-			sliderIds[i] = topics[i].id;
-		}
-		for(var i=halfTheTopics; i<topics.length; i++) {
-			$("#expertiseDivExpertiseRight").append(
-				$.el.div({'class':'row'},
-					$.el.div({'class':'col-md-10 col-md-offset-1'},
-						$.el.h5({'id':'expertiseLblExpertise'},
-							topics[i].label,
-							$.el.small(printArray(topics[i].childrens_labels))))));
-			$("#expertiseDivExpertiseRight").append(
-				$.el.div({'class':'row'},
-					$.el.div({'class':'col-md-10 col-md-offset-1'},
-						$.el.small({'class':'expertiseLblSlider'}, labels.sldNothing),
-						expertiseSlider(topics[i].id),
-						$.el.small({'class':'expertiseLblSlider'}, labels.sldALot))));
-			initSlider(topics[i].id);
-			sliderIds[i] = topics[i].id;
-		}
-		setSliderValues();
-
-		return topics;
-	});
-}
-
-function generateIds(topics) {
-	for(var i=0; i<topics.length; i++) {
-		topics[i].id = generateIdFromUri(topics[i].uri);
-	}
-	return topics;
-}
-
-function expertiseSlider(id) {
-	return $.el.input({'id':id,
-						'data-slider-id':'sld'+id,
-						'type':'text',
-						'data-slider-min':'1',
-						'data-slider-max':'5',
-						'data-slider-step':'0.1',
-						'data-slider-value':'3'});
-}
-
-function initSlider(id) {
-	$("#"+id).slider();
-}
-
-function processExpertiseValues(topics) {
-	var userExpertise = {};
-	userExpertise.user = user;
-	userExpertise.expertise = {};
-
-	for (var i=0; i<topics.length; i++) {
-		var value = $("#"+topics[i].id).val();
-		var scaledValue = (value - 1) / 4;
-		var roundedValue = scaledValue.toFixed(2);
-		userExpertise.expertise[topics[i].uri] = roundedValue;
-	}
-
-	$.ajax({type: "POST",
-		    url: "expertise_values",
-			contentType: "application/json",
-			data: JSON.stringify(userExpertise),
-	})
-	.then(function() {
-		document.location.href="results.html";
-	});
-}
-
-function printArray(labelArray) {
-	var arrayString = "";
-	for(var i=0; i<labelArray.length; i++) {
-		arrayString += " " + labelArray[i];
-	}
-	return arrayString;
-}
-
-function setSliderValues() {
-	$.getJSON("expertise_values")
-	.then(function(expertValues){
-		var uris = Object.keys(expertValues);
-		for(var i=0; i<uris.length; i++){
-			// Generate id based on uri
-			var uri = uris[i];
-			var id = generateIdFromUri(uri);
-			var value = Number(expertValues[uris[i]]);
-			var descaledValue = (value * 4) + 1;
-
-			// if no expertise value is given, set the default to 3
-			if(expertValues[uris[i]] === "-1")
-				descaledValue = 3;
-
-			// Set slider value
-			$("#"+id).slider('setValue', descaledValue);
-		}
-	});
-}
-
-function addMasterSlider(sliderIds, labels) {
-	$("#expertiseDivExpertiseMaster").append(
-		$.el.div({'class':'row'},
-			$.el.div({'class':'col-md-10 col-md-offset-1'},
-				$.el.h4({'id':'expertiseLblExpertise'},
-					labels.txtChangeAll))));
-	$("#expertiseDivExpertiseMaster").append(
-		$.el.div({'class':'row'},
-			$.el.div({'class':'col-md-10 col-md-offset-1'},
-				$.el.span({'id':'expertiseLblMasterLeft'}, labels.sldNothing),
-				expertiseSlider("master"),
-				$.el.span({'id':'expertiseLblMasterRight'}, labels.sldALot))));
-	$("#master").slider();
-
-	//Change all values on using master slider
-	$("#master").on("slide", function(slideEvt) {
-		for(var i=0; i<sliderIds.length; i++) {
-			$("#" + sliderIds[i]).slider('setValue', slideEvt.value);
-		}
-	});
-}
diff --git a/web/js/accurator_form.js b/web/js/accurator_form.js
deleted file mode 100644
index 8110240..0000000
--- a/web/js/accurator_form.js
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
-Accurator Form
-Code for rendering fields used for elliciting information about user.
-*******************************************************************************/
-var locale, domain, experiment, ui;
-var countries = [];
-var languages = [];
-var formOptsEducation,  formOptsInternet;
-var info = {};
-var twitterFieldAdded = false;
-var tagsiteFieldAdded = false;
-var socialFieldAdded = false;
-var formLblTwitterId, formLblTagSiteOpen, formLblSocialSiteOpen;
-var formTxtDisclaimer, formHdrDisclaimer;
-
-function formInit() {
-	locale = getLocale();
-	domain = getDomain();
-	experiment = getExperiment();
-	populateFlags(locale);
-
-	// Make sure user is logged in
-	onLoggedIn = function(loginData){
-		setLinkLogo("profile");
-
-		//Get domain settings before populating ui
-		onDomain = function(domainData) {
-			ui = domainData.ui + "form";
-			populateUI();
-			var userName = getUserName(loginData.user);
-			populateNavbar(userName, [{link:"profile.html", name:"Profile"}]);
-		};
-		domainSettings = domainSettings(domain, onDomain);
-	};
-	onDismissal = function(){document.location.href="intro.html"};
-	logUserIn(onLoggedIn, onDismissal);
-}
-
-function nextPage() {
-	// Determine which page will be shown next
-	if(experiment === "true") {
-		return function(){document.location.href="expertise.html"};
-	} else {
-		return function(){document.location.href="domain.html"};
-	}
-}
-
-function populateUI() {
-	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"labels"})
-	.done(function(data){
-		addButtonEvents();
-		initLabels(data);
-		addFormEvents();
-		alertMessage(formHdrDisclaimer, formTxtDisclaimer, 'info');
-	});
-}
-
-function addButtonEvents() {
-	$("#formBtnAdd").click(function() {
-		processFormFields();
-	});
-	$("#formBtnSkip").click(function() {
-		// Get function for next page and execute
-		nextPage()();
-	});
-}
-
-function initLabels(labels) {
-	document.title = labels.formPageTitle;
-	$("#formHdrInternetUsage").append(labels.formHdrInternetUsage);
-	$("#formHdrPersonalInfo").append(labels.formHdrPersonalInfo);
-	formLblTwitterId = labels.formLblTwitterId;
-	formLblTagSiteOpen = labels.formLblTagSiteOpen;
-	formLblSocialSiteOpen = labels.formLblSocialSiteOpen;
-	$("#formHdrSlogan").prepend(labels.formHdrSlogan);
-	$("#formHdrSubSlogan").append(labels.formHdrSubSlogan);
-	initFormQuestions(labels);
-	$("#formBtnAdd").append(labels.formBtnAdd);
-	$("#formBtnSkip").append(labels.formBtnSkip);
-	initRadioButtons(labels);
-	initCheckboxes(labels);
-	initCountriesSelector();
-	initLanguagesSelector();
-	formOptsEducation = labels.formOptsEducation;
-	initEducationSelector();
-	formOptsInternet = labels.formOptsInternet;
-	initInternetSelector(labels.formOptsInternet);
-	formTxtDisclaimer = labels.formTxtDisclaimer;
-	formHdrDisclaimer = labels.formHdrDisclaimer;
-}
-
-function initFormQuestions(data) {
-	$("#formLblBirthDate").append(data.formLblBirthDate);
-	$("#formLblGender").append(data.formLblGender);
-	$("#formLblCountry").append(data.formLblCountry);
-	$("#formLblCommunity").append(data.formLblCommunity);
-	$("#formLblLanguage").append(data.formLblLanguage);
-	$("#formLblEducation").append(data.formLblEducation);
-	$("#formLblMail").append(data.formLblMail);
-	$("#formLblEmailCheck").append(data.formLblEmailCheck);
-	$("#formLblSocialNetwork").append(data.formLblSocialNetwork);
-	$("#formLblInternetUsage").append(data.formLblInternetUsage);
-	$("#formLblMuseumVisits").append(data.formLblMuseumVisits);
-	$("#formLblTaggingExperience").append(data.formLblTaggingExperience);
-	$("#formLblTagSite").append(data.formLblTagSite);
-}
-
-function initRadioButtons(data) {
-	$("#formRbtnMale").after(data.formRbtnMale);
-	$("#formRbtnFemale").after(data.formRbtnFemale);
-	$("#formRbtnUrban").after(data.formRbtnUrban);
-	$("#formRbtnSubUrban").after(data.formRbtnSubUrban);
-	$("#formRbtnRural").after(data.formRbtnRural);
-	$("#formRbtnNone").after(data.formRbtnNone);
-	$("#formRbtnNovice").after(data.formRbtnNovice);
-	$("#formRbtnIntermediate").after(data.formRbtnIntermediate);
-	$("#formRbtnExpert").after(data.formRbtnExpert);
-}
-
-function initCheckboxes(data) {
-	$("#formChkFacebook").after(data.formChkFacebook);
-	$("#formChkLinkedIn").after(data.formChkLinkedIn);
-	$("#formChkTwitter").after(data.formChkTwitter);
-	$("#formChkOther").after(data.formChkOther);
-	$("#formChkNone").after(data.formChkNone);
-	$("#formChkTagFlickr").after(data.formChkTagFlickr);
-	$("#formChkTagDelicious").after(data.formChkTagDelicious);
-	$("#formChkTagFacebook").after(data.formChkTagFacebook);
-	$("#formChkTagOther").after(data.formChkTagOther);
-	$("#formChkTagNone").after(data.formChkTagNone);
-}
-
-function addFormEvents() {
-	$("#formChkOther").click(function() {
-		if(!socialFieldAdded) {
-			$("#formDivSocialNetwork").after(
-				$.el.div({'class':'form-group'},
-						$.el.label({'for':'addSocialSite',
-									'id':'frmSocialOpen',
-									'class':'col-sm-5 control-label'},
-									formLblSocialSiteOpen),
-						$.el.div({'class':'col-sm-5'},
-								 $.el.input({'type':'text',
-									 		 'id':'addSocialSite',
-									 		 'class':'form-control'}))));
-			socialFieldAdded = true;
-		}
-	});
-	$("#formChkTwitter").click(function() {
-		if(!twitterFieldAdded) {
-			$("#formDivSocialNetwork").after(
-				$.el.div({'class':'form-group'},
-						$.el.label({'for':'addTwitterId',
-									'id':'formLblTwitterId',
-									'class':'col-sm-5 control-label'},
-									formLblTwitterId),
-						$.el.div({'class':'col-sm-5'},
-								 $.el.input({'type':'text',
-									 		 'id':'addTwitterId',
-									 		 'class':'form-control'}))));
-			twitterFieldAdded = true;
-		}
-	});
-	$("#formChkTagOther").click(function() {
-		if(!tagsiteFieldAdded) {
-			$("#formDivTaggingSite").after(
-				$.el.div({'class':'form-group'},
-					$.el.label({'for':'addTagSite',
-							    'id':'formLblTagSite',
-								'class':'col-sm-5 control-label'},
-								formLblTagSiteOpen),
-					$.el.div({'class':'col-sm-5'},
-							 $.el.input({'type':'text',
-										 'id':'addTagSite',
-										 'class':'form-control'}))));
-			tagsiteFieldAdded = true;
-		}
-	});
-}
-
-function initCountriesSelector() {
-	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"countries"})
-	.done(function(data){
-		for (var key in data) {
-			countries[key] = {"name":data[key].name, "country_code":data[key].country_code};
-		}
-		countries.sort(function(a,b) { return a.name.localeCompare(b.name) });
-
-		$("#formSltCountry").append($.el.option(""));
-		for (var i=0; i<countries.length; i++) {
-			$("#formSltCountry").append($.el.option(countries[i].name));
-		}
-	})
-	.fail(function(data, textStatus){
-		$("#formSltLanguage").append($.el.option("No countries found on server"));
-	});
-}
-
-function initLanguagesSelector() {
-	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"languages"})
-	.done(function(data){
-		for (var key in data) {
-			languages[key] = {"iso_code":data[key].iso_code, "name":data[key].name};
-		}
-		languages.sort(function(a,b) { return a.name.localeCompare(b.name) });
-
-		$("#formSltLanguage").append($.el.option(""));
-		for (var i=0; i<languages.length; i++) {
-			$("#formSltLanguage").append($.el.option(languages[i].name));
-		}
-	})
-	.fail(function(data, textStatus){
-		$("#formSltLanguage").append($.el.option("No languages found on server"));
-	});
-}
-
-function initEducationSelector() {
-	$("#formSltEducation").append($.el.option(""));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptPrimarySchool.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptHighSchool.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptCollege.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptBachelor.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptMaster.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptDoctorate.label));
-	$("#formSltEducation").append($.el.option(formOptsEducation.formOptUnkown.label));
-}
-
-function initInternetSelector(optionList) {
-	$("#formSltInternet").append($.el.option(""));
-	$("#formSltInternet").append($.el.option(formOptsInternet.formOptInternetAlways.label));
-	$("#formSltInternet").append($.el.option(formOptsInternet.formOptInternetOnceADay.label));
-	$("#formSltInternet").append($.el.option(formOptsInternet.formOptInternet3to5.label));
-	$("#formSltInternet").append($.el.option(formOptsInternet.formOptInternet1to2.label));
-	$("#formSltInternet").append($.el.option(formOptsInternet.formOptInternetLessThan1.label));
-}
-
-function processFormFields() {
-	getInput();
-	var onSuccess = nextPage();
-	save_user_info(info, onSuccess);
-}
-
-function getInput() {
-	getInputTextFields();
-	getInputRadioButtons();
-	getInputCheckboxes();
-	getInputDropdownMenus();
-}
-
-function getInputTextFields() {
-	if (!($("#formInpAddAge").val() === ""))
-		info.age = $("#formInpAddAge").val();
-	if (!($("#formInpAddMail").val() === ""))
-		info.mail = $("#formInpAddMail").val();
-	if (!($("#formInpAddMuseumVisits").val() === ""))
-		info.museum_visits = $("#formInpAddMuseumVisits").val();
-}
-
-function getInputRadioButtons() {
-	if(!($("input[name='formRbtnsGender']:checked").val() === undefined))
-		info.gender = $("input[name='formRbtnsGender']:checked").val();
-	if(!($("input[name='communityRadio']:checked").val() === undefined))
-		info.community = $("input[name='communityRadio']:checked").val();
-	if(!($("input[name='formRbtnsTaggingExperience']:checked").val() === undefined))
-		info.tagging_experience_level = $("input[name='formRbtnsTaggingExperience']:checked").val();
-}
-
-function getInputCheckboxes() {
-	getInputSocialNetwork();
-	getInputTaggingSite();
-	getInputEmailCheck();
-}
-
-function getInputSocialNetwork() {
-	if($("#formChkNone").is(":checked")) {
-		info.facebook = false;
-		info.linked_in = false;
-		info.twitter = false;
-	} else {
-		if ($("#formChkFacebook").is(":checked"))
-			info.facebook = true;
-		if ($("#formChkLinkedIn").is(":checked"))
-			info.linked_in = true;
-		//Set twitter to true when no id is given but box is checked
-		if ($("#formChkTwitter").is(":checked")) {
-			if (!($("#addTwitterId").val() === undefined) && !($("#addTwitterId").val() === "")) {
-				info.twitter = $("#addTwitterId").val();
-			} else {
-				info.twitter = true;
-			}
-		}
-		//Set social to true
-		if ($("#formChkOther").is(":checked")) {
-			if (!($("#addSocialSite").val() === undefined) && !($("#addSocialSite").val() === "")) {
-				info.other_social_site = $("#addSocialSite").val();
-			} else {
-				info.other_social_site = true;
-			}
-		}
-	}
-}
-
-function getInputTaggingSite() {
-	if($("#formChkTagNone").is(":checked")) {
-		info.flickr = false;
-		info.delicious = false;
-		info.tag_facebook = false;
-		info.other = false;
-	} else {
-		if ($("#formChkTagFlickr").is(":checked"))
-			info.flickr = true;
-		if ($("#formChkTagDelicious").is(":checked"))
-			info.delicious = true;
-		if ($("#formChkTagFacebook").is(":checked"))
-			info.tag_facebook = true;
-
-		//Set tagsite to true
-		if ($("#formChkTagOther").is(":checked")) {
-			if (!($("#addTagSite").val() === undefined) && !($("#addTagSite").val() === "")) {
-				info.other_tag_site = $("#addTagSite").val();
-			} else {
-				info.other_tag_site = true;
-			}
-		}
-	}
-}
-
-function getInputEmailCheck() {
-	if($("#formChkEmail").is(":checked")) {
-		info.accurator_email = true;
-	} else {
-		info.accurator_email = false;
-	}
-}
-
-function getInputDropdownMenus() {
-	if (!($("#formSltCountry").val() === ""))
-		info.country = getCountryId($("#formSltCountry").val());
-	if (!($("#formSltLanguage").val() === ""))
-		info.language = getLanguageCode($("#formSltLanguage").val());
-	if (!($("#formSltEducation").val() === ""))
-		info.education = getOptionId(formOptsEducation, $("#formSltEducation").val());
-	if (!($("#formSltInternet").val() === ""))
-		info.internet_use = getOptionId(formOptsInternet, $("#formSltInternet").val());
-}
-
-function getCountryId(name) {
-	// Find the geonames id corresponding to the selected name
-	for(var i=0; i<countries.length; i++) {
-		if (countries[i].name === name)
-			return countries[i].country_code;
-	}
-}
-
-function getLanguageCode(name) {
-	// Find the iso code corresponding to the selected name
-	for(var i=0; i<languages.length; i++) {
-		if (languages[i].name === name)
-			return languages[i].iso_code;
-	}
-}
-
-function getOptionId(optionList, name) {
-	// Find the id corresponding to the selected name
-	for (var key in optionList) {
-		if(optionList[key].label === name)
-			return optionList[key].id;
-	}
-}
diff --git a/web/js/accurator_intro.js b/web/js/accurator_intro.js
deleted file mode 100644
index 60ff28f..0000000
--- a/web/js/accurator_intro.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
-Accurator Intro
-Code for showing the welcome page, adapts to the domain and locale setting.
-*******************************************************************************/
-"use strict";
-
-function introInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-
-	// add language switch to navbar
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function() {
-		// go to profile page if logged in
-		document.location.href="profile.html";
-	}, function() {
-		// get domain settings
-		return domainSettings(domain);
-	})
-	.then(function(domainSettings) {
-		var ui = getUI(domainSettings, "intro");
-		setBackground(domainSettings.image, domainSettings.image_brightness);
-		return getLabels(locale, ui);
-	})
-	.then(function(labels) {
-		addButtonEvents({"locale": locale, "domain": domain});
-		initLabels(labels);
-	});
-}
-
-function setBackground(backgroundUrl, imageBrightness) {
-	$(".introImgBackground").attr("src", backgroundUrl);
-
-	if (imageBrightness === "dark") {
-	   // make font lighter to make it readable
-	   $("#introHdrSlogan").css('color', '#FFFFFF');
-	   $("#introBtnLogin").css('color', '#BBBBBB');
-	}
-}
-
-function addButtonEvents(settings) {
-	$("#introBtnRegister").click(function() {
-		var onDismissal = function() {
-			$("#registerDivRegister").modal('hide');
-		};
-		registerModal(onDismissal, settings);
-	});
-	$("#introBtnLogin").click(function() {
-		// show login modal and on success go to profile
-		var onSuccess = function() {
-			document.location.href="profile.html";
-		};
-		var onDismissal = function() {
-			$("#loginDivLogin").modal('hide');
-		};
-		login(onSuccess, onDismissal);
-	});
-}
-
-function initLabels(labels) {
-	// add retrieved labels to html elements
-	$("#introHdrSlogan").prepend(labels.introHdrSlogan);
-	$("#introHdrSubSlogan").prepend(labels.introHdrSubSlogan);
-	$("#introBtnRegister").append(labels.introBtnRegister);
-	$("#introBtnLogin").append(labels.introBtnLogin);
-	$("#introLnkAbout").append(labels.introLnkAbout);
-}
diff --git a/web/js/accurator_item.js b/web/js/accurator_item.js
deleted file mode 100644
index 7a4825f..0000000
--- a/web/js/accurator_item.js
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
-Accurator Item
-This code allows the item page to be setup according to the locale, domain
-and user settings. The main functionallity regards annoting the item, for which
-it relies upon the following files:
-
-* field.js - field objects allowing users to add annotations
-
-* annotations.js - list of annotations
-
-* annotorious.min.js - annotorious editor used for annotating fragments of images
-
-* deniche-plugin.js - plugin for annotorious embedding field objects in the
-editor div and manages the adding and removal of annotations in the annotation
-list
-
-*******************************************************************************/
-"use strict";
-
-var page = {
-	showMetadata: true,
-	showAnnotations: true,
-	imageId: null, // Set on init image
-	fragmentFieldsId: "itemDivAnnotoriousFields", // Id container containing fields
-	wholeFieldsId: "itemDivFields"
-}
-
-function itemInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-	var uri = getParameterByName("uri");
-
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		// user is logged in, so draw page
-		drawPage(userData);
-	}, function() {
-		// user is not logged in, show modal
-		var onDismissal = function() {document.location.href="intro.html"};
-		login(drawPage, onDismissal);
-	});
-
-	function drawPage(userData) {
-		var ui, annotation_ui;
-		var user = userData.user;
-		var userName = getUserName(userData.user);
-
-		setLinkLogo("profile");
-		populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
-
-		domainSettings(domain)
-		.then(function(domainData) {
-			ui = domainData.ui + "item";
-			annotation_ui = domainData.annotation_ui;
-		})
-		.then(function() {
-			return setImage(uri);
-		})
-		.then(function(metadata) {
-			displayMetadata(uri);
-			displayAnnotations(uri);
-			return addAnnotationFields(metadata, user, uri, locale, domain, annotation_ui);
-		})
-		.then(function() {
-			return getLabels(locale, ui);
-		})
-		.then(function(labels) {
-			var labelArray = initLabels(labels);
-
-			// Only show path when cluster is available TODO: remove ugly check for undefined
-			if((localStorage.getItem("currentCluster") !== null) && (localStorage.getItem("currentCluster") !== "undefined"))
-				addPath();
-			addButtonEvents();
-			return events(user, labelArray);
-		})
-	}
-}
-
-function setImage(uri) {
-	return $.getJSON("metadata", {uri:uri})
-	.then(function(metadata){
-		// set id image
-		page.imageId = "itemImg" + generateIdFromUri(uri);
-		$(".itemImg").attr("id", page.imageId);
-		// return info for anotorious
-		return metadata;
-	});
-}
-
-function initLabels(labels) {
-	document.title = labels.title;
-	$("#itemBtnPrevious").append(labels.itemBtnPrevious);
-	$("#itemBtnNext").prepend(labels.itemBtnNext);
-	$("#navbarBtnRecommend").append(labels.navbarBtnRecommend);
-	$("#navbarBtnSearch").append(labels.navbarBtnSearch);
-
-	var labelArray = {
-		vntFirstTitle: labels.vntFirstTitle,
-		vntFirstText: labels.vntFirstText
-	};
-
-	return labelArray;
-}
-
-function events(user, labels) {
-	return $.getJSON("annotations", {uri:user, type:"user"})
-	.then(function(annotations) {
-		if(annotations.length===0) {
-			alertMessage(labels.vntFirstTitle, labels.vntFirstText, 'success');
-		}
-	});
-}
-
-function addPath() {
-	//TODO: restore path functionallity after making it an object
-	// query = localStorage.getItem("query");
-	// var cluster = JSON.parse(localStorage.getItem("currentCluster"));
-	// console.log("cluster", cluster);
-	// $("#path").append(pathHtmlElements(cluster.path));
-	// unfoldPathEvent("#path", cluster.path);
-	// addNavigationButtonEvents();
-}
-
-function addButtonEvents() {
-	$("#navbarBtnRecommend").click(function() {
-		document.location.href="results.html" + "?user=" + user;
-	});
-	// Search on pressing enter
-	$("#navbarInpSearch").keypress(function(event) {
-		if (event.which == 13) {
-			var query = encodeURIComponent($("#navbarInpSearch").val());
-			document.location.href="results.html?query=" + query;
-		}
-	});
-	$("#navbarBtnSearch").click(function() {
-		var query = encodeURIComponent($("#frmSearch").val());
-		document.location.href="results.html?query=" + query;
-	});
-}
-
-function addNavigationButtonEvents() {
-	var index = parseInt(localStorage.getItem("itemIndex"));
-	var cluster = JSON.parse(localStorage.getItem("currentCluster"));
-	var items = cluster.items;
-
-	if(index === 0) {
-		$("#itemBtnPrevious").attr("disabled", "disabled");
-	} else {
-		$("#itemBtnPrevious").click(function() {
-			localStorage.setItem("itemIndex", index - 1);
-			document.location.href= "annotate.html?uri=" + items[index -1].uri;
-		});
-	}
-
-	if(index === items.length-1) {
-		$("#itemBtnNext").attr("disabled", "disabled");
-	} else {
-		$("#itemBtnNext").click(function() {
-			localStorage.setItem("itemIndex", index + 1);
-			document.location.href= "annotate.html?uri=" + items[index + 1].uri;
-		});
-	}
-}
-
-function addAnnotationFields(metadata, user, uri, locale, domain, annotation_ui) {
-	// Retrieve the fields that should be added (based on save_user_info)
-	return $.getJSON("annotation_fields",
-			  {locale:locale,
-			   domain:domain,
-		   	   annotation_ui:annotation_ui})
-	.then(function(fields) {
-		// Add fields whole image
-		for (var i=0; i<fields.whole_fields.length; i++) {
-			// Create new field object
-			var wholeField = new Field(
-				fields.whole_fields[i],
-				{	id: "whole" + generateIdFromUri(fields.whole_fields[i].uri),
-					fragment: false,
-					target: uri,
-				 	targetImage: metadata.image_uri,
-					user: user,
-					locale: locale,
-			 	 	imageId: page.imageId,
-					fieldsId: page.wholeFieldsId
-			 	}
-			);
-			$("#" + wholeField.fieldsId).append(wholeField.node);
-		}
-
-		// Add hidden container for fields if there are fragment fields
-		if (fields.fragment_fields.length > 0) {
-			$(".itemDivHidden").append($.el.div({'id':page.fragmentFieldsId}));
-			// Set fields attribute image for annotorious deniche
-			$("#" + page.imageId).attr("fields", page.fragmentFieldsId);
-		}
-
-		// Add fields to hidden dom elements for annotorious
-		for (var i=0; i<fields.fragment_fields.length; i++) {
-			// Create new field object
-			var fragmentField = new Field(
-				fields.fragment_fields[i],
-				{	id: "fragment" + generateIdFromUri(fields.fragment_fields[i].uri),
-					fragment: true,
-					target: uri,
-				 	targetImage: metadata.image_uri,
-					user: user,
-			 	 	imageId: page.imageId,
-					fieldsId: page.fragmentFieldsId
-			 	}
-			);
-			// Append the field to div which will be embedded in annotorious
-			$("#" + fragmentField.fieldsId).append(fragmentField.node);
-		}
-		// Add the deniche plugin, which embeds the fields in annotorious
-		anno.addPlugin("DenichePlugin", {});
-	});
-}
-
-function displayMetadata(uri) {
-	if(page.showMetadata){
-		// Get metadata from server
-		$.getJSON("metadata", {uri:uri})
-		.done(function(metadata){
-			appendMetadataWell(metadata);
-		});
-	}
-}
-
-function appendMetadataWell(metadata) {
-	$("#itemDivMetadata").append(
-		$.el.div({'class':'row'},
-			$.el.div({'class':'col-md-10 col-md-offset-1'},
-				$.el.div({'class':'well well-sm'},
-				  $.el.h4('Showing metadata for ' + metadata.title),
-					$.el.dl({'class':'dl-horizontal',
-							 'id':'itemLstMetadata'})))));
-
-	for(var i=0; i<metadata.properties.length; i++) {
-		var encodedQuery = encodeURIComponent(metadata.properties[i].object_label);
-		$("#itemLstMetadata").append(
-			$.el.dt(metadata.properties[i].predicate_label));
-		$("#itemLstMetadata").append(
-			$.el.dd(
-				$.el.a({'class':'r_undef',
-					    'href':'results.html?query=' + encodedQuery},
-					metadata.properties[i].object_label)));
-	}
-}
-
-function displayAnnotations(uri) {
-	// Get annotations from server for projecting in well
-	if(page.showAnnotations){
-		$.getJSON("annotations", {uri:uri, type:"object"})
-		.done(function(annotations){
-			if(annotations.annotations.length > 0){
-				$("#itemDivMetadata").append(annotationWell(annotations));
-			}
-		});
-	}
-}
-
-function annotationWell(annotations) {
-	$("#itemDivMetadata").append(
-		$.el.div({'class':'row'},
-			$.el.div({'class':'col-md-10 col-md-offset-1'},
-				$.el.div({'class':'well well-sm'},
-				  $.el.h4('Annotations for ' + annotations.title),
-					$.el.dl({'class':'dl-horizontal',
-							 'id':'itemLstAnnotations'})))));
-
-
-	for(var i=0; i<annotations.annotations.length; i++) {
-		var encodedQuery = encodeURIComponent(annotations.annotations[i].body);
-		$("#itemLstAnnotations").append(
-			$.el.dt(annotations.annotations[i].field));
-		$("#itemLstAnnotations").append(
-			$.el.dd(
-				$.el.a({'class':'r_undef',
-					    'href':'results.html?query=' + encodedQuery},
-					annotations.annotations[i].body)));
-	}
-}
-
-function maybeRunExperiment() {
-	// Hide some elements during an experiment
-	if(experiment !== "none") {
-		// Hide path if on annotate page
-		$("#itemDivClusterNavigation").hide();
-		// Don't show metadata
-		page.showMetadata = false;
-		// Don't show annotations of others
-		page.showAnnotations = false;
-		// Add big next button
-		addExperimentNavigation();
-	}
-}
-
-function addExperimentNavigation() {
-	$("#itemDivMetadata").before(
-		$.el.div({'class':'row',
-				  'id':'itemDivNavigationExperiment'},
-			$.el.button({'class':'btn btn-primary',
-						 'id':'itemBtnExperimentNext'})
-		)
-	);
-
-	// Get the number of objects annotated
-	$.getJSON("annotations", {uri:user, type:"user"})
-	.done(function(annotations){
-		var numberAnnotated = annotations.length;
-
-		// Switch AB setting after 5 annotations
-		if(numberAnnotated == 5) {
-			var AorB = getAOrB();
-
-			if(AorB === "recommend")
-				setAOrB("random");
-			if(AorB === "random")
-				setAOrB("recommend")
-		}
-
-		// Add click event to navigation button
-		$("#itemBtnExperimentNext").click(function() {
-			// Go to thank you page after 20 annotations else results
-			if(numberAnnotated == 500) {
-				document.location.href="end.html";
-			} else {
-				var items = JSON.parse(localStorage.getItem("currentCluster"));
-				var index = items.indexOf(uri);
-				var next = index + 1;
-				document.location.href="annotate.html" + "?uri=" + items[next];
-			}
-		});
-	});
-}
diff --git a/web/js/accurator_profile.js b/web/js/accurator_profile.js
deleted file mode 100644
index 40cf62f..0000000
--- a/web/js/accurator_profile.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
-Accurator Profile
-Code for showing statistical elements on the profile page and allowing the user
-to change settings.
-*******************************************************************************/
-"use strict";
-
-function profileInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		// user is logged in, so draw page
-		drawPage(userData);
-	}, function() {
-		// user is not logged in, show modal
-		var onDismissal = function() {document.location.href="intro.html"};
-		login(drawPage, onDismissal);
-	});
-
-	function drawPage(userData) {
-		var user = userData.user;
-		var userName = getUserName(user);
-		var realName = userData.real_name;
-
-		setLinkLogo("profile");
-		populateNavbar(userName, [], locale);
-		populateRecentlyAnnotated(user);
-
-		domainSettings(domain)
-		.then(function(domainData) {
-			return getLabels(locale, domainData.ui + "profile");
-		})
-		.then(function(labels) {
-			addButtonEvents(user);
-			initLabels(labels);
-			initDomains(locale, domain, labels);
-		});
-	}
-}
-
-function populateRecentlyAnnotated(user) {
-	$.getJSON("annotations", {uri:user, type:"user"})
-	.then(function(uris){
-		if (uris.length === 0) {
-			$("#profileDivLastAnnotated").hide();
-		} else {
-			//TODO: limit length of uris (faster if someone annotated a bunch)?
-			//BIGGER TODO: make clusers, pagination, thumbnails correct objects.
-			// var cluster = new Cluster(uris, "profileCluster");
-			// cluster.enrich()
-			// .then(function() {
-			// 	cluster.display();
-			// });
-		}
-	});
-}
-
-function initLabels(labels) {
-	// add retrieved labels to html elements
-	document.title = labels.profilePageTitle;
-	// check if real name is available
-	if (typeof realName !== 'undefined') {
-		$("#profileHdrSlogan").prepend(labels.profileHdrSlogan + " " + realName + " ");
-	} else {
-		$("#profileHdrSlogan").prepend(labels.profileHdrSlogan);
-	}
-	$("#profileTxtSubSlogan").prepend(labels.profileTxtSubSlogan);
-	$("#profileTxtStartAnnotating").append(labels.profileTxtStartAnnotating);
-	$("#navbarBtnRecommend").append(labels.navbarBtnRecommend);
-	$("#profileBtnChangeExpertise").append(labels.profileBtnChangeExpertise);
-	$("#navbarBtnSearch").append(labels.navbarBtnSearch);
-	$("#profileBtnDomain").prepend(labels.profileBtnDomain);
-	$("#profileLblLastAnnotated").append(labels.profileLblLastAnnotated);
-}
-
-function initDomains(locale, domain, labels) {
-	getAvailableDomains()
-	.then(function(domains) {
-		// set domain settings for all the domains
-		for(var i=0; i<domains.length; i++) {
-			var currentDomain = domains[i];
-
-			// already create function so currentdomain is not the last deu to asynchronisity
-			var processDomain = function(currentDomain, labels) {
-				return function(domainData) {
-					if (domain === currentDomain) {
-						addDomainTitle(domainData, locale, labels);
-					} else {
-						domainHtml(domainData, locale);
-					}
-				}
-			}
-
-			// add info about all domains except generic
-			if(currentDomain !== "generic") {
-				$.getJSON("domains", {domain:currentDomain})
-				.then(processDomain(currentDomain, labels));
-			}
-		}
-	});
-}
-
-function addDomainTitle(domainData, locale, labels) {
-	// add the title of the current domain to the profile page
-	getLabels(locale, domainData.ui + "domain")
-	.then(function(data){
-		$("#profileTxtDomain").append(
-			labels.profileTxtDomain,
-			$.el.span({'class':'text-info'},
-				data.domainLabel));}
-	);
-}
-
-function domainHtml(domainData, locale) {
-	// add the different domains to a dropdown list
-	getLabels(locale, domainData.ui + "domain")
-	.then(function(data){
-		$("#profileLstDomainItems").append(
-			$.el.li(
-				$.el.a({'href':'#',
-						'id':domainData.domain},
-						 data.domainLabel)));
-		addDomainEvent(domainData.domain);
-	});
-}
-
-function addDomainEvent(domain) {
-	// add event reloadingn page on domain selection, saving choice
-	$("#" + domain).click(function() {
-		setDomain(domain)
-		.then(function() {
-			location.reload();
-		});
-	});
-}
-
-function addButtonEvents(user) {
-	$("#navbarBtnRecommend").click(function() {
-		document.location.href="results.html" + "?user=" + user;
-	});
-	// Search on pressing enter
-	$("#navbarInpSearch").keypress(function(event) {
-		if (event.which == 13) {
-			var query = encodeURIComponent($("#navbarInpSearch").val());
-			document.location.href="results.html?query=" + query;
-		}
-	});
-	$("#navbarBtnSearch").click(function() {
-		var query = encodeURIComponent($("#navbarInpSearch").val());
-		document.location.href="results.html?query=" + query;
-	});
-	$("#profileBtnChangeExpertise").click(function() {
-		document.location.href="expertise.html";
-	});
-}
diff --git a/web/js/accurator_results.js b/web/js/accurator_results.js
deleted file mode 100644
index 567cb35..0000000
--- a/web/js/accurator_results.js
+++ /dev/null
@@ -1,719 +0,0 @@
-/*******************************************************************************
-Accurator Results
-
-Page showing overview of recommender/search results. Uses a lot of code from
-pagination.js and thumbnail.js.
-
-Options:
-
-1. SEARCH: If a user query is entered, then the page shows the results that
-   match that query.
-2. RECOMMENDER: If no query is entered by the user and the recommend is set to
-   true, then results will contain recommendations given based on the expertise
-   of the user. Also, below these recommendations, a number of random items not
-   yet annotated are shown.
-3. RANDOM: If no query is entered and the recommender is not used, then a random
-   list of results will be shown.
-
-Layout of the results:
-
-1. CLUSTER VIEW: results will be grouped according to their path elements. More
-   elements can belong to the same cluster and these will be shown per row.
-2. LIST VIEW: results are in the form of a list with a certain number of items
-   per row.
-
-*******************************************************************************/
-"use strict";
-
-var clusters = [];
-var randoms = [];
-
-// Display options deciding how to results get displayed
-var display = {
-	layout: "cluster",
-	imageFilter: "onlyImages",
-	numberDisplayedItems: 4,
-	showControls: true
-}
-
-// Initialize page
-function resultsInit() {
-	var locale = getLocale();
-	var domain = getDomain();
-
-	populateFlags(locale);
-
-	userLoggedIn()
-	.then(function(userData) {
-		// user is logged in, so draw page
-		drawPage(userData);
-	}, function() {
-		// user is not logged in, show modal
-		var onDismissal = function() {document.location.href="intro.html"};
-		login(drawPage, onDismissal);
-	});
-
-	function drawPage(userData) {
-		var ui, target, labels;
-		var user = userData.user;
-		var userName = getUserName(user);
-		var realName = userData.real_name;
-		var userQuery = getParameterByName("user");
-		var query = getParameterByName("query");
-
-		setLinkLogo("profile");
-		populateNavbar(userName, [{link:"profile.html",	name:"Profile"}], locale);
-
-		domainSettings(domain)
-		.then(function(domainData) {
-			ui = domainData.ui + "results";
-			target = domainData.target;
-			return getLabels(locale, ui);
-		})
-		.then(function(labelData) {
-			labels = initLabels(labelData);
-			labels.realName = realName; // Add realname to labels for rendering
-			addButtonEvents(user);
-			return events(user, labels);
-		})
-		.then(function() {
-			// Provide results based on query, recommend something based on
-			// the expertise of the retrieved user or, if none of these, show
-			// just random results
-			results(labels, query, userQuery, target);
-		});
-	}
-}
-
-// Add retrieved labels to html elements
-function initLabels(labelData) {
-	$("#navbarBtnSearch").append(labelData.navbarBtnSearch);
-	$("#navbarBtnRecommend").append(labelData.resultsBtnRecommend);
-
-	var labels = {
-		resultsTxtRecommendationsFor: labelData.resultsTxtRecommendationsFor,
-		resultsTxtSearching: labelData.resultsTxtSearching,
-		resultsHdrResults: labelData.resultsHdrResults,
-		resultsHdrRecommendedResults: labelData.resultsHdrRecommendedResults,
-		resultsHdrRandomResults: labelData.resultsHdrRandomResults,
-		resultsHdrFirst: labelData.resultsHdrFirst,
-		resultsTxtFirst: labelData.resultsTxtFirst,
-		resultsTxtNoResults: labelData.resultsTxtNoResults,
-		resultsTxtError: labelData.resultsTxtError,
-		resultsLblCluster: labelData.resultsLblCluster,
-		resultsLblList: labelData.resultsLblList
-	};
-
-	return labels;
-}
-
-// Add button events in the navbar
-function addButtonEvents(user) {
-	$("#navbarBtnRecommend").click(function() {
-		document.location.href="results.html" + "?user=" + user;
-	});
-	// Search on pressing enter
-	$("#navbarInpSearch").keypress(function(event) {
-		if (event.which == 13) {
-			var query = encodeURIComponent($("#navbarInpSearch").val());
-			document.location.href="results.html?query=" + query;
-		}
-	});
-	$("#navbarBtnSearch").click(function() {
-		var query = encodeURIComponent($("#navbarInpSearch").val());
-		document.location.href="results.html?query=" + query;
-	});
-}
-
-// Message displayed when the first annotation is made by a user
-function events(user, labels) {
-	return $.getJSON("annotations", {uri:user, type:"user"})
-	.then(function(annotations) {
-		if (annotations.length === 0) {
-			alertMessage(labels.resultsHdrFirst, labels.resultsTxtFirst, 'success');
-		}
-	});
-}
-
-/*******************************************************************************
-Search, Recommend or Random results
-*******************************************************************************/
-function results(labels, query, userQuery, target) {
-	// don't do random stuff yet
-	var recommendBoolean = true;
-
-	if(query) {
-		// results based on the user query
-		search(query, labels);
-	} else if(recommendBoolean) {
-		// recommendations based on the expertise of the user
-		// first recommended results are shown, then random results
-		query = "expertise";
-		recommend(query, labels, target);
-	} else {
-		// random results
-		query = "random";
-		random(query, labels, target, 10);
-	}
-	localStorage.setItem("query", query);
-}
-
-// Get results based on the user query
-function search(query, labels, target) {
-	var request = {query:query};
-
-	if(typeof target != 'undefined')
-		request.target = target;
-
-	$.getJSON("cluster_search_api", request)
-	.then(function(data){
-		// retrieve clusters
-		clusters = data.clusters;
-
-		// enrich retrieved clusters if any
-		if(clusters.length == 0){
-			statusMessage(labels.resultsTxtNoResults, query);
-		} else {
-			// set page title and text for results header
-			statusMessage(labels.resultsHdrResults + query);
-
-			// enrich the retrieved clusters
-			enrichClusters(query, labels);
-
-			// Add control buttons to change layout
-			controls(labels);
-		}
-	}, function() {
-		statusMessage(labels.resultsTxtError, data.responseText);
-	});
-}
-
-// Get results based on the expertise of the user and, afterwards, a number of
-// random items that have not yet been annotated
-function recommend(query, labels, target) {
-	$.getJSON("recommendation", {strategy:query,
-								 target:target})
-	.then(function(data){
-		// retrieve clusters
-		clusters = data.clusters;
-		//localStorage.setItem("clusters", JSON.stringify(clusters));
-
-		// enrich retrieved clusters if any
-		if(clusters.length == 0){
-			statusMessage(labels.resultsTxtNoResults, labels.realName);
-		} else {
-			statusMessage(labels.resultsHdrRecommendedResults);
-
-			// enrich the retrieved clusters
-			enrichClusters(query);
-		}
-
-		// populate random elements in the previously added random cluster
-		random(query, target, 10);
-
-		// set page title
-		$(document).prop('title', labels.resultsTxtRecommendationsFor + labels.realName);
-
-		// Add control buttons to change layout
-		controls(labels);
-	}, function(data) {
-		statusMessage(labels.resultsTxtError, data.responseText);
-	})
-}
-
-// Get random items
-function random(query, labels, target, noResults) {
-	// Get a list of random items
-	$.getJSON("recommendation", {strategy:'random',
-								 number:noResults,
-								 target:target})
-	.then(function(uris){
-		// populate the page with random
-		randoms = uris;
-		// TODO add in local storage?!
-		// localStorage.setItem("randoms", JSON.stringify(randoms));
-
-		// enrich retrieved clusters if any
-		if(randoms.length == 0){
-			statusMessage(labels.resultsTxtNoResults, query);
-		} else {
-			statusMessage(labels.resultsHdrRandomResults);
-
-			if (query === "expertise"){
-				// set page title
-				$(document).prop('title', labels.resultsTxtRecommendationsFor + labels.realName);
-			}
-
-			var noRandomItems = randoms.length;
-
-			if (query === "expertise" && display.layout === "cluster") {
-				addRandomPath();
-			} else {
-				// add rows for random objects and display them as a list
-				addRandomRows(noRandomItems);
-			}
-
-			// enrich random objects
-			enrichRandoms(randoms)
-			.then(function(){
-				// TODO add pagination here for cluster items and add cluster items
-				if (query === "expertise" && display.layout === "cluster"){
-					$("#randoms").append(pagination(getNoOfPagesOrRows(noRandomItems),
-							randoms, "randoms"));
-					displayRandomCluster(0);
-				}
-				else {
-					displayRandomList();
-				}
-			});
-		}
-	}, function(data) {
-		statusMessage(labels.resultsTxtError, data.responseText);
-	});
-}
-
-/*******************************************************************************
-Result population and enrichment
-*******************************************************************************/
-
-function enrichClusters(query, labels) {
-	// clear results div and reset rows
-	//$("#resultsDiv").children().remove();
-
-	// enrich retrieved clusters if any
-	if(clusters.length != 0){ //double verification here (see previous function)
-		// set page title
-		$(document).prop('title', labels.resultsHdrResults + query);
-
-		// if the display is the list view, the rows that are needed can be first
-		// created and after the enrichment is done, these can be further populated
-		if (display.layout === "list") {
-			var totItems = totalItemsInClusters();
-
-			// add rows for every cluster item
-			addRows(totItems);
-		}
-		var itemsAdded = 0;
-
-		//for every cluster item
-		for(var i = 0; i < clusters.length; i++) {
-			if(display.layout === "cluster") {
-				displayClusterHeader(i);
-			}
-			var uris = [];
-
-			// enrich every item in the cluster
-			for(var j = 0; j < clusters[i].items.length; j++) {
-				uris[j] = clusters[i].items[j].uri;
-			}
-
-			//when a cluster item finished being enriched, display it
-			enrichCluster(uris, i)
-			.then(function (clusterId){
-	  		  	// add enriched clusters and pagination
-				if (display.layout === "cluster"){
-					displayClusterItems(clusterId);
-				// add enriched clusters and rows
-				} else if (display.layout === "list"){
-					itemsAdded = displayList(clusterId, itemsAdded);
-				}
-			});
-		}
-	}
-}
-
-// Enrichment of one cluster item
-function enrichCluster(uris, clusterId){
-	var json = {"uris":uris};
-
-	return $.ajax({type: "POST",
-			url: "metadata",
-			contentType: "application/json",
-			data: JSON.stringify(json)})
-	.then(function(data) {
-		   // replace cluster items array with enriched ones
-		   clusters[clusterId].items = processEnrichment(data);
-		   return clusterId;
-	 });
-}
-
-// Enrich one image element in the cluster adding an image, a link where it can
-// be (further) annotated and a title
-function processEnrichment(data) {
-	var enrichedItems = [];
-
-	for(var i=0; i<data.length; i++) {
-		enrichedItems[i] = {};
-		var uri = data[i].uri;
-		enrichedItems[i].uri = uri;
-		enrichedItems[i].thumb = data[i].thumb;
-		enrichedItems[i].link = "item.html?uri=" + uri;
-		enrichedItems[i].title = truncate(data[i].title, 60);
-	}
-	return enrichedItems;
-}
-
-// Enrichment of one random object
-function enrichRandoms(uris) {
-	// clear results div and reset rows
-	// $("#resultsDiv").children().remove();
-
-	var json = {"uris":uris};
-
-	return $.ajax({type: "POST",
-		url: "metadata",
-		contentType: "application/json",
-		data: JSON.stringify(json)})
-	.then(function(data) {
-		// Replace cluster items with enriched ones
-		randoms = processEnrichment(data);
-	});
-}
-
-/*******************************************************************************
-Display of results and helper functions for the display
-*******************************************************************************/
-
-// Determine number of pages or rows based on the items to be shown
-function getNoOfPagesOrRows(numberOfItems) {
-	var numberOfPages = 0;
-	var restPages = numberOfItems%display.numberDisplayedItems;
-
-	if(restPages == 0) {
-		numberOfPages = numberOfItems/display.numberDisplayedItems;
-	} else {
-		numberOfPages = (numberOfItems-restPages)/display.numberDisplayedItems+1;
-	}
-	return numberOfPages;
-}
-
-// Determine the total number of items from clusters
-function totalItemsInClusters(){
-	var totItems = 0;
-
-	for (var clusterId = 0; clusterId < clusters.length; clusterId++){
-		totItems += clusters[clusterId].results;
-	}
-	return totItems;
-}
-
-// Display the cluster header: the html rows that contain one cluster and
-// the path of the cluster
-function displayClusterHeader(clusterId) {
-	$("#resultsDiv").append(
-		$.el.div({'class':'well well-sm',
-				  'id':'cluster' + clusterId})
-	);
-	addPath(clusterId, clusters[clusterId].path, localStorage.query);
-}
-
-// Add the path elements for one cluster
-function addPath(clusterId, uris, query) {
-	// Get labels from server
-	var json = {"uris":uris, "type":"label"};
-
-	return $.ajax({type: "POST",
-		url: "metadata",
-		contentType: "application/json",
-		data: JSON.stringify(json)})
-	.then(function (labels) {
-		var pathElements = [];
-
-		for(var i = 0; i < uris.length; i++){
-			pathElements[i] = {uri:uris[i], label:truncate(labels[i], 50)};
-		}
-
-		pathElements.reverse();
-		var path = new Path(uris, labels, pathElements);
-
-		$("#cluster" + clusterId).prepend(path.htmlSimple);
-		path.unfoldEvent("#cluster" + clusterId, query);
-	});
-}
-
-// Display the items in one cluster with pagination (if necessary)
-function displayClusterItems(clusterId){
-	var noPages = getNoOfPagesOrRows(clusters[clusterId].items.length);
-
-	$("#cluster" + clusterId).append(pagination(noPages, clusters[clusterId].items, "cluster", clusterId));
-	thumbnails(clusterId);
-}
-
-// Add rows for cluster items for the list view
-function addRows(totItems){
-	var noRows = getNoOfPagesOrRows(totItems);
-
-	for (var i = 0; i < noRows; i++){
-		$("#resultsDiv").append(
-				$.el.div({'class':'row',
-						 'id':'thumbnailRow' + i})
-		);
-	}
-}
-
-// Display the items from one cluster and add them as items in a list
-function displayList(clusterId, itemsAdded){
-		//for every item in this cluster, add the thumbnail in the list view
-		for(var clusterItem = 0; clusterItem < clusters[clusterId].items.length; clusterItem++) {
-			var id = getId(clusters[clusterId].items[clusterItem].uri);
-			var rowId = parseInt(itemsAdded/display.numberDisplayedItems, 10);
-			var index = itemsAdded%display.numberDisplayedItems;
-
-			$("#thumbnailRow" + rowId).append(thumbnail(clusters[clusterId].items[clusterItem]));
-			addListClickEvent(id, clusters[clusterId].items[clusterItem].link, rowId, index, clusterId);
-			itemsAdded++;
-		}
-		return itemsAdded;
-}
-
-// Add thumbnail click event
-function addListClickEvent(id, link, rowId, index, clusterId) {
-	$("#thumbnailRow" + rowId  + " #" + id).click(function() {
-		//Add info to local storage to be able to save context
-		localStorage.setItem("itemIndex", index);
-		localStorage.setItem("rowId", rowId);
-		localStorage.setItem("currentCluster", JSON.stringify(clusters[clusterId]));
-		//TODO check here + this is already done for the cluster, right?
-		// if((clusterId+1) == clusters.length)
-		// 	localStorage.setItem("query", "random");
-		document.location.href = link;
-	});
-}
-
-// Add rows for random items
-function addRandomRows(totItems){
-	var noRows = getNoOfPagesOrRows(totItems);
-
-	// add rows for thumbnails
-    for (var i = 0; i < noRows; i++){
-		// display as a list
-		$("#resultsDiv").append(
-			$.el.div({'class':'row',
-             		  'id':'thumbnailRandomRow' + i})
-		);
-    }
-}
-
-// Add path node for random objects
-function addRandomPath() {
-	// display path for random cluster only when cluster view is set and for
-	// user recommendations
-	$("#resultsDiv").append(
-		$.el.div({'class':'well well-sm',
-						 'id':'randoms'},
-			$.el.div({'class':'row path'},
-				$.el.div({'class':'col-md-12'},
-					$.el.h4(
-						$.el.span({'class':'path-label path-literal'},
-								 "random objects")))))
-	);
-}
-
-// Add rows for random items that are displayed after recommended ones
-function addRandomNodes(totItems){
-	var noPagesOrRows = getNoOfPagesOrRows(totItems);
-
-	// add rows for thumbnails
-    for (var i = 0; i < noPagesOrRows; i++){
-		// display as a list
-		$("#randoms").append(
-			$.el.div({'class':'row',
-             		  'id':'thumbnailRandomRow' + i})
-		);
-    }
-}
-
-// Display the random list of items
-function displayRandomList(){
-	var noRows = getNoOfPagesOrRows(randoms.length);
-	var stop = display.numberDisplayedItems;
-	var itemsAdded = 0;
-
-	// populate rows of random
-	for (var rowId = 0; rowId < noRows; rowId++){
-		for (var index = 0; index < stop; index++){
-			if (itemsAdded < randoms.length){
-				var id = getId(randoms[itemsAdded].uri);
-
-				$("#thumbnailRandomRow" + rowId).append(thumbnail(randoms[itemsAdded]));
-				addRandomClickEvent(id, randoms[itemsAdded].link, rowId, index);
-				itemsAdded++;
-			}
-		}
-	}
-}
-
-// Display the random list of items
-function displayRandomCluster(rowId){
-	var noItems = getNoOfPagesOrRows(randoms.length);
-	var stop = display.numberDisplayedItems;
-
-	if (randoms.length < stop) {
-		stop = randoms.length;
-	}
-
-	$("#randoms").append(
-		$.el.div({'class':'row',
-				  'id':'thumbnailRandomRow' + rowId})
-	);
-
-	// populate page of random
-	for (var index = 0; index < stop; index++){
-			var id = getId(randoms[index].uri);
-
-			$("#thumbnailRandomRow" + rowId).append(thumbnail(randoms[index]));
-			addRandomClickEvent(id, randoms[index].link, rowId, index);
-	}
-}
-
-// Add click events for random thumbnail items
-function addRandomClickEvent(id, link, rowId, index) {
-	// Add thumbnail click event
-	$("#thumbnailRandomRow" + rowId  + " #" + id).click(function() {
-		//Add info to local storage to be able to save context
-		localStorage.setItem("itemIndex", index);
-		localStorage.setItem("row", rowId);
-		//localStorage.setItem("currentRandom", JSON.stringify(randoms[randomId]));
-		document.location.href = link;
-	});
-}
-
-// Add a title for the page and print a status message within the page that
-// gives more information on the progress of the search
-function statusMessage(header, text){
-	//$("#resultsDiv").children().remove();
-	//$(".col-md-10").empty();
-	$(document).prop('title', header);
-
-	$("#resultsDiv").append(
-		$.el.div({'class':'row'},
-			$.el.div({'class':'col-lg-10 col-md-offset-1'},
-				$.el.h3(header)),
-			$.el.div({'class':'row'},
-				$.el.div({'class':'col-md-10 col-md-offset-1'},
-					text)))
-	);
-}
-
-/*******************************************************************************
-Controls
-Code for adding buttons controlling the layout
-*******************************************************************************/
-
-// Add the container for the controls that change the display of the items
-function controls(labels) {
-	if(display.showControls) {
-		$("#resultsDiv").prepend(
-			$.el.div({'class':'row'},
-				$.el.div({'class':'col-md-12 resultsDivControls'}))
-		);
-		resultLayoutButtons(labels);
-	}
-}
-
-// Add the buttons and the click functionality for changing the display
-function resultLayoutButtons(labels) {
-	$(".resultsDivControls").append(
-		$.el.div({'class':'btn-group'},
-			$.el.button({'class':'btn btn-default',
-						 'id':'resultsBtnLayout'}))
-	);
-	setLayoutButton(labels);
-	$("#resultsBtnLayout").click(function() {
-		$("#resultsDiv").children().remove(".row");
-		display.layout = (display.layout === "list") ? "cluster" : "list";
-		controls(labels);
-		displayView(labels);
-	});
-}
-
-// Set the text of the display button depending on the view that is rendered
-function setLayoutButton(labels) {
-	if(display.layout === "list") {
-		$("#resultsBtnLayout").html(
-			$.el.span(labels.resultsLblCluster + ' ',
-			$.el.span({'class':'glyphicon glyphicon-th-large'}))
-		);
-	} else {
-		$("#resultsBtnLayout").html(
-			$.el.span(labels.resultsLblList + ' ',
-			$.el.span({'class':'glyphicon glyphicon-th-large'}))
-		);
-	}
-}
-
-/*******************************************************************************
-View
-Code for rendering either the cluster or the list view
-*******************************************************************************/
-
-// Displaying of the results based on the view chosen
-// This function uses the data structures (clusters and randoms) that were
-// populated before and just changes the way they are shown for user queries and
-// recommendations based on user expertise. The random objects only get displayed
-// as a list, so the button that selects the view (cluster or list) is not available
-function displayView(labels){
-	// TODO what if the result population or enrichment is not finished when
-	// the user clicks the button? Maybe show the button after all this is finished?!
-
-	// clear results div and display controls for changing the view again
-	$("#resultsDiv").children().remove(".well, .well-sm");
-
-	if(localStorage.query === "expertise") {
-		statusMessage(labels.resultsHdrRecommendedResults);
-	} else {
-		// set page title and text for results header
-		statusMessage(labels.resultsHdrResults + localStorage.query);
-	}
-
-	// display list view
-	if(display.layout === "list") {
-		// list view for user query
-		var itemsAdded = 0;
-		var totItems = totalItemsInClusters();
-
-		// add rows for every cluster item
-		addRows(totItems);
-
-		for(var clusterId = 0; clusterId < clusters.length; clusterId++) {
-			itemsAdded = displayList(clusterId, itemsAdded);
-		}
-
-		// list view for recommendation
-		if(localStorage.query === "expertise") {
-			statusMessage(labels.resultsHdrRandomResults);
-
-			$(document).prop('title', labels.resultsTxtRecommendationsFor + labels.realName);
-
-			var noRandomItems = randoms.length;
-
-			// add rows for random objects and display them as a list
-			addRandomRows(noRandomItems);
-
-			displayRandomList();
-		}
-	// display cluster view
-	} else if (display.layout === "cluster"){
-		// cluster view for user query and recommendation
-		for(var clusterId = 0; clusterId < clusters.length; clusterId++){
-			displayClusterHeader(clusterId);
-			displayClusterItems(clusterId);
-		}
-
-		// show random results for cluster view for recommendation
-		if(localStorage.query === "expertise") {
-			statusMessage(labels.resultsHdrRandomResults);
-
-			$(document).prop('title', labels.resultsTxtRecommendationsFor + labels.realName);
-
-			var noRandomItems = randoms.length;
-
-			addRandomPath();
-
-			//display items using pagination
-			$("#randoms").append(pagination(getNoOfPagesOrRows(noRandomItems),
-					randoms, "randoms"));
-			displayRandomCluster(0);
-		}
-	}
-}
diff --git a/web/js/accurator_search.js b/web/js/accurator_search.js
deleted file mode 100644
index 359cc8a..0000000
--- a/web/js/accurator_search.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
-Accurator Search
-This code loads possible search queries into the page, where the search options
-depend on the search queries loaded in the triple store.
-*******************************************************************************/
-var locale, domain, experiment, ui;
-
-function searchInit() {
-	locale = getLocale();
-	// Be domain agnostic on domain selection screen
-	domain = "generic";
-	experiment = getExperiment();
-
-	// Add language switch to navbar
-	populateFlags(locale);
-
-	onLoggedIn = function(loginData) {
-		setLinkLogo("profile");
-		onDomains = function(data){
-			//populateDomains(data);
-
-			// Get generic domain settings before populating ui
-			onDomain = function(domainSettings) {
-				ui = getUI(domainSettings, "search");
-				populateUI();
-				var userName = getUserName(loginData.user);
-				populateNavbar(userName, [{link:"profile.html", name:"Profile"}]);
-			};
-			domainSettings(domain, onDomain);
-		};
-		// Get a list of the available domain (utilities function)
-		//getAvailableDomains(onDomains);
-	};
-	// If user is not logged go to intro page
-	onDismissal = function(){document.location.href="intro.html";};
-	logUserIn(onLoggedIn, onDismissal);
-}
-
-function nextPage() {
-	return function(){document.location.href="expertise.html"};
-}
-
-function populateUI() {
-	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"labels"})
-		.done(function(labels){
-			document.title = labels.searchPageTitle;
-			$("#navbarBtnSearch").append(labels.navbarBtnSearch);
-			$("#searchHdrSlogan").append(labels.searchHdrSlogan);
-		});
-}
-
-// function populateDomains(domainLabels) {
-// 	var row;
-//
-// 	// Get domain settings for all the domains
-// 	for(var i=0; i<domainLabels.length; i++) {
-// 		if(!(i%2===0)) {
-// 			row = parseInt((i/2) + 0.5);
-// 			// Add a new row for every two domains
-// 			$(".domainDiv").append(
-// 				$.el.div({'class':'row',
-// 						  'id':'domain' + row}));
-// 		}
-//
-// 		// Add domain specific html to rows
-// 		$.getJSON("domains", {domain:domainLabels[i]})
-// 			.done(function(data){
-// 				if(!(data.domain === "generic")) {
-// 					domainHtml(data, row);
-// 				}
-// 			});
-// 	}
-// }
-
-// function domainHtml(domainData, row) {
-// 	var domain = domainData.domain;
-// 	$.getJSON("ui_elements",
-// 			  {locale:locale,
-// 			   ui:domainData.ui + "domain",
-// 			   type:"labels"})
-// 		.done(function(data){
-// 			$("#domain" + row).append(
-// 				$.el.div({'class':'noPadding col-md-6'},
-// 					$.el.h3({'class':'domainHdr',
-// 							 'id':'domainTxt' + domain},
-// 							 data.domainLabel),
-// 					$.el.img({'class':'domainImg',
-// 							  'id':'domainImg' + domain,
-// 							  'src':domainData.image})));
-// 			if(domainData.image_brightness === "dark")
-// 				$("#domainTxt" + domainData.domain).css('color', '#fff');
-// 			addDomainEvent(domain);
-// 		});
-// }
-//
-// function addDomainEvent(domain) {
-// 	$("#domainImg"+domain).click(function() {
-// 		setDomain(domain, nextPage());
-// 	});
-// 	$("#domainTxt"+domain).click(function() {
-// 		setDomain(domain, nextPage());
-// 	});
-//}
diff --git a/web/js/accurator_utilities.js b/web/js/accurator_utilities.js
deleted file mode 100644
index 67e3e6b..0000000
--- a/web/js/accurator_utilities.js
+++ /dev/null
@@ -1,595 +0,0 @@
-/*******************************************************************************
-Accurator Utilities
-Functions used by multiple javascript files. Topics include:
-
-- Settings
-- Annotation domain
-- Locale
-- Experiment
-- User interface
-- User management
-- Uri
-*******************************************************************************/
-
-/*******************************************************************************
-Settings
-General setting management.
-*******************************************************************************/
-function clearLocalStorage(setting) {
-	// remove a setting from local storage
-	localStorage.removeItem(setting);
-}
-
-function setUserSettingsLocal() {
-	// set user settings upon loggin in (called by loginServer)
-	return $.getJSON("get_user_settings")
-	.then(function(data){
-		localStorage.setItem("locale", data.locale);
-		localStorage.setItem("domain", data.domain);
-	});
-}
-
-function save_user_info(info) {
-	// save user settings to user.db of Cliopatria
-	return $.getJSON("get_user")
-	.then(function(data){
-		// get the user id and post information
-		info.user = data.user;
-
-		return $.ajax({
-			type: "POST",
-			url: "save_user_info",
-			contentType: "application/json",
-			data: JSON.stringify(info)
-		});
-	})
-}
-
-function getParameterByName(name) {
-	// retrieve information from url parameters (often settings)
-	name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
-	var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
-	results = regex.exec(location.search);
-	return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
-}
-
-/*******************************************************************************
-Annotation Domain
-Functionality to change the annotation domain (e.g. bird or bible). Functions
-include the retrieval and storage of the domain setting and the information
-related to the domain (e.g. taxonomies, instances, illustrative image url)
-*******************************************************************************/
-function getDomain() {
-	//No domain
-	if(localStorage.getItem("domain") === null ||
-	   localStorage.getItem("domain") === "") {
-		setDomainToGenericOrParameter();
-	}
-	var domainParameter = getParameterByName("domain");
-
-	//Domain parameter
-	if(!(domainParameter === "")){
-		setDomain(domainParameter);
-	}
-	return localStorage.getItem("domain");
-}
-
-function setDomainToGenericOrParameter() {
-	var domain = getParameterByName("domain");
-	// Set domain to generic if no parameter is given
-	if(domain === "") {
-		setDomain("generic");
-	} else {
-		setDomain(domain);
-	}
-}
-
-function setDomain(domain) {
-	localStorage.setItem("domain", domain);
-	return save_user_info({"domain":domain});
-}
-
-function domainSettings(domain) {
-	// retrieve domain settings
-	return $.getJSON("domains", {domain:domain});
-}
-
-
-function getAvailableDomains() {
-	// promise of all domains
-	return $.getJSON("domains");
-}
-
-/*******************************************************************************
-Locale and language flags
-Functionallity to adapt to the desired locale.
-*******************************************************************************/
-function getLabels(locale, ui) {
-	// Retrieve labels from server according to locale and ui
-	return $.getJSON("ui_elements", {locale:locale, ui:ui, type:"labels"});
-}
-
-function getLocale() {
-	// check url for locale parameter
-	var paramLocale = getParameterByName("locale");
-
-	// if parameter is given, set locale accordingly
-	if(!(paramLocale === "")) {
-		setLocale(paramLocale);
-	}
-	// if there is no locale in local storage, set according to browser language
-	if(localStorage.getItem("locale") === null ||
-	   localStorage.getItem("locale") === ""){
-		setLocaleToBrowserLanguage();
-	}
-	return localStorage.getItem("locale");
-}
-
-function setLocaleToBrowserLanguage() {
-	// retrieve locale from browser
-	var language = window.navigator.userLanguage || window.navigator.language;
-	var languageCode = language.substr(0,2);
-
-	// Save locale to localStorage and user.db
-	localStorage.setItem("locale", languageCode);
-	save_user_info({"locale":languageCode});
-}
-
-function setLocale(languageCode) {
-	var deferred = jQuery.Deferred();
-
-	// Action should depend on whether user is logged in
-	userLoggedIn()
-	.then(function() {
-		localStorage.setItem("locale", languageCode);
-		save_user_info({"locale":languageCode});
-		deferred.resolve();
-	}, function() {
-		localStorage.setItem("locale", languageCode);
-		deferred.resolve();
-	});
-
-	return deferred.promise();
-}
-
-function populateFlags(locale) {
-	// Code to add flags to navbar allowing to change the locale
-	$(".navbarLstFlag").append(
-		$.el.li({'class':'dropdown'},
-				 getInitialFlag(locale),
-			$.el.ul({'class':'dropdown-menu',
-					'role':'menu'},
-					$.el.li($.el.a({'href':'#',
-									'id':'navbarLnkEn'},
-									$.el.span({'class':'flag-icon flag-icon-en'}),
-									" English")),
-					$.el.li($.el.a({'href':'#',
-									'id':'navbarLnkNl'},
-									$.el.span({'class':'flag-icon flag-icon-nl'}),
-									" Nederlands"))
-			)
-		)
-	);
-	// Add flag events
-	flagEvents();
-}
-
-function flagEvents() {
-	$("#navbarLnkEn").click(function() {
-		setLocale("en")
-		.then(function() {
-			location.reload();});
-	});
-	$("#navbarLnkNl").click(function() {
-		setLocale("nl")
-		.then(function() {
-			location.reload();});
-	});
-}
-
-function getInitialFlag(locale) {
-	// set the flag to be shown in the navbar
-	return $.el.a({'href':'#',
-				   'class':'dropdown-toggle',
-				   'data-toggle':'dropdown',
-				   'role':'button'},
-				   $.el.span({'class':'flag-icon flag-icon-' + locale}),
-				   " ",
-				   $.el.span({'class':'caret'})
-	)
-}
-
-/*******************************************************************************
-User Interface
-Functionallity making the ui adapt
-*******************************************************************************/
-function getUI(domainSettings, page) {
-	if(typeof domainSettings != 'undefined') {
-		return domainSettings.ui + page
-	} else {
-		return "http://accurator.nl/ui/generic#" + page;
-	}
-}
-
-function alertMessage(title, text, type) {
-	$("#eventsDiv").prepend(
-		$.el.div({'class':'row',
-				  'id':'alertMessage'},
-			$.el.div({'class':'col-md-12'},
-				$.el.div({'class':'alert alert-' + type + ' alert-dismissible',
-						  'role':'alert'},
-					$.el.button({'type':'button',
-								 'class':'close',
-								 'data-dismiss':'alert',
-								 'aria-label':'Close'},
-						$.el.span({'aria-hidden':'true'},
-							"x")),
-					$.el.h4(title),
-					$.el.p(text)))));
-}
-
-function populateNavbar(userName, linkList, locale) {
-	// only popluate navbar when no experiment is running
-	if(typeof experiment === "undefined" || experiment === "none") {
-		populateNavbarUser(userName, linkList, locale);
-	} else {
-		// hide recommendations button if experiment is running
-		$("#btnRecommend").hide();
-		$("#navbarBtnRecommend").hide();
-		$("#btnResultsRecommend").hide();
-		// hide search form
-		$("#navbarFrmSearch").hide();
-		// remove link from logo if experiment is running
-		$(".navbar-brand").attr('href', "#");
-	}
-}
-
-function populateNavbarUser(userName, linkList, locale) {
-	// Add a user drop down based on the user and listed links
-	getLabels(locale, "http://accurator.nl/ui/generic#userDropdown")
-	.then(function(labels) {
-		$(".navbarLstUser").append(
-			$.el.li({'class':'dropdown'},
-					$.el.a({'href':'#',
-							'class':'dropdown-toggle',
-							'data-toggle':'dropdown',
-							'role':'button',
-							'aria-expanded':'false'},
-							userName + " ",
-							$.el.span({'class':'caret'})),
-					$.el.ul({'class':'dropdown-menu',
-						 	 'role':'menu'},
-						 	 $.el.li($.el.a({'href':'#',
-								         	 'id':'navbarLnkLogout'},
-										 	 labels.navbarLnkLogout)),
-							 // Add links based on array
-							 addLinks(linkList, labels),
-						 	 $.el.li({'class':'divider'}),
-						 	 $.el.li($.el.a({'href':'about.html'},
-								 	 labels.navbarLnkAbout))))
-		)
-		// Add logout event to menu item
-		$("#navbarLnkLogout").click(function() {
-			logout();
-		});
-	});
-}
-
-function addLinks(linkList, labels) {
-	var links = [];
-
-	// Populate the list of additional links in the navbar dropdown
-	for(var i=0; i<linkList.length; i++){
-		links[i] = $.el.li($.el.a({'href':linkList[i].link},
-			localizedPageName(linkList, labels, i)
-		));
-	}
-	return links;
-}
-
-function localizedPageName(linkList, labels, counter) {
-	if(linkList[counter].name === "Profile") {
-		return labels.navbarLblProfile;
-	} else {
-		return linkList[counter].name;
-	}
-}
-
-function setLinkLogo(page) {
-	if(page === "profile")
-	   $(".navbar-brand").attr('href', "profile.html");
-	if(page === "intro")
-		$(".navbar-brand").attr('href', "intro.html");
-}
-
-function truncate(string, limit) {
-	var chars;
-	var i;
-
-	chars = string.split('');
-	if (chars.length > limit) {
-		for (var i=chars.length - 1; i>-1; --i) {
-			if (i>limit) {
-				chars.length = i;
-			}
-			else if (' ' === chars[i]) {
-				chars.length = i;
-				break;
-			}
-		}
-		chars.push('...');
-	}
-	return chars.join('');
-}
-
-/*******************************************************************************
-User Login
-User management code.
-*******************************************************************************/
-function userLoggedIn() {
-	// see if user is logged in (random for unique request)
-	return $.getJSON("get_user?time=" + Math.random())
-	.then(function(user) {
-		if (user.login) return user;
-		if (!user.login) return jQuery.Deferred().reject(user).promise();
-	});
-}
-
-function login(onSuccess, onDismissal) {
-	var ui = "http://accurator.nl/ui/generic#loginModal";
-	var locale = getLocale();
-
-	getLabels(locale, ui)
-	.then(function(labels) {
-		// add labels and show modal
-		var labels = initModalLabels(labels);
-		$("#loginDivLogin").modal();
-		$("#loginInpUsername").focus();
-		loginButtonEvents(onSuccess, onDismissal, labels);
-	})
-}
-
-function initModalLabels(data) {
-	$("#loginHdrTitle").html(data.loginHdrTitle);
-	$("#loginBtnLogin").html(data.loginBtnLogin);
-	$("#loginLblUsername").html(data.loginLblUsername);
-	$("#loginLblPassword").html(data.loginLblPassword);
-	$("body").on('shown.bs.modal', '.modal', function () {
-		$("#loginInpUsername").focus();
-	});
-	var labels = {loginTxtWarning:data.loginTxtWarning,
-		 		  loginTxtIncomplete:data.loginTxtIncomplete}
-	return labels;
-}
-
-function loginButtonEvents(onSuccess, onDismissal, labels) {
-	// add events to login modal
-	$("#loginBtnLogin").click(function() {
-		processLogin(onSuccess, labels);
-	});
-	// login on pressing enter
-	$("#loginInpPassword").keypress(function(event) {
-		if (event.which == 13) processLogin(onSuccess, labels);
-	});
-	$("#loginInpUsername").keypress(function(event) {
-		if (event.which == 13) processLogin(onSuccess, labels);
-	});
-	// run onDismissal if modal is dismissed
-	$("#loginDivLogin").on('hidden.bs.modal', function () {
-		onDismissal();
-	});
-	$("#loginBtnClose").click(function() {
-		onDismissal();
-	});
-}
-
-function processLogin(onSuccess, labels) {
-	// login based upon values provided in modal
-	var user = getUserUri($("#loginInpUsername").val());
-	var password = $("#loginInpPassword").val();
-
-	if(user == "" || password == "") {
-		$("#loginTxtWarning").html(
-			$.el.p({'class':'text-danger'}, labels.loginTxtIncomplete)
-		);
-	} else {
-		loginServer(user, password)
-		.then(function(data) {
-			if(data.indexOf("Login failed") != -1) {
-				// show warning login failed
-				$("#loginTxtWarning").html(
-					$.el.p({'class':'text-danger'}, labels.loginTxtWarning)
-				);
-			} else if (data.indexOf("Login ok") != -1) {
-				// set user settings, hide modal and execute onSuccess
-				setUserSettingsLocal()
-				.then(function() {
-					$("#loginDivLogin").off('hidden.bs.modal');
-					$("#loginDivLogin").modal('hide');
-					return userLoggedIn();
-				})
-				.then(function(userData) {
-					onSuccess(userData);
-				});
-			}
-		});
-	}
-}
-
-function loginServer(user, password) {
-	var dataLogin = {"user": user, "password": password};
-
-	return $.ajax({type: "POST", url: "user/login", data: dataLogin});
-}
-
-function logout() {
-	$.ajax({url: "user/logout", type: "POST"})
-	.then(function() {
-		document.location.href="intro.html";
-	});
-}
-
-/*******************************************************************************
-User registration
-Code for registering a new user
-*******************************************************************************/
-function registerModal(onDismissal, settings) {
-	var ui = "http://accurator.nl/ui/generic#registerModal";
-	var locale = getLocale();
-
-	getLabels(locale, ui)
-	.then(function(data) {
-		var labels = initRegisterModalLabels(data);
-		registerButtonEvent(onDismissal, settings, labels);
-
-		$("#registerDivRegister").modal();
-		$("#registerInpFullName").focus();
-	});
-}
-
-function initRegisterModalLabels(data) {
-	// add retrieved labels to html elements
-	$("#registerHdrTitle").html(data.registerHdrTitle);
-	$("#registerLblFullName").html(data.registerLblFullName);
-	$("#registerLblUsername").html(data.registerLblUsername);
-	$("#registerLblPassword").html(data.registerLblPassword);
-	$("#registerLblPasswordRepeat").html(data.registerLblPasswordRepeat);
-	$("#registerBtnRegister").html(data.registerBtnRegister);
-
-	// set text variables for possible later use
-	var labels = {
-		registerTxtRegistrationFailed: data.registerTxtRegistrationFailed,
-		registerTxtUsernameFail: data.registerTxtUsernameFail,
-		registerTxtPasswordsMatchFail: data.registerTxtPasswordsMatchFail,
-		registerTxtUserTaken: data.registerTxtUserTaken,
-		registerTxtServerError: data.registerTxtServerError
-	};
-
-	$("body").on('shown.bs.modal', '.modal', function () {
-		$("#registerInpFullName").focus();
-	})
-
-	return labels;
-}
-
-function registerButtonEvent(onDismissal, settings, labels) {
-	$("#registerBtnRegister").click(function() {
-		register(settings, labels);
-	});
-	// register on pressing enter
-	$("#registerInpPasswordRepeat").keypress(function(event) {
-		if (event.which == 13) {
-			register(settings, labels);
-		}
-	});
-	$("#registerDivRegister").on('hidden.bs.modal', function (e) {
-		onDismissal();
-	});
-	$("#registerBtnClose").click(function() {
-		onDismissal();
-	});
-}
-
-function register(settings, labels) {
-	// get and check initial form input
-	var name = $("#registerInpFullName").val();
-	var user = $("#registerInpUsername").val();
-	var userUri = getUserUri(user);
-	var password = $("#registerInpPassword").val();
-	var passwordRepeat = $("#registerInpPasswordRepeat").val();
-
-	if((name == "") || (user == "") || (password == "") || (passwordRepeat == "")){
-		setRegisterFailureText(labels.registerTxtRegistrationFailed);
-	} else if (checkUsername(user)) {
-		setRegisterFailureText(labels.registerTxtUsernameFail);
-	} else if (password != passwordRepeat){
-		setRegisterFailureText(labels.registerTxtPasswordsMatchFail);
-	} else {
-		// Attempt registration
-		registerServer(name, userUri, password, settings, labels);
-	}
-}
-
-function setRegisterFailureText(text) {
-	var alertMessage = $.el.div({'class':'registerMessage'},
-			$.el.h5({'class':'text-danger'}, text));
-	// clear the current
-	$("#registerTxtWarning").empty();
-	$("#registerTxtWarning").append(alertMessage);
-}
-
-function checkUsername(user) {
-	// Only allow letters, numbers and underscores in username
-	var illegalChars = /\W/;
-
-	if (illegalChars.test(user)) {
-		return true;
-	} else {
-		return false;
-	}
-}
-
-function registerServer(name, user, password, settings, labels) {
-	var json = {"name":name, "user":user, "password":password};
-
-	$.ajax({
-		type: "POST",
-		url: "register_user",
-		contentType: "application/json",
-		data: JSON.stringify(json),
-	}).then(function() {
-		// login user upon succesful register
-		firstLogin(user, password, settings);
-	}, function(response, textStatus, errorThrown) {
-		if(errorThrown == "Not Found")
-			setRegisterFailureText("Server did not respond.");
-		if(response.responseText.indexOf("User already exists") > -1) {
-			setRegisterFailureText(labels.registerTxtUserTaken);
-		} else {
-			setRegisterFailureText(labels.registerTxtServerError);
-		}
-	});
-}
-
-function firstLogin(user, password, settings) {
-	// loginServer from utilities is not used because it resets settings upon
-	// retrieving non existent settings from user.db (hence, firstLogin)
-	$.ajax({
-		type: "POST",
-		url: "user/login",
-		data: {"user":user, "password":password},
-	})
-	.then(function() {
-		// save the locale and domain currently in local storage
-		save_user_info(settings)
-		.then(function() {
-			// page that will be shown next
-			document.location.href="domain.html";
-		 });
-	});
-}
-
-/*******************************************************************************
-Uri
-Code for working with Uris
-*******************************************************************************/
-function getUserUri(userName) {
-	// concatenate proper user uri (e.g. )
-	return getUserUriBase() + userName.toLowerCase();
-}
-
-function getUserName(userUri) {
-	// retrieve user name from uri
-	return userUri.replace(getUserUriBase(),"");
-}
-
-function getUserUriBase() {
-	// return the base of the user uri, username should be added
-	return "http://accurator.nl/user#";
-}
-
-function generateIdFromUri(uri) {
-	// create a html id from a uri (jquery doesn't play well with full uri's)
-	var pathArray = uri.split(/[/#]/);
-	return pathArray[pathArray.length - 1];
-}
diff --git a/web/js/annotations.js b/web/js/annotations.js
deleted file mode 100644
index 352b97a..0000000
--- a/web/js/annotations.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
-Annotations
-Code for handling the adding and removing of tags
-*******************************************************************************/
-function AnnotationList(id) {
-	this.divId = id; // id of annotation container
-	this.annotations = []; // array containing the annotations
-	this.node = $.el.div({'id':id}) // empty html dom element
-}
-
-AnnotationList.prototype.add = function(annotation) {
-	// Add annotation to the list
-	this.annotations.unshift(annotation);
-	this.render();
-}
-
-AnnotationList.prototype.remove = function(annotation) {
-	var id = annotation['@id'];
-
-	for (key in this.annotations) {
-		var annotationId = this.annotations[key]['@id'];
-		// Remove an annotation based on id
-		if (annotationId === id)
-			this.annotations.splice(key, 1);
-	}
-}
-
-AnnotationList.prototype.render = function() {
-	// Empty the field before showing all annotations
-	$("#" + this.divId).empty();
-
-	// Render the annotations related to this field
-	for (var key in this.annotations) {
-		var annotation = this.annotations[key];
-		var label = truncate(annotation.title, 7);
-		var id = generateIdFromUri(annotation['@id']);
-		var target = this.findTarget(annotation);
-
-		// Add annotation in div below field
-		$('#' + this.divId).append(
-			$.el.span({
-				'id':'lbl' + id,
-				'class':'label label-default lblAnnotation',
-				'targetId':target['@id']},
-				label
-			)
-		);
-
-		// Add event to label
-		// $("#lbl" + id).on("click", function(){
-		// });
-	}
-}
-
-AnnotationList.prototype.findTarget = function(tag) {
-	// Return specific target of a tag or else generic target
-	var result = this.findSpecificTarget(tag);
-
-	if (result) {
-		return result;
-	} else {
-		return this.findGenericTarget(tag);
-	}
-}
-
-AnnotationList.prototype.findSpecificTarget = function(tag) {
-	// Returns the specific fragmet target of a tag identified by a selector
-	var targets = tag.hasTarget;
-	var target = undefined;
-
-	if (!targets)
-		return null;
-	if (targets.hasSelector)
-		return targets;
-	for (var t in targets) {
-		target = targets[t];
-		if (target.hasSelector)
-			return target;
-	}
-	return null;
-}
-
-AnnotationList.prototype.findGenericTarget = function(tag) {
-	// Returns the generic target of a tag identified with key @id
-	var targets = tag.hasTarget;
-	var target = undefined;
-
-
-	if (!targets)
-		return null; // return null if no target is known
-	if (targets['@id'])
-		return targets; // return targets array if key @id is present
-
-	// Loop through targets till key @id is found
-	for (var t in targets) {
-		target = targets[t];
-		if (target['@id'])
-			return target;
-	}
-	return null;
-}
diff --git a/web/js/annotorious.min.js b/web/js/annotorious.min.js
deleted file mode 100644
index b7bb650..0000000
--- a/web/js/annotorious.min.js
+++ /dev/null
@@ -1,254 +0,0 @@
-function g(a){throw a;}var i=void 0,j=!0,m=null,n=!1;function p(){return function(){}}function r(a){return function(){return this[a]}}function aa(a){return function(){return a}}var s,t=this;function ba(a,b){var c=a.split("."),d=t;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&ca(b)?d[f]=b:d=d[f]?d[f]:d[f]={}}function da(){}function ea(a){a.pb=function(){return a.Bd?a.Bd:a.Bd=new a}}
-function fa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
-else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return a!==i}function ga(a){return"array"==fa(a)}function ha(a){var b=fa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function u(a){return"string"==typeof a}function v(a){return"function"==fa(a)}function ia(a){var b=typeof a;return"object"==b&&a!=m||"function"==b}function ja(a){return a[ka]||(a[ka]=++la)}var ka="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),la=0;
-function ma(a,b,c){return a.call.apply(a.bind,arguments)}function na(a,b,c){a||g(Error());if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function oa(a,b,c){oa=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ma:na;return oa.apply(m,arguments)}
-function pa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var qa=Date.now||function(){return+new Date};function z(a,b){function c(){}c.prototype=b.prototype;a.K=b.prototype;a.prototype=new c;a.prototype.constructor=a};function ra(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function sa(a){if(!ta.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(ua,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(va,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(wa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(xa,"&quot;"));return a}var ua=/&/g,va=/</g,wa=/>/g,xa=/\"/g,ta=/[&<>\"]/;function ya(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var B=Array.prototype,za=B.indexOf?function(a,b,c){return B.indexOf.call(a,b,c)}:function(a,b,c){c=c==m?0:0>c?Math.max(0,a.length+c):c;if(u(a))return!u(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},C=B.forEach?function(a,b,c){B.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=u(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},Aa=B.filter?function(a,b,c){return B.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=[],e=0,h=u(a)?a.split(""):
-a,k=0;k<d;k++)if(k in h){var l=h[k];b.call(c,l,k,a)&&(f[e++]=l)}return f},Ba=B.map?function(a,b,c){return B.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=Array(d),e=u(a)?a.split(""):a,h=0;h<d;h++)h in e&&(f[h]=b.call(c,e[h],h,a));return f},Ca=B.every?function(a,b,c){return B.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=u(a)?a.split(""):a,e=0;e<d;e++)if(e in f&&!b.call(c,f[e],e,a))return n;return j};
-function Da(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,f=0;f<c;f++)if(f in d&&b.call(i,d[f],f,a)){c=f;break a}c=-1}return 0>c?m:u(a)?a.charAt(c):a[c]}function Ea(a,b){return 0<=za(a,b)}function D(a,b){var c=za(a,b);0<=c&&B.splice.call(a,c,1)}function Fa(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}
-function Ga(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],f;if(ga(d)||(f=ha(d))&&d.hasOwnProperty("callee"))a.push.apply(a,d);else if(f)for(var e=a.length,h=d.length,k=0;k<h;k++)a[e+k]=d[k];else a.push(d)}}function Ha(a,b,c){return 2>=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)}function Ia(a,b){return a>b?1:a<b?-1:0};var Ja,Ka,La,Ma,Na;function Oa(){return t.navigator?t.navigator.userAgent:m}function Pa(){return t.navigator}Ma=La=Ka=Ja=n;var Qa;if(Qa=Oa()){var Ra=Pa();Ja=0==Qa.indexOf("Opera");Ka=!Ja&&-1!=Qa.indexOf("MSIE");La=!Ja&&-1!=Qa.indexOf("WebKit");Ma=!Ja&&!La&&"Gecko"==Ra.product}var Sa=Ja,E=Ka,F=Ma,G=La,Ta=Pa();Na=-1!=(Ta&&Ta.platform||"").indexOf("Mac");var Ua=!!Pa()&&-1!=(Pa().appVersion||"").indexOf("X11"),Va;
-a:{var Wa="",Xa;if(Sa&&t.opera)var Ya=t.opera.version,Wa="function"==typeof Ya?Ya():Ya;else if(F?Xa=/rv\:([^\);]+)(\)|;)/:E?Xa=/MSIE\s+([^\);]+)(\)|;)/:G&&(Xa=/WebKit\/(\S+)/),Xa)var Za=Xa.exec(Oa()),Wa=Za?Za[1]:"";if(E){var $a,ab=t.document;$a=ab?ab.documentMode:i;if($a>parseFloat(Wa)){Va=String($a);break a}}Va=Wa}var bb={};
-function I(a){var b;if(!(b=bb[a])){b=0;for(var c=ra(String(Va)).split("."),d=ra(String(a)).split("."),f=Math.max(c.length,d.length),e=0;0==b&&e<f;e++){var h=c[e]||"",k=d[e]||"",l=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var w=l.exec(h)||["","",""],y=q.exec(k)||["","",""];if(0==w[0].length&&0==y[0].length)break;b=((0==w[1].length?0:parseInt(w[1],10))<(0==y[1].length?0:parseInt(y[1],10))?-1:(0==w[1].length?0:parseInt(w[1],10))>(0==y[1].length?0:parseInt(y[1],10))?1:0)||((0==w[2].length)<
-(0==y[2].length)?-1:(0==w[2].length)>(0==y[2].length)?1:0)||(w[2]<y[2]?-1:w[2]>y[2]?1:0)}while(0==b)}b=bb[a]=0<=b}return b}var cb={};function db(a){return cb[a]||(cb[a]=E&&!!document.documentMode&&document.documentMode>=a)};var eb,fb=!E||db(9);!F&&!E||E&&db(9)||F&&I("1.9.1");E&&I("9");var gb=E||Sa||G;function hb(a){a=a.className;return u(a)&&a.match(/\S+/g)||[]}function ib(a,b){var c=hb(a),d=Ha(arguments,1),f=c.length+d.length;jb(c,d);a.className=c.join(" ");return c.length==f}function kb(a,b){var c=hb(a),d=Ha(arguments,1),f=lb(c,d);a.className=f.join(" ");return f.length==c.length-d.length}function jb(a,b){for(var c=0;c<b.length;c++)Ea(a,b[c])||a.push(b[c])}function lb(a,b){return Aa(a,function(a){return!Ea(b,a)})}
-function mb(a,b,c){var d=hb(a);u(b)?D(d,b):ga(b)&&(d=lb(d,b));u(c)&&!Ea(d,c)?d.push(c):ga(c)&&jb(d,c);a.className=d.join(" ")};function J(a,b){this.x=ca(a)?a:0;this.y=ca(b)?b:0};function nb(a,b){this.width=a;this.height=b}nb.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};nb.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ob(a,b){for(var c in a)b.call(i,a[c],c,a)}var pb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function qb(a,b){for(var c,d,f=1;f<arguments.length;f++){d=arguments[f];for(c in d)a[c]=d[c];for(var e=0;e<pb.length;e++)c=pb[e],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function rb(a){return a?new sb(K(a)):eb||(eb=new sb)}function tb(){var a,b,c,d;a=document;if(a.querySelectorAll&&a.querySelector)return a.querySelectorAll(".openseadragon-container");if(a.getElementsByClassName){var f=a.getElementsByClassName("openseadragon-container");return f}f=a.getElementsByTagName("*");d={};for(b=c=0;a=f[b];b++){var e=a.className;"function"==typeof e.split&&Ea(e.split(/\s+/),"openseadragon-container")&&(d[c++]=a)}d.length=c;return d}
-function ub(a,b){ob(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in vb?a.setAttribute(vb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var vb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
-function wb(a,b,c){var d=arguments,f=document,e=d[0],h=d[1];if(!fb&&h&&(h.name||h.type)){e=["<",e];h.name&&e.push(' name="',sa(h.name),'"');if(h.type){e.push(' type="',sa(h.type),'"');var k={};qb(k,h);delete k.type;h=k}e.push(">");e=e.join("")}e=f.createElement(e);h&&(u(h)?e.className=h:ga(h)?ib.apply(m,[e].concat(h)):ub(e,h));2<d.length&&xb(f,e,d,2);return e}
-function xb(a,b,c,d){function f(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var e=c[d];if(ha(e)&&!(ia(e)&&0<e.nodeType)){var h;a:{if(e&&"number"==typeof e.length){if(ia(e)){h="function"==typeof e.item||"string"==typeof e.item;break a}if(v(e)){h="function"==typeof e.item;break a}}h=n}C(h?Fa(e):e,f)}else f(e)}}function yb(a){for(var b;b=a.firstChild;)a.removeChild(b)}function zb(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function Ab(a){return ia(a)&&1==a.nodeType}
-function Bb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function K(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Cb(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?(a=a.tabIndex,"number"==typeof a&&0<=a&&32768>a):n}function sb(a){this.M=a||t.document||document}s=sb.prototype;s.pd=rb;
-s.d=function(a){return u(a)?this.M.getElementById(a):a};s.ga=ub;s.createElement=function(a){return this.M.createElement(a)};s.createTextNode=function(a){return this.M.createTextNode(a)};function Db(a){var b=a.M,a=!G?b.documentElement:b.body,b=b.parentWindow||b.defaultView;return new J(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}s.appendChild=function(a,b){a.appendChild(b)};s.append=function(a,b){xb(K(a),a,arguments,1)};s.contains=Bb;var Eb;Eb=aa(j);/*
- Portions of this code are from the Dojo Toolkit, received by
- The Closure Library Authors under the BSD license. All other code is
- Copyright 2005-2009 The Closure Library Authors. All Rights Reserved.
-
-The "New" BSD License:
-
-Copyright (c) 2005-2009, The Dojo Foundation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- Neither the name of the Dojo Foundation nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-function Fb(a,b){var c=b||[];a&&c.push(a);return c}var Gb=G&&"BackCompat"==document.compatMode,Hb=document.firstChild.children?"children":"childNodes",Ib=n;
-function Jb(a){function b(){0<=q&&(x.id=c(q,A).replace(/\\/g,""),q=-1);if(0<=w){var a=w==A?m:c(w,A);0>">~+".indexOf(a)?x.H=a:x.Qb=a;w=-1}0<=l&&(x.ca.push(c(l+1,A).replace(/\\/g,"")),l=-1)}function c(b,c){return ra(a.slice(b,c))}for(var a=0<=">~+".indexOf(a.slice(-1))?a+" * ":a+" ",d=[],f=-1,e=-1,h=-1,k=-1,l=-1,q=-1,w=-1,y="",H="",S,A=0,Me=a.length,x=m,M=m;y=H,H=a.charAt(A),A<Me;A++)if("\\"!=y)if(x||(S=A,x={Ua:m,Ba:[],Ab:[],ca:[],H:m,Qb:m,id:m,rc:function(){return Ib?this.he:this.H}},w=A),0<=f)if("]"==
-H){M.nc?M.yc=c(h||f+1,A):M.nc=c(f+1,A);if((f=M.yc)&&('"'==f.charAt(0)||"'"==f.charAt(0)))M.yc=f.slice(1,-1);x.Ab.push(M);M=m;f=h=-1}else"="==H&&(h=0<="|~^$*".indexOf(y)?y:"",M.type=h+H,M.nc=c(f+1,A-h.length),h=A+1);else 0<=e?")"==H&&(0<=k&&(M.value=c(e+1,A)),k=e=-1):"#"==H?(b(),q=A+1):"."==H?(b(),l=A):":"==H?(b(),k=A):"["==H?(b(),f=A,M={}):"("==H?(0<=k&&(M={name:c(k+1,A),value:m},x.Ba.push(M)),e=A):" "==H&&y!=H&&(b(),0<=k&&x.Ba.push({name:c(k+1,A)}),x.Ed=x.Ba.length||x.Ab.length||x.ca.length,x.ye=
-x.Ua=c(S,A),x.he=x.H=x.Qb?m:x.H||"*",x.H&&(x.H=x.H.toUpperCase()),d.length&&d[d.length-1].Qb&&(x.Ad=d.pop(),x.Ua=x.Ad.Ua+" "+x.Ua),d.push(x),x=m);return d}function Kb(a,b){return!a?b:!b?a:function(){return a.apply(window,arguments)&&b.apply(window,arguments)}}function Lb(a){return 1==a.nodeType}function Mb(a,b){return!a?"":"class"==b?a.className||"":"for"==b?a.htmlFor||"":"style"==b?a.style.cssText||"":(Ib?a.getAttribute(b):a.getAttribute(b,2))||""}
-var Nb={"*=":function(a,b){return function(c){return 0<=Mb(c,a).indexOf(b)}},"^=":function(a,b){return function(c){return 0==Mb(c,a).indexOf(b)}},"$=":function(a,b){return function(c){c=" "+Mb(c,a);return c.lastIndexOf(b)==c.length-b.length}},"~=":function(a,b){var c=" "+b+" ";return function(b){return 0<=(" "+Mb(b,a)+" ").indexOf(c)}},"|=":function(a,b){b=" "+b;return function(c){c=" "+Mb(c,a);return c==b||0==c.indexOf(b+"-")}},"=":function(a,b){return function(c){return Mb(c,a)==b}}},Ob="undefined"==
-typeof document.firstChild.nextElementSibling,Pb=!Ob?"nextElementSibling":"nextSibling",Qb=!Ob?"previousElementSibling":"previousSibling",Rb=Ob?Lb:Eb;function Sb(a){for(;a=a[Qb];)if(Rb(a))return n;return j}function Tb(a){for(;a=a[Pb];)if(Rb(a))return n;return j}function Ub(a){var b=a.parentNode,c=0,d=b[Hb],f=a._i||-1,e=b._l||-1;if(!d)return-1;d=d.length;if(e==d&&0<=f&&0<=e)return f;b._l=d;f=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[Pb])Rb(b)&&(b._i=++c,a===b&&(f=c));return f}
-function Vb(a){return!(Ub(a)%2)}function Wb(a){return Ub(a)%2}
-var Yb={checked:function(){return function(a){return a.checked||a.attributes.checked}},"first-child":function(){return Sb},"last-child":function(){return Tb},"only-child":function(){return function(a){return!Sb(a)||!Tb(a)?n:j}},empty:function(){return function(a){for(var b=a.childNodes,a=a.childNodes.length-1;0<=a;a--){var c=b[a].nodeType;if(1===c||3==c)return n}return j}},contains:function(a,b){var c=b.charAt(0);if('"'==c||"'"==c)b=b.slice(1,-1);return function(a){return 0<=a.innerHTML.indexOf(b)}},
-not:function(a,b){var c=Jb(b)[0],d={D:1};"*"!=c.H&&(d.H=1);c.ca.length||(d.ca=1);var f=Xb(c,d);return function(a){return!f(a)}},"nth-child":function(a,b){if("odd"==b)return Wb;if("even"==b)return Vb;if(-1!=b.indexOf("n")){var c=b.split("n",2),d=c[0]?"-"==c[0]?-1:parseInt(c[0],10):1,f=c[1]?parseInt(c[1],10):0,e=0,h=-1;0<d?0>f?f=f%d&&d+f%d:0<f&&(f>=d&&(e=f-f%d),f%=d):0>d&&(d*=-1,0<f&&(h=f,f%=d));if(0<d)return function(a){a=Ub(a);return a>=e&&(0>h||a<=h)&&a%d==f};b=f}var k=parseInt(b,10);return function(a){return Ub(a)==
-k}}},Zb=E?function(a){var b=a.toLowerCase();"class"==b&&(a="className");return function(c){return Ib?c.getAttribute(a):c[a]||c[b]}}:function(a){return function(b){return b&&b.getAttribute&&b.hasAttribute(a)}};
-function Xb(a,b){if(!a)return Eb;var b=b||{},c=m;b.D||(c=Kb(c,Lb));b.H||"*"!=a.H&&(c=Kb(c,function(b){return b&&b.tagName==a.rc()}));b.ca||C(a.ca,function(a,b){var e=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");c=Kb(c,function(a){return e.test(a.className)});c.count=b});b.Ba||C(a.Ba,function(a){var b=a.name;Yb[b]&&(c=Kb(c,Yb[b](b,a.value)))});b.Ab||C(a.Ab,function(a){var b,e=a.nc;a.type&&Nb[a.type]?b=Nb[a.type](e,a.yc):e.length&&(b=Zb(e));b&&(c=Kb(c,b))});b.id||a.id&&(c=Kb(c,function(b){return!!b&&b.id==a.id}));
-c||"default"in b||(c=Eb);return c}var $b={};
-function ac(a){var b=$b[a.Ua];if(b)return b;var c=a.Ad,c=c?c.Qb:"",d=Xb(a,{D:1}),f="*"==a.H,e=document.getElementsByClassName;if(c)if(e={D:1},f&&(e.H=1),d=Xb(a,e),"+"==c)var h=d,b=function(a,b,c){for(;a=a[Pb];)if(!Ob||Lb(a)){(!c||bc(a,c))&&h(a)&&b.push(a);break}return b};else if("~"==c)var k=d,b=function(a,b,c){for(a=a[Pb];a;){if(Rb(a)){if(c&&!bc(a,c))break;k(a)&&b.push(a)}a=a[Pb]}return b};else{if(">"==c)var l=d,l=l||Eb,b=function(a,b,c){for(var d=0,f=a[Hb];a=f[d++];)Rb(a)&&((!c||bc(a,c))&&l(a,d))&&
-b.push(a);return b}}else if(a.id)d=!a.Ed&&f?Eb:Xb(a,{D:1,id:1}),b=function(b,c){var f=rb(b).d(a.id),e;if(e=f&&d(f))if(!(e=9==b.nodeType)){for(e=f.parentNode;e&&e!=b;)e=e.parentNode;e=!!e}if(e)return Fb(f,c)};else if(e&&/\{\s*\[native code\]\s*\}/.test(String(e))&&a.ca.length&&!Gb)var d=Xb(a,{D:1,ca:1,id:1}),q=a.ca.join(" "),b=function(a,b){for(var c=Fb(0,b),f,e=0,h=a.getElementsByClassName(q);f=h[e++];)d(f,a)&&c.push(f);return c};else!f&&!a.Ed?b=function(b,c){for(var d=Fb(0,c),f,e=0,h=b.getElementsByTagName(a.rc());f=
-h[e++];)d.push(f);return d}:(d=Xb(a,{D:1,H:1,id:1}),b=function(b,c){for(var f=Fb(0,c),e,h=0,k=b.getElementsByTagName(a.rc());e=k[h++];)d(e,b)&&f.push(e);return f});return $b[a.Ua]=b}var cc={},dc={};function ec(a){var b=Jb(ra(a));if(1==b.length){var c=ac(b[0]);return function(a){if(a=c(a,[]))a.Pb=j;return a}}return function(a){for(var a=Fb(a),c,e,h=b.length,k,l,q=0;q<h;q++){l=[];c=b[q];e=a.length-1;0<e&&(k={},l.Pb=j);e=ac(c);for(var w=0;c=a[w];w++)e(c,l,k);if(!l.length)break;a=l}return l}}
-var fc=!!document.querySelectorAll&&(!G||I("526"));
-function gc(a,b){if(fc){var c=dc[a];if(c&&!b)return c}if(c=cc[a])return c;var c=a.charAt(0),d=-1==a.indexOf(" ");0<=a.indexOf("#")&&d&&(b=j);if(fc&&!b&&-1==">~+".indexOf(c)&&(!E||-1==a.indexOf(":"))&&!(Gb&&0<=a.indexOf("."))&&-1==a.indexOf(":contains")&&-1==a.indexOf("|=")){var f=0<=">~+".indexOf(a.charAt(a.length-1))?a+" *":a;return dc[a]=function(b){try{9==b.nodeType||d||g("");var c=b.querySelectorAll(f);E?c.Td=j:c.Pb=j;return c}catch(e){return gc(a,j)(b)}}}var e=a.split(/\s*,\s*/);return cc[a]=
-2>e.length?ec(a):function(a){for(var b=0,c=[],d;d=e[b++];)c=c.concat(ec(d)(a));return c}}var hc=0,ic=E?function(a){return Ib?a.getAttribute("_uid")||a.setAttribute("_uid",++hc)||hc:a.uniqueID}:function(a){return a._uid||(a._uid=++hc)};function bc(a,b){if(!b)return 1;var c=ic(a);return!b[c]?b[c]=1:0}
-function jc(a){if(a&&a.Pb)return a;var b=[];if(!a||!a.length)return b;a[0]&&b.push(a[0]);if(2>a.length)return b;hc++;if(E&&Ib){var c=hc+"";a[0].setAttribute("_zipIdx",c);for(var d=1,f;f=a[d];d++)a[d].getAttribute("_zipIdx")!=c&&b.push(f),f.setAttribute("_zipIdx",c)}else if(E&&a.Td)try{for(d=1;f=a[d];d++)Lb(f)&&b.push(f)}catch(e){}else{a[0]&&(a[0]._zipIdx=hc);for(d=1;f=a[d];d++)a[d]._zipIdx!=hc&&b.push(f),f._zipIdx=hc}return b}
-function L(a,b){if(!a)return[];if(a.constructor==Array)return a;if(!u(a))return[a];if(u(b)&&(b=u(b)?document.getElementById(b):b,!b))return[];var b=b||document,c=b.ownerDocument||b.documentElement;Ib=b.contentType&&"application/xml"==b.contentType||Sa&&(b.doctype||"[object XMLDocument]"==c.toString())||!!c&&(E?c.xml:b.xmlVersion||c.xmlVersion);return(c=gc(a)(b))&&c.Pb?c:jc(c)}L.Ba=Yb;ba("goog.dom.query",L);ba("goog.dom.query.pseudos",L.Ba);var kc=!E||db(9),lc=!E||db(9),mc=E&&!I("9");!G||I("528");F&&I("1.9b")||E&&I("8")||Sa&&I("9.5")||G&&I("528");F&&!I("8")||E&&I("9");function nc(){0!=oc&&(this.se=Error().stack,ja(this))}var oc=0;nc.prototype.ld=n;function pc(a,b){this.type=a;this.currentTarget=this.target=b}s=pc.prototype;s.Aa=n;s.defaultPrevented=n;s.Ub=j;s.stopPropagation=function(){this.Aa=j};s.preventDefault=function(){this.defaultPrevented=j;this.Ub=n};function qc(a){a.preventDefault()};function rc(a){rc[" "](a);return a}rc[" "]=da;function sc(a,b){a&&this.init(a,b)}z(sc,pc);var tc=[1,4,2];s=sc.prototype;s.target=m;s.relatedTarget=m;s.offsetX=0;s.offsetY=0;s.clientX=0;s.clientY=0;s.screenX=0;s.screenY=0;s.button=0;s.keyCode=0;s.charCode=0;s.ctrlKey=n;s.altKey=n;s.shiftKey=n;s.metaKey=n;s.Cc=n;s.n=m;
-s.init=function(a,b){var c=this.type=a.type;pc.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(F){var f;a:{try{rc(d.nodeName);f=j;break a}catch(e){}f=n}f||(d=m)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=G||a.offsetX!==i?a.offsetX:a.layerX;this.offsetY=G||a.offsetY!==i?a.offsetY:a.layerY;this.clientX=a.clientX!==i?a.clientX:a.pageX;this.clientY=a.clientY!==i?a.clientY:a.pageY;this.screenX=
-a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.Cc=Na?a.metaKey:a.ctrlKey;this.state=a.state;this.n=a;a.defaultPrevented&&this.preventDefault();delete this.Aa};function uc(a){return(kc?0==a.n.button:"click"==a.type?j:!!(a.n.button&tc[0]))&&!(G&&Na&&a.ctrlKey)}
-s.stopPropagation=function(){sc.K.stopPropagation.call(this);this.n.stopPropagation?this.n.stopPropagation():this.n.cancelBubble=j};s.preventDefault=function(){sc.K.preventDefault.call(this);var a=this.n;if(a.preventDefault)a.preventDefault();else if(a.returnValue=n,mc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};s.Ud=r("n");function vc(){}var wc=0;s=vc.prototype;s.key=0;s.Ca=n;s.fd=n;s.init=function(a,b,c,d,f,e){v(a)?this.Dd=j:a&&a.handleEvent&&v(a.handleEvent)?this.Dd=n:g(Error("Invalid listener argument"));this.Ta=a;this.Hd=b;this.src=c;this.type=d;this.capture=!!f;this.Pa=e;this.fd=n;this.key=++wc;this.Ca=n};s.handleEvent=function(a){return this.Dd?this.Ta.call(this.Pa||this.src,a):this.Ta.handleEvent.call(this.Ta,a)};var xc={},N={},yc={},zc={};
-function O(a,b,c,d,f){if(b){if(ga(b)){for(var e=0;e<b.length;e++)O(a,b[e],c,d,f);return m}var d=!!d,h=N;b in h||(h[b]={m:0,O:0});h=h[b];d in h||(h[d]={m:0,O:0},h.m++);var h=h[d],k=ja(a),l;h.O++;if(h[k]){l=h[k];for(e=0;e<l.length;e++)if(h=l[e],h.Ta==c&&h.Pa==f){if(h.Ca)break;return l[e].key}}else l=h[k]=[],h.m++;var q=Ac,w=lc?function(a){return q.call(w.src,w.key,a)}:function(a){a=q.call(w.src,w.key,a);if(!a)return a},e=w;e.src=a;h=new vc;h.init(c,e,a,b,d,f);c=h.key;e.key=c;l.push(h);xc[c]=h;yc[k]||
-(yc[k]=[]);yc[k].push(h);a.addEventListener?(a==t||!a.hd)&&a.addEventListener(b,e,d):a.attachEvent(b in zc?zc[b]:zc[b]="on"+b,e);return c}g(Error("Invalid event type"))}function Bc(a,b,c,d,f){if(ga(b))for(var e=0;e<b.length;e++)Bc(a,b[e],c,d,f);else if(d=!!d,a=Cc(a,b,d))for(e=0;e<a.length;e++)if(a[e].Ta==c&&a[e].capture==d&&a[e].Pa==f){P(a[e].key);break}}
-function P(a){if(!xc[a])return n;var b=xc[a];if(b.Ca)return n;var c=b.src,d=b.type,f=b.Hd,e=b.capture;c.removeEventListener?(c==t||!c.hd)&&c.removeEventListener(d,f,e):c.detachEvent&&c.detachEvent(d in zc?zc[d]:zc[d]="on"+d,f);c=ja(c);yc[c]&&(f=yc[c],D(f,b),0==f.length&&delete yc[c]);b.Ca=j;if(b=N[d][e][c])b.Gd=j,Dc(d,e,c,b);delete xc[a];return j}
-function Dc(a,b,c,d){if(!d.Kb&&d.Gd){for(var f=0,e=0;f<d.length;f++)d[f].Ca?d[f].Hd.src=m:(f!=e&&(d[e]=d[f]),e++);d.length=e;d.Gd=n;0==e&&(delete N[a][b][c],N[a][b].m--,0==N[a][b].m&&(delete N[a][b],N[a].m--),0==N[a].m&&delete N[a])}}function Cc(a,b,c){var d=N;return b in d&&(d=d[b],c in d&&(d=d[c],a=ja(a),d[a]))?d[a]:m}
-function Ec(a,b,c,d,f){var e=1,b=ja(b);if(a[b]){a.O--;a=a[b];a.Kb?a.Kb++:a.Kb=1;try{for(var h=a.length,k=0;k<h;k++){var l=a[k];l&&!l.Ca&&(e&=Fc(l,f)!==n)}}finally{a.Kb--,Dc(c,d,b,a)}}return Boolean(e)}function Fc(a,b){a.fd&&P(a.key);return a.handleEvent(b)}
-function Ac(a,b){if(!xc[a])return j;var c=xc[a],d=c.type,f=N;if(!(d in f))return j;var f=f[d],e,h;if(!lc){var k;if(!(k=b))a:{k=["window","event"];for(var l=t;e=k.shift();)if(l[e]!=m)l=l[e];else{k=m;break a}k=l}e=k;k=j in f;l=n in f;if(k){if(0>e.keyCode||e.returnValue!=i)return j;a:{var q=n;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(w){q=j}if(q||e.returnValue==i)e.returnValue=j}}q=new sc;q.init(e,this);e=j;try{if(k){for(var y=[],H=q.currentTarget;H;H=H.parentNode)y.push(H);h=f[j];h.O=h.m;for(var S=
-y.length-1;!q.Aa&&0<=S&&h.O;S--)q.currentTarget=y[S],e&=Ec(h,y[S],d,j,q);if(l){h=f[n];h.O=h.m;for(S=0;!q.Aa&&S<y.length&&h.O;S++)q.currentTarget=y[S],e&=Ec(h,y[S],d,n,q)}}else e=Fc(c,q)}finally{y&&(y.length=0)}return e}d=new sc(b,this);return e=Fc(c,d)};function Gc(a){nc.call(this);this.xd=a;this.j=[]}z(Gc,nc);var Hc=[];function Q(a,b,c,d,f){ga(c)||(Hc[0]=c,c=Hc);for(var e=0;e<c.length;e++){var h=O(b,c[e],d||a,f||n,a.xd||a);a.j.push(h)}return a}function Ic(a,b,c,d,f,e){if(ga(c))for(var h=0;h<c.length;h++)Ic(a,b,c[h],d,f,e);else{a:{d=d||a;e=e||a.xd||a;f=!!f;if(b=Cc(b,c,f))for(c=0;c<b.length;c++)if(!b[c].Ca&&b[c].Ta==d&&b[c].capture==f&&b[c].Pa==e){b=b[c];break a}b=m}b&&(b=b.key,P(b),D(a.j,b))}return a}
-Gc.prototype.Sb=function(){C(this.j,P);this.j.length=0};Gc.prototype.handleEvent=function(){g(Error("EventHandler.handleEvent not implemented"))};function Jc(){nc.call(this)}z(Jc,nc);s=Jc.prototype;s.hd=j;s.Bc=m;s.Gc=function(a){this.Bc=a};s.addEventListener=function(a,b,c,d){O(this,a,b,c,d)};s.removeEventListener=function(a,b,c,d){Bc(this,a,b,c,d)};
-s.dispatchEvent=function(a){var b=a.type||a,c=N;if(b in c){if(u(a))a=new pc(a,this);else if(a instanceof pc)a.target=a.target||this;else{var d=a,a=new pc(b,this);qb(a,d)}var d=1,f,c=c[b],b=j in c,e;if(b){f=[];for(e=this;e;e=e.Bc)f.push(e);e=c[j];e.O=e.m;for(var h=f.length-1;!a.Aa&&0<=h&&e.O;h--)a.currentTarget=f[h],d&=Ec(e,f[h],a.type,j,a)&&a.Ub!=n}if(n in c)if(e=c[n],e.O=e.m,b)for(h=0;!a.Aa&&h<f.length&&e.O;h++)a.currentTarget=f[h],d&=Ec(e,f[h],a.type,n,a)&&a.Ub!=n;else for(f=this;!a.Aa&&f&&e.O;f=
-f.Bc)a.currentTarget=f,d&=Ec(e,f,a.type,n,a)&&a.Ub!=n;a=Boolean(d)}else a=j;return a};function Kc(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}Kc.prototype.contains=function(a){return!this||!a?n:a instanceof Kc?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function Lc(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}Lc.prototype.contains=function(a){return a instanceof Lc?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function R(a,b,c){u(b)?Mc(a,c,b):ob(b,pa(Mc,a))}function Mc(a,b,c){a.style[ya(c)]=b}function T(a,b){var c=K(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b)||"":""}function Nc(a,b){return a.currentStyle?a.currentStyle[b]:m}function Oc(a,b){return T(a,b)||Nc(a,b)||a.style&&a.style[b]}function Pc(a,b,c){var d,f=F&&(Na||Ua)&&I("1.9");b instanceof J?(d=b.x,b=b.y):(d=b,b=c);a.style.left=Qc(d,f);a.style.top=Qc(b,f)}
-function Rc(a){var b=a.getBoundingClientRect();E&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
-function Sc(a){if(E&&!db(8))return a.offsetParent;for(var b=K(a),c=Oc(a,"position"),d="fixed"==c||"absolute"==c,a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Oc(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return m}
-function Tc(a){var b,c=K(a),d=Oc(a,"position"),f=F&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),e=new J(0,0),h;b=c?K(c):document;if(h=E)if(h=!db(9))rb(b),h=n;h=h?b.body:b.documentElement;if(a==h)return e;if(a.getBoundingClientRect)b=Rc(a),a=Db(rb(c)),e.x=b.left+a.x,e.y=b.top+a.y;else if(c.getBoxObjectFor&&!f)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),e.x=b.screenX-a.screenX,e.y=b.screenY-a.screenY;else{f=a;do{e.x+=f.offsetLeft;
-e.y+=f.offsetTop;f!=a&&(e.x+=f.clientLeft||0,e.y+=f.clientTop||0);if(G&&"fixed"==Oc(f,"position")){e.x+=c.body.scrollLeft;e.y+=c.body.scrollTop;break}f=f.offsetParent}while(f&&f!=a);if(Sa||G&&"absolute"==d)e.y-=c.body.offsetTop;for(f=a;(f=Sc(f))&&f!=c.body&&f!=h;)if(e.x-=f.scrollLeft,!Sa||"TR"!=f.tagName)e.y-=f.scrollTop}return e}function Uc(a,b){var c=Vc(a),d=Vc(b);return new J(c.x-d.x,c.y-d.y)}
-function Vc(a){var b=new J;if(1==a.nodeType){if(a.getBoundingClientRect){var c=Rc(a);b.x=c.left;b.y=c.top}else{var c=Db(rb(a)),d=Tc(a);b.x=d.x-c.x;b.y=d.y-c.y}if(F&&!I(12)){var f;E?f="-ms-transform":G?f="-webkit-transform":Sa?f="-o-transform":F&&(f="-moz-transform");var e;f&&(e=Oc(a,f));e||(e=Oc(a,"transform"));e?(a=e.match(Wc),a=!a?new J(0,0):new J(parseFloat(a[1]),parseFloat(a[2]))):a=new J(0,0);b=new J(b.x+a.x,b.y+a.y)}}else f=v(a.Ud),e=a,a.targetTouches?e=a.targetTouches[0]:f&&a.n.targetTouches&&
-(e=a.n.targetTouches[0]),b.x=e.clientX,b.y=e.clientY;return b}function Xc(a,b,c){b instanceof nb?(c=b.height,b=b.width):c==i&&g(Error("missing height argument"));a.style.width=Qc(b,j);a.style.height=Qc(c,j)}function Qc(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}
-function Yc(a){if("none"!=Oc(a,"display"))return Zc(a);var b=a.style,c=b.display,d=b.visibility,f=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Zc(a);b.display=c;b.position=f;b.visibility=d;return a}function Zc(a){var b=a.offsetWidth,c=a.offsetHeight,d=G&&!b&&!c;return(!ca(b)||d)&&a.getBoundingClientRect?(a=Rc(a),new nb(a.right-a.left,a.bottom-a.top)):new nb(b,c)}function $c(a){var b=Tc(a),a=Yc(a);return new Lc(b.x,b.y,a.width,a.height)}
-function U(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")}function V(a,b){a.style.display=b?"":"none"}function ad(a){return"rtl"==Oc(a,"direction")}var bd=F?"MozUserSelect":G?"WebkitUserSelect":m;
-function cd(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var f=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return f}
-function dd(a,b){if(E){var c=cd(a,Nc(a,b+"Left")),d=cd(a,Nc(a,b+"Right")),f=cd(a,Nc(a,b+"Top")),e=cd(a,Nc(a,b+"Bottom"));return new Kc(f,d,e,c)}c=T(a,b+"Left");d=T(a,b+"Right");f=T(a,b+"Top");e=T(a,b+"Bottom");return new Kc(parseFloat(f),parseFloat(d),parseFloat(e),parseFloat(c))}var ed={thin:2,medium:4,thick:6};function fd(a,b){if("none"==Nc(a,b+"Style"))return 0;var c=Nc(a,b+"Width");return c in ed?ed[c]:cd(a,c)}
-function gd(a){if(E){var b=fd(a,"borderLeft"),c=fd(a,"borderRight"),d=fd(a,"borderTop"),a=fd(a,"borderBottom");return new Kc(d,c,a,b)}b=T(a,"borderLeftWidth");c=T(a,"borderRightWidth");d=T(a,"borderTopWidth");a=T(a,"borderBottomWidth");return new Kc(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}var Wc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function hd(a,b,c){nc.call(this);this.target=a;this.handle=b||a;this.wc=c||new Lc(NaN,NaN,NaN,NaN);this.M=K(a);this.ka=new Gc(this);O(this.handle,["touchstart","mousedown"],this.le,n,this)}z(hd,Jc);var id=E||F&&I("1.9.3");s=hd.prototype;s.clientX=0;s.clientY=0;s.screenX=0;s.screenY=0;s.Ld=0;s.Md=0;s.Ka=0;s.La=0;s.md=j;s.xa=n;s.zd=0;s.de=0;s.ae=n;s.Hc=n;s.Eb=r("ka");function jd(a){ca(a.ra)||(a.ra=ad(a.target));return a.ra}
-s.le=function(a){var b="mousedown"==a.type;if(this.md&&!this.xa&&(!b||uc(a))){kd(a);if(0==this.zd)if(this.dispatchEvent(new ld("start",this,a.clientX,a.clientY,a)))this.xa=j,a.preventDefault();else return;else a.preventDefault();var b=this.M,c=b.documentElement,d=!id;Q(this.ka,b,["touchmove","mousemove"],this.Zd,d);Q(this.ka,b,["touchend","mouseup"],this.Cb,d);id?(c.setCapture(n),Q(this.ka,c,"losecapture",this.Cb)):Q(this.ka,b?b.parentWindow||b.defaultView:window,"blur",this.Cb);E&&this.ae&&Q(this.ka,
-b,"dragstart",qc);this.je&&Q(this.ka,this.je,"scroll",this.ge,d);this.clientX=this.Ld=a.clientX;this.clientY=this.Md=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.Hc?(a=this.target,b=a.offsetLeft,c=a.offsetParent,!c&&"fixed"==Oc(a,"position")&&(c=K(a).documentElement),c?(F?(d=gd(c),b+=d.left):db(8)&&(d=gd(c),b-=d.left),a=ad(c)?c.clientWidth-(b+a.offsetWidth):b):a=b):a=this.target.offsetLeft;this.Ka=a;this.La=this.target.offsetTop;this.Ac=Db(rb(this.M));this.de=qa()}else this.dispatchEvent("earlycancel")};
-s.Cb=function(a,b){this.ka.Sb();id&&this.M.releaseCapture();if(this.xa){kd(a);this.xa=n;var c=md(this,this.Ka),d=nd(this,this.La);this.dispatchEvent(new ld("end",this,a.clientX,a.clientY,a,c,d,b||"touchcancel"==a.type))}else this.dispatchEvent("earlycancel");("touchend"==a.type||"touchcancel"==a.type)&&a.preventDefault()};
-function kd(a){var b=a.type;"touchstart"==b||"touchmove"==b?a.init(a.n.targetTouches[0],a.currentTarget):("touchend"==b||"touchcancel"==b)&&a.init(a.n.changedTouches[0],a.currentTarget)}
-s.Zd=function(a){if(this.md){kd(a);var b=(this.Hc&&jd(this)?-1:1)*(a.clientX-this.clientX),c=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.xa){var d=this.Ld-this.clientX,f=this.Md-this.clientY;if(d*d+f*f>this.zd)if(this.dispatchEvent(new ld("start",this,a.clientX,a.clientY,a)))this.xa=j;else{this.ld||this.Cb(a);return}}c=od(this,b,c);b=c.x;c=c.y;this.xa&&this.dispatchEvent(new ld("beforedrag",this,a.clientX,a.clientY,a,
-b,c))&&(pd(this,a,b,c),a.preventDefault())}};function od(a,b,c){var d=Db(rb(a.M)),b=b+(d.x-a.Ac.x),c=c+(d.y-a.Ac.y);a.Ac=d;a.Ka+=b;a.La+=c;b=md(a,a.Ka);a=nd(a,a.La);return new J(b,a)}s.ge=function(a){var b=od(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;pd(this,a,b.x,b.y)};function pd(a,b,c,d){a.kd(c,d);a.dispatchEvent(new ld("drag",a,b.clientX,b.clientY,b,c,d))}
-function md(a,b){var c=a.wc,d=!isNaN(c.left)?c.left:m,c=!isNaN(c.width)?c.width:0;return Math.min(d!=m?d+c:Infinity,Math.max(d!=m?d:-Infinity,b))}function nd(a,b){var c=a.wc,d=!isNaN(c.top)?c.top:m,c=!isNaN(c.height)?c.height:0;return Math.min(d!=m?d+c:Infinity,Math.max(d!=m?d:-Infinity,b))}s.kd=function(a,b){this.Hc&&jd(this)?this.target.style.right=a+"px":this.target.style.left=a+"px";this.target.style.top=b+"px"};
-function ld(a,b,c,d,f,e,h,k){pc.call(this,a);this.clientX=c;this.clientY=d;this.qe=f;this.left=ca(e)?e:b.Ka;this.top=ca(h)?h:b.La;this.ue=b;this.te=!!k}z(ld,pc);function qd(a){for(var b=0,c=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)b+=a.offsetLeft-a.scrollLeft,c+=a.offsetTop-a.scrollTop,a=a.offsetParent;return{top:c,left:b}};function rd(){this.Za=[]}rd.prototype.addHandler=function(a,b){this.Za[a]||(this.Za[a]=[]);this.Za[a].push(b)};rd.prototype.Tb=function(a,b){var c=this.Za[a];c&&D(c,b)};rd.prototype.fireEvent=function(a,b,c){var d=n;(a=this.Za[a])&&C(a,function(a){a=a(b,c);ca(a)&&!a&&(d=j)});return d};function sd(a,b){this.Y={};this.j=[];var c=arguments.length;if(1<c){c%2&&g(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var f;if(a instanceof sd)td(a),f=a.j.concat(),d=W(a);else{var c=[],e=0;for(f in a)c[e++]=f;f=c;c=[];e=0;for(d in a)c[e++]=a[d];d=c}for(c=0;c<f.length;c++)this.set(f[c],d[c])}}s=sd.prototype;s.m=0;s.Ic=0;function W(a){td(a);for(var b=[],c=0;c<a.j.length;c++)b.push(a.Y[a.j[c]]);return b}
-s.clear=function(){this.Y={};this.Ic=this.m=this.j.length=0};s.remove=function(a){return ud(this.Y,a)?(delete this.Y[a],this.m--,this.Ic++,this.j.length>2*this.m&&td(this),j):n};function td(a){if(a.m!=a.j.length){for(var b=0,c=0;b<a.j.length;){var d=a.j[b];ud(a.Y,d)&&(a.j[c++]=d);b++}a.j.length=c}if(a.m!=a.j.length){for(var f={},c=b=0;b<a.j.length;)d=a.j[b],ud(f,d)||(a.j[c++]=d,f[d]=1),b++;a.j.length=c}}s.get=function(a,b){return ud(this.Y,a)?this.Y[a]:b};
-s.set=function(a,b){ud(this.Y,a)||(this.m++,this.j.push(a),this.Ic++);this.Y[a]=b};function ud(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function vd(a,b){this.x=a;this.y=b};function wd(a){this.points=a}function xd(a){for(var b=0,c=a.length-1,d=0;d<a.length;d++)b+=(a[c].x+a[d].x)*(a[c].y-a[d].y),c=d;return b/2}
-function yd(a,b){for(var c,d=c=0,f,e=a.length-1,h=0;h<a.length;h++)f=a[h].x*a[e].y-a[e].x*a[h].y,c+=(a[h].x+a[e].x)*f,d+=(a[h].y+a[e].y)*f,e=h;f=6*xd(a);c=new vd(Math.abs(c/f),Math.abs(d/f));d=[];for(f=0;f<a.length;f++){var e=a[f],k=(0>xd(a)?-1:1)*b,h=e.x-c.x,l=e.y-c.y,q=0<k?1:0>k?-1:0,k=Math.sqrt(Math.pow(k,2)/(1+Math.pow(h/l,2)));d.push({x:e.x+Math.abs(h/l*k)*(0<h?1:0>h?-1:0)*q,y:e.y+Math.abs(k)*(0<l?1:0>l?-1:0)*q})}return d};function zd(a,b,c,d){0<c?(this.x=a,this.width=c):(this.x=a+c,this.width=-c);0<d?(this.y=b,this.height=d):(this.y=b+d,this.height=-d)};function Ad(a,b,c,d){this.type=a;this.geometry=b;c&&(this.units=c);this.style=d?d:{}}function Bd(a){return"rect"==a.type?a.geometry.width*a.geometry.height:"polygon"==a.type?Math.abs(xd(a.geometry.points)):0}function Cd(a){if("rect"==a.type)return a;if("polygon"==a.type){for(var b=a.geometry.points,c=b[0].x,d=b[0].x,f=b[0].y,e=b[0].y,h=1;h<b.length;h++)b[h].x>d&&(d=b[h].x),b[h].x<c&&(c=b[h].x),b[h].y>e&&(e=b[h].y),b[h].y<f&&(f=b[h].y);return new Ad("rect",new zd(c,f,d-c,e-f),n,a.style)}}
-function Dd(a,b){var c;c=a.geometry.points;var d=0>xd(c)?-1:1;if(4>c.length)c=yd(c,d*b);else{for(var f=c.length-1,e=1,h=[],k=0;k<c.length;k++)f=yd([c[f],c[k],c[e]],d*b),h.push(f[1]),f=k,e++,e>c.length-1&&(e=0);c=h}return new Ad("polygon",new wd(c),n,a.style)}function Ed(a,b){if("rect"==a.type){var c=b(a.geometry);return new Ad("rect",c,n,a.style)}if("polygon"==a.type){var d=[];C(a.geometry.points,function(a){d.push(b(a))});return new Ad("polygon",new wd(d),n,a.style)}}
-function Fd(a){return JSON.stringify(a.geometry)};function Gd(a,b,c){this.src=a;this.text=b;this.shapes=[c];this.context=document.URL};function Hd(){}function Id(a,b){a.g=new sd;a.Uc=[];a.bb=[];a.Ha=[];a.Fa=[];a.$b=[];a.ub={Ra:n,Qa:n};a.Ga=new sd;a.bc=i;a.bd=b}function Jd(a,b){var c=a.Ga.get(b);c||(c={Ra:n,Qa:n},a.Ga.set(b,c));return c}
-function Kd(a,b){var c=a.Fb(b);if(!a.g.get(c)){var d=a.zc(b),f=[],e=[];C(a.Uc,function(a){d.addHandler(a.type,a.Pa)});C(a.bb,function(a){if(a.onInitAnnotator)a.onInitAnnotator(d)});C(a.Fa,function(a){a.src==c&&(d.J(a),f.push(a))});C(a.$b,function(a){a.src==c&&(d.A(a),e.push(a))});C(f,function(b){D(a.Fa,b)});C(e,function(b){D(a.$b,b)});var h=a.Ga.get(c);h?(h.Ra&&d.N(),h.Qa&&d.ea(),a.Ga.remove(c)):(a.ub.Ra&&d.N(),a.ub.Qa&&d.ea());a.bc&&d.ga(a.bc);a.g.set(c,d);D(a.Ha,b)}}
-function Ld(a){var b,c;for(c=a.Ha.length;0<c;c--){for(var d=b=a.Ha[c-1],f=d.offsetTop,e=d.offsetLeft,h=d.offsetWidth,k=d.offsetHeight;d.offsetParent;)d=d.offsetParent,f+=d.offsetTop,e+=d.offsetLeft;f<window.pageYOffset+window.innerHeight&&(e<window.pageXOffset+window.innerWidth&&f+k>window.pageYOffset&&e+h>window.pageXOffset)&&Kd(a,b)}}function Md(a,b,c){if(b){var d=a.g.get(b);d?c?d.Da():d.ea():Jd(a,b).Qa=c}else C(W(a.g),function(a){c?a.Da():a.ea()}),a.ub.Qa=!c,C(W(a.Ga),function(a){a.Qa=!c})}
-function Nd(a,b,c){if(b){var d=a.g.get(b);d?c?d.Z():d.N():Jd(a,b).Ra=c}else C(W(a.g),function(a){c?a.Z():a.N()}),a.ub.Ra=!c,C(W(a.Ga),function(a){a.Ra=!c})}s=Hd.prototype;s.ba=function(a,b){var c=i,d=i;u(a)?(c=a,d=b):v(a)&&(d=a);c?(c=this.g.get(c))&&c.ba(d):C(W(this.g),function(a){a.ba(d)})};s.stopSelection=function(a){a?(a=this.g.get(a))&&a.stopSelection():C(W(this.g),function(a){a.stopSelection()})};
-s.J=function(a,b){if(Od(this,a.src)){var c=this.g.get(a.src);c?c.J(a,b):(this.Fa.push(a),b&&D(this.Fa,b))}};s.addHandler=function(a,b){C(W(this.g),function(c){c.addHandler(a,b)});this.Uc.push({type:a,Pa:b})};s.zb=function(a){this.bb.push(a);C(W(this.g),function(b){if(a.onInitAnnotator)a.onInitAnnotator(b)})};function Od(a,b){return ud(a.g.Y,b)?j:Da(a.Ha,function(c){return a.Fb(c)==b})!=m}
-s.destroy=function(a){if(a){var b=this.g.get(a);b&&(b.destroy(),this.g.remove(a))}else C(W(this.g),function(a){a.destroy()}),this.g.clear()};s.la=function(a){if(Od(this,a)&&(a=this.g.get(a)))return a.la().getName()};s.t=function(a){if(a){var b=this.g.get(a);return b?b.t():Aa(this.Fa,function(b){return b.src==a})}var c=[];C(W(this.g),function(a){Ga(c,a.t())});Ga(c,this.Fa);return c};s.ma=function(a){if(Od(this,a)&&(a=this.g.get(a)))return Ba(a.ma(),function(a){return a.getName()})};
-s.ea=function(a){Md(this,a,n)};s.N=function(a){Nd(this,a,n)};s.o=function(a){if(a){if(Od(this,a.src)){var b=this.g.get(a.src);b&&b.o(a)}}else C(W(this.g),function(a){a.o()})};s.init=function(){this.bd&&Ga(this.Ha,this.bd());Ld(this);var a=this,b=O(window,"scroll",function(){0<a.Ha.length?Ld(a):P(b)})};s.xc=function(a){this.Wb(a)&&Kd(this,a)};s.A=function(a){if(Od(this,a.src)){var b=this.g.get(a.src);b?b.A(a):this.$b.push(a)}};s.sb=function(a,b){if(Od(this,a)){var c=this.g.get(a);c&&c.Jd(b)}};
-s.ga=function(a){this.bc=a;C(W(this.g),function(b){b.ga(a)})};s.Da=function(a){Md(this,a,j)};s.Z=function(a){Nd(this,a,j)};function Pd(a,b){var c=rb().createElement("DIV");c.innerHTML=a(b||Qd,i,i);if(1==c.childNodes.length){var d=c.firstChild;if(1==d.nodeType)return d}return c}var Qd={};function Rd(a,b){a!=m&&this.append.apply(this,arguments)}s=Rd.prototype;s.wa="";s.set=function(a){this.wa=""+a};s.append=function(a,b,c){this.wa+=a;if(b!=m)for(var d=1;d<arguments.length;d++)this.wa+=arguments[d];return this};s.clear=function(){this.wa=""};s.toString=r("wa");/*
- Portions of this code are from the google-caja project, received by
- Google under the Apache license (http://code.google.com/p/google-caja/).
- All other code is Copyright 2009 Google, Inc. All Rights Reserved.
-
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// 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.
-
-*/
-function Sd(){}
-var Td={we:"<",ve:">",oe:"&",xe:"\u00a0",ze:'"',pe:"'"},Ud={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:20,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,noframes:20,noscript:20,object:16,
-ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:20,select:0,small:0,span:0,strike:0,strong:0,style:20,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},Vd=/&/g,Wd=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Xd=/</g,Yd=/>/g,Zd=/\"/g,$d=/=/g,ae=/\0/g,be=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,ce=/^#(\d+)$/,de=/^#x([0-9A-Fa-f]+)$/,ee=RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[^a-z\\s>]+)",
-"i"),fe=RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);|<[!]--[\\s\\S]*?--\>|<!\\w[^>]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i");
-Sd.prototype.parse=function(a,b){var c=m,d=n,f=[],e,h,k;a.Q=[];for(a.oa=n;b;){var l=b.match(d?ee:fe),b=b.substring(l[0].length);if(d)if(l[1]){var q=l[1].toLowerCase();if(l[2]){l=l[3];switch(l.charCodeAt(0)){case 34:case 39:l=l.substring(1,l.length-1)}l=l.replace(ae,"").replace(be,oa(this.be,this))}else l=q;f.push(q,l)}else l[4]&&(h!==i&&(k?a.Kd&&a.Kd(e,f):a.nd&&a.nd(e)),k&&h&12&&(c=c===m?b.toLowerCase():c.substring(c.length-b.length),d=c.indexOf("</"+e),0>d&&(d=b.length),h&4?a.gd&&a.gd(b.substring(0,
-d)):a.Id&&a.Id(b.substring(0,d).replace(Wd,"&amp;$1").replace(Xd,"&lt;").replace(Yd,"&gt;")),b=b.substring(d)),e=h=k=i,f.length=0,d=n);else if(l[1])ge(a,l[0]);else if(l[3])k=!l[2],d=j,e=l[3].toLowerCase(),h=Ud.hasOwnProperty(e)?Ud[e]:i;else if(l[4])ge(a,l[4]);else if(l[5])switch(l[5]){case "<":ge(a,"&lt;");break;case ">":ge(a,"&gt;");break;default:ge(a,"&amp;")}}for(c=a.Q.length;0<=--c;)a.ha.append("</",a.Q[c],">");a.Q.length=0};
-Sd.prototype.be=function(a){a=a.toLowerCase();if(Td.hasOwnProperty(a))return Td[a];var b=a.match(ce);return b?String.fromCharCode(parseInt(b[1],10)):(b=a.match(de))?String.fromCharCode(parseInt(b[1],16)):""};function he(){};/*
- Portions of this code are from the google-caja project, received by
- Google under the Apache license (http://code.google.com/p/google-caja/).
- All other code is Copyright 2009 Google, Inc. All Rights Reserved.
-
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// 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.
-
-*/
-function ie(a,b,c){this.ha=a;this.Q=[];this.oa=n;this.Od=b;this.Ob=c}z(ie,he);
-var je={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"*::accesskey":0,"*::tabindex":0,"*::onfocus":2,"*::onblur":2,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,
-"area::href":1,"area::nohref":0,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,
-"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,
-"img::hspace":0,"img::ismap":0,"img::longdesc":1,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::autocomplete":0,"input::align":0,"input::alt":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,
-"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,
-"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,
-"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,
-"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0};
-ie.prototype.Kd=function(a,b){if(!this.oa&&Ud.hasOwnProperty(a)){var c=Ud[a];if(!(c&32))if(c&16)this.oa=!(c&2);else{for(var d=b,f=0;f<d.length;f+=2){var e=d[f],h=d[f+1],k=m,l;if((l=a+"::"+e,je.hasOwnProperty(l))||(l="*::"+e,je.hasOwnProperty(l)))k=je[l];if(k!==m)switch(k){case 0:break;case 2:case 3:h=m;break;case 4:case 5:case 6:case 7:case 8:case 9:h=this.Ob?this.Ob(h):h;break;case 1:h=this.Od&&this.Od(h);break;case 11:h&&"#"===h.charAt(0)?(h=this.Ob?this.Ob(h):h)&&(h="#"+h):h=m;break;default:h=
-m}else h=m;d[f+1]=h}if(b=d){c&2||this.Q.push(a);this.ha.append("<",a);c=0;for(d=b.length;c<d;c+=2)f=b[c],e=b[c+1],e!==m&&e!==i&&this.ha.append(" ",f,'="',e.replace(Vd,"&amp;").replace(Xd,"&lt;").replace(Yd,"&gt;").replace(Zd,"&#34;").replace($d,"&#61;"),'"');this.ha.append(">")}}}};
-ie.prototype.nd=function(a){if(this.oa)this.oa=n;else if(Ud.hasOwnProperty(a)){var b=Ud[a];if(!(b&50)){if(b&1)for(b=this.Q.length;0<=--b;){var c=this.Q[b];if(c===a)break;if(!(Ud[c]&1))return}else for(b=this.Q.length;0<=--b&&this.Q[b]!==a;);if(!(0>b)){for(var d=this.Q.length;--d>b;)c=this.Q[d],Ud[c]&1||this.ha.append("</",c,">");this.Q.length=b;this.ha.append("</",a,">")}}}};function ge(a,b){a.oa||a.ha.append(b)}ie.prototype.Id=function(a){this.oa||this.ha.append(a)};
-ie.prototype.gd=function(a){this.oa||this.ha.append(a)};function ke(a,b,c,d,f){if(!E&&(!G||!I("525")))return j;if(Na&&f)return le(a);if(f&&!d||!c&&(17==b||18==b)||E&&d&&b==a)return n;switch(a){case 13:return!(E&&db(9));case 27:return!G}return le(a)}function le(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=a&&90>=a||G&&0==a)return j;switch(a){case 32:case 63:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return j;default:return n}}
-function me(a){switch(a){case 61:return 187;case 59:return 186;case 224:return 91;case 0:return 224;default:return a}};function ne(a,b){nc.call(this);a&&oe(this,a,b)}z(ne,Jc);s=ne.prototype;s.F=m;s.Ib=m;s.uc=m;s.Jb=m;s.qa=-1;s.pa=-1;s.mc=n;
-var pe={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},qe={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},re=E||G&&I("525"),se=Na&&F;s=ne.prototype;
-s.Wd=function(a){if(G&&(17==this.qa&&!a.ctrlKey||18==this.qa&&!a.altKey))this.pa=this.qa=-1;re&&!ke(a.keyCode,this.qa,a.shiftKey,a.ctrlKey,a.altKey)?this.handleEvent(a):(this.pa=F?me(a.keyCode):a.keyCode,se&&(this.mc=a.altKey))};s.Yd=function(a){this.pa=this.qa=-1;this.mc=a.altKey};
-s.handleEvent=function(a){var b=a.n,c,d,f=b.altKey;E&&"keypress"==a.type?(c=this.pa,d=13!=c&&27!=c?b.keyCode:0):G&&"keypress"==a.type?(c=this.pa,d=0<=b.charCode&&63232>b.charCode&&le(c)?b.charCode:0):Sa?(c=this.pa,d=le(c)?b.keyCode:0):(c=b.keyCode||this.pa,d=b.charCode||0,se&&(f=this.mc),Na&&(63==d&&224==c)&&(c=191));var e=c,h=b.keyIdentifier;c?63232<=c&&c in pe?e=pe[c]:25==c&&a.shiftKey&&(e=9):h&&h in qe&&(e=qe[h]);a=e==this.qa;this.qa=e;b=new te(e,d,a,b);b.altKey=f;this.dispatchEvent(b)};s.d=r("F");
-function oe(a,b,c){a.Jb&&a.detach();a.F=b;a.Ib=O(a.F,"keypress",a,c);a.uc=O(a.F,"keydown",a.Wd,c,a);a.Jb=O(a.F,"keyup",a.Yd,c,a)}s.detach=function(){this.Ib&&(P(this.Ib),P(this.uc),P(this.Jb),this.Jb=this.uc=this.Ib=m);this.F=m;this.pa=this.qa=-1};function te(a,b,c,d){d&&this.init(d,i);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c}z(te,sc);function ue(){}ea(ue);ue.prototype.fe=0;ue.pb();function ve(a){nc.call(this);this.kb=a||rb();this.ra=we}z(ve,Jc);ve.prototype.$d=ue.pb();var we=m;function xe(a,b){switch(a){case 1:return b?"disable":"enable";case 2:return b?"highlight":"unhighlight";case 4:return b?"activate":"deactivate";case 8:return b?"select":"unselect";case 16:return b?"check":"uncheck";case 32:return b?"focus":"blur";case 64:return b?"open":"close"}g(Error("Invalid component state"))}s=ve.prototype;s.Hb=m;s.fa=n;s.F=m;s.ra=m;s.za=m;s.hb=m;s.Ja=m;s.ne=n;s.d=r("F");
-s.Eb=function(){return this.sc||(this.sc=new Gc(this))};s.Gc=function(a){this.za&&this.za!=a&&g(Error("Method not supported"));ve.K.Gc.call(this,a)};s.pd=r("kb");s.jb=function(a){this.fa&&g(Error("Component already rendered"));if(a&&this.gb(a)){this.ne=j;if(!this.kb||this.kb.M!=K(a))this.kb=rb(a);this.jd(a);this.Ma()}else g(Error("Invalid element to decorate"))};s.gb=aa(j);s.jd=function(a){this.F=a};s.Ma=function(){function a(a){!a.fa&&a.d()&&a.Ma()}this.fa=j;this.hb&&C(this.hb,a,i)};
-s.Db=function(){function a(a){a.fa&&a.Db()}this.hb&&C(this.hb,a,i);this.sc&&this.sc.Sb();this.fa=n};s.nb=r("F");s.Va=function(a){this.fa&&g(Error("Component already rendered"));this.ra=a};
-s.removeChild=function(a,b){if(a){var c=u(a)?a:a.Hb||(a.Hb=":"+(a.$d.fe++).toString(36)),d;this.Ja&&c?(d=this.Ja,d=(c in d?d[c]:i)||m):d=m;a=d;c&&a&&(d=this.Ja,c in d&&delete d[c],D(this.hb,a),b&&(a.Db(),a.F&&zb(a.F)),c=a,c==m&&g(Error("Unable to set parent component")),c.za=m,ve.K.Gc.call(c,m))}a||g(Error("Child is not in parent component"));return a};function ye(){}var ze;ea(ye);s=ye.prototype;s.nb=function(a){return a};s.lb=function(a,b,c){if(a=a.d?a.d():a)if(E&&!I("7")){var d=Ae(hb(a),b);d.push(b);pa(c?ib:kb,a).apply(m,d)}else c?ib(a,b):kb(a,b)};s.gb=aa(j);
-s.jb=function(a,b){if(b.id){var c=b.id;if(a.za&&a.za.Ja){var d=a.za.Ja,f=a.Hb;f in d&&delete d[f];d=a.za.Ja;c in d&&g(Error('The object already contains the key "'+c+'"'));d[c]=a}a.Hb=c}(c=this.nb(b))&&c.firstChild?(c=c.firstChild.nextSibling?Fa(c.childNodes):c.firstChild,a.ib=c):a.ib=m;var e=0,h=this.ob(),k=this.ob(),l=n,q=n,c=n,d=hb(b);C(d,function(a){if(!l&&a==h)l=j,k==h&&(q=j);else if(!q&&a==k)q=j;else{var b=e;if(!this.Nd){this.Bb||Be(this);var c=this.Bb,d={},f;for(f in c)d[c[f]]=f;this.Nd=d}a=
-parseInt(this.Nd[a],10);e=b|(isNaN(a)?0:a)}},this);a.r=e;l||(d.push(h),k==h&&(q=j));q||d.push(k);(f=a.da)&&d.push.apply(d,f);if(E&&!I("7")){var w=Ae(d);0<w.length&&(d.push.apply(d,w),c=j)}if(!l||!q||f||c)b.className=d.join(" ");a.isEnabled()||this.Wa(b,1,j);a.r&8&&this.Wa(b,8,j);a.V&16&&this.Wa(b,16,!!(a.r&16));a.V&64&&this.Wa(b,64,!!(a.r&64));return b};
-s.Vb=function(a,b){var c=!b,d=E||Sa?a.getElementsByTagName("*"):m;if(bd){if(c=c?"none":"",a.style[bd]=c,d)for(var f=0,e;e=d[f];f++)e.style[bd]=c}else if(E||Sa)if(c=c?"on":"",a.setAttribute("unselectable",c),d)for(f=0;e=d[f];f++)e.setAttribute("unselectable",c)};s.Va=function(a,b){this.lb(a,this.ob()+"-rtl",b)};s.Cd=function(a){var b;return a.V&32&&(b=a.Na())?Cb(b):n};
-s.Fc=function(a,b){var c;if(a.V&32&&(c=a.Na())){if(!b&&a.r&32){try{c.blur()}catch(d){}a.r&32&&a.qd()}Cb(c)!=b&&(b?c.tabIndex=0:(c.tabIndex=-1,c.removeAttribute("tabIndex")))}};s.P=function(a,b,c){var d=a.d();if(d){var f;this.Bb||Be(this);(f=this.Bb[b])&&this.lb(a,f,c);this.Wa(d,b,c)}};s.Wa=function(a,b,c){ze||(ze={1:"disabled",8:"selected",16:"checked",64:"expanded"});(b=ze[b])&&a.setAttribute("aria-"+b,c)};
-s.sa=function(a,b){var c=this.nb(a);if(c&&(yb(c),b))if(u(b))if("textContent"in c)c.textContent=b;else if(c.firstChild&&3==c.firstChild.nodeType){for(;c.lastChild!=c.firstChild;)c.removeChild(c.lastChild);c.firstChild.data=b}else yb(c),c.appendChild(K(c).createTextNode(b));else{var d=function(a){if(a){var b=K(c);c.appendChild(u(a)?b.createTextNode(a):a)}};ga(b)?C(b,d):ha(b)&&!("nodeType"in b)?C(Fa(b),d):d(b)}};s.Na=function(a){return a.d()};s.ob=aa("goog-control");
-function Ae(a,b){var c=[];b&&(a=a.concat([b]));C([],function(d){Ca(d,pa(Ea,a))&&(!b||Ea(d,b))&&c.push(d.join("_"))});return c}function Be(a){var b=a.ob();a.Bb={1:b+"-disabled",2:b+"-hover",4:b+"-active",8:b+"-selected",16:b+"-checked",32:b+"-focused",64:b+"-open"}};var Ce={};function De(a,b,c){ve.call(this,c);if(!b){for(var b=this.constructor,d;b;){d=ja(b);if(d=Ce[d])break;b=b.K?b.K.constructor:m}b=d?v(d.pb)?d.pb():new d:m}this.G=b;this.ib=a}z(De,ve);s=De.prototype;s.ib=m;s.r=0;s.V=39;s.oc=255;s.me=0;s.Yb=j;s.da=m;s.tc=j;s.lc=n;s.ie=m;function Ee(a){a.fa&&n!=a.tc&&Fe(a,n);a.tc=n}s.Na=function(){return this.G.Na(this)};
-s.lb=function(a,b){b?a&&(this.da?Ea(this.da,a)||this.da.push(a):this.da=[a],this.G.lb(this,a,j)):a&&this.da&&(D(this.da,a),0==this.da.length&&(this.da=m),this.G.lb(this,a,n))};s.nb=function(){return this.G.nb(this.d())};s.gb=function(a){return this.G.gb(a)};s.jd=function(a){this.F=a=this.G.jb(this,a);var b=this.ie||i;b&&a.setAttribute("role",b);this.lc||this.G.Vb(a,n);this.Yb="none"!=a.style.display};
-s.Ma=function(){De.K.Ma.call(this);var a=this.G;this.ra==m&&(this.ra=ad(this.fa?this.F:this.kb.M.body));this.ra&&a.Va(this.d(),j);this.isEnabled()&&a.Fc(this,this.Yb);if(this.V&-2&&(this.tc&&Fe(this,j),this.V&32&&(a=this.Na()))){var b=this.vc||(this.vc=new ne);oe(b,a);Q(Q(Q(this.Eb(),b,"key",this.Xd),a,"focus",this.Vd),a,"blur",this.qd)}};
-function Fe(a,b){var c=a.Eb(),d=a.d();b?(Q(Q(Q(Q(c,d,"mouseover",a.vd),d,"mousedown",a.sd),d,"mouseup",a.wd),d,"mouseout",a.ud),a.Gb!=da&&Q(c,d,"contextmenu",a.Gb),E&&Q(c,d,"dblclick",a.rd)):(Ic(Ic(Ic(Ic(c,d,"mouseover",a.vd),d,"mousedown",a.sd),d,"mouseup",a.wd),d,"mouseout",a.ud),a.Gb!=da&&Ic(c,d,"contextmenu",a.Gb),E&&Ic(c,d,"dblclick",a.rd))}s.Db=function(){De.K.Db.call(this);this.vc&&this.vc.detach();this.Yb&&this.isEnabled()&&this.G.Fc(this,n)};
-s.sa=function(a){this.G.sa(this.d(),a);this.ib=a};s.Va=function(a){De.K.Va.call(this,a);var b=this.d();b&&this.G.Va(b,a)};s.Vb=function(a){this.lc=a;var b=this.d();b&&this.G.Vb(b,a)};s.isEnabled=function(){return!(this.r&1)};function Ge(a,b){He(a,2,b)&&a.P(2,b)}s.setActive=function(a){He(this,4,a)&&this.P(4,a)};s.P=function(a,b){this.V&a&&b!=!!(this.r&a)&&(this.G.P(this,a,b),this.r=b?this.r|a:this.r&~a)};function X(a,b){return!!(a.oc&b)&&!!(a.V&b)}
-function He(a,b,c){return!!(a.V&b)&&!!(a.r&b)!=c&&(!(a.me&b)||a.dispatchEvent(xe(b,c)))&&!a.ld}s.vd=function(a){(!a.relatedTarget||!Bb(this.d(),a.relatedTarget))&&(this.dispatchEvent("enter")&&this.isEnabled()&&X(this,2))&&Ge(this,j)};s.ud=function(a){if((!a.relatedTarget||!Bb(this.d(),a.relatedTarget))&&this.dispatchEvent("leave"))X(this,4)&&this.setActive(n),X(this,2)&&Ge(this,n)};s.Gb=da;
-s.sd=function(a){this.isEnabled()&&(X(this,2)&&Ge(this,j),uc(a)&&(X(this,4)&&this.setActive(j),this.G.Cd(this)&&this.Na().focus()));!this.lc&&uc(a)&&a.preventDefault()};s.wd=function(a){this.isEnabled()&&(X(this,2)&&Ge(this,j),this.r&4&&(Ie(this,a)&&X(this,4))&&this.setActive(n))};s.rd=function(a){this.isEnabled()&&Ie(this,a)};
-function Ie(a,b){if(X(a,16)){var c=!(a.r&16);He(a,16,c)&&a.P(16,c)}X(a,8)&&He(a,8,j)&&a.P(8,j);X(a,64)&&(c=!(a.r&64),He(a,64,c)&&a.P(64,c));c=new pc("action",a);b&&(c.altKey=b.altKey,c.ctrlKey=b.ctrlKey,c.metaKey=b.metaKey,c.shiftKey=b.shiftKey,c.Cc=b.Cc);return a.dispatchEvent(c)}s.Vd=function(){X(this,32)&&He(this,32,j)&&this.P(32,j)};s.qd=function(){X(this,4)&&this.setActive(n);X(this,32)&&He(this,32,n)&&this.P(32,n)};
-s.Xd=function(a){return this.Yb&&this.isEnabled()&&13==a.keyCode&&Ie(this,a)?(a.preventDefault(),a.stopPropagation(),j):n};v(De)||g(Error("Invalid component class "+De));v(ye)||g(Error("Invalid renderer class "+ye));var Je=ja(De);Ce[Je]=ye;function Ke(){return new De(m)}v(Ke)||g(Error("Invalid decorator function "+Ke));function Le(){}z(Le,ye);ea(Le);s=Le.prototype;s.jb=function(a,b){Ee(a);a.oc&=-256;a.fa&&a.r&32&&g(Error("Component already rendered"));a.r&32&&a.P(32,n);a.V&=-33;Le.K.jb.call(this,a,b);a.sa(b.value);return b};s.gb=function(a){return"TEXTAREA"==a.tagName};s.Va=da;s.Cd=function(a){return a.isEnabled()};s.Fc=da;s.P=function(a,b,c){Le.K.P.call(this,a,b,c);if((a=a.d())&&1==b)a.disabled=c};s.Wa=da;s.sa=function(a,b){a&&(a.value=b)};s.ob=aa("goog-textarea");function Ne(a,b,c){De.call(this,a,b||Le.pb(),c);Ee(this);this.Vb(j);a||(this.ib="")}z(Ne,De);var Oe=F||G;s=Ne.prototype;s.Sa=n;s.na=0;s.ce=0;s.Fd=0;s.yd=n;s.Nb=n;s.Ec=n;s.Dc=n;function Pe(a){return a.rb.top+a.rb.bottom+a.ed.top+a.ed.bottom}function Qe(a){var b=a.Fd,c=a.d();b&&(c&&a.Nb)&&(b-=Pe(a));return b}function Re(a){var b=a.ce,c=a.d();b&&(c&&a.Nb)&&(b-=Pe(a));return b}s.sa=function(a){Ne.K.sa.call(this,a);this.d()&&this.Oa()};
-s.Ma=function(){Ne.K.Ma.call(this);var a=this.d();R(a,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"});this.rb=dd(a,"padding");this.ed=gd(a);Q(Q(Q(Q(this.Eb(),a,"scroll",this.Oa),a,"focus",this.Oa),a,"keyup",this.Oa),a,"mouseup",this.ee);this.d()&&this.Oa()};
-function Se(a){if(!a.yd){var b=a.d().cloneNode(n);R(b,{position:"absolute",height:"auto",top:"-9999px",margin:"0",padding:"1px",border:"1px solid #000",overflow:"hidden"});a.pd().M.body.appendChild(b);var c=b.scrollHeight;b.style.padding="10px";var d=b.scrollHeight;a.Ec=d>c;b.style.borderWidth="10px";a.Dc=b.scrollHeight>d;b.style.height="100px";100!=b.offsetHeight&&(a.Nb=j);zb(b);a.yd=j}var b=a.d(),c=a.d().scrollHeight,f=a.d(),d=f.offsetHeight-f.clientHeight;if(!a.Ec)var e=a.rb,d=d-(e.top+e.bottom);
-a.Dc||(f=gd(f),d-=f.top+f.bottom);c+=0<d?d:0;a.Nb?c-=Pe(a):(a.Ec||(d=a.rb,c+=d.top+d.bottom),a.Dc||(a=gd(b),c+=a.top+a.bottom));return c}function Te(a,b){a.na!=b&&(a.na=b,a.d().style.height=b+"px")}function Ue(a){a=a.d();a.style.height="auto";var b=a.value.match(/\n/g)||[];a.rows=b.length+1}
-s.Oa=function(){if(!this.Sa){var a=n;this.Sa=j;var b=this.d(),c=this.na;if(b.scrollHeight){var d=n,f=n,e=Se(this),h=b.offsetHeight,k=Qe(this),l=Re(this);k&&e<k?(Te(this,k),d=j):l&&e>l?(Te(this,l),b.style.overflowY="",f=j):h!=e?Te(this,e):this.na||(this.na=e);!d&&(!f&&Oe)&&(a=j)}else Ue(this);this.Sa=n;a&&(a=this.d(),this.Sa||(this.Sa=j,b=n,a.value||(a.value=" ",b=j),(f=a.scrollHeight)?(e=Se(this),d=Qe(this),h=Re(this),!(d&&e<=d)&&!(h&&e>=h)&&(h=this.rb,a.style.paddingBottom=h.bottom+1+"px",Se(this)==
-e&&(a.style.paddingBottom=h.bottom+f+"px",a.scrollTop=0,f=Se(this)-f,f>=d?Te(this,f):Te(this,d)),a.style.paddingBottom=h.bottom+"px")):Ue(this),b&&(a.value=""),this.Sa=n));c!=this.na&&this.dispatchEvent("resize")}};s.ee=function(){var a=this.d(),b=a.offsetHeight;a.filters&&a.filters.length&&(a=a.filters.item("DXImageTransform.Microsoft.DropShadow"))&&(b-=a.offX);b!=this.na&&(this.na=this.Fd=b)};E&&I(8);function Ve(a){return"object"===typeof a&&a&&0===a.re?a.content:String(a).replace(We,Xe)}var Ye={"\x00":"&#0;",'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;","\t":"&#9;","\n":"&#10;","\x0B":"&#11;","\f":"&#12;","\r":"&#13;"," ":"&#32;","-":"&#45;","/":"&#47;","=":"&#61;","`":"&#96;","\u0085":"&#133;","\u00a0":"&#160;","\u2028":"&#8232;","\u2029":"&#8233;"};function Xe(a){return Ye[a]}var We=/[\x00\x22\x26\x27\x3c\x3e]/g;function Ze(){return'<div class="annotorious-popup top-left" style="position:absolute;z-index:1"><div class="annotorious-popup-buttons"><a class="annotorious-popup-button annotorious-popup-button-edit" title="Edit" href="javascript:void(0);">EDIT</a><a class="annotorious-popup-button annotorious-popup-button-delete" title="Delete" href="javascript:void(0);">DELETE</a></div><span class="annotorious-popup-text"></span></div>'}
-function $e(){return'<div class="annotorious-editor" style="position:absolute;z-index:1"><form><textarea class="annotorious-editor-text" placeholder="Add a Comment..." tabindex="1"></textarea><div class="annotorious-editor-button-container"><a class="annotorious-editor-button annotorious-editor-button-cancel" href="javascript:void(0);" tabindex="3">Cancel</a><a class="annotorious-editor-button annotorious-editor-button-save" href="javascript:void(0);" tabindex="2">Save</a></div></form></div>'};function af(a){function b(){var a=d.Ia;a.d()&&a.Oa()}this.element=Pd($e);this.e=a;this.Rd=a.getItem();this.Ia=new Ne("");this.Pd=L(".annotorious-editor-button-cancel",this.element)[0];this.Tc=L(".annotorious-editor-button-save",this.element)[0];var c;c=this.Tc;gb?c=c.parentElement:(c=c.parentNode,c=Ab(c)?c:m);this.Qd=c;this.Ya=[];var d=this;O(this.Pd,"click",function(b){b.preventDefault();a.stopSelection(d.$c);d.close()});O(this.Tc,"click",function(b){b.preventDefault();b=d.od();a.J(b);a.stopSelection();
-d.$c?a.fireEvent("onAnnotationUpdated",b,a.getItem()):a.fireEvent("onAnnotationCreated",b,a.getItem());d.close()});V(this.element,n);a.element.appendChild(this.element);this.Ia.jb(L(".annotorious-editor-text",this.element)[0]);var f=this.element;c=document.createElement("div");R(c,"position","absolute");R(c,"top","0px");R(c,"right","0px");R(c,"width","5px");R(c,"height","100%");R(c,"cursor","e-resize");f.appendChild(c);var e=gd(f),e=$c(f).width-e.right-e.left;c=new hd(c);c.wc=new Lc(e,0,800,0)||new Lc(NaN,
-NaN,NaN,NaN);c.kd=function(a){R(f,"width",a+"px");b&&b()}}s=af.prototype;s.kc=function(a){var b=wb("div","annotorious-editor-field");u(a)?b.innerHTML=a:v(a)?this.Ya.push({D:b,qc:a}):Ab(a)&&b.appendChild(a);a=this.Qd;a.parentNode&&a.parentNode.insertBefore(b,a)};s.open=function(a){(this.vb=this.$c=a)&&this.Ia.sa(String(a.text));V(this.element,j);this.Ia.d().focus();C(this.Ya,function(b){var c=b.qc(a);u(c)?b.D.innerHTML=c:Ab(c)&&(yb(b.D),b.D.appendChild(c))});this.e.fireEvent("onEditorShown",a)};
-s.close=function(){V(this.element,n);this.Ia.sa("")};s.setPosition=function(a){Pc(this.element,a.x,a.y)};s.od=function(){var a;a=this.Ia.d().value;var b=new Rd;(new Sd).parse(new ie(b,function(a){return a},i),a);a=b.toString();this.vb?this.vb.text=a:this.vb=new Gd(this.Rd.src,a,this.e.la().getShape());return this.vb};af.prototype.addField=af.prototype.kc;af.prototype.getAnnotation=af.prototype.od;function bf(a,b,c){var d=this;c||(c="Click and Drag to Annotate");this.element=Pd(cf,{Mb:c});this.e=a;this.Xc=L(".annotorious-hint-msg",this.element)[0];this.Vc=L(".annotorious-hint-icon",this.element)[0];this.ic=function(){d.show()};this.hc=function(){df(d)};this.Zb();df(this);b.appendChild(this.element)}
-bf.prototype.Zb=function(){var a=this;this.Zc=O(this.Vc,"mouseover",function(){a.show();window.clearTimeout(a.ec)});this.Yc=O(this.Vc,"mouseout",function(){df(a)});this.e.addHandler("onMouseOverItem",this.ic);this.e.addHandler("onMouseOutOfItem",this.hc)};bf.prototype.wb=function(){P(this.Zc);P(this.Yc);this.e.Tb("onMouseOverItem",this.ic);this.e.Tb("onMouseOutOfItem",this.hc)};
-bf.prototype.show=function(){window.clearTimeout(this.ec);U(this.Xc,0.8);var a=this;this.ec=window.setTimeout(function(){df(a)},3E3)};function df(a){window.clearTimeout(a.ec);U(a.Xc,0)}bf.prototype.destroy=function(){this.wb();delete this.Zc;delete this.Yc;delete this.ic;delete this.hc;zb(this.element)};function ef(a){this.element=Pd(Ze);this.e=a;this.Sd=L(".annotorious-popup-text",this.element)[0];this.R=L(".annotorious-popup-buttons",this.element)[0];this.cc=n;this.Ya=[];var b=L(".annotorious-popup-button-edit",this.R)[0],c=L(".annotorious-popup-button-delete",this.R)[0],d=this;O(b,"mouseover",function(){ib(b,"annotorious-popup-button-active")});O(b,"mouseout",function(){kb(b,"annotorious-popup-button-active")});O(b,"click",function(){U(d.element,0);R(d.element,"pointer-events","none");a.pc(d.f)});
-O(c,"mouseover",function(){ib(c,"annotorious-popup-button-active")});O(c,"mouseout",function(){kb(c,"annotorious-popup-button-active")});O(c,"click",function(){a.fireEvent("beforeAnnotationRemoved",d.f)||(U(d.element,0),R(d.element,"pointer-events","none"),a.A(d.f),a.fireEvent("onAnnotationRemoved",d.f))});ff&&(O(this.element,"mouseover",function(){window.clearTimeout(d.ac);0.9>(d.R.style[ya("opacity")]||"")&&U(d.R,0.9);d.clearHideTimer()}),O(this.element,"mouseout",function(){U(d.R,0);d.startHideTimer()}),
-a.addHandler("onMouseOutOfItem",function(){d.startHideTimer()}));U(this.R,0);U(this.element,0);R(this.element,"pointer-events","none");a.element.appendChild(this.element)}s=ef.prototype;s.kc=function(a){var b=wb("div","annotorious-popup-field");u(a)?b.innerHTML=a:v(a)?this.Ya.push({D:b,qc:a}):Ab(a)&&b.appendChild(a);this.element.appendChild(b)};
-s.startHideTimer=function(){this.cc=n;if(!this.cb){var a=this;this.cb=window.setTimeout(function(){a.e.fireEvent("beforePopupHide",a);a.cc||(U(a.element,0),R(a.element,"pointer-events","none"),U(a.R,0.9),delete a.cb)},150)}};s.clearHideTimer=function(){this.cc=j;this.cb&&(window.clearTimeout(this.cb),delete this.cb)};
-s.show=function(a,b){this.clearHideTimer();b&&this.setPosition(b);a&&this.setAnnotation(a);this.ac&&window.clearTimeout(this.ac);U(this.R,0.9);if(ff){var c=this;this.ac=window.setTimeout(function(){U(c.R,0)},1E3)}U(this.element,0.9);R(this.element,"pointer-events","auto");this.e.fireEvent("onPopupShown",this.f)};s.setPosition=function(a){Pc(this.element,new J(a.x,a.y))};
-s.setAnnotation=function(a){this.f=a;this.Sd.innerHTML=a.text?a.text.replace(/\n/g,"<br/>"):'<span class="annotorious-popup-empty">No comment</span>';"editable"in a&&a.editable==n?V(this.R,n):V(this.R,j);C(this.Ya,function(b){var c=b.qc(a);u(c)?b.D.innerHTML=c:Ab(c)&&(yb(b.D),b.D.appendChild(c))})};ef.prototype.addField=ef.prototype.kc;function gf(){}s=gf.prototype;s.J=function(a,b){this.h.J(a,b)};s.addHandler=function(a,b){this.w.addHandler(a,b)};s.fireEvent=function(a,b,c){return this.w.fireEvent(a,b,c)};s.la=r("v");s.o=function(a){this.h.o(a)};s.A=function(a){this.h.A(a)};s.Tb=function(a,b){this.w.Tb(a,b)};s.stopSelection=function(a){ff&&V(this.c,n);this.eb&&(this.eb(),delete this.eb);this.v.stopSelection();a&&this.h.J(a)};
-function hf(a,b){O(b,jf,function(c){console.log("start selection event");console.log(c);c=kf(c,b);a.h.o(n);a.yb?(V(a.c,j),a.v.startSelection(c.x,c.y)):(c=a.h.mb(c.x,c.y),0<c.length&&a.h.o(c[0]))})};function lf(a,b){this.W=a;this.e=b;this.Ea=[];this.aa=[];this.ua=this.W.getContext("2d");this.ta=j;this.xb=n;var c=this;O(this.W,mf,function(a){if(c.ta){var b=nf(c,a.offsetX,a.offsetY);b?(c.xb=c.xb&&b==c.f,c.f?c.f!=b&&(c.ta=n,c.e.popup.startHideTimer()):(c.f=b,of(c),c.e.fireEvent("onMouseOverAnnotation",{C:c.f,mouseEvent:a}))):!c.xb&&c.f&&(c.ta=n,c.e.popup.startHideTimer())}else c.Xa=a});O(this.W,jf,function(){c.f!==i&&c.f!=n&&c.e.fireEvent("onAnnotationClicked",c.f)});b.addHandler("onMouseOutOfItem",
-function(){delete c.f;c.ta=j});b.addHandler("beforePopupHide",function(){if(!c.ta&&c.Xa){var a=c.f;c.f=nf(c,c.Xa.offsetX,c.Xa.offsetY);c.ta=j;a!=c.f?(of(c),c.e.fireEvent("onMouseOutOfAnnotation",{C:a,mouseEvent:c.Xa}),c.e.fireEvent("onMouseOverAnnotation",{C:c.f,mouseEvent:c.Xa})):c.f&&c.e.popup.clearHideTimer()}else of(c)})}s=lf.prototype;
-s.J=function(a,b){b&&(b==this.f&&delete this.f,D(this.Ea,b),delete this.aa[Fd(b.shapes[0])]);this.Ea.push(a);var c=a.shapes[0];if("pixel"!=c.units)var d=this,c=Ed(c,function(a){return d.e.ya(a)});this.aa[Fd(a.shapes[0])]=c;of(this)};s.A=function(a){a==this.f&&delete this.f;D(this.Ea,a);delete this.aa[Fd(a.shapes[0])];of(this)};s.t=function(){return Fa(this.Ea)};s.o=function(a){(this.f=a)?this.xb=j:this.e.popup.startHideTimer();of(this);this.ta=j};
-function nf(a,b,c){a=a.mb(b,c);if(0<a.length)return a[0]}
-s.mb=function(a,b){var c=[],d=this;C(this.Ea,function(f){var e;e=d.aa[Fd(f.shapes[0])];if("rect"==e.type)e=a<e.geometry.x||b<e.geometry.y||a>e.geometry.x+e.geometry.width||b>e.geometry.y+e.geometry.height?n:j;else if("polygon"==e.type){e=e.geometry.points;for(var h=n,k=e.length-1,l=0;l<e.length;l++)e[l].y>b!=e[k].y>b&&a<(e[k].x-e[l].x)*(b-e[l].y)/(e[k].y-e[l].y)+e[l].x&&(h=!h),k=l;e=h}else e=n;e&&c.push(f)});B.sort.call(c,function(a,b){var c=d.aa[Fd(a.shapes[0])],k=d.aa[Fd(b.shapes[0])];return Bd(c)-
-Bd(k)}||Ia);return c};function pf(a,b,c){var d=Da(a.e.ma(),function(a){return a.getSupportedShapeType()==b.type});d?d.drawShape(a.ua,b,c):console.log("WARNING unsupported shape type: "+b.type)}function of(a){a.ua.clearRect(0,0,a.W.width,a.W.height);C(a.Ea,function(b){b!=a.f&&pf(a,a.aa[Fd(b.shapes[0])])});if(a.f){var b=a.aa[Fd(a.f.shapes[0])];pf(a,b,j);b=Cd(b).geometry;a.e.popup.show(a.f,new vd(b.x,b.y+b.height+5))}};var qf="ontouchstart"in window,ff=!qf,jf=qf?"touchstart":"mousedown",rf=qf?"touchenter":"mouseover",mf=qf?"touchmove":"mousemove",sf=qf?"touchend":"mouseup",tf=qf?"touchleave":"mouseout";function kf(a,b){var c=n;a.offsetX=a.offsetX?a.offsetX:n;a.offsetY=a.offsetY?a.offsetY:n;return c=(!a.offsetX||!a.offsetY)&&a.n.changedTouches?{x:a.n.changedTouches[0].clientX-qd(b).left,y:a.n.changedTouches[0].clientY-qd(b).top}:{x:a.offsetX,y:a.offsetY}};function uf(){}s=uf.prototype;s.init=function(a,b){this.Pc="#000000";this.Rc="#ffffff";this.Jc=n;this.Lc="#000000";this.Nc="#fff000";this.Kc=n;this.Mc=this.Sc=this.Qc=1;this.Oc=1.2;this.W=b;this.e=a;this.ua=b.getContext("2d");this.ua.lineWidth=1;this.dc=n};
-s.Zb=function(){var a=this,b=this.W;this.fc=O(this.W,mf,function(c){console.log(c);c=kf(c,b);if(a.dc){a.B={x:c.x,y:c.y};a.ua.clearRect(0,0,b.width,b.height);var c=a.B.x-a.L.x,d=a.B.y-a.L.y;a.drawShape(a.ua,{type:"rect",geometry:{x:0<c?a.L.x:a.B.x,y:0<d?a.L.y:a.B.y,width:Math.abs(c),height:Math.abs(d)},style:{}})}});this.gc=O(b,sf,function(c){var d=kf(c,b),f=a.getShape(),c=c.n?c.n:c;a.dc=n;f?(a.wb(),a.e.fireEvent("onSelectionCompleted",{mouseEvent:c,shape:f,viewportBounds:a.getViewportBounds()})):
-(a.e.fireEvent("onSelectionCanceled"),c=a.e.mb(d.x,d.y),0<c.length&&a.e.o(c[0]))})};s.wb=function(){this.fc&&(P(this.fc),delete this.fc);this.gc&&(P(this.gc),delete this.gc)};s.getName=aa("rect_drag");s.getSupportedShapeType=aa("rect");
-s.ga=function(a){a.hasOwnProperty("outline")&&(this.Pc=a.outline);a.hasOwnProperty("stroke")&&(this.Rc=a.stroke);a.hasOwnProperty("fill")&&(this.Jc=a.fill);a.hasOwnProperty("hi_outline")&&(this.Lc=a.hi_outline);a.hasOwnProperty("hi_stroke")&&(this.Nc=a.hi_stroke);a.hasOwnProperty("hi_fill")&&(this.Kc=a.hi_fill);a.hasOwnProperty("outline_width")&&(this.Qc=a.outline_width);a.hasOwnProperty("stroke_width")&&(this.Sc=a.stroke_width);a.hasOwnProperty("hi_outline_width")&&(this.Mc=a.hi_outline_width);a.hasOwnProperty("hi_stroke_width")&&
-(this.Oc=a.hi_stroke_width)};s.startSelection=function(a,b){var c={x:a,y:b};this.dc=j;this.Zb(c);this.L=new vd(a,b);this.e.fireEvent("onSelectionStarted",{offsetX:a,offsetY:b});R(document.body,"-webkit-user-select","none")};s.stopSelection=function(){this.wb();this.ua.clearRect(0,0,this.W.width,this.W.height);R(document.body,"-webkit-user-select","auto");delete this.B};
-s.getShape=function(){if(this.B&&3<Math.abs(this.B.x-this.L.x)&&3<Math.abs(this.B.y-this.L.y)){var a=this.getViewportBounds(),a=this.e.Xb({x:a.left,y:a.top,width:a.right-a.left,height:a.bottom-a.top});return new Ad("rect",a)}};s.getViewportBounds=function(){var a,b;this.B.x>this.L.x?(a=this.B.x,b=this.L.x):(a=this.L.x,b=this.B.x);var c,d;this.B.y>this.L.y?(c=this.L.y,d=this.B.y):(c=this.B.y,d=this.L.y);return{top:c,right:a,bottom:d,left:b}};
-s.drawShape=function(a,b,c){var d,f,e,h;b.style||(b.style={});"rect"==b.type&&(c?(d=b.style.hi_fill||this.Kc,c=b.style.hi_stroke||this.Nc,f=b.style.hi_outline||this.Lc,e=b.style.hi_outline_width||this.Mc,h=b.style.hi_stroke_width||this.Oc):(d=b.style.fill||this.Jc,c=b.style.stroke||this.Rc,f=b.style.outline||this.Pc,e=b.style.outline_width||this.Qc,h=b.style.stroke_width||this.Sc),b=b.geometry,f&&(a.lineJoin="round",a.lineWidth=e,a.strokeStyle=f,a.strokeRect(b.x+e/2,b.y+e/2,b.width-e,b.height-e)),
-c&&(a.lineJoin="miter",a.lineWidth=h,a.strokeStyle=c,a.strokeRect(b.x+e+h/2,b.y+e+h/2,b.width-2*e-h,b.height-2*e-h)),d&&(a.lineJoin="miter",a.lineWidth=h,a.fillStyle=d,a.fillRect(b.x+e+h/2,b.y+e+h/2,b.width-2*e-h,b.height-2*e-h)))};function vf(a){return'<canvas class="annotorious-item annotorious-opacity-fade" style="position:absolute; top:0px; left:0px; width:'+Ve(a.width)+"px; height:"+Ve(a.height)+'px; z-index:0" width="'+Ve(a.width)+'" height="'+Ve(a.height)+'"></canvas>'}
-function cf(a){return'<div class="annotorious-hint" style="white-space:nowrap; position:absolute; top:0px; left:0px; pointer-events:none;"><div class="annotorious-hint-msg annotorious-opacity-fade">'+Ve(a.Mb)+'</div><div class="annotorious-hint-icon" style="pointer-events:auto"></div></div>'};function wf(a,b){function c(b,c){R(d,"margin-"+b,c+"px");R(a,"margin-"+b,0);R(a,"padding-"+b,0)}this.$=a;this.ad={padding:a.style.padding,margin:a.style.margin};this.w=new rd;this.ia=[];this.yb=j;this.element=wb("div","annotorious-annotationlayer");R(this.element,"position","relative");R(this.element,"display","inline-block");var d=this.element,f=dd(a,"margin"),e=dd(a,"padding");(0!=f.top||0!=e.top)&&c("top",f.top+e.top);(0!=f.right||0!=e.right)&&c("right",f.right+e.right);(0!=f.bottom||0!=e.bottom)&&
-c("bottom",f.bottom+e.bottom);(0!=f.left||0!=e.left)&&c("left",f.left+e.left);(f=a.parentNode)&&f.replaceChild(this.element,a);this.element.appendChild(a);f=$c(a);this.ja=Pd(vf,{width:f.width,height:f.height});ff&&ib(this.ja,"annotorious-item-unfocus");this.element.appendChild(this.ja);this.c=Pd(vf,{width:f.width,height:f.height});ff&&V(this.c,n);this.element.appendChild(this.c);this.popup=b?b:new ef(this);f=new uf;f.init(this,this.c);this.ia.push(f);this.v=f;this.editor=new af(this);this.h=new lf(this.ja,
-this);this.$a=new bf(this,this.element);var h=this;ff&&(O(this.element,rf,function(a){a=a.relatedTarget;if(!a||!Bb(h.element,a))h.w.fireEvent("onMouseOverItem"),mb(h.ja,"annotorious-item-unfocus","annotorious-item-focus")}),O(this.element,tf,function(a){a=a.relatedTarget;if(!a||!Bb(h.element,a))h.w.fireEvent("onMouseOutOfItem"),mb(h.ja,"annotorious-item-focus","annotorious-item-unfocus")}));hf(this,qf?this.c:this.ja);this.w.addHandler("onSelectionCompleted",function(a){var b=a.viewportBounds;h.editor.setPosition(new vd(b.left+
-h.$.offsetLeft,b.bottom+4+h.$.offsetTop));h.editor.open(n,a)});this.w.addHandler("onSelectionCanceled",function(){ff&&V(h.c,n);h.v.stopSelection()})}z(wf,gf);s=wf.prototype;s.ba=p();s.cd=function(a){a.init(this,this.c);this.ia.push(a)};s.destroy=function(){var a=this.$;a.style.margin=this.ad.margin;a.style.padding=this.ad.padding;var b=this.element,c=b.parentNode;c&&c.replaceChild(a,b)};
-s.pc=function(a){this.h.A(a);var b=Da(this.ia,function(b){return b.getSupportedShapeType()==a.shapes[0].type});if(b){V(this.c,j);this.h.o(n);var c=this.c.getContext("2d"),d=a.shapes[0],f=this,d="pixel"==d.units?d:Ed(d,function(a){return f.ya(a)});b.drawShape(c,d)}b=Cd(a.shapes[0]).geometry;b="pixel"==a.shapes[0].units?new vd(b.x,b.y+b.height):this.ya(new vd(b.x,b.y+b.height));this.editor.setPosition(new vd(b.x+this.$.offsetLeft,b.y+4+this.$.offsetTop));this.editor.open(a)};
-s.ya=function(a){var b=Yc(this.$);return a.width?{x:a.x*b.width,y:a.y*b.height,width:a.width*b.width,height:a.height*b.height}:{x:a.x*b.width,y:a.y*b.height}};s.la=r("v");s.t=function(){return this.h.t()};s.mb=function(a,b){return Fa(this.h.mb(a,b))};s.ma=r("ia");s.getItem=function(){return{src:xf(this.$),element:this.$}};function xf(a){var b=a.getAttribute("data-original");return b?b:a.src}s.ea=function(){V(this.ja,n)};s.N=function(){this.yb=n;this.$a&&(this.$a.destroy(),delete this.$a)};
-s.Jd=function(a){(this.v=Da(this.ia,function(b){return b.getName()==a}))||console.log('WARNING: selector "'+a+'" not available')};s.ga=function(a){C(this.ia,function(b){b.ga(a)});of(this.h)};s.Da=function(){V(this.ja,j)};s.Z=function(){this.yb=j;this.$a||(this.$a=new bf(this,this.element))};s.stopSelection=function(a){ff&&V(this.c,n);this.v.stopSelection();a&&this.h.J(a)};
-s.Xb=function(a){var b=Yc(this.$);return a.width?{x:a.x/b.width,y:a.y/b.height,width:a.width/b.width,height:a.height/b.height}:{x:a.x/b.width,y:a.y/b.height}};wf.prototype.addSelector=wf.prototype.cd;wf.prototype.fireEvent=wf.prototype.fireEvent;wf.prototype.setCurrentSelector=wf.prototype.Jd;wf.prototype.toItemCoordinates=wf.prototype.Xb;function yf(){Id(this,function(){return L("img.annotatable",document)})}z(yf,Hd);yf.prototype.Fb=function(a){return xf(a)};yf.prototype.zc=function(a){return new wf(a)};yf.prototype.Wb=function(a){return Ab(a)?"IMG"==a.tagName:n};function zf(a){return'<div class="annotorious-opacity-fade" style="white-space:nowrap; position:absolute; pointer-events:none; top:80px; width:100%; text-align:center;"><div class="annotorious-ol-hint" style="width: 400px; margin:0px auto;">'+Ve(a.Mb)+"</dvi></div>"};function Af(a,b){this.X=a;this.S=$c(b.element);this.k=b.popup;R(this.k.element,"z-index",99E3);this.z=[];this.tb=new OpenLayers.Layer.Boxes("Annotorious");this.X.addLayer(this.tb);var c=this;this.X.events.register("move",this.X,function(){c.I&&c.ab()});b.addHandler("beforePopupHide",function(){c.va==c.I?c.k.clearHideTimer():c.fb(c.va,c.I)})}s=Af.prototype;s.destroy=function(){this.tb.destroy()};
-s.ab=function(){var a=this.I.Lb.div,b=$c(a),c=Uc(a,this.X.div),a=c.y,c=c.x,d=b.width,f=b.height,b=$c(this.k.element),a={y:a+f+5};c+b.width>this.S.width?(mb(this.k.element,"top-left","top-right"),a.x=c+d-b.width):(mb(this.k.element,"top-right","top-left"),a.x=c);0>a.x&&(a.x=0);a.x+b.width>this.S.width&&(a.x=this.S.width-b.width);a.y+b.height>this.S.height&&(a.y=this.S.height-b.height);this.k.setPosition(a)};s.jc=function(a){this.k.setAnnotation(a);this.ab();this.k.show()};
-s.fb=function(a,b){a?(Uc(a.Lb.div,this.X.div),ya("height"),R(a.qb,"border-color","#fff000"),this.I=a,this.jc(a.C)):delete this.I;b&&R(b.qb,"border-color","#fff")};
-s.J=function(a){var b=a.shapes[0].geometry,b=new OpenLayers.Marker.Box(new OpenLayers.Bounds(b.x,b.y,b.x+b.width,b.y+b.height));ib(b.div,"annotorious-ol-boxmarker-outer");R(b.div,"border",m);var c=wb("div","annotorious-ol-boxmarker-inner");Xc(c,"100%","100%");b.div.appendChild(c);var d={C:a,Lb:b,qb:c},f=this;O(c,"mouseover",function(){f.I||f.fb(d);f.va=d});O(c,"mouseout",function(){delete f.va;f.k.startHideTimer()});this.z.push(d);B.sort.call(this.z,function(a,b){return Bd(b.C.shapes[0])-Bd(a.C.shapes[0])}||
-Ia);var e=1E4;C(this.z,function(a){R(a.Lb.div,"z-index",e);e++});this.tb.addMarker(b)};s.A=function(a){var b=Da(this.z,function(b){return b.C==a});b&&(D(this.z,b),this.tb.removeMarker(b.Lb))};s.t=function(){return Ba(this.z,function(a){return a.C})};s.o=function(a){a||this.k.startHideTimer()};function Bf(a){function b(){var a=parseInt(T(d.element,"width"),10),b=parseInt(T(d.element,"height"),10);Xc(d.c,a,b);d.c.width=a;d.c.height=b}this.X=a;this.element=a.div;var c=this.element.style[ya("position")]||"";"absolute"!=c&&"relative"!=c&&R(this.element,"position","relative");this.w=new rd;this.U=Pd(zf,{Mb:"Click and Drag"});R(this.U,"z-index",9998);U(this.U,0);this.element.appendChild(this.U);this.popup=new ef(this);this.h=new Af(a,this);this.c=Pd(vf,{width:"0",height:"0"});V(this.c,n);R(this.c,
-"position","absolute");R(this.c,"top","0px");R(this.c,"z-index",9999);this.element.appendChild(this.c);var d=this;b();this.v=new uf;this.v.init(this,this.c);this.eb=i;this.editor=new af(this);R(this.editor.element,"z-index",1E4);window.addEventListener?window.addEventListener("resize",b,n):window.attachEvent&&window.attachEvent("onresize",b);O(this.element,"mouseover",function(a){a=a.relatedTarget;(!a||!Bb(d.element,a))&&d.w.fireEvent("onMouseOverItem")});O(this.element,"mouseout",function(a){a=a.relatedTarget;
-(!a||!Bb(d.element,a))&&d.w.fireEvent("onMouseOutOfItem")});O(this.c,"mousedown",function(a){var b=Vc(d.element);d.v.startSelection(a.clientX-b.x,a.clientY-b.y)});this.w.addHandler("onSelectionCompleted",function(a){R(d.c,"pointer-events","none");a=a.viewportBounds;d.editor.setPosition(new vd(a.left,a.bottom+4));d.editor.open()});this.w.addHandler("onSelectionCanceled",function(){d.stopSelection()})}z(Bf,gf);s=Bf.prototype;s.Z=p();s.N=p();
-s.ba=function(a){R(this.c,"pointer-events","auto");var b=this;V(this.c,j);U(this.U,0.8);window.setTimeout(function(){U(b.U,0)},2E3);a&&(this.eb=a)};s.destroy=function(){this.h.destroy();zb(this.U);zb(this.c)};s.cd=p();s.pc=function(a){this.h.A(a);var b=this.v,c=this;if(b){V(this.c,j);this.h.o(i);var d=this.c.getContext("2d"),f=Ed(a.shapes[0],function(a){return c.ya(a)});console.log(f);b.drawShape(d,f);b=Cd(f).geometry;this.editor.setPosition(new vd(b.x,b.y+b.height));this.editor.open(a)}};
-s.ya=function(a){var b=this.X.getViewPortPxFromLonLat(new OpenLayers.LonLat(a.x,a.y));return(a=a.width?this.X.getViewPortPxFromLonLat(new OpenLayers.LonLat(a.x+a.width,a.y+a.height)):n)?{x:b.x,y:a.y,width:a.x-b.x+2,height:b.y-a.y+2}:{x:b.x,y:b.y}};s.t=function(){return this.h.t()};s.ma=p();s.getItem=function(){return{src:"map://openlayers/something"}};s.sb=p();
-s.Xb=function(a){var b=this.X.getLonLatFromPixel(new OpenLayers.Pixel(a.x,a.y));return(a=a.width?new OpenLayers.Pixel(a.x+a.width-2,a.y+a.height-2):n)?(a=this.X.getLonLatFromPixel(a),b={x:b.lon,y:a.lat,width:a.lon-b.lon,height:b.lat-a.lat},console.log(b),b):{x:b.lon,y:b.lat}};function Cf(){Id(this)}z(Cf,Hd);Cf.prototype.Fb=aa("map://openlayers/something");Cf.prototype.zc=function(a){return new Bf(a)};Cf.prototype.Wb=function(a){return a instanceof OpenLayers.Map};function Df(a,b){this.T=a;this.S=$c(a.element);this.k=b.popup;R(this.k.element,"z-index",99E3);this.z=[];var c=this;this.T.addHandler("animation",function(){c.I&&c.ab()});b.addHandler("beforePopupHide",function(){c.va==c.I?c.k.clearHideTimer():c.fb(c.va,c.I)})}s=Df.prototype;
-s.ab=function(){var a=this.T.element,b=this.I.Rb,c=$c(b),b=Uc(b,a),a=b.y,b=b.x,d=c.width,f=c.height,c=$c(this.k.element),a={x:b,y:a+f+12};mb(this.k.element,"top-right","top-left");this.T.isFullPage()||(b+c.width>this.S.width&&(mb(this.k.element,"top-left","top-right"),a.x=b+d-c.width),0>a.x&&(a.x=0),a.x+c.width>this.S.width&&(a.x=this.S.width-c.width),a.y+c.height>this.S.height&&(a.y=this.S.height-c.height));this.k.setPosition(a)};s.jc=function(a){this.k.setAnnotation(a);this.ab();this.k.show()};
-s.fb=function(a,b){a?(R(a.qb,"border-color","#fff000"),this.I=a,this.jc(a.C)):delete this.I;b&&R(b.qb,"border-color","#fff")};
-s.J=function(a){var b=a.shapes[0].geometry,c=wb("div","annotorious-ol-boxmarker-outer"),d=wb("div","annotorious-ol-boxmarker-inner");Xc(d,"100%","100%");c.appendChild(d);var b=new OpenSeadragon.Rect(b.x,b.y,b.width,b.height),f={C:a,Rb:c,qb:d},e=this;O(d,"mouseover",function(){e.I||e.fb(f);e.va=f});O(d,"mouseout",function(){delete e.va;e.k.startHideTimer()});this.z.push(f);B.sort.call(this.z,function(a,b){return Bd(b.C.shapes[0])-Bd(a.C.shapes[0])}||Ia);var h=1;C(this.z,function(a){R(a.Rb,"z-index",
-h);h++});this.T.drawer.addOverlay(c,b)};s.A=function(a){var b=Da(this.z,function(b){return b.C==a});b&&(D(this.z,b),this.T.drawer.removeOverlay(b.Rb))};s.t=function(){return Ba(this.z,function(a){console.log(a);return a.C})};s.o=p();s.destroy=function(){var a=this;C(this.z,function(b){a.T.removeOverlay(b.Rb)});this.z=[]};function Ef(a){this.element=a.element;var b=document;b.querySelectorAll&&b.querySelector?b=b.querySelector(".openseadragon-container"):(b=document,b=(b.querySelectorAll&&b.querySelector?b.querySelectorAll(".openseadragon-container"):b.getElementsByClassName?b.getElementsByClassName("openseadragon-container"):tb())[0]);R(b||m,"z-index",0);this.T=a;this.w=new rd;this.ia=[];this.yb=j;this.U=Pd(zf,{Mb:"Click and Drag"});U(this.U,0);this.element.appendChild(this.U);this.popup=new ef(this);this.h=new Df(a,
-this);this.c=Pd(vf,{width:"0",height:"0"});V(this.c,n);this.element.appendChild(this.c);var c=this,a=parseInt(T(c.element,"width"),10),b=parseInt(T(c.element,"height"),10);Xc(c.c,a,b);c.c.width=a;c.c.height=b;a=new uf;a.init(this,this.c);this.ia.push(a);this.v=a;this.editor=new af(this);hf(this,this.c);this.w.addHandler("onSelectionCompleted",function(a){a=a.viewportBounds;c.editor.setPosition(new vd(a.left,a.bottom+4));c.editor.open()});this.w.addHandler("onSelectionCanceled",function(){c.stopSelection()})}
-z(Ef,gf);s=Ef.prototype;s.Z=p();s.N=p();s.destroy=function(){this.h.destroy();delete this.h};s.ba=function(a){R(this.c,"pointer-events","auto");var b=this;V(this.c,j);U(this.U,0.8);window.setTimeout(function(){U(b.U,0)},2E3);a&&(this.eb=a)};s.pc=function(a){this.h.A(a);var b=this.v,c=this;if(b){V(this.c,j);this.h.o(i);var d=this.c.getContext("2d"),f=Ed(a.shapes[0],function(a){return c.ya(a)});b.drawShape(d,f);b=Cd(f).geometry;this.editor.setPosition(new vd(b.x,b.y+b.height+4));this.editor.open(a)}};
-s.ya=function(a){var b=qd(this.element);b.top+=window.pageYOffset;b.left+=window.pageXOffset;var c=new OpenSeadragon.Point(a.x,a.y),a=a.width?new OpenSeadragon.Point(a.x+a.width,a.y+a.height):n,c=this.T.viewport.viewportToWindowCoordinates(c);return a?(a=this.T.viewport.viewportToWindowCoordinates(a),{x:c.x-b.left,y:c.y-b.top,width:a.x-c.x+2,height:a.y-c.y+2}):c};s.t=function(){return this.h.t()};s.ma=p();s.getItem=function(){return{src:"dzi://openseadragon/something"}};s.sb=p();s.la=r("v");
-s.Xb=function(a){var b=qd(this.element);b.top+=window.pageYOffset;b.left+=window.pageXOffset;var c=new OpenSeadragon.Point(a.x+b.left,a.y+b.top),a=a.width?new OpenSeadragon.Point(a.x+b.left+a.width-2,a.y+b.top+a.height-2):n,c=this.T.viewport.windowToViewportCoordinates(c);return a?(a=this.T.viewport.windowToViewportCoordinates(a),{x:c.x,y:c.y,width:a.x-c.x,height:a.y-c.y}):c};function Ff(){Id(this)}z(Ff,Hd);Ff.prototype.Fb=aa("dzi://openseadragon/something");Ff.prototype.zc=function(a){return new Ef(a)};Ff.prototype.Wb=function(a){return!a.id||0!=a.id.indexOf("openseadragon")||!a.hasOwnProperty("drawer")?n:j};function Y(){function a(){Gf(b)}this.Wc=n;this.l=[new yf];window.OpenLayers&&this.l.push(new Cf);window.OpenSeadragon&&this.l.push(new Ff);this.bb=[];var b=this;window.addEventListener?window.addEventListener("load",a,n):window.attachEvent&&window.attachEvent("onload",a)}function Gf(a){a.Wc||(C(a.l,function(a){a.init()}),C(a.bb,function(b){b.initPlugin&&b.initPlugin(a);C(a.l,function(a){a.zb(b)})}),a.Wc=j)}function Z(a,b){return Da(a.l,function(a){return Od(a,b)})}s=Y.prototype;
-s.ba=function(a,b){var c=i,d=i;u(a)?(c=a,d=b):v(a)&&(d=a);if(c){var f=Z(this,c);f&&f.ba(c,d)}else C(this.l,function(a){a.ba(d)})};s.J=function(a,b){var c;c=a.src;if(!(0<c.indexOf("://"))){var d=document.createElement("a");d.href=c;c=d.protocol+"//"+d.host+d.pathname}a.src=c;(c=Z(this,a.src))&&c.J(a,b)};s.addHandler=function(a,b){C(this.l,function(c){c.addHandler(a,b)})};
-s.zb=function(a,b){try{var c=new window.annotorious.plugin[a](b);"complete"==document.readyState?(c.initPlugin&&c.initPlugin(this),C(this.l,function(a){a.zb(c)})):this.bb.push(c)}catch(d){console.log("Could not load plugin: "+a)}};s.destroy=function(a){if(a){var b=Z(this,a);b&&b.destroy(a)}else C(this.l,function(a){a.destroy()})};s.la=function(a){var b=Z(this,a);if(b)return b.la(a)};s.t=function(a){if(a){var b=Z(this,a);return b?b.t(a):[]}var c=[];C(this.l,function(a){Ga(c,a.t())});return c};
-s.ma=function(a){var b=Z(this,a);return b?b.ma(a):[]};s.ea=function(a){if(a){var b=Z(this,a);b&&b.ea(a)}else C(this.l,function(a){a.ea()})};s.N=function(a){if(a){var b=Z(this,a);b&&b.N(a)}else C(this.l,function(a){a.N()})};s.stopSelection=function(a){if(a){var b=Z(this,a);b&&b.stopSelection(a)}else C(this.l,function(a){a.stopSelection()})};s.o=function(a){if(a){var b=Z(this,a.src);b&&b.o(a)}else C(this.l,function(a){a.o()})};
-s.xc=function(a){Gf(this);var b=Da(this.l,function(b){return b.Wb(a)});b?b.xc(a):g("Error: Annotorious does not support this media type in the current version or build configuration.")};s.Sb=function(a){var b=this;C(this.t(a),function(a){b.A(a)})};s.A=function(a){var b=Z(this,a.src);b&&b.A(a)};s.reset=function(){C(this.l,function(a){a.destroy();a.init()})};s.sb=function(a,b){var c=Z(this,a);c&&c.sb(a,b)};s.ga=function(a){C(this.l,function(b){b.ga(a)})};s.ke=function(a){a?this.Z(i):this.N(i)};
-s.Da=function(a){if(a){var b=Z(this,a);b&&b.Da(a)}else C(this.l,function(a){a.Da()})};s.Z=function(a){if(a){var b=Z(this,a);b&&b.Z(a)}else C(this.l,function(a){a.Z()})};window.anno=new Y;Y.prototype.activateSelector=Y.prototype.ba;Y.prototype.addAnnotation=Y.prototype.J;Y.prototype.addHandler=Y.prototype.addHandler;Y.prototype.addPlugin=Y.prototype.zb;Y.prototype.destroy=Y.prototype.destroy;Y.prototype.getActiveSelector=Y.prototype.la;Y.prototype.getAnnotations=Y.prototype.t;Y.prototype.getAvailableSelectors=Y.prototype.ma;Y.prototype.hideAnnotations=Y.prototype.ea;Y.prototype.hideSelectionWidget=Y.prototype.N;Y.prototype.highlightAnnotation=Y.prototype.o;
-Y.prototype.makeAnnotatable=Y.prototype.xc;Y.prototype.removeAll=Y.prototype.Sb;Y.prototype.removeAnnotation=Y.prototype.A;Y.prototype.reset=Y.prototype.reset;Y.prototype.setActiveSelector=Y.prototype.sb;Y.prototype.setProperties=Y.prototype.ga;Y.prototype.showAnnotations=Y.prototype.Da;Y.prototype.showSelectionWidget=Y.prototype.Z;window.annotorious||(window.annotorious={});window.annotorious.plugin||(window.annotorious.plugin={});
-window.annotorious.geometry||(window.annotorious.geometry={},window.annotorious.geometry.expand=Dd,window.annotorious.geometry.getBoundingRect=Cd);Y.prototype.setSelectionEnabled=Y.prototype.ke;
diff --git a/web/js/bloodhound.js b/web/js/bloodhound.js
deleted file mode 100644
index 6095f29..0000000
--- a/web/js/bloodhound.js
+++ /dev/null
@@ -1,918 +0,0 @@
-/*!
- * typeahead.js 0.11.1
- * https://github.com/twitter/typeahead.js
- * Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
- */
-
-(function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define("bloodhound", [ "jquery" ], function(a0) {
-            return root["Bloodhound"] = factory(a0);
-        });
-    } else if (typeof exports === "object") {
-        module.exports = factory(require("jquery"));
-    } else {
-        root["Bloodhound"] = factory(jQuery);
-    }
-})(this, function($) {
-    var _ = function() {
-        "use strict";
-        return {
-            isMsie: function() {
-                return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
-            },
-            isBlankString: function(str) {
-                return !str || /^\s*$/.test(str);
-            },
-            escapeRegExChars: function(str) {
-                return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
-            },
-            isString: function(obj) {
-                return typeof obj === "string";
-            },
-            isNumber: function(obj) {
-                return typeof obj === "number";
-            },
-            isArray: $.isArray,
-            isFunction: $.isFunction,
-            isObject: $.isPlainObject,
-            isUndefined: function(obj) {
-                return typeof obj === "undefined";
-            },
-            isElement: function(obj) {
-                return !!(obj && obj.nodeType === 1);
-            },
-            isJQuery: function(obj) {
-                return obj instanceof $;
-            },
-            toStr: function toStr(s) {
-                return _.isUndefined(s) || s === null ? "" : s + "";
-            },
-            bind: $.proxy,
-            each: function(collection, cb) {
-                $.each(collection, reverseArgs);
-                function reverseArgs(index, value) {
-                    return cb(value, index);
-                }
-            },
-            map: $.map,
-            filter: $.grep,
-            every: function(obj, test) {
-                var result = true;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (!(result = test.call(null, val, key, obj))) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            some: function(obj, test) {
-                var result = false;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (result = test.call(null, val, key, obj)) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            mixin: $.extend,
-            identity: function(x) {
-                return x;
-            },
-            clone: function(obj) {
-                return $.extend(true, {}, obj);
-            },
-            getIdGenerator: function() {
-                var counter = 0;
-                return function() {
-                    return counter++;
-                };
-            },
-            templatify: function templatify(obj) {
-                return $.isFunction(obj) ? obj : template;
-                function template() {
-                    return String(obj);
-                }
-            },
-            defer: function(fn) {
-                setTimeout(fn, 0);
-            },
-            debounce: function(func, wait, immediate) {
-                var timeout, result;
-                return function() {
-                    var context = this, args = arguments, later, callNow;
-                    later = function() {
-                        timeout = null;
-                        if (!immediate) {
-                            result = func.apply(context, args);
-                        }
-                    };
-                    callNow = immediate && !timeout;
-                    clearTimeout(timeout);
-                    timeout = setTimeout(later, wait);
-                    if (callNow) {
-                        result = func.apply(context, args);
-                    }
-                    return result;
-                };
-            },
-            throttle: function(func, wait) {
-                var context, args, timeout, result, previous, later;
-                previous = 0;
-                later = function() {
-                    previous = new Date();
-                    timeout = null;
-                    result = func.apply(context, args);
-                };
-                return function() {
-                    var now = new Date(), remaining = wait - (now - previous);
-                    context = this;
-                    args = arguments;
-                    if (remaining <= 0) {
-                        clearTimeout(timeout);
-                        timeout = null;
-                        previous = now;
-                        result = func.apply(context, args);
-                    } else if (!timeout) {
-                        timeout = setTimeout(later, remaining);
-                    }
-                    return result;
-                };
-            },
-            stringify: function(val) {
-                return _.isString(val) ? val : JSON.stringify(val);
-            },
-            noop: function() {}
-        };
-    }();
-    var VERSION = "0.11.1";
-    var tokenizers = function() {
-        "use strict";
-        return {
-            nonword: nonword,
-            whitespace: whitespace,
-            obj: {
-                nonword: getObjTokenizer(nonword),
-                whitespace: getObjTokenizer(whitespace)
-            }
-        };
-        function whitespace(str) {
-            str = _.toStr(str);
-            return str ? str.split(/\s+/) : [];
-        }
-        function nonword(str) {
-            str = _.toStr(str);
-            return str ? str.split(/\W+/) : [];
-        }
-        function getObjTokenizer(tokenizer) {
-            return function setKey(keys) {
-                keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0);
-                return function tokenize(o) {
-                    var tokens = [];
-                    _.each(keys, function(k) {
-                        tokens = tokens.concat(tokenizer(_.toStr(o[k])));
-                    });
-                    return tokens;
-                };
-            };
-        }
-    }();
-    var LruCache = function() {
-        "use strict";
-        function LruCache(maxSize) {
-            this.maxSize = _.isNumber(maxSize) ? maxSize : 100;
-            this.reset();
-            if (this.maxSize <= 0) {
-                this.set = this.get = $.noop;
-            }
-        }
-        _.mixin(LruCache.prototype, {
-            set: function set(key, val) {
-                var tailItem = this.list.tail, node;
-                if (this.size >= this.maxSize) {
-                    this.list.remove(tailItem);
-                    delete this.hash[tailItem.key];
-                    this.size--;
-                }
-                if (node = this.hash[key]) {
-                    node.val = val;
-                    this.list.moveToFront(node);
-                } else {
-                    node = new Node(key, val);
-                    this.list.add(node);
-                    this.hash[key] = node;
-                    this.size++;
-                }
-            },
-            get: function get(key) {
-                var node = this.hash[key];
-                if (node) {
-                    this.list.moveToFront(node);
-                    return node.val;
-                }
-            },
-            reset: function reset() {
-                this.size = 0;
-                this.hash = {};
-                this.list = new List();
-            }
-        });
-        function List() {
-            this.head = this.tail = null;
-        }
-        _.mixin(List.prototype, {
-            add: function add(node) {
-                if (this.head) {
-                    node.next = this.head;
-                    this.head.prev = node;
-                }
-                this.head = node;
-                this.tail = this.tail || node;
-            },
-            remove: function remove(node) {
-                node.prev ? node.prev.next = node.next : this.head = node.next;
-                node.next ? node.next.prev = node.prev : this.tail = node.prev;
-            },
-            moveToFront: function(node) {
-                this.remove(node);
-                this.add(node);
-            }
-        });
-        function Node(key, val) {
-            this.key = key;
-            this.val = val;
-            this.prev = this.next = null;
-        }
-        return LruCache;
-    }();
-    var PersistentStorage = function() {
-        "use strict";
-        var LOCAL_STORAGE;
-        try {
-            LOCAL_STORAGE = window.localStorage;
-            LOCAL_STORAGE.setItem("~~~", "!");
-            LOCAL_STORAGE.removeItem("~~~");
-        } catch (err) {
-            LOCAL_STORAGE = null;
-        }
-        function PersistentStorage(namespace, override) {
-            this.prefix = [ "__", namespace, "__" ].join("");
-            this.ttlKey = "__ttl__";
-            this.keyMatcher = new RegExp("^" + _.escapeRegExChars(this.prefix));
-            this.ls = override || LOCAL_STORAGE;
-            !this.ls && this._noop();
-        }
-        _.mixin(PersistentStorage.prototype, {
-            _prefix: function(key) {
-                return this.prefix + key;
-            },
-            _ttlKey: function(key) {
-                return this._prefix(key) + this.ttlKey;
-            },
-            _noop: function() {
-                this.get = this.set = this.remove = this.clear = this.isExpired = _.noop;
-            },
-            _safeSet: function(key, val) {
-                try {
-                    this.ls.setItem(key, val);
-                } catch (err) {
-                    if (err.name === "QuotaExceededError") {
-                        this.clear();
-                        this._noop();
-                    }
-                }
-            },
-            get: function(key) {
-                if (this.isExpired(key)) {
-                    this.remove(key);
-                }
-                return decode(this.ls.getItem(this._prefix(key)));
-            },
-            set: function(key, val, ttl) {
-                if (_.isNumber(ttl)) {
-                    this._safeSet(this._ttlKey(key), encode(now() + ttl));
-                } else {
-                    this.ls.removeItem(this._ttlKey(key));
-                }
-                return this._safeSet(this._prefix(key), encode(val));
-            },
-            remove: function(key) {
-                this.ls.removeItem(this._ttlKey(key));
-                this.ls.removeItem(this._prefix(key));
-                return this;
-            },
-            clear: function() {
-                var i, keys = gatherMatchingKeys(this.keyMatcher);
-                for (i = keys.length; i--; ) {
-                    this.remove(keys[i]);
-                }
-                return this;
-            },
-            isExpired: function(key) {
-                var ttl = decode(this.ls.getItem(this._ttlKey(key)));
-                return _.isNumber(ttl) && now() > ttl ? true : false;
-            }
-        });
-        return PersistentStorage;
-        function now() {
-            return new Date().getTime();
-        }
-        function encode(val) {
-            return JSON.stringify(_.isUndefined(val) ? null : val);
-        }
-        function decode(val) {
-            return $.parseJSON(val);
-        }
-        function gatherMatchingKeys(keyMatcher) {
-            var i, key, keys = [], len = LOCAL_STORAGE.length;
-            for (i = 0; i < len; i++) {
-                if ((key = LOCAL_STORAGE.key(i)).match(keyMatcher)) {
-                    keys.push(key.replace(keyMatcher, ""));
-                }
-            }
-            return keys;
-        }
-    }();
-    var Transport = function() {
-        "use strict";
-        var pendingRequestsCount = 0, pendingRequests = {}, maxPendingRequests = 6, sharedCache = new LruCache(10);
-        function Transport(o) {
-            o = o || {};
-            this.cancelled = false;
-            this.lastReq = null;
-            this._send = o.transport;
-            this._get = o.limiter ? o.limiter(this._get) : this._get;
-            this._cache = o.cache === false ? new LruCache(0) : sharedCache;
-        }
-        Transport.setMaxPendingRequests = function setMaxPendingRequests(num) {
-            maxPendingRequests = num;
-        };
-        Transport.resetCache = function resetCache() {
-            sharedCache.reset();
-        };
-        _.mixin(Transport.prototype, {
-            _fingerprint: function fingerprint(o) {
-                o = o || {};
-                return o.url + o.type + $.param(o.data || {});
-            },
-            _get: function(o, cb) {
-                var that = this, fingerprint, jqXhr;
-                fingerprint = this._fingerprint(o);
-                if (this.cancelled || fingerprint !== this.lastReq) {
-                    return;
-                }
-                if (jqXhr = pendingRequests[fingerprint]) {
-                    jqXhr.done(done).fail(fail);
-                } else if (pendingRequestsCount < maxPendingRequests) {
-                    pendingRequestsCount++;
-                    pendingRequests[fingerprint] = this._send(o).done(done).fail(fail).always(always);
-                } else {
-                    this.onDeckRequestArgs = [].slice.call(arguments, 0);
-                }
-                function done(resp) {
-                    cb(null, resp);
-                    that._cache.set(fingerprint, resp);
-                }
-                function fail() {
-                    cb(true);
-                }
-                function always() {
-                    pendingRequestsCount--;
-                    delete pendingRequests[fingerprint];
-                    if (that.onDeckRequestArgs) {
-                        that._get.apply(that, that.onDeckRequestArgs);
-                        that.onDeckRequestArgs = null;
-                    }
-                }
-            },
-            get: function(o, cb) {
-                var resp, fingerprint;
-                cb = cb || $.noop;
-                o = _.isString(o) ? {
-                    url: o
-                } : o || {};
-                fingerprint = this._fingerprint(o);
-                this.cancelled = false;
-                this.lastReq = fingerprint;
-                if (resp = this._cache.get(fingerprint)) {
-                    cb(null, resp);
-                } else {
-                    this._get(o, cb);
-                }
-            },
-            cancel: function() {
-                this.cancelled = true;
-            }
-        });
-        return Transport;
-    }();
-    var SearchIndex = window.SearchIndex = function() {
-        "use strict";
-        var CHILDREN = "c", IDS = "i";
-        function SearchIndex(o) {
-            o = o || {};
-            if (!o.datumTokenizer || !o.queryTokenizer) {
-                $.error("datumTokenizer and queryTokenizer are both required");
-            }
-            this.identify = o.identify || _.stringify;
-            this.datumTokenizer = o.datumTokenizer;
-            this.queryTokenizer = o.queryTokenizer;
-            this.reset();
-        }
-        _.mixin(SearchIndex.prototype, {
-            bootstrap: function bootstrap(o) {
-                this.datums = o.datums;
-                this.trie = o.trie;
-            },
-            add: function(data) {
-                var that = this;
-                data = _.isArray(data) ? data : [ data ];
-                _.each(data, function(datum) {
-                    var id, tokens;
-                    that.datums[id = that.identify(datum)] = datum;
-                    tokens = normalizeTokens(that.datumTokenizer(datum));
-                    _.each(tokens, function(token) {
-                        var node, chars, ch;
-                        node = that.trie;
-                        chars = token.split("");
-                        while (ch = chars.shift()) {
-                            node = node[CHILDREN][ch] || (node[CHILDREN][ch] = newNode());
-                            node[IDS].push(id);
-                        }
-                    });
-                });
-            },
-            get: function get(ids) {
-                var that = this;
-                return _.map(ids, function(id) {
-                    return that.datums[id];
-                });
-            },
-            search: function search(query) {
-                var that = this, tokens, matches;
-                tokens = normalizeTokens(this.queryTokenizer(query));
-                _.each(tokens, function(token) {
-                    var node, chars, ch, ids;
-                    if (matches && matches.length === 0) {
-                        return false;
-                    }
-                    node = that.trie;
-                    chars = token.split("");
-                    while (node && (ch = chars.shift())) {
-                        node = node[CHILDREN][ch];
-                    }
-                    if (node && chars.length === 0) {
-                        ids = node[IDS].slice(0);
-                        matches = matches ? getIntersection(matches, ids) : ids;
-                    } else {
-                        matches = [];
-                        return false;
-                    }
-                });
-                return matches ? _.map(unique(matches), function(id) {
-                    return that.datums[id];
-                }) : [];
-            },
-            all: function all() {
-                var values = [];
-                for (var key in this.datums) {
-                    values.push(this.datums[key]);
-                }
-                return values;
-            },
-            reset: function reset() {
-                this.datums = {};
-                this.trie = newNode();
-            },
-            serialize: function serialize() {
-                return {
-                    datums: this.datums,
-                    trie: this.trie
-                };
-            }
-        });
-        return SearchIndex;
-        function normalizeTokens(tokens) {
-            tokens = _.filter(tokens, function(token) {
-                return !!token;
-            });
-            tokens = _.map(tokens, function(token) {
-                return token.toLowerCase();
-            });
-            return tokens;
-        }
-        function newNode() {
-            var node = {};
-            node[IDS] = [];
-            node[CHILDREN] = {};
-            return node;
-        }
-        function unique(array) {
-            var seen = {}, uniques = [];
-            for (var i = 0, len = array.length; i < len; i++) {
-                if (!seen[array[i]]) {
-                    seen[array[i]] = true;
-                    uniques.push(array[i]);
-                }
-            }
-            return uniques;
-        }
-        function getIntersection(arrayA, arrayB) {
-            var ai = 0, bi = 0, intersection = [];
-            arrayA = arrayA.sort();
-            arrayB = arrayB.sort();
-            var lenArrayA = arrayA.length, lenArrayB = arrayB.length;
-            while (ai < lenArrayA && bi < lenArrayB) {
-                if (arrayA[ai] < arrayB[bi]) {
-                    ai++;
-                } else if (arrayA[ai] > arrayB[bi]) {
-                    bi++;
-                } else {
-                    intersection.push(arrayA[ai]);
-                    ai++;
-                    bi++;
-                }
-            }
-            return intersection;
-        }
-    }();
-    var Prefetch = function() {
-        "use strict";
-        var keys;
-        keys = {
-            data: "data",
-            protocol: "protocol",
-            thumbprint: "thumbprint"
-        };
-        function Prefetch(o) {
-            this.url = o.url;
-            this.ttl = o.ttl;
-            this.cache = o.cache;
-            this.prepare = o.prepare;
-            this.transform = o.transform;
-            this.transport = o.transport;
-            this.thumbprint = o.thumbprint;
-            this.storage = new PersistentStorage(o.cacheKey);
-        }
-        _.mixin(Prefetch.prototype, {
-            _settings: function settings() {
-                return {
-                    url: this.url,
-                    type: "GET",
-                    dataType: "json"
-                };
-            },
-            store: function store(data) {
-                if (!this.cache) {
-                    return;
-                }
-                this.storage.set(keys.data, data, this.ttl);
-                this.storage.set(keys.protocol, location.protocol, this.ttl);
-                this.storage.set(keys.thumbprint, this.thumbprint, this.ttl);
-            },
-            fromCache: function fromCache() {
-                var stored = {}, isExpired;
-                if (!this.cache) {
-                    return null;
-                }
-                stored.data = this.storage.get(keys.data);
-                stored.protocol = this.storage.get(keys.protocol);
-                stored.thumbprint = this.storage.get(keys.thumbprint);
-                isExpired = stored.thumbprint !== this.thumbprint || stored.protocol !== location.protocol;
-                return stored.data && !isExpired ? stored.data : null;
-            },
-            fromNetwork: function(cb) {
-                var that = this, settings;
-                if (!cb) {
-                    return;
-                }
-                settings = this.prepare(this._settings());
-                this.transport(settings).fail(onError).done(onResponse);
-                function onError() {
-                    cb(true);
-                }
-                function onResponse(resp) {
-                    cb(null, that.transform(resp));
-                }
-            },
-            clear: function clear() {
-                this.storage.clear();
-                return this;
-            }
-        });
-        return Prefetch;
-    }();
-    var Remote = function() {
-        "use strict";
-        function Remote(o) {
-            this.url = o.url;
-            this.prepare = o.prepare;
-            this.transform = o.transform;
-            this.transport = new Transport({
-                cache: o.cache,
-                limiter: o.limiter,
-                transport: o.transport
-            });
-        }
-        _.mixin(Remote.prototype, {
-            _settings: function settings() {
-                return {
-                    url: this.url,
-                    type: "GET",
-                    dataType: "json"
-                };
-            },
-            get: function get(query, cb) {
-                var that = this, settings;
-                if (!cb) {
-                    return;
-                }
-                query = query || "";
-                settings = this.prepare(query, this._settings());
-                return this.transport.get(settings, onResponse);
-                function onResponse(err, resp) {
-                    err ? cb([]) : cb(that.transform(resp));
-                }
-            },
-            cancelLastRequest: function cancelLastRequest() {
-                this.transport.cancel();
-            }
-        });
-        return Remote;
-    }();
-    var oParser = function() {
-        "use strict";
-        return function parse(o) {
-            var defaults, sorter;
-            defaults = {
-                initialize: true,
-                identify: _.stringify,
-                datumTokenizer: null,
-                queryTokenizer: null,
-                sufficient: 5,
-                sorter: null,
-                local: [],
-                prefetch: null,
-                remote: null
-            };
-            o = _.mixin(defaults, o || {});
-            !o.datumTokenizer && $.error("datumTokenizer is required");
-            !o.queryTokenizer && $.error("queryTokenizer is required");
-            sorter = o.sorter;
-            o.sorter = sorter ? function(x) {
-                return x.sort(sorter);
-            } : _.identity;
-            o.local = _.isFunction(o.local) ? o.local() : o.local;
-            o.prefetch = parsePrefetch(o.prefetch);
-            o.remote = parseRemote(o.remote);
-            return o;
-        };
-        function parsePrefetch(o) {
-            var defaults;
-            if (!o) {
-                return null;
-            }
-            defaults = {
-                url: null,
-                ttl: 24 * 60 * 60 * 1e3,
-                cache: true,
-                cacheKey: null,
-                thumbprint: "",
-                prepare: _.identity,
-                transform: _.identity,
-                transport: null
-            };
-            o = _.isString(o) ? {
-                url: o
-            } : o;
-            o = _.mixin(defaults, o);
-            !o.url && $.error("prefetch requires url to be set");
-            o.transform = o.filter || o.transform;
-            o.cacheKey = o.cacheKey || o.url;
-            o.thumbprint = VERSION + o.thumbprint;
-            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
-            return o;
-        }
-        function parseRemote(o) {
-            var defaults;
-            if (!o) {
-                return;
-            }
-            defaults = {
-                url: null,
-                cache: true,
-                prepare: null,
-                replace: null,
-                wildcard: null,
-                limiter: null,
-                rateLimitBy: "debounce",
-                rateLimitWait: 300,
-                transform: _.identity,
-                transport: null
-            };
-            o = _.isString(o) ? {
-                url: o
-            } : o;
-            o = _.mixin(defaults, o);
-            !o.url && $.error("remote requires url to be set");
-            o.transform = o.filter || o.transform;
-            o.prepare = toRemotePrepare(o);
-            o.limiter = toLimiter(o);
-            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
-            delete o.replace;
-            delete o.wildcard;
-            delete o.rateLimitBy;
-            delete o.rateLimitWait;
-            return o;
-        }
-        function toRemotePrepare(o) {
-            var prepare, replace, wildcard;
-            prepare = o.prepare;
-            replace = o.replace;
-            wildcard = o.wildcard;
-            if (prepare) {
-                return prepare;
-            }
-            if (replace) {
-                prepare = prepareByReplace;
-            } else if (o.wildcard) {
-                prepare = prepareByWildcard;
-            } else {
-                prepare = idenityPrepare;
-            }
-            return prepare;
-            function prepareByReplace(query, settings) {
-                settings.url = replace(settings.url, query);
-                return settings;
-            }
-            function prepareByWildcard(query, settings) {
-                settings.url = settings.url.replace(wildcard, encodeURIComponent(query));
-                return settings;
-            }
-            function idenityPrepare(query, settings) {
-                return settings;
-            }
-        }
-        function toLimiter(o) {
-            var limiter, method, wait;
-            limiter = o.limiter;
-            method = o.rateLimitBy;
-            wait = o.rateLimitWait;
-            if (!limiter) {
-                limiter = /^throttle$/i.test(method) ? throttle(wait) : debounce(wait);
-            }
-            return limiter;
-            function debounce(wait) {
-                return function debounce(fn) {
-                    return _.debounce(fn, wait);
-                };
-            }
-            function throttle(wait) {
-                return function throttle(fn) {
-                    return _.throttle(fn, wait);
-                };
-            }
-        }
-        function callbackToDeferred(fn) {
-            return function wrapper(o) {
-                var deferred = $.Deferred();
-                fn(o, onSuccess, onError);
-                return deferred;
-                function onSuccess(resp) {
-                    _.defer(function() {
-                        deferred.resolve(resp);
-                    });
-                }
-                function onError(err) {
-                    _.defer(function() {
-                        deferred.reject(err);
-                    });
-                }
-            };
-        }
-    }();
-    var Bloodhound = function() {
-        "use strict";
-        var old;
-        old = window && window.Bloodhound;
-        function Bloodhound(o) {
-            o = oParser(o);
-            this.sorter = o.sorter;
-            this.identify = o.identify;
-            this.sufficient = o.sufficient;
-            this.local = o.local;
-            this.remote = o.remote ? new Remote(o.remote) : null;
-            this.prefetch = o.prefetch ? new Prefetch(o.prefetch) : null;
-            this.index = new SearchIndex({
-                identify: this.identify,
-                datumTokenizer: o.datumTokenizer,
-                queryTokenizer: o.queryTokenizer
-            });
-            o.initialize !== false && this.initialize();
-        }
-        Bloodhound.noConflict = function noConflict() {
-            window && (window.Bloodhound = old);
-            return Bloodhound;
-        };
-        Bloodhound.tokenizers = tokenizers;
-        _.mixin(Bloodhound.prototype, {
-            __ttAdapter: function ttAdapter() {
-                var that = this;
-                return this.remote ? withAsync : withoutAsync;
-                function withAsync(query, sync, async) {
-                    return that.search(query, sync, async);
-                }
-                function withoutAsync(query, sync) {
-                    return that.search(query, sync);
-                }
-            },
-            _loadPrefetch: function loadPrefetch() {
-                var that = this, deferred, serialized;
-                deferred = $.Deferred();
-                if (!this.prefetch) {
-                    deferred.resolve();
-                } else if (serialized = this.prefetch.fromCache()) {
-                    this.index.bootstrap(serialized);
-                    deferred.resolve();
-                } else {
-                    this.prefetch.fromNetwork(done);
-                }
-                return deferred.promise();
-                function done(err, data) {
-                    if (err) {
-                        return deferred.reject();
-                    }
-                    that.add(data);
-                    that.prefetch.store(that.index.serialize());
-                    deferred.resolve();
-                }
-            },
-            _initialize: function initialize() {
-                var that = this, deferred;
-                this.clear();
-                (this.initPromise = this._loadPrefetch()).done(addLocalToIndex);
-                return this.initPromise;
-                function addLocalToIndex() {
-                    that.add(that.local);
-                }
-            },
-            initialize: function initialize(force) {
-                return !this.initPromise || force ? this._initialize() : this.initPromise;
-            },
-            add: function add(data) {
-                this.index.add(data);
-                return this;
-            },
-            get: function get(ids) {
-                ids = _.isArray(ids) ? ids : [].slice.call(arguments);
-                return this.index.get(ids);
-            },
-            search: function search(query, sync, async) {
-                var that = this, local;
-                local = this.sorter(this.index.search(query));
-                sync(this.remote ? local.slice() : local);
-                if (this.remote && local.length < this.sufficient) {
-                    this.remote.get(query, processRemote);
-                } else if (this.remote) {
-                    this.remote.cancelLastRequest();
-                }
-                return this;
-                function processRemote(remote) {
-                    var nonDuplicates = [];
-                    _.each(remote, function(r) {
-                        !_.some(local, function(l) {
-                            return that.identify(r) === that.identify(l);
-                        }) && nonDuplicates.push(r);
-                    });
-                    async && async(nonDuplicates);
-                }
-            },
-            all: function all() {
-                return this.index.all();
-            },
-            clear: function clear() {
-                this.index.reset();
-                return this;
-            },
-            clearPrefetchCache: function clearPrefetchCache() {
-                this.prefetch && this.prefetch.clear();
-                return this;
-            },
-            clearRemoteCache: function clearRemoteCache() {
-                Transport.resetCache();
-                return this;
-            },
-            ttAdapter: function ttAdapter() {
-                return this.__ttAdapter();
-            }
-        });
-        return Bloodhound;
-    }();
-    return Bloodhound;
-});
\ No newline at end of file
diff --git a/web/js/cluster.js b/web/js/cluster.js
deleted file mode 100644
index 0ce5af7..0000000
--- a/web/js/cluster.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
-Cluster
-*******************************************************************************/
-function Cluster(uris, id) {
-	this.uris = uris;
-	this.id = id;
-	this.items = [];
-}
-
-Cluster.prototype.enrich = function() {
-	var _cluster = this; //make sure we can use this Cluster in $ scope
-
-	return $.ajax({
-		type: "POST",
-		url: "metadata",
-		contentType: "application/json",
-		data: JSON.stringify({"uris":this.uris})})
-	.then(function(data) {
-		// Enrich one image element in the cluster adding an image,
-		// a link where it can be (further) annotated and a title
-		var items = [];
-
-		for(var i=0; i<data.length; i++) {
-			items[i] = {};
-			var uri = data[i].uri;
-			items[i].uri = uri;
-			items[i].thumb = data[i].thumb;
-			items[i].link = "item.html?uri=" + uri;
-			items[i].title = truncate(data[i].title, 60);
-		}
-		_cluster.items = items;
-	 });
-}
-
-Cluster.prototype.display = function() {
-	var numberOfPages = this.getNumberOfPages(this.items.length);
-
-	$("#" + this.id).append(
-		pagination(numberOfPages, this.items, "cluster", this.id)
-	);
-	thumbnails(this.id);
-}
-
-Cluster.prototype.getNumberOfPages = function(numberOfItems) {
-	var numberOfPages = 0;
-	var restPages = numberOfItems%display.numberDisplayedItems;
-
-	if(restPages == 0) {
-		numberOfPages = numberOfItems/display.numberDisplayedItems;
-	} else {
-		numberOfPages = (numberOfItems-restPages)/display.numberDisplayedItems+1;
-	}
-	return numberOfPages;
-}
diff --git a/web/js/deniche-plugin.js b/web/js/deniche-plugin.js
deleted file mode 100644
index 5df4968..0000000
--- a/web/js/deniche-plugin.js
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Annotorious plugin to use the annotation editor from the
- * ClioPatria image_annotation cpack package as the editor for
- * shapes created in Annotorious.
- *
- * To this, we need to solve three issues:
- *
- * 1. We need to communicate the shape that the user created within
- *    annotorious to all annotation field objects of the cpack.
- *    This is why the plugin has a public member variable 'currentShape'
- *    that the cpack fields can access.
- *
- * 2. The cpack data model assumes multiple annotation can be made on
- *    the same target, while annotorious can have only one.
- *    As a result, we need to collect all tags for the same target and
- *    merge them into a single annotation for annotorious.
- *    This is done in the 'cleantags' array, which is indexed on targetId.
- *
- * 3. While the annotorious editor is open, the user can add and remove
- *    individual tags using the cpack user interface. But we can only
- *    add/rm the final merged tag using the annotorious API when the
- *    editor is closed. As a result, we need to do some bookkeeping
- *    ourselves in the _dirtytag variable, and update annotorious when
- *    the editor is closed by flushing out all changes made to the current
- *    dirty tag.
- *
- * Apart from these issues above, the approach is quite straight forward:
- *
- * 1. We simple move the cpack editor as a plugin field into the annotorious
- *    editor.
- * 2. We hijack the cancel/save buttons of annotorious for our own purposes.
- * 3. We bind handler functions on all relevant events generated by annotorious.
- *
- * @author: Jacco van Ossenbruggen
- *
- * */
-
-annotorious.plugin.DenichePlugin = function() {
-    /** @public **/
-	this.currentShape = null; // Should be accessible by cpack objects
-
-	/** @private **/
-	this._cleantags = []; // tags annotorious already knows about
-	this._dirtytag = null; // tag annotorious doesn't know yet
-	this._saveButtons = {}; // we have multiple buttons if we have multiple images per page
-	this._cancelButtons = {};
-}
-
-annotorious.plugin.DenichePlugin.states = {EMPTY:'empty', SOME:'some'};
-
-annotorious.plugin.DenichePlugin.prototype.onInitAnnotator = function(annotator) {
-    this.annotator = annotator;
-	var el =  annotator.element;
-
-	// remove standard textarea
-	var textArea = el.getElementsByTagName('textarea')[0];
-	textArea.parentNode.removeChild(textArea);
-
-	// move the cpack editor into the annotorious editor:
-    var fieldsId = el.getElementsByTagName('img')[0].getAttribute('fields');
-    var imageId  = el.getElementsByTagName('img')[0].getAttribute('id');
-    var fieldsEl = document.getElementById(fieldsId);
-    annotator.editor.addField(fieldsEl);
-
-    // install all handlers on events created by annotorious:
-    this.installHandlers();
-
-	// get existing annotations on init annotorious
-    if (this._anno.fields) {
-		var fields = this._anno.fields[imageId][fieldsId];
-		for (var i in fields) {
-			var field = fields[i];
-			if (field.showAnnotations) field.getAnnotations();
-		}
-    }
-}
-
-annotorious.plugin.DenichePlugin.prototype.initPlugin = function(anno) {
-	this._anno = anno;	// make sure we know annotorious ...
-	this._anno._deniche = this; // and annotorious knows us
-}
-
-annotorious.plugin.DenichePlugin.prototype.toggleButtons = function(state, fieldsId) {
-	if (!this._cancelButtons[fieldsId]) return;
-	if (!state) state = annotorious.plugin.DenichePlugin.states.SOME;
-	if (state == annotorious.plugin.DenichePlugin.states.SOME) {
-		this._cancelButtons[fieldsId].style.display="none";
-		this._saveButtons[fieldsId].style.display="inline-block";
-	} else if (state == annotorious.plugin.DenichePlugin.states.EMPTY) {
-		this._saveButtons[fieldsId].style.display="none";
-		this._cancelButtons[fieldsId].style.display="inline-block";
-	}
-}
-
-annotorious.plugin.DenichePlugin.prototype.filterTags = function(targetId, fieldsId) {
-	// Filter tags to show only the ones with the same selector
-	var oSelf = this;
-	var editor = $(".annotorious-editor")[0];
-	var selector = '#'+ fieldsId + ' .lblAnnotation';
-	if (!fieldsId) selector = '.lblAnnotation';
-
-	$(editor).find(selector).each(function(index, annotation) {
-		// See if id matches the (current?) target
-		if (targetId == $(annotation).attr("targetId")) {
-			$(annotation).show();
-		} else {
-			$(annotation).hide();
-		}
-	});
-}
-
-annotorious.plugin.DenichePlugin.prototype.removeAnnotation = function (label, targetId) {
-	var old = this._dirtytag;
-	if (!old) old = this._cleantags[targetId];
-	if (old) {
-		var annotation = JSON.parse(JSON.stringify(old)); // deep copy
-		var index = old.compound_text.indexOf(label);
-		annotation.compound_text = old.compound_text.splice(index, 1);
-		annotation.text = old.compound_text.join(', ');
-		this._dirtytag = annotation;
-	}
-}
-
-annotorious.plugin.DenichePlugin.prototype.onFragmentCancel = function(ev) {
-	this.annotator.stopSelection();
-	this.annotator.editor.close();
-}
-
-annotorious.plugin.DenichePlugin.prototype.addAnnotation = function (annotation, update) {
-	var old = this._dirtytag;
-	if (!old) old = this._cleantags[ annotation.targetId ];
-
-	if (old) {
-		// extend new annotation by merging in old one
-		annotation.compound_text = old.compound_text;
-		annotation.compound_text.push(annotation.text);
-		annotation.text = annotation.compound_text.join(', ');
-	} else {
-		annotation.compound_text = [ annotation.text ];
-	}
-	
-	if (update) {
-		this._cleantags[annotation.targetId] = annotation;
-		this._anno.addAnnotation(annotation, old);
-	} else {
-		this._dirtytag = annotation;
-	}
-
-	this.toggleButtons(annotorious.plugin.DenichePlugin.states.SOME, annotation.fieldsId);
-	this.filterTags(annotation.targetId, annotation.fieldsId); // only show tags for this shape
-}
-
-annotorious.plugin.DenichePlugin.prototype.flushDirtyAnnotation = function(original) {
-	var dirty = this._dirtytag;
-	this._dirtytag = null;
-	if (dirty) {
-		if (dirty.text) {
-			this._anno.addAnnotation(dirty,original);
-			this._cleantags[dirty.targetId] = dirty;
-		} else {
-			this._anno.removeAnnotation(original);
-			this._cleantags[dirty.targetId] = null;
-		}
-	}
-}
-
-annotorious.plugin.DenichePlugin.prototype.installHandlers = function() {
-	var oSelf = this;
-
-	this._anno.addHandler('onSelectionCompleted', function(event) {
-		oSelf.currentShape = event.shape;
-		var currentFieldsId = event.mouseEvent.target.parentNode.getElementsByTagName('img')[0].getAttribute('fields');
-		oSelf.toggleButtons(annotorious.plugin.DenichePlugin.states.EMPTY, currentFieldsId);
-	});
-
-	this._anno.addHandler('onEditorShown', function(annotation) {
-		// get the annotorious save and cancel button so we can manipulate them:
-		var node = oSelf.annotator.element;
-
-		oSelf._saveButtons[annotation.fieldsId] = $(".annotorious-editor-button-save").get(0);
-		oSelf._cancelButtons[annotation.fieldsId] = $(".annotorious-editor-button-cancel").get(0);
-		oSelf._saveButtons[annotation.fieldsId].innerHTML = "Done";
-
-		// Set focus on first field (exlude hint input field introduced by twitter typeahead)
-		$(".annotorious-editor input").not(".tt-hint")[0].focus();
-
-		oSelf._dirtytag = null;
-		if (annotation && annotation.shapes) {
-			oSelf.currentShape = annotation.shapes[0];
-			oSelf.toggleButtons(annotorious.plugin.DenichePlugin.states.SOME, annotation.fieldsId);
-			oSelf.filterTags(annotation.targetId, annotation.fieldsId); // only show tags for this shape
-		} else {
-			oSelf.filterTags(null, null);	// hide all tags
-		}
-	});
-
-	this._anno.addHandler('onAnnotationCreated', function(original) {
-		oSelf.flushDirtyAnnotation(original);
-	});
-
-	this._anno.addHandler('onAnnotationUpdated', function(original) {
-		oSelf.flushDirtyAnnotation(original);
-	});
-}
diff --git a/web/js/field.js b/web/js/field.js
deleted file mode 100644
index 82bfb70..0000000
--- a/web/js/field.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
-Field
-Class of annotation fields. Fields are bound to a specific image and annotorious
-instance. Most of the code comes from annotate.js written by
-Jacco van Ossenbruggen
-*******************************************************************************/
-function Field(defenition, context) {
-	this.id = context.id; // id of field serving as a basis for jquery identifiers
-	this.fieldsId = context.fieldsId;  // id of the fields container
-	this.inputId = context.id + "Inp"; // id of input
-	this.fragmentField = context.fragment; // boolean for indicating this is a fragment field
-	this.label = defenition.label; // name of the field
-	this.comment = defenition.comment; // short description of the field
-	this.node = null; // html node representing the field
-	this.source = defenition.source; // source of the alternatives shown
-	this.alternatives = null; // list of alternatives for dropdown
-	this.showAnnotations = true; // boolean indicating whether previous annotations should be shown
-	this.annotationList = null; // array of annotations related to this target and field
-	this.field = defenition.uri; // URI identifying annotation field
-	this.target = context.target; // URI of target to be annotated
-	this.targetImage = context.targetImage; // URI of target's image to be annotated
-	this.imageId = context.imageId; // id of the corresponding img element
-	this.user = context.user; // URI of the user currently annotating
-	this.locale = context.locale // locale for retrieving language specific resources
-	this.MOTIVATION = {
-		tagging:    'http://www.w3.org/ns/oa#tagging',
-		commenting: 'http://www.w3.org/ns/oa#commenting',
-		moderating: 'http://www.w3.org/ns/oa#moderating',
-	};
-
-	if (this.fragmentField) {
-		this._anno = anno; // reference to annotatorious
-
-		// Extend annotatorious with object with fields indexed on imageId and fieldsId
-		if (!anno.fields) anno.fields = {};
-		if (!anno.fields[this.imageId]) anno.fields[this.imageId] = {};
-		var fields = anno.fields[this.imageId][this.fieldsId];
-		if (fields) {
-			fields.push(this);
-		} else {
-			anno.fields[this.imageId][this.fieldsId] = [this];
-		}
-	}
-	this.initDropdown();
-}
-
-Field.prototype.initDropdown = function() {
-	var _field = this; //make sure we can use this Field in $ scope
-	this.node = this.dropdownField();
-
-	if (this.showAnnotations) {
-		// Add div for annotations, existing annotations are retrieved upon init deniche
-		this.annotationList = new AnnotationList(this.id + "DivAnnotations");
-		$(this.node).append(this.annotationList.node);
-	}
-
-	this.getAllAlternatives()
-	.then(function(alternatives){
-		_field.addTypeAhead(alternatives);
-		_field.addDropdownListeners();
-	});
-}
-
-Field.prototype.submitAnnotation = function(motiv, target, body, label, graph) {
-	var _field = this; //make sure we can use this Field in $ scope
-	if (!target) return; // annotation target is required
-	if (!body) return; // annotation in the form of text or resource is required
-	if (!label && body['@value']) label = body['@value']; // set label to value in body if not sepperately defined
-	if (!motiv) motiv = this.MOTIVATION.tagging;
-	if (!graph)	graph = target;
-
-	var targetObject = null;
-	if (this.fragmentField && this._anno._deniche.currentShape) {
-		var shape = this._anno._deniche.currentShape.geometry;
-		var targetImage = this.targetImage;
-
-		if (targetImage && target != targetImage) {
-			// Another annotation on selector with existing id (target id is the selector, not the image)
-			targetObject = [{hasSource:targetImage, hasSelector:{value:shape}}, {'@id':target}];
-		} else {
-			// Annotation on new selector, id will be generated server-side
-			targetObject = [{hasSource:target, hasSelector:{value:shape}}];
-		}
-	} else {
-		// Annotation without fragment, on entire target image
-		targetObject = [{'@id':target}];
-	}
-
-	var targetString = JSON.stringify(targetObject);
-	var bodyString = JSON.stringify(body);
-
-	// console.log("Saving the following ", "field: ", this.field, "hasTarget: ", targetString, "hasBody: ", bodyString, "label: ", label, "motivatedBy: ", motiv, "graph: ", graph);
-
-	$.ajax({type: "POST",
-			url: "api/annotation/add",
-			data: {
-				field: this.field,
-				hasTarget: targetString,
-				hasBody: bodyString,
-				label: label,
-			   	motivatedBy: motiv,
-				graph: graph
-			}})
-	.then(function(data) {
-		//Add annotation to list of annotations
-		_field.annotationList.add(data.annotation);
-		_field.addAnnotationFragment(data.annotation, false); // add but do not update open editor
-	});
-}
-
-Field.prototype.getAnnotations = function() {
-	var _field = this; //make sure we can use this Field in $ scope
-
-	$.getJSON("api/annotation/get", {field:this.field, hasTarget:this.target})
-	.then(function(data){
-		// Get the annotations from the returned data
-		var annotations = data[_field.field].annotations;
-
-		for (key in annotations) {
-			_field.annotationList.add(annotations[key]);
-			_field.addAnnotationFragment(annotations[key], true);
-		}
-	});
-}
-
-Field.prototype.addAnnotationFragment = function(annotation, update) {
-	var target = this.annotationList.findSpecificTarget(annotation);
-	if (!this.fragmentField || !target) return;
-
-	var label = annotation.title;
-	var x = target.hasSelector.x;
-	var y = target.hasSelector.y;
-	var w = target.hasSelector.w;
-	var h = target.hasSelector.h;
-	var torious = {
-		src: $("#" + this.imageId)[0].src,
-		text: label,
-		targetId: target['@id'],
-		fieldsId: this.fieldsId,
-		annotationId: annotation.annotation,
-		shapes: [{
-			type:'rect',
-			geometry: { x:x,y:y,width:w,height:h }
-		}]
-	};
-	this._anno._deniche.addAnnotation(torious, update);
-}
-
-Field.prototype.addDropdownListeners = function() {
-	var _field = this; //make sure we can use this Field in $ scope
-	var selector = "#" + this.inputId;
-
-	// Eventlistener for selecting typeahead alternative
-	$(selector).on('typeahead:select', function(event, annotation) {
-		$(selector).typeahead('val', ''); // Clear query
-
-		// console.log("SAVE: resource EVENT: typeahead:select ANNOTATION: ", annotation);
-		_field.submitAnnotation(
-			_field.MOTIVATION.tagging,
-			_field.target,
-			{'@id':annotation.uri},
-			annotation.value
-		);
-	});
-
-	// Action upon pressing enter
-	$(selector).on('keyup', function(event) {
-		// Check to see if typeahead cleared the field (so autocomplete was used)
-		if ($(selector).val() && event.which == 13) {
-			var annotation = $(selector).val();
-
-			// console.log("SAVE: literal EVENT: keyup ANNOTATION: ", annotation);
-			_field.submitAnnotation(
-				_field.MOTIVATION.tagging,
-				_field.target,
-				{'@value':annotation},
-				annotation
-			);
-			// Clear input
-			$(selector).typeahead('val', '');
-		}
-	});
-
-	// Action on pressing esc
-	$(selector).on('keyup', function(event) {
-		if (_field.fragmentField && event.which == 27) {
-			_field._anno._deniche.onFragmentCancel(event);
-		}
-	});
-}
-
-Field.prototype.getAllAlternatives = function() {
-	// Get autocomplete alternatives
-	var filter = JSON.stringify({scheme:"http://accurator.nl/bible#BiblicalFigureConceptScheme"});
-	var labelRank = "['http://www.w3.org/2004/02/skos/core#prefLabel'-1]";
-
-	// Return promise
-	return $.getJSON("api/autocomplete",
-		{q:"stub",
-		 filter:filter,
-		 labelrank:labelRank,
-		 method:"all",
-		 locale:this.locale});
-}
-
-Field.prototype.getAlternatives = function(string) {
-	// Get autocomplete alternatives
-	var filter = JSON.stringify({scheme:"http://accurator.nl/bible#BiblicalFigureConceptScheme"});
-	var labelRank = "['http://www.w3.org/2004/02/skos/core#prefLabel'-1]";
-
-	// Return promise
-	return $.getJSON("api/autocomplete",
-		{q:string,
-		 filter:filter,
-		 labelrank:labelRank,
-		//  method:"all",
-		 locale:this.locale});
-}
-
-Field.prototype.addTypeAhead = function(alternatives) {
-	this.alternatives = alternatives;
-	var array = [];
-
-	// Prep the data for adding it to the suggestion engine
-	for(var i=0; i<alternatives.results.length; i++) {
-		array[i] = {
-			value:alternatives.results[i].label,
-			uri:alternatives.results[i].uri
-		};
-	}
-
-	// Constructs the suggestion engine
-	var bloodHoundAlternatives = new Bloodhound({
-		datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
-		queryTokenizer: Bloodhound.tokenizers.whitespace,
-		local: array
-	});
-
-	// Create the suggestion template
-	var suggestionTemplate = function(data) {
-		return '<div>' + data.value + ' - <small>' + data.uri + '</small></div>';
-	}
-
-	// Select the input field and add typeahead
-	$("#" + this.inputId).typeahead({hint: true,
-						 highlight: true,
-						 minLength: 1},
-			   			{name:'alternatives',
-						 display:'value',
-						 source: bloodHoundAlternatives,
-						 templates: {
-							 suggestion:suggestionTemplate
-						 }
-	});
-}
-
-Field.prototype.dropdownField = function() {
-	// Return the form group
-	return	$.el.div({'class':'form-group'},
-				$.el.label({'class':'itemLbl',
-							'for':this.inputId},
-						   this.label),
-				$.el.input({'type':'text',
-							'class':'form-control typeahead',
-							'id':this.inputId,
-							'placeholder':this.comment}));
-}
diff --git a/web/js/pagination.js b/web/js/pagination.js
deleted file mode 100644
index 234400f..0000000
--- a/web/js/pagination.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Pagination
-*  Code for initializing bootstrap pagination and handling interactions
-*/
-var items, labelItems;
-
-function pagination(numberOfPages, itemsForPagination, labelForPaginationItems, clusterId) {
-	// Don't use pagination if there are not enough items
-	if(numberOfPages==1) return "";
-
-	items = itemsForPagination;
-
-	// If the list of items to be displayed is random, then clusterId is undefined
-	if (clusterId === undefined) {
-		clusterId = 0;
-		labelItems = labelForPaginationItems + "";
-	}
-	else {
-		labelItems = labelForPaginationItems + clusterId;
-	}
-
-	// Init HTML pagination string, starting with a disabled left arrow and an active first page
-	var html = $.el.ul({'class':'pagination pagination-sm'},
-					   $.el.li({'class':'disabled'},
-							   $.el.span('\u00ab')),
-					   $.el.li({'class':'active'},
-							   $.el.span(1)));
-
-	// Add additional pages
-	for(var i = 2; i <= numberOfPages;i++){
-		html.appendChild(
-			$.el.li($.el.a({'href':'javascript:goToPage(' + i + ', ' + clusterId + ')'},
-						   i)));
-	};
-
-	// Add right arrow to pagination
-	html.appendChild(
-		$.el.li($.el.a({'href':'javascript:nextPage(1' + ', ' + clusterId + ')'},
-					   '\u00bb')));
-
-	return $.el.div({'class':'row'},
-					$.el.div({'class':'col-md-12'},
-							 html));
-}
-
-function newPagination(numberOfPages){
-	// Don't use pagination if there are not enough items
-	if(numberOfPages==1) return "";
-
-	// Init HTML pagination string, starting with a disabled left arrow and an active first page
-	var html = $.el.ul({'class':'pagination pagination-sm'},
-					   $.el.li({'class':'disabled'},
-							   $.el.span('\u00ab')),
-					   $.el.li({'class':'active'},
-							   $.el.span(1)));
-
-
-}
-
-function changePagination(pageNumber, activePage, numberOfPages, clusterId) {
-	console.log("labeItems=", labelItems);
-	//Often replacing html, this is because often <a> has to be replaced by <span> and vice versa
-	//Replace span active class with a link
-	// $("#" + labelItems + clusterId + " .pagination li").eq(activePage).replaceWith(
-	$("#" + labelItems + " .pagination li").eq(activePage).replaceWith(
-		$.el.li($.el.a({'href':'javascript:goToPage(' + activePage + ', ' + clusterId + ')'},
-					   activePage)));
-
-	//Replace a link with span active class
-	// $("#" + labelItems + clusterId + " .pagination li").eq(pageNumber).replaceWith(
-	$("#" + labelItems + " .pagination li").eq(pageNumber).replaceWith(
-		$.el.li({'class':'active'},
-				$.el.span(pageNumber)));
-
-	//Replace left arrow
-	if(pageNumber == 1) {
-		// Disable left because switching to page one
-		// $("#" + labelItems + clusterId + " .pagination li").eq(0).replaceWith(
-		$("#" + labelItems + " .pagination li").eq(0).replaceWith(
-			$.el.li({'class':'disabled'},
-					$.el.span('\u00ab')));
-	} else {
-		// Enable left with pageNumber as a link
-		// $("#" + labelItems + clusterId + " .pagination li").eq(0).replaceWith(
-		$("#" + labelItems + " .pagination li").eq(0).replaceWith(
-			$.el.li($.el.a({'href':'javascript:previousPage(' + pageNumber + ', ' + clusterId + ')'},
-						   '\u00ab')));
-	}
-
-	//Replace right arrow
-	if(pageNumber == numberOfPages) {
-		// Disable left because switching to page one
-		// $("#" + labelItems + clusterId + " .pagination li").eq(numberOfPages+1).replaceWith(
-		$("#" + labelItems + " .pagination li").eq(numberOfPages+1).replaceWith(
-			$.el.li({'class':'disabled'},
-					$.el.span('\u00bb')));
-	} else {
-		// Enable left with pageNumber as a link
-		// $("#" + labelItems + clusterId + " .pagination li").eq(numberOfPages+1).replaceWith(
-		 $("#" + labelItems + " .pagination li").eq(numberOfPages+1).replaceWith(
-			$.el.li($.el.a({'href':'javascript:nextPage(' + pageNumber + ', ' + clusterId + ')'},
-						   '\u00bb')));
-	}
-}
-
-function nextPage(pageNumber, clusterId) {
-	var toGoToPage = pageNumber + 1;
-	//	console.log("Should be going to " + toGoToPage + " page now...");
-	goToPage(toGoToPage, clusterId);
-}
-
-function previousPage(pageNumber, clusterId) {
-	var toGoToPage = pageNumber - 1;
-	//	console.log("Should be going to " + toGoToPage + " page now...");
-	goToPage(toGoToPage, clusterId);
-}
-
-function goToPage(pageNumber, clusterId) {
-	// Get the number of list items of the pagination (translation: the number of pages)
-	// var numberOfPages = $("#" + labelItems + clusterId + " .pagination li").length - 2;
-	// var activePage = $("#" + labelItems + clusterId + " .pagination .active").text();
-	var numberOfPages = $("#" + labelItems + " .pagination li").length - 2;
-	var activePage = $("#" + labelItems + " .pagination .active").text();
-	// console.log("Number of pages: " + numberOfPages + " Should be going to the " + pageNumber + " page now,  current activePAge: " + activePage);
-	changePagination(pageNumber, activePage, numberOfPages, clusterId);
-	changeThumbnails(pageNumber, activePage, numberOfPages, items, labelItems, clusterId);
-}
diff --git a/web/js/path.js b/web/js/path.js
deleted file mode 100644
index 7bcd2c8..0000000
--- a/web/js/path.js
+++ /dev/null
@@ -1,50 +0,0 @@
-function Path(uris, labels, elements) {
-    this.uris = uris;
-    this.labels = labels;
-    this.elements = elements;
-
-    this.htmlSimple = function() {
-        return $.el.div({'class':'row path'},
-                    $.el.div({'class':'col-md-12'},
-                        $.el.h4(
-                            $.el.span({'class':'path-label path-property'},
-                                      elements[elements.length-2].label),
-                            $.el.span({'class':'path-label path-resource'},
-                                      elements[elements.length-3].label)
-        )));
-    }
-
-    this.unfoldEvent = function(id, query) {
-        var pathHtml = $.el.h4();
-
-        for(var i=0; i<elements.length; i++) {
-            // Label colouring
-            if(i==0){
-				pathHtml.appendChild(
-					$.el.span({'class':'path-label path-literal'},
-					          query));
-			} else if(i%2==0){
-                pathHtml.appendChild(
-                    $.el.span({'class':'path-label path-resource'},
-                              elements[i].label));
-            } else {
-                pathHtml.appendChild(
-                    $.el.span({'class':'path-label path-property'},
-                              elements[i].label));
-            }
-            // Add arrow if not end of path
-            if(!(elements.length == i+1)){
-                pathHtml.appendChild(
-                    $.el.span({'class':'glyphicon glyphicon-arrow-right'}));
-            }
-        }
-        // Add event
-        $(id + " .path-label").click(function() {
-            $(id + " .path").html(
-                $.el.div({'class':'col-md-12'},
-                    pathHtml)
-            );
-        });
-    }
-
-}
diff --git a/web/js/search.js b/web/js/search.js
index aa2d443..359cc8a 100644
--- a/web/js/search.js
+++ b/web/js/search.js
@@ -1,450 +1,103 @@
-// var initialClusters = [];
-// var enrichedClusters = [];
-// var clusters = [];
-// var query = "";
-
-// display = {
-// 	numberDisplayedItems: 4,
-// 	showFilters: true,
-// 	imageFilter: 'onlyImages',
-// }
-
-// function search(keyword, target) {
-// 	query  = keyword;
-// 	$(document).prop('title', 'Searching for ' + query);
-// 	$("#resultsDiv").append(searchingHtml());
-//
-// 	onDone = function(data){
-// 		$("#resultsDiv").children().remove();
-// 		showFilters();
-// 		processJsonResults(data);
-// 		createResultClusters();
-// 		$(document).prop('title', 'Results for ' + query);
-// 	};
-//
-// 	onFail = function(data, textStatus){
-// 		$("#resultsDiv").children().remove();
-// 		$("#resultsDiv").append(errorHtml(data, textStatus));
-// 		$(document).prop('title', 'Error on ' + query);
-// 	};
-//
-// 	//Get and process clusters
-// 	if (typeof target == 'undefined') {
-// 		$.getJSON("cluster_search_api", {query:query})
-// 		.done(onDone)
-// 		.fail(onFail);
-// 	} else {
-// 		$.getJSON("cluster_search_api", {query:query,
-// 										 target:target})
-// 		.done(onDone)
-// 		.fail(onFail);
-// 	}
-// }
-
-
-
-// function errorHtml(data, textStatus){
-// 	return $.el.div({'class':'row'},
-// 					$.el.div({'class':'col-lg-10 col-md-offset-1'},
-// 							 $.el.h3('Unfortunately an ',
-// 									 $.el.span({'class':'text-danger'},
-// 											   'error'),
-// 									 ' has occured:')),
-// 					$.el.div({'class':'row'},
-// 							 $.el.div({'class':'well well-sm col-md-10 col-md-offset-1'},
-// 									  data.responseText)));
-// }
-//
-// function noResultsHtml(query) {
-// 	return $.el.div({'class':'row'},
-// 					$.el.div({'class':'col-lg-10 col-md-offset-1'},
-// 							 $.el.h3('No results found for ',
-// 									 $.el.span({'class':'text-danger'},
-// 											   query))));
-// }
-
-function noFilterResultsHtml() {
-	return $.el.h4('No results due to filter: ',
-				   $.el.span({'class':'text-danger'},
-							 display.imageFilter));
+/*******************************************************************************
+Accurator Search
+This code loads possible search queries into the page, where the search options
+depend on the search queries loaded in the triple store.
+*******************************************************************************/
+var locale, domain, experiment, ui;
+
+function searchInit() {
+	locale = getLocale();
+	// Be domain agnostic on domain selection screen
+	domain = "generic";
+	experiment = getExperiment();
+
+	// Add language switch to navbar
+	populateFlags(locale);
+
+	onLoggedIn = function(loginData) {
+		setLinkLogo("profile");
+		onDomains = function(data){
+			//populateDomains(data);
+
+			// Get generic domain settings before populating ui
+			onDomain = function(domainSettings) {
+				ui = getUI(domainSettings, "search");
+				populateUI();
+				var userName = getUserName(loginData.user);
+				populateNavbar(userName, [{link:"profile.html", name:"Profile"}]);
+			};
+			domainSettings(domain, onDomain);
+		};
+		// Get a list of the available domain (utilities function)
+		//getAvailableDomains(onDomains);
+	};
+	// If user is not logged go to intro page
+	onDismissal = function(){document.location.href="intro.html";};
+	logUserIn(onLoggedIn, onDismissal);
 }
 
-// function showFilters() {
-// 	// console.log('Showing filters:', display.showFilters);
-// 	if(display.showFilters) {
-// 		$("#resultsDiv").append(filterAndRankButtons());
-// 	}
-// }
-
-// function processJsonResults(data) {
-// 	// Convert json to initialClusters array
-// 	var sourceClusters = data.clusters;
-// 	var numberOfClusters = sourceClusters.length;
-//
-// 	for (var i=0;i<numberOfClusters;i++) {
-// 		// Get path uris and query for the labels
-// 		var path = sourceClusters[i].path;
-// 		var numberOfItems = sourceClusters[i].results;
-// 		var items = [];
-//
-// 		for (var j=0;j<numberOfItems;j++) {
-// 			var uri = sourceClusters[i].items[j].uri;
-// 			items[j] = new item(uri);
-// 		}
-// 		initialClusters[i] = new cluster(path, items);
-// 	}
-// }
-
-// function createResultClusters() {
-// 	if(initialClusters.length == 0){
-// 		// console.log('No results found for ', query);
-// 		$("#resultsDiv").append(noResultsHtml(query));
-// 	} else {
-// 		for(var i=0;i<initialClusters.length;i++) {
-// 			$("#resultsDiv").append(clusterContainer(i));
-// 			// Append path to cluster container
-// 			addPath(i);
-// 			// Add enriched clusters and pagination
-// 			addItems(i);
-// 		}
-// 	}
-// }
-
-function addPath(clusterId) {
-	// Generate HTML cluster path
-	var pathUris = initialClusters[clusterId].path;
-	var pathElements = $.el.h4();
-	enrichedClusters[clusterId] = new cluster('undefined', 'undefined');
-
-	// Get labels from server
-	var json = {"uris":pathUris, "type":"label"};
-	$.ajax({type: "POST",
-			url: "metadata",
-			contentType: "application/json",
-			data: JSON.stringify(json),
-			success: function(labels) {
-				var path = [];
-
-				for(var i=0; i<pathUris.length; i++)
-					path[i] = {uri:pathUris[i], label:labels[i]};
+function nextPage() {
+	return function(){document.location.href="expertise.html"};
+}
 
-				// Add path to enrichedClusters for future reference
-				path.reverse();
-				enrichedClusters[clusterId].path = path;
-				$("#cluster"+clusterId).prepend(pathHtmlElements(path));
-				unfoldPathEvent("#cluster"+clusterId, path);
-		   }
-	});
+function populateUI() {
+	$.getJSON("ui_elements", {locale:locale, ui:ui, type:"labels"})
+		.done(function(labels){
+			document.title = labels.searchPageTitle;
+			$("#navbarBtnSearch").append(labels.navbarBtnSearch);
+			$("#searchHdrSlogan").append(labels.searchHdrSlogan);
+		});
 }
 
-// function pathHtmlElements(path) {
-// 	var simplePathElements = $.el.h4();
-//
-// 	//Simplified
-// 	if(path.length==0){
-// 		// Only show query in case there is no path
-// 		simplePathElements.appendChild(
-// 			$.el.span({'class':'path-label path-literal'},
-// 					  query));
-// 	} else {
-// 		simplePathElements.appendChild(
-// 			$.el.span({'class':'path-label path-property'},
-// 					  path[path.length-2].label));
-//
-// 		simplePathElements.appendChild(
-// 			$.el.span({'class':'path-label path-resource'},
-// 					  path[path.length-3].label));
-// 	}
-// 	return $.el.div({'class':'row path'},
-// 					$.el.div({'class':'col-md-12'},
-// 							 simplePathElements));
-// }
-//
-// function unfoldPathEvent(id, path) {
-// 	var pathElements = $.el.h4();
-//
-// 	if(path.length==0){
-// 		// Only show query in case there is no path
-// 		pathElements.appendChild(
-// 			$.el.span({'class':'path-label path-literal'},
-// 					  query));
-// 	} else {
-// 		for(var i=0; i<path.length; i++) {
-// 			// Label colouring
-// 			if(i==0){
-// 				pathElements.appendChild(
-// 					$.el.span({'class':'path-label path-literal'},
-// 							query));
-// 			} else if(i%2==0){
-// 				pathElements.appendChild(
-// 					$.el.span({'class':'path-label path-resource'},
-// 						path[i].label));
-// 			} else {
-// 				pathElements.appendChild(
-// 					$.el.span({'class':'path-label path-property'},
-// 						path[i].label));
-// 			}
-// 			// Add arrow if not end of path
-// 			if(!(path.length==i+1)){
-// 				pathElements.appendChild(
-// 					$.el.span({'class':'glyphicon glyphicon-arrow-right'}));
-// 			}
+// function populateDomains(domainLabels) {
+// 	var row;
+//
+// 	// Get domain settings for all the domains
+// 	for(var i=0; i<domainLabels.length; i++) {
+// 		if(!(i%2===0)) {
+// 			row = parseInt((i/2) + 0.5);
+// 			// Add a new row for every two domains
+// 			$(".domainDiv").append(
+// 				$.el.div({'class':'row',
+// 						  'id':'domain' + row}));
 // 		}
-// 	};
 //
-//
-// }
-
-// function addItems(clusterId) {
-// 	var items = initialClusters[clusterId].items;
-// 	var uris = [];
-// 	var enrichedItems = [];
-//
-// 	for(var i=0; i<items.length; i++)
-// 		uris[i] = items[i].uri;
-//
-// 	var json = {"uris":uris};
-// 	$.ajax({type: "POST",
-// 			url: "metadata",
-// 			contentType: "application/json",
-// 			data: JSON.stringify(json),
-// 			success: function(data) {
-// 				processEnrichment(data, clusterId);
-// 				// Clone cluster to enable filtering without losing information.
-// 				clusters[clusterId] = clone(enrichedClusters[clusterId]);
-// 				filterCluster(clusters[clusterId]);
-// 				if(clusters[clusterId].items.length==0) {
-// 					$("#cluster"+clusterId).append(noFilterResultsHtml());
-// 				} else {
-// 					var pages = determineNumberOfPages(clusterId);
-// 					$("#cluster"+clusterId).append(pagination(pages, clusterId));
-// 					thumbnails(clusterId);
+// 		// Add domain specific html to rows
+// 		$.getJSON("domains", {domain:domainLabels[i]})
+// 			.done(function(data){
+// 				if(!(data.domain === "generic")) {
+// 					domainHtml(data, row);
 // 				}
-// 		   }
-// 	});
-// }
-//
-// function processEnrichment(data, clusterId) {
-// 	var items = [];
-//
-// 	for(var i=0; i<data.length; i++) {
-// 		var uri = data[i].uri;
-// 		var thumb = data[i].thumb;
-// 		var link = "annotate.html?uri=" + uri;
-// 		var title = truncate(data[i].title, 60);
-// 		items[i] = new item(uri, thumb, link, title);
-// 	}
-// 	// Add items to enrichedClusters for future reference
-// 	enrichedClusters[clusterId].items = items;
-// }
-// function determineNumberOfPages (clusterId) {
-// 	var numberOfPages = 0;
-// 	var numberOfItems = clusters[clusterId].items.length;
-// 	var restPages = numberOfItems%display.numberDisplayedItems;
-//
-// 	//Determine number of items in pagination
-// 	if(restPages == 0) {
-// 		numberOfPages = numberOfItems/display.numberDisplayedItems;
-// 	} else {
-// 		numberOfPages = (numberOfItems-restPages)/display.numberDisplayedItems+1;
+// 			});
 // 	}
-// 	return numberOfPages;
-// }
-
-// function filterAndRankButtons() {
-// 	return $.el.div({'class':'row'},
-// 					$.el.div({'class':'col-md-12 filters'},
-// 							 filterButtons()));
-// 							 //rankButtons()));
 // }
 
-// function filterButtons() {
-// 	return $.el.div({'class':'btn-group'},
-// 			 	    $.el.button({'type':'button',
-// 								 'class':'btn btn-default dropdown-toggle',
-// 							     'data-toggle':'dropdown'},
-// 							     'Image Filter ',
-// 							    $.el.span({'class':'caret'})),
-// 				    $.el.ul({'class':'dropdown-menu',
-// 						     'role':'menu'},
-// 						     $.el.li(
-// 									 $.el.a({'href':'javascript:filterTrigger(\'onlyImages\')'},
-// 										     'Only Images'),
-// 									 $.el.a({'href':'javascript:filterTrigger(\'allObjects\')'},
-// 										     'All Objects'))));
-// }
-//
-// function rankButtons() {
-// 	return $.el.div({'class':'btn-group'},
-// 					$.el.button({'type':'button',
-// 								'class':'btn btn-default dropdown-toggle',
-// 								'data-toggle':'dropdown'},
-// 								'Cluster Abstraction ',
-// 								$.el.span({'class':'caret'})),
-// 					$.el.ul({'class':'dropdown-menu',
-// 							 'role':'menu'},
-// 							 $.el.li(
-// 									 $.el.a({'href':'javascript:clusterAbstractionTrigger(\'instanceLevel\')'},
-// 											 'Instance Level'),
-// 									 $.el.a({'href':'javascript:clusterAbstractionTrigger(\'classLevel\')'},
-// 											 'Class Level'),
-// 									 $.el.a({'href':'javascript:clusterAbstractionTrigger(\'whatLevel\')'},
-// 											 'Who What Where'))));
-// }
-//
-// function filterTrigger(type) {
-// 	var changeShownContent = false;
-// 	// console.log('Filtering type: ', type);
-// 	if(type == 'onlyImages' && !(display.imageFilter == 'onlyImages')) {
-// 		display.imageFilter = 'onlyImages';
-// 		changeShownContent = true;
-// 	}
-// 	if(type == 'allObjects'  && !(display.imageFilter == 'allObjects')) {
-// 		display.imageFilter = 'allObjects';
-// 		changeShownContent = true;
-// 	}
-// 	// console.log('Should change something', changeShownContent);
-// 	if(changeShownContent) {
-// 		clusters = clone(enrichedClusters);
-// 		filter();
-// 		updateClusters();
-// 	}
-// }
-//
-// function clusterAbstractionTrigger(type) {
-// 	var changeClusterAbstraction = false;
-// 	if(type == 'instanceLevel' && !(display.imageFilter == 'instanceLevel')) {
-// 		display.imageFilter = 'instanceLevel';
-// 		changeClusterAbstraction = true;
-// 	}
-// 	if(type == 'classLevel'  && !(display.imageFilter == 'classLevel')) {
-// 		display.imageFilter = 'classLevel';
-// 		changeClusterAbstraction = true;
-// 	}
-// 	if(type == 'whatLevel'  && !(display.imageFilter == 'whatLevel')) {
-// 		display.imageFilter = 'whatLevel';
-// 		changeClusterAbstraction = true;
-// 	}
-// 	if(changeClusterAbstraction) {
-// 		// console.log("Should be changing the Cluster Abstraction Level");
-// 		updateClusters();
-// 	}
-// }
-
-function updateClusters() {
-	for(var i=0; i<clusters.length; i++) {
-		// console.log('Adding clusters', clusters);
-		if(clusters[i].items.length==0) {
-			$("#cluster"+i).children().remove();
-			$("#cluster"+i).append(pathHtmlElements(clusters[i].path, i));
-			$("#cluster"+i).append(noFilterResultsHtml());
-		} else {
-			$("#cluster"+i).children().remove();;
-			$("#cluster"+i).append(pathHtmlElements(clusters[i].path, i));
-			var pages = determineNumberOfPages(i);
-			$("#cluster"+i).append(pagination(pages, i));
-			$("#cluster"+i).append(thumbnails(i));
-		}
-	}
-}
-
-function filter() {
-	if(display.imageFilter == 'onlyImages') {
-		// console.log('Filtering out objects without image');
-		// Remove all items without an image (read: with a stub)
-		for(var i=0; i<clusters.length; i++) {
-			filterCluster(clusters[i]);
-		}
-	}
-}
-
-function filterCluster(cluster) {
-	if(display.imageFilter == 'onlyImages') {
-		// Remove all items without an image (read: with a stub)
-		var items = cluster.items;
-		// Check which items should be removed
-		for(var i=0; i<items.length; i++) {
-			if(items[i].thumb.substring(items[i].thumb.length-8) == "stub.png") {
-				items.splice(i, 1);
-				// Move the index one back because of removal
-				i--;
-			}
-		}
-	}
-}
-
-function rankClusters() {
-	// Sort on size for now
-	// console.log("Custers: " + clusters);
-	clusters.sort(compareClusterSize);
-}
-
-function compareClusterSize(a, b) {
-	if (a.items.length < b.items.length) return 1;
-	if (a.items.length > b.items.length) return -1;
-	return 0;
-}
-
-function cluster(path, items) {
-	this.path = path;
-	this.items = items;
-}
-
-function item(uri, thumb, link, title) {
-	this.uri = uri;
-	this.thumb = thumb;
-	this.link = link;
-	this.title = title;
-}
-
-function clone(obj) {
-    // Handle the 3 simple types, and null or undefined
-    if (null == obj || "object" != typeof obj) return obj;
-    // Handle Date
-    if (obj instanceof Date) {
-        var copy = new Date();
-        copy.setTime(obj.getTime());
-        return copy;
-    }
-    // Handle Array
-    if (obj instanceof Array) {
-        var copy = [];
-        for (var i = 0, len = obj.length; i < len; i++) {
-            copy[i] = clone(obj[i]);
-        }
-        return copy;
-    }
-    // Handle Object
-    if (obj instanceof Object) {
-        var copy = {};
-        for (var attr in obj) {
-            if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
-        }
-        return copy;
-    }
-    throw new Error("Unable to copy obj! Its type isn't supported.");
-}
-
-// function truncate (string, limit) {
-// 	var chars;
-// 	var i;
-//
-// 	chars = string.split('');
-// 	if (chars.length > limit) {
-// 		for (var i=chars.length - 1; i>-1; --i) {
-// 			if (i>limit) {
-// 				chars.length = i;
-// 			}
-// 			else if (' ' === chars[i]) {
-// 				chars.length = i;
-// 				break;
-// 			}
-// 		}
-// 		chars.push('...');
-// 	}
-// 	return chars.join('');
-// }
-
-// function setGlobalQuery(keyword) {
-// 	query = keyword;
-// }
+// function domainHtml(domainData, row) {
+// 	var domain = domainData.domain;
+// 	$.getJSON("ui_elements",
+// 			  {locale:locale,
+// 			   ui:domainData.ui + "domain",
+// 			   type:"labels"})
+// 		.done(function(data){
+// 			$("#domain" + row).append(
+// 				$.el.div({'class':'noPadding col-md-6'},
+// 					$.el.h3({'class':'domainHdr',
+// 							 'id':'domainTxt' + domain},
+// 							 data.domainLabel),
+// 					$.el.img({'class':'domainImg',
+// 							  'id':'domainImg' + domain,
+// 							  'src':domainData.image})));
+// 			if(domainData.image_brightness === "dark")
+// 				$("#domainTxt" + domainData.domain).css('color', '#fff');
+// 			addDomainEvent(domain);
+// 		});
+// }
+//
+// function addDomainEvent(domain) {
+// 	$("#domainImg"+domain).click(function() {
+// 		setDomain(domain, nextPage());
+// 	});
+// 	$("#domainTxt"+domain).click(function() {
+// 		setDomain(domain, nextPage());
+// 	});
+//}
diff --git a/web/js/thumbnail.js b/web/js/thumbnail.js
deleted file mode 100644
index fc6cade..0000000
--- a/web/js/thumbnail.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/******************************************************************************
-Thumbnail
-
-Code for initializing bootstrap thumbnails and handling changes
-*******************************************************************************/
-
-// Add thumbnails for a cluster
-function thumbnails(clusterId) {
-	var items = clusters[clusterId].items;
-	var stop = display.numberDisplayedItems;
-	var bootstrapWidth = parseInt(12/display.numberDisplayedItems, 10);
-
-	// check if less results available then there are to be displayed
-	if(items.length < stop){
-		stop = items.length;
-	}
-
-	// add row
-	$("#cluster" + clusterId).append(
-		$.el.div({'class':'row', 'id':'thumbnailRow' + clusterId}));
-
-	for (var i = 0; i < stop; i++) {
-		id = getId(items[i].uri);
-		$("#thumbnailRow" + clusterId).append(thumbnail(items[i]));
-		addClickEvent(id, items[i].link, clusterId, i);
-	}
-}
-
-// Retrieves the item id from the uri string
-// Allow characters in the uri that won't trip up jQuery
-function getId(uri) {
-	var dirtyId = uri.substr(uri.lastIndexOf('/') + 1);
-	var id = dirtyId.replace(/[^\w\-]/gi, '');
-	return id;
-}
-
-// Generate HTML for adding a thumbnail for an item
-function thumbnail(item) {
-	var id = getId(item.uri);
-	var bootstrapWidth = parseInt(12/display.numberDisplayedItems, 10);
-
-	return $.el.div({'class':'col-md-' + bootstrapWidth},
-				$.el.div({'class':'thumbnail',
-						  'id':id},
-					$.el.img({'src':item.thumb,
-							  'class':'img-responsive',
-							  'alt':''}),
-						$.el.div({'class':'caption'},
-							 thumbnailTitle(item, bootstrapWidth))));
-}
-
-// Retrieves the title of an item and sizes it accordingly
-function thumbnailTitle(item, bootstrapWidth) {
-	//Make header depent on size thumbnail
-	if(bootstrapWidth < 4)
-		return $.el.h5(item.title);
-	if(bootstrapWidth >= 4)
-		return $.el.h4(item.title);
-}
-
-// Add thumbnail click event
-function addClickEvent(id, link, clusterId, index) {
-	$("#cluster" + clusterId  + " #" + id).click(function() {
-		//Add info to local storage to be able to save context
-		localStorage.setItem("itemIndex", index);
-		localStorage.setItem("clusterId", clusterId);
-		localStorage.setItem("currentCluster", JSON.stringify(clusters[clusterId]));
-		//TODO check here
-		// if((clusterId+1) == clusters.length)
-		// 	localStorage.setItem("query", "random");
-		document.location.href = link;
-	});
-}
-
-function changeThumbnails(pageNumber, activePage, numberOfPages, items, labelItems, clusterId) {
-	var bootstrapWidth = parseInt(12/display.numberDisplayedItems, 10);
-	//var items = clusters[clusterId].items;
-	var start = (pageNumber - 1) * display.numberDisplayedItems;
-	var stop = start + display.numberDisplayedItems;
-	var remove = 0;
-	var headerType;
-
-	// Check if there are more spaces then items, if so, make those spaces invisible
-	if(stop > items.length){
-		remove = stop - items.length;
-		stop = items.length;
-		// console.log("Should make " + remove + " invisible.");
-	}
-
-	// console.log("start: " + start + " stop: " + stop + " page number: " + pageNumber + " current page: " + activePage + " cluster id: " + clusterId + " displayed: " + display.numberDisplayedItems + " remove: " + remove);
-	var thumbIndex = 0;
-	for (var i=start; i<stop; i++) {
-		// console.log("Replacing thumb", thumbIndex);
-		// Replace image
-		// $("#" + labelItems + clusterId + " img").eq(thumbIndex).replaceWith(
-		$("#" + labelItems + " img").eq(thumbIndex).replaceWith(
-			$.el.img({'src':items[i].thumb,
-					  'class':'img-responsive',
-					  'alt':''}));
-		// Replace title
-		if(bootstrapWidth < 4)
-			headerType = "h5";
-		if(bootstrapWidth >= 4)
-			headerType = "h4";
-
-		// $("#" + labelItems + clusterId + " .caption " + headerType).eq(thumbIndex).replaceWith(
-		$("#" + labelItems + " .caption " + headerType).eq(thumbIndex).replaceWith(
-				thumbnailTitle(items[i], bootstrapWidth));
-
-		// Replace id element and add new listener
-		id = getId(items[i].uri)
-		// $("#" + labelItems + clusterId + " .thumbnail").eq(thumbIndex).attr("id", id);
-		$("#" + labelItems + " .thumbnail").eq(thumbIndex).attr("id", id);
-		addClickEvent(id, items[i].link, clusterId, i);
-		thumbIndex++;
-	}
-
-	// If returning from a possible invisible situation, make everything visible again
-	if(activePage == numberOfPages) {
-		var removed = numberOfPages * display.numberDisplayedItems - items.length;
-		// console.log("Make " + removed + " thumbnail(s) visible again.");
-		var start = display.numberDisplayedItems - removed;
-		for(var i = start;i < display.numberDisplayedItems; i++) {
-			// $("#" + labelItems + clusterId + " .col-md-" + bootstrapWidth).eq(i).show();
-			$("#" + labelItems + " .col-md-" + bootstrapWidth).eq(i).show();
-		}
-	}
-
-	// Don't display unused thumbspace
-	for (var i = thumbIndex; i < thumbIndex+remove; i++) {
-		// Remove slow?
-		// $("#" + labelItems + clusterId + " .col-md-" + bootstrapWidth).eq(i).hide();
-		$("#" + labelItems + " .col-md-" + bootstrapWidth).eq(i).hide();
-	}
-}
diff --git a/web/js/typeahead.js b/web/js/typeahead.js
deleted file mode 100644
index bb0c8ae..0000000
--- a/web/js/typeahead.js
+++ /dev/null
@@ -1,2451 +0,0 @@
-/*!
- * typeahead.js 0.11.1
- * https://github.com/twitter/typeahead.js
- * Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
- */
-
-(function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define("bloodhound", [ "jquery" ], function(a0) {
-            return root["Bloodhound"] = factory(a0);
-        });
-    } else if (typeof exports === "object") {
-        module.exports = factory(require("jquery"));
-    } else {
-        root["Bloodhound"] = factory(jQuery);
-    }
-})(this, function($) {
-    var _ = function() {
-        "use strict";
-        return {
-            isMsie: function() {
-                return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
-            },
-            isBlankString: function(str) {
-                return !str || /^\s*$/.test(str);
-            },
-            escapeRegExChars: function(str) {
-                return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
-            },
-            isString: function(obj) {
-                return typeof obj === "string";
-            },
-            isNumber: function(obj) {
-                return typeof obj === "number";
-            },
-            isArray: $.isArray,
-            isFunction: $.isFunction,
-            isObject: $.isPlainObject,
-            isUndefined: function(obj) {
-                return typeof obj === "undefined";
-            },
-            isElement: function(obj) {
-                return !!(obj && obj.nodeType === 1);
-            },
-            isJQuery: function(obj) {
-                return obj instanceof $;
-            },
-            toStr: function toStr(s) {
-                return _.isUndefined(s) || s === null ? "" : s + "";
-            },
-            bind: $.proxy,
-            each: function(collection, cb) {
-                $.each(collection, reverseArgs);
-                function reverseArgs(index, value) {
-                    return cb(value, index);
-                }
-            },
-            map: $.map,
-            filter: $.grep,
-            every: function(obj, test) {
-                var result = true;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (!(result = test.call(null, val, key, obj))) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            some: function(obj, test) {
-                var result = false;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (result = test.call(null, val, key, obj)) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            mixin: $.extend,
-            identity: function(x) {
-                return x;
-            },
-            clone: function(obj) {
-                return $.extend(true, {}, obj);
-            },
-            getIdGenerator: function() {
-                var counter = 0;
-                return function() {
-                    return counter++;
-                };
-            },
-            templatify: function templatify(obj) {
-                return $.isFunction(obj) ? obj : template;
-                function template() {
-                    return String(obj);
-                }
-            },
-            defer: function(fn) {
-                setTimeout(fn, 0);
-            },
-            debounce: function(func, wait, immediate) {
-                var timeout, result;
-                return function() {
-                    var context = this, args = arguments, later, callNow;
-                    later = function() {
-                        timeout = null;
-                        if (!immediate) {
-                            result = func.apply(context, args);
-                        }
-                    };
-                    callNow = immediate && !timeout;
-                    clearTimeout(timeout);
-                    timeout = setTimeout(later, wait);
-                    if (callNow) {
-                        result = func.apply(context, args);
-                    }
-                    return result;
-                };
-            },
-            throttle: function(func, wait) {
-                var context, args, timeout, result, previous, later;
-                previous = 0;
-                later = function() {
-                    previous = new Date();
-                    timeout = null;
-                    result = func.apply(context, args);
-                };
-                return function() {
-                    var now = new Date(), remaining = wait - (now - previous);
-                    context = this;
-                    args = arguments;
-                    if (remaining <= 0) {
-                        clearTimeout(timeout);
-                        timeout = null;
-                        previous = now;
-                        result = func.apply(context, args);
-                    } else if (!timeout) {
-                        timeout = setTimeout(later, remaining);
-                    }
-                    return result;
-                };
-            },
-            stringify: function(val) {
-                return _.isString(val) ? val : JSON.stringify(val);
-            },
-            noop: function() {}
-        };
-    }();
-    var VERSION = "0.11.1";
-    var tokenizers = function() {
-        "use strict";
-        return {
-            nonword: nonword,
-            whitespace: whitespace,
-            obj: {
-                nonword: getObjTokenizer(nonword),
-                whitespace: getObjTokenizer(whitespace)
-            }
-        };
-        function whitespace(str) {
-            str = _.toStr(str);
-            return str ? str.split(/\s+/) : [];
-        }
-        function nonword(str) {
-            str = _.toStr(str);
-            return str ? str.split(/\W+/) : [];
-        }
-        function getObjTokenizer(tokenizer) {
-            return function setKey(keys) {
-                keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0);
-                return function tokenize(o) {
-                    var tokens = [];
-                    _.each(keys, function(k) {
-                        tokens = tokens.concat(tokenizer(_.toStr(o[k])));
-                    });
-                    return tokens;
-                };
-            };
-        }
-    }();
-    var LruCache = function() {
-        "use strict";
-        function LruCache(maxSize) {
-            this.maxSize = _.isNumber(maxSize) ? maxSize : 100;
-            this.reset();
-            if (this.maxSize <= 0) {
-                this.set = this.get = $.noop;
-            }
-        }
-        _.mixin(LruCache.prototype, {
-            set: function set(key, val) {
-                var tailItem = this.list.tail, node;
-                if (this.size >= this.maxSize) {
-                    this.list.remove(tailItem);
-                    delete this.hash[tailItem.key];
-                    this.size--;
-                }
-                if (node = this.hash[key]) {
-                    node.val = val;
-                    this.list.moveToFront(node);
-                } else {
-                    node = new Node(key, val);
-                    this.list.add(node);
-                    this.hash[key] = node;
-                    this.size++;
-                }
-            },
-            get: function get(key) {
-                var node = this.hash[key];
-                if (node) {
-                    this.list.moveToFront(node);
-                    return node.val;
-                }
-            },
-            reset: function reset() {
-                this.size = 0;
-                this.hash = {};
-                this.list = new List();
-            }
-        });
-        function List() {
-            this.head = this.tail = null;
-        }
-        _.mixin(List.prototype, {
-            add: function add(node) {
-                if (this.head) {
-                    node.next = this.head;
-                    this.head.prev = node;
-                }
-                this.head = node;
-                this.tail = this.tail || node;
-            },
-            remove: function remove(node) {
-                node.prev ? node.prev.next = node.next : this.head = node.next;
-                node.next ? node.next.prev = node.prev : this.tail = node.prev;
-            },
-            moveToFront: function(node) {
-                this.remove(node);
-                this.add(node);
-            }
-        });
-        function Node(key, val) {
-            this.key = key;
-            this.val = val;
-            this.prev = this.next = null;
-        }
-        return LruCache;
-    }();
-    var PersistentStorage = function() {
-        "use strict";
-        var LOCAL_STORAGE;
-        try {
-            LOCAL_STORAGE = window.localStorage;
-            LOCAL_STORAGE.setItem("~~~", "!");
-            LOCAL_STORAGE.removeItem("~~~");
-        } catch (err) {
-            LOCAL_STORAGE = null;
-        }
-        function PersistentStorage(namespace, override) {
-            this.prefix = [ "__", namespace, "__" ].join("");
-            this.ttlKey = "__ttl__";
-            this.keyMatcher = new RegExp("^" + _.escapeRegExChars(this.prefix));
-            this.ls = override || LOCAL_STORAGE;
-            !this.ls && this._noop();
-        }
-        _.mixin(PersistentStorage.prototype, {
-            _prefix: function(key) {
-                return this.prefix + key;
-            },
-            _ttlKey: function(key) {
-                return this._prefix(key) + this.ttlKey;
-            },
-            _noop: function() {
-                this.get = this.set = this.remove = this.clear = this.isExpired = _.noop;
-            },
-            _safeSet: function(key, val) {
-                try {
-                    this.ls.setItem(key, val);
-                } catch (err) {
-                    if (err.name === "QuotaExceededError") {
-                        this.clear();
-                        this._noop();
-                    }
-                }
-            },
-            get: function(key) {
-                if (this.isExpired(key)) {
-                    this.remove(key);
-                }
-                return decode(this.ls.getItem(this._prefix(key)));
-            },
-            set: function(key, val, ttl) {
-                if (_.isNumber(ttl)) {
-                    this._safeSet(this._ttlKey(key), encode(now() + ttl));
-                } else {
-                    this.ls.removeItem(this._ttlKey(key));
-                }
-                return this._safeSet(this._prefix(key), encode(val));
-            },
-            remove: function(key) {
-                this.ls.removeItem(this._ttlKey(key));
-                this.ls.removeItem(this._prefix(key));
-                return this;
-            },
-            clear: function() {
-                var i, keys = gatherMatchingKeys(this.keyMatcher);
-                for (i = keys.length; i--; ) {
-                    this.remove(keys[i]);
-                }
-                return this;
-            },
-            isExpired: function(key) {
-                var ttl = decode(this.ls.getItem(this._ttlKey(key)));
-                return _.isNumber(ttl) && now() > ttl ? true : false;
-            }
-        });
-        return PersistentStorage;
-        function now() {
-            return new Date().getTime();
-        }
-        function encode(val) {
-            return JSON.stringify(_.isUndefined(val) ? null : val);
-        }
-        function decode(val) {
-            return $.parseJSON(val);
-        }
-        function gatherMatchingKeys(keyMatcher) {
-            var i, key, keys = [], len = LOCAL_STORAGE.length;
-            for (i = 0; i < len; i++) {
-                if ((key = LOCAL_STORAGE.key(i)).match(keyMatcher)) {
-                    keys.push(key.replace(keyMatcher, ""));
-                }
-            }
-            return keys;
-        }
-    }();
-    var Transport = function() {
-        "use strict";
-        var pendingRequestsCount = 0, pendingRequests = {}, maxPendingRequests = 6, sharedCache = new LruCache(10);
-        function Transport(o) {
-            o = o || {};
-            this.cancelled = false;
-            this.lastReq = null;
-            this._send = o.transport;
-            this._get = o.limiter ? o.limiter(this._get) : this._get;
-            this._cache = o.cache === false ? new LruCache(0) : sharedCache;
-        }
-        Transport.setMaxPendingRequests = function setMaxPendingRequests(num) {
-            maxPendingRequests = num;
-        };
-        Transport.resetCache = function resetCache() {
-            sharedCache.reset();
-        };
-        _.mixin(Transport.prototype, {
-            _fingerprint: function fingerprint(o) {
-                o = o || {};
-                return o.url + o.type + $.param(o.data || {});
-            },
-            _get: function(o, cb) {
-                var that = this, fingerprint, jqXhr;
-                fingerprint = this._fingerprint(o);
-                if (this.cancelled || fingerprint !== this.lastReq) {
-                    return;
-                }
-                if (jqXhr = pendingRequests[fingerprint]) {
-                    jqXhr.done(done).fail(fail);
-                } else if (pendingRequestsCount < maxPendingRequests) {
-                    pendingRequestsCount++;
-                    pendingRequests[fingerprint] = this._send(o).done(done).fail(fail).always(always);
-                } else {
-                    this.onDeckRequestArgs = [].slice.call(arguments, 0);
-                }
-                function done(resp) {
-                    cb(null, resp);
-                    that._cache.set(fingerprint, resp);
-                }
-                function fail() {
-                    cb(true);
-                }
-                function always() {
-                    pendingRequestsCount--;
-                    delete pendingRequests[fingerprint];
-                    if (that.onDeckRequestArgs) {
-                        that._get.apply(that, that.onDeckRequestArgs);
-                        that.onDeckRequestArgs = null;
-                    }
-                }
-            },
-            get: function(o, cb) {
-                var resp, fingerprint;
-                cb = cb || $.noop;
-                o = _.isString(o) ? {
-                    url: o
-                } : o || {};
-                fingerprint = this._fingerprint(o);
-                this.cancelled = false;
-                this.lastReq = fingerprint;
-                if (resp = this._cache.get(fingerprint)) {
-                    cb(null, resp);
-                } else {
-                    this._get(o, cb);
-                }
-            },
-            cancel: function() {
-                this.cancelled = true;
-            }
-        });
-        return Transport;
-    }();
-    var SearchIndex = window.SearchIndex = function() {
-        "use strict";
-        var CHILDREN = "c", IDS = "i";
-        function SearchIndex(o) {
-            o = o || {};
-            if (!o.datumTokenizer || !o.queryTokenizer) {
-                $.error("datumTokenizer and queryTokenizer are both required");
-            }
-            this.identify = o.identify || _.stringify;
-            this.datumTokenizer = o.datumTokenizer;
-            this.queryTokenizer = o.queryTokenizer;
-            this.reset();
-        }
-        _.mixin(SearchIndex.prototype, {
-            bootstrap: function bootstrap(o) {
-                this.datums = o.datums;
-                this.trie = o.trie;
-            },
-            add: function(data) {
-                var that = this;
-                data = _.isArray(data) ? data : [ data ];
-                _.each(data, function(datum) {
-                    var id, tokens;
-                    that.datums[id = that.identify(datum)] = datum;
-                    tokens = normalizeTokens(that.datumTokenizer(datum));
-                    _.each(tokens, function(token) {
-                        var node, chars, ch;
-                        node = that.trie;
-                        chars = token.split("");
-                        while (ch = chars.shift()) {
-                            node = node[CHILDREN][ch] || (node[CHILDREN][ch] = newNode());
-                            node[IDS].push(id);
-                        }
-                    });
-                });
-            },
-            get: function get(ids) {
-                var that = this;
-                return _.map(ids, function(id) {
-                    return that.datums[id];
-                });
-            },
-            search: function search(query) {
-                var that = this, tokens, matches;
-                tokens = normalizeTokens(this.queryTokenizer(query));
-                _.each(tokens, function(token) {
-                    var node, chars, ch, ids;
-                    if (matches && matches.length === 0) {
-                        return false;
-                    }
-                    node = that.trie;
-                    chars = token.split("");
-                    while (node && (ch = chars.shift())) {
-                        node = node[CHILDREN][ch];
-                    }
-                    if (node && chars.length === 0) {
-                        ids = node[IDS].slice(0);
-                        matches = matches ? getIntersection(matches, ids) : ids;
-                    } else {
-                        matches = [];
-                        return false;
-                    }
-                });
-                return matches ? _.map(unique(matches), function(id) {
-                    return that.datums[id];
-                }) : [];
-            },
-            all: function all() {
-                var values = [];
-                for (var key in this.datums) {
-                    values.push(this.datums[key]);
-                }
-                return values;
-            },
-            reset: function reset() {
-                this.datums = {};
-                this.trie = newNode();
-            },
-            serialize: function serialize() {
-                return {
-                    datums: this.datums,
-                    trie: this.trie
-                };
-            }
-        });
-        return SearchIndex;
-        function normalizeTokens(tokens) {
-            tokens = _.filter(tokens, function(token) {
-                return !!token;
-            });
-            tokens = _.map(tokens, function(token) {
-                return token.toLowerCase();
-            });
-            return tokens;
-        }
-        function newNode() {
-            var node = {};
-            node[IDS] = [];
-            node[CHILDREN] = {};
-            return node;
-        }
-        function unique(array) {
-            var seen = {}, uniques = [];
-            for (var i = 0, len = array.length; i < len; i++) {
-                if (!seen[array[i]]) {
-                    seen[array[i]] = true;
-                    uniques.push(array[i]);
-                }
-            }
-            return uniques;
-        }
-        function getIntersection(arrayA, arrayB) {
-            var ai = 0, bi = 0, intersection = [];
-            arrayA = arrayA.sort();
-            arrayB = arrayB.sort();
-            var lenArrayA = arrayA.length, lenArrayB = arrayB.length;
-            while (ai < lenArrayA && bi < lenArrayB) {
-                if (arrayA[ai] < arrayB[bi]) {
-                    ai++;
-                } else if (arrayA[ai] > arrayB[bi]) {
-                    bi++;
-                } else {
-                    intersection.push(arrayA[ai]);
-                    ai++;
-                    bi++;
-                }
-            }
-            return intersection;
-        }
-    }();
-    var Prefetch = function() {
-        "use strict";
-        var keys;
-        keys = {
-            data: "data",
-            protocol: "protocol",
-            thumbprint: "thumbprint"
-        };
-        function Prefetch(o) {
-            this.url = o.url;
-            this.ttl = o.ttl;
-            this.cache = o.cache;
-            this.prepare = o.prepare;
-            this.transform = o.transform;
-            this.transport = o.transport;
-            this.thumbprint = o.thumbprint;
-            this.storage = new PersistentStorage(o.cacheKey);
-        }
-        _.mixin(Prefetch.prototype, {
-            _settings: function settings() {
-                return {
-                    url: this.url,
-                    type: "GET",
-                    dataType: "json"
-                };
-            },
-            store: function store(data) {
-                if (!this.cache) {
-                    return;
-                }
-                this.storage.set(keys.data, data, this.ttl);
-                this.storage.set(keys.protocol, location.protocol, this.ttl);
-                this.storage.set(keys.thumbprint, this.thumbprint, this.ttl);
-            },
-            fromCache: function fromCache() {
-                var stored = {}, isExpired;
-                if (!this.cache) {
-                    return null;
-                }
-                stored.data = this.storage.get(keys.data);
-                stored.protocol = this.storage.get(keys.protocol);
-                stored.thumbprint = this.storage.get(keys.thumbprint);
-                isExpired = stored.thumbprint !== this.thumbprint || stored.protocol !== location.protocol;
-                return stored.data && !isExpired ? stored.data : null;
-            },
-            fromNetwork: function(cb) {
-                var that = this, settings;
-                if (!cb) {
-                    return;
-                }
-                settings = this.prepare(this._settings());
-                this.transport(settings).fail(onError).done(onResponse);
-                function onError() {
-                    cb(true);
-                }
-                function onResponse(resp) {
-                    cb(null, that.transform(resp));
-                }
-            },
-            clear: function clear() {
-                this.storage.clear();
-                return this;
-            }
-        });
-        return Prefetch;
-    }();
-    var Remote = function() {
-        "use strict";
-        function Remote(o) {
-            this.url = o.url;
-            this.prepare = o.prepare;
-            this.transform = o.transform;
-            this.transport = new Transport({
-                cache: o.cache,
-                limiter: o.limiter,
-                transport: o.transport
-            });
-        }
-        _.mixin(Remote.prototype, {
-            _settings: function settings() {
-                return {
-                    url: this.url,
-                    type: "GET",
-                    dataType: "json"
-                };
-            },
-            get: function get(query, cb) {
-                var that = this, settings;
-                if (!cb) {
-                    return;
-                }
-                query = query || "";
-                settings = this.prepare(query, this._settings());
-                return this.transport.get(settings, onResponse);
-                function onResponse(err, resp) {
-                    err ? cb([]) : cb(that.transform(resp));
-                }
-            },
-            cancelLastRequest: function cancelLastRequest() {
-                this.transport.cancel();
-            }
-        });
-        return Remote;
-    }();
-    var oParser = function() {
-        "use strict";
-        return function parse(o) {
-            var defaults, sorter;
-            defaults = {
-                initialize: true,
-                identify: _.stringify,
-                datumTokenizer: null,
-                queryTokenizer: null,
-                sufficient: 5,
-                sorter: null,
-                local: [],
-                prefetch: null,
-                remote: null
-            };
-            o = _.mixin(defaults, o || {});
-            !o.datumTokenizer && $.error("datumTokenizer is required");
-            !o.queryTokenizer && $.error("queryTokenizer is required");
-            sorter = o.sorter;
-            o.sorter = sorter ? function(x) {
-                return x.sort(sorter);
-            } : _.identity;
-            o.local = _.isFunction(o.local) ? o.local() : o.local;
-            o.prefetch = parsePrefetch(o.prefetch);
-            o.remote = parseRemote(o.remote);
-            return o;
-        };
-        function parsePrefetch(o) {
-            var defaults;
-            if (!o) {
-                return null;
-            }
-            defaults = {
-                url: null,
-                ttl: 24 * 60 * 60 * 1e3,
-                cache: true,
-                cacheKey: null,
-                thumbprint: "",
-                prepare: _.identity,
-                transform: _.identity,
-                transport: null
-            };
-            o = _.isString(o) ? {
-                url: o
-            } : o;
-            o = _.mixin(defaults, o);
-            !o.url && $.error("prefetch requires url to be set");
-            o.transform = o.filter || o.transform;
-            o.cacheKey = o.cacheKey || o.url;
-            o.thumbprint = VERSION + o.thumbprint;
-            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
-            return o;
-        }
-        function parseRemote(o) {
-            var defaults;
-            if (!o) {
-                return;
-            }
-            defaults = {
-                url: null,
-                cache: true,
-                prepare: null,
-                replace: null,
-                wildcard: null,
-                limiter: null,
-                rateLimitBy: "debounce",
-                rateLimitWait: 300,
-                transform: _.identity,
-                transport: null
-            };
-            o = _.isString(o) ? {
-                url: o
-            } : o;
-            o = _.mixin(defaults, o);
-            !o.url && $.error("remote requires url to be set");
-            o.transform = o.filter || o.transform;
-            o.prepare = toRemotePrepare(o);
-            o.limiter = toLimiter(o);
-            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
-            delete o.replace;
-            delete o.wildcard;
-            delete o.rateLimitBy;
-            delete o.rateLimitWait;
-            return o;
-        }
-        function toRemotePrepare(o) {
-            var prepare, replace, wildcard;
-            prepare = o.prepare;
-            replace = o.replace;
-            wildcard = o.wildcard;
-            if (prepare) {
-                return prepare;
-            }
-            if (replace) {
-                prepare = prepareByReplace;
-            } else if (o.wildcard) {
-                prepare = prepareByWildcard;
-            } else {
-                prepare = idenityPrepare;
-            }
-            return prepare;
-            function prepareByReplace(query, settings) {
-                settings.url = replace(settings.url, query);
-                return settings;
-            }
-            function prepareByWildcard(query, settings) {
-                settings.url = settings.url.replace(wildcard, encodeURIComponent(query));
-                return settings;
-            }
-            function idenityPrepare(query, settings) {
-                return settings;
-            }
-        }
-        function toLimiter(o) {
-            var limiter, method, wait;
-            limiter = o.limiter;
-            method = o.rateLimitBy;
-            wait = o.rateLimitWait;
-            if (!limiter) {
-                limiter = /^throttle$/i.test(method) ? throttle(wait) : debounce(wait);
-            }
-            return limiter;
-            function debounce(wait) {
-                return function debounce(fn) {
-                    return _.debounce(fn, wait);
-                };
-            }
-            function throttle(wait) {
-                return function throttle(fn) {
-                    return _.throttle(fn, wait);
-                };
-            }
-        }
-        function callbackToDeferred(fn) {
-            return function wrapper(o) {
-                var deferred = $.Deferred();
-                fn(o, onSuccess, onError);
-                return deferred;
-                function onSuccess(resp) {
-                    _.defer(function() {
-                        deferred.resolve(resp);
-                    });
-                }
-                function onError(err) {
-                    _.defer(function() {
-                        deferred.reject(err);
-                    });
-                }
-            };
-        }
-    }();
-    var Bloodhound = function() {
-        "use strict";
-        var old;
-        old = window && window.Bloodhound;
-        function Bloodhound(o) {
-            o = oParser(o);
-            this.sorter = o.sorter;
-            this.identify = o.identify;
-            this.sufficient = o.sufficient;
-            this.local = o.local;
-            this.remote = o.remote ? new Remote(o.remote) : null;
-            this.prefetch = o.prefetch ? new Prefetch(o.prefetch) : null;
-            this.index = new SearchIndex({
-                identify: this.identify,
-                datumTokenizer: o.datumTokenizer,
-                queryTokenizer: o.queryTokenizer
-            });
-            o.initialize !== false && this.initialize();
-        }
-        Bloodhound.noConflict = function noConflict() {
-            window && (window.Bloodhound = old);
-            return Bloodhound;
-        };
-        Bloodhound.tokenizers = tokenizers;
-        _.mixin(Bloodhound.prototype, {
-            __ttAdapter: function ttAdapter() {
-                var that = this;
-                return this.remote ? withAsync : withoutAsync;
-                function withAsync(query, sync, async) {
-                    return that.search(query, sync, async);
-                }
-                function withoutAsync(query, sync) {
-                    return that.search(query, sync);
-                }
-            },
-            _loadPrefetch: function loadPrefetch() {
-                var that = this, deferred, serialized;
-                deferred = $.Deferred();
-                if (!this.prefetch) {
-                    deferred.resolve();
-                } else if (serialized = this.prefetch.fromCache()) {
-                    this.index.bootstrap(serialized);
-                    deferred.resolve();
-                } else {
-                    this.prefetch.fromNetwork(done);
-                }
-                return deferred.promise();
-                function done(err, data) {
-                    if (err) {
-                        return deferred.reject();
-                    }
-                    that.add(data);
-                    that.prefetch.store(that.index.serialize());
-                    deferred.resolve();
-                }
-            },
-            _initialize: function initialize() {
-                var that = this, deferred;
-                this.clear();
-                (this.initPromise = this._loadPrefetch()).done(addLocalToIndex);
-                return this.initPromise;
-                function addLocalToIndex() {
-                    that.add(that.local);
-                }
-            },
-            initialize: function initialize(force) {
-                return !this.initPromise || force ? this._initialize() : this.initPromise;
-            },
-            add: function add(data) {
-                this.index.add(data);
-                return this;
-            },
-            get: function get(ids) {
-                ids = _.isArray(ids) ? ids : [].slice.call(arguments);
-                return this.index.get(ids);
-            },
-            search: function search(query, sync, async) {
-                var that = this, local;
-                local = this.sorter(this.index.search(query));
-                sync(this.remote ? local.slice() : local);
-                if (this.remote && local.length < this.sufficient) {
-                    this.remote.get(query, processRemote);
-                } else if (this.remote) {
-                    this.remote.cancelLastRequest();
-                }
-                return this;
-                function processRemote(remote) {
-                    var nonDuplicates = [];
-                    _.each(remote, function(r) {
-                        !_.some(local, function(l) {
-                            return that.identify(r) === that.identify(l);
-                        }) && nonDuplicates.push(r);
-                    });
-                    async && async(nonDuplicates);
-                }
-            },
-            all: function all() {
-                return this.index.all();
-            },
-            clear: function clear() {
-                this.index.reset();
-                return this;
-            },
-            clearPrefetchCache: function clearPrefetchCache() {
-                this.prefetch && this.prefetch.clear();
-                return this;
-            },
-            clearRemoteCache: function clearRemoteCache() {
-                Transport.resetCache();
-                return this;
-            },
-            ttAdapter: function ttAdapter() {
-                return this.__ttAdapter();
-            }
-        });
-        return Bloodhound;
-    }();
-    return Bloodhound;
-});
-
-(function(root, factory) {
-    if (typeof define === "function" && define.amd) {
-        define("typeahead.js", [ "jquery" ], function(a0) {
-            return factory(a0);
-        });
-    } else if (typeof exports === "object") {
-        module.exports = factory(require("jquery"));
-    } else {
-        factory(jQuery);
-    }
-})(this, function($) {
-    var _ = function() {
-        "use strict";
-        return {
-            isMsie: function() {
-                return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
-            },
-            isBlankString: function(str) {
-                return !str || /^\s*$/.test(str);
-            },
-            escapeRegExChars: function(str) {
-                return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
-            },
-            isString: function(obj) {
-                return typeof obj === "string";
-            },
-            isNumber: function(obj) {
-                return typeof obj === "number";
-            },
-            isArray: $.isArray,
-            isFunction: $.isFunction,
-            isObject: $.isPlainObject,
-            isUndefined: function(obj) {
-                return typeof obj === "undefined";
-            },
-            isElement: function(obj) {
-                return !!(obj && obj.nodeType === 1);
-            },
-            isJQuery: function(obj) {
-                return obj instanceof $;
-            },
-            toStr: function toStr(s) {
-                return _.isUndefined(s) || s === null ? "" : s + "";
-            },
-            bind: $.proxy,
-            each: function(collection, cb) {
-                $.each(collection, reverseArgs);
-                function reverseArgs(index, value) {
-                    return cb(value, index);
-                }
-            },
-            map: $.map,
-            filter: $.grep,
-            every: function(obj, test) {
-                var result = true;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (!(result = test.call(null, val, key, obj))) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            some: function(obj, test) {
-                var result = false;
-                if (!obj) {
-                    return result;
-                }
-                $.each(obj, function(key, val) {
-                    if (result = test.call(null, val, key, obj)) {
-                        return false;
-                    }
-                });
-                return !!result;
-            },
-            mixin: $.extend,
-            identity: function(x) {
-                return x;
-            },
-            clone: function(obj) {
-                return $.extend(true, {}, obj);
-            },
-            getIdGenerator: function() {
-                var counter = 0;
-                return function() {
-                    return counter++;
-                };
-            },
-            templatify: function templatify(obj) {
-                return $.isFunction(obj) ? obj : template;
-                function template() {
-                    return String(obj);
-                }
-            },
-            defer: function(fn) {
-                setTimeout(fn, 0);
-            },
-            debounce: function(func, wait, immediate) {
-                var timeout, result;
-                return function() {
-                    var context = this, args = arguments, later, callNow;
-                    later = function() {
-                        timeout = null;
-                        if (!immediate) {
-                            result = func.apply(context, args);
-                        }
-                    };
-                    callNow = immediate && !timeout;
-                    clearTimeout(timeout);
-                    timeout = setTimeout(later, wait);
-                    if (callNow) {
-                        result = func.apply(context, args);
-                    }
-                    return result;
-                };
-            },
-            throttle: function(func, wait) {
-                var context, args, timeout, result, previous, later;
-                previous = 0;
-                later = function() {
-                    previous = new Date();
-                    timeout = null;
-                    result = func.apply(context, args);
-                };
-                return function() {
-                    var now = new Date(), remaining = wait - (now - previous);
-                    context = this;
-                    args = arguments;
-                    if (remaining <= 0) {
-                        clearTimeout(timeout);
-                        timeout = null;
-                        previous = now;
-                        result = func.apply(context, args);
-                    } else if (!timeout) {
-                        timeout = setTimeout(later, remaining);
-                    }
-                    return result;
-                };
-            },
-            stringify: function(val) {
-                return _.isString(val) ? val : JSON.stringify(val);
-            },
-            noop: function() {}
-        };
-    }();
-    var WWW = function() {
-        "use strict";
-        var defaultClassNames = {
-            wrapper: "twitter-typeahead",
-            input: "tt-input",
-            hint: "tt-hint",
-            menu: "tt-menu",
-            dataset: "tt-dataset",
-            suggestion: "tt-suggestion",
-            selectable: "tt-selectable",
-            empty: "tt-empty",
-            open: "tt-open",
-            cursor: "tt-cursor",
-            highlight: "tt-highlight"
-        };
-        return build;
-        function build(o) {
-            var www, classes;
-            classes = _.mixin({}, defaultClassNames, o);
-            www = {
-                css: buildCss(),
-                classes: classes,
-                html: buildHtml(classes),
-                selectors: buildSelectors(classes)
-            };
-            return {
-                css: www.css,
-                html: www.html,
-                classes: www.classes,
-                selectors: www.selectors,
-                mixin: function(o) {
-                    _.mixin(o, www);
-                }
-            };
-        }
-        function buildHtml(c) {
-            return {
-                wrapper: '<span class="' + c.wrapper + '"></span>',
-                menu: '<div class="' + c.menu + '"></div>'
-            };
-        }
-        function buildSelectors(classes) {
-            var selectors = {};
-            _.each(classes, function(v, k) {
-                selectors[k] = "." + v;
-            });
-            return selectors;
-        }
-        function buildCss() {
-            var css = {
-                wrapper: {
-                    position: "relative",
-                    display: "inline-block"
-                },
-                hint: {
-                    position: "absolute",
-                    top: "0",
-                    left: "0",
-                    borderColor: "transparent",
-                    boxShadow: "none",
-                    opacity: "1"
-                },
-                input: {
-                    position: "relative",
-                    verticalAlign: "top",
-                    backgroundColor: "transparent"
-                },
-                inputWithNoHint: {
-                    position: "relative",
-                    verticalAlign: "top"
-                },
-                menu: {
-                    position: "absolute",
-                    top: "100%",
-                    left: "0",
-                    zIndex: "100",
-                    display: "none"
-                },
-                ltr: {
-                    left: "0",
-                    right: "auto"
-                },
-                rtl: {
-                    left: "auto",
-                    right: " 0"
-                }
-            };
-            if (_.isMsie()) {
-                _.mixin(css.input, {
-                    backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
-                });
-            }
-            return css;
-        }
-    }();
-    var EventBus = function() {
-        "use strict";
-        var namespace, deprecationMap;
-        namespace = "typeahead:";
-        deprecationMap = {
-            render: "rendered",
-            cursorchange: "cursorchanged",
-            select: "selected",
-            autocomplete: "autocompleted"
-        };
-        function EventBus(o) {
-            if (!o || !o.el) {
-                $.error("EventBus initialized without el");
-            }
-            this.$el = $(o.el);
-        }
-        _.mixin(EventBus.prototype, {
-            _trigger: function(type, args) {
-                var $e;
-                $e = $.Event(namespace + type);
-                (args = args || []).unshift($e);
-                this.$el.trigger.apply(this.$el, args);
-                return $e;
-            },
-            before: function(type) {
-                var args, $e;
-                args = [].slice.call(arguments, 1);
-                $e = this._trigger("before" + type, args);
-                return $e.isDefaultPrevented();
-            },
-            trigger: function(type) {
-                var deprecatedType;
-                this._trigger(type, [].slice.call(arguments, 1));
-                if (deprecatedType = deprecationMap[type]) {
-                    this._trigger(deprecatedType, [].slice.call(arguments, 1));
-                }
-            }
-        });
-        return EventBus;
-    }();
-    var EventEmitter = function() {
-        "use strict";
-        var splitter = /\s+/, nextTick = getNextTick();
-        return {
-            onSync: onSync,
-            onAsync: onAsync,
-            off: off,
-            trigger: trigger
-        };
-        function on(method, types, cb, context) {
-            var type;
-            if (!cb) {
-                return this;
-            }
-            types = types.split(splitter);
-            cb = context ? bindContext(cb, context) : cb;
-            this._callbacks = this._callbacks || {};
-            while (type = types.shift()) {
-                this._callbacks[type] = this._callbacks[type] || {
-                    sync: [],
-                    async: []
-                };
-                this._callbacks[type][method].push(cb);
-            }
-            return this;
-        }
-        function onAsync(types, cb, context) {
-            return on.call(this, "async", types, cb, context);
-        }
-        function onSync(types, cb, context) {
-            return on.call(this, "sync", types, cb, context);
-        }
-        function off(types) {
-            var type;
-            if (!this._callbacks) {
-                return this;
-            }
-            types = types.split(splitter);
-            while (type = types.shift()) {
-                delete this._callbacks[type];
-            }
-            return this;
-        }
-        function trigger(types) {
-            var type, callbacks, args, syncFlush, asyncFlush;
-            if (!this._callbacks) {
-                return this;
-            }
-            types = types.split(splitter);
-            args = [].slice.call(arguments, 1);
-            while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
-                syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
-                asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
-                syncFlush() && nextTick(asyncFlush);
-            }
-            return this;
-        }
-        function getFlush(callbacks, context, args) {
-            return flush;
-            function flush() {
-                var cancelled;
-                for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
-                    cancelled = callbacks[i].apply(context, args) === false;
-                }
-                return !cancelled;
-            }
-        }
-        function getNextTick() {
-            var nextTickFn;
-            if (window.setImmediate) {
-                nextTickFn = function nextTickSetImmediate(fn) {
-                    setImmediate(function() {
-                        fn();
-                    });
-                };
-            } else {
-                nextTickFn = function nextTickSetTimeout(fn) {
-                    setTimeout(function() {
-                        fn();
-                    }, 0);
-                };
-            }
-            return nextTickFn;
-        }
-        function bindContext(fn, context) {
-            return fn.bind ? fn.bind(context) : function() {
-                fn.apply(context, [].slice.call(arguments, 0));
-            };
-        }
-    }();
-    var highlight = function(doc) {
-        "use strict";
-        var defaults = {
-            node: null,
-            pattern: null,
-            tagName: "strong",
-            className: null,
-            wordsOnly: false,
-            caseSensitive: false
-        };
-        return function hightlight(o) {
-            var regex;
-            o = _.mixin({}, defaults, o);
-            if (!o.node || !o.pattern) {
-                return;
-            }
-            o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
-            regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
-            traverse(o.node, hightlightTextNode);
-            function hightlightTextNode(textNode) {
-                var match, patternNode, wrapperNode;
-                if (match = regex.exec(textNode.data)) {
-                    wrapperNode = doc.createElement(o.tagName);
-                    o.className && (wrapperNode.className = o.className);
-                    patternNode = textNode.splitText(match.index);
-                    patternNode.splitText(match[0].length);
-                    wrapperNode.appendChild(patternNode.cloneNode(true));
-                    textNode.parentNode.replaceChild(wrapperNode, patternNode);
-                }
-                return !!match;
-            }
-            function traverse(el, hightlightTextNode) {
-                var childNode, TEXT_NODE_TYPE = 3;
-                for (var i = 0; i < el.childNodes.length; i++) {
-                    childNode = el.childNodes[i];
-                    if (childNode.nodeType === TEXT_NODE_TYPE) {
-                        i += hightlightTextNode(childNode) ? 1 : 0;
-                    } else {
-                        traverse(childNode, hightlightTextNode);
-                    }
-                }
-            }
-        };
-        function getRegex(patterns, caseSensitive, wordsOnly) {
-            var escapedPatterns = [], regexStr;
-            for (var i = 0, len = patterns.length; i < len; i++) {
-                escapedPatterns.push(_.escapeRegExChars(patterns[i]));
-            }
-            regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
-            return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
-        }
-    }(window.document);
-    var Input = function() {
-        "use strict";
-        var specialKeyCodeMap;
-        specialKeyCodeMap = {
-            9: "tab",
-            27: "esc",
-            37: "left",
-            39: "right",
-            13: "enter",
-            38: "up",
-            40: "down"
-        };
-        function Input(o, www) {
-            o = o || {};
-            if (!o.input) {
-                $.error("input is missing");
-            }
-            www.mixin(this);
-            this.$hint = $(o.hint);
-            this.$input = $(o.input);
-            this.query = this.$input.val();
-            this.queryWhenFocused = this.hasFocus() ? this.query : null;
-            this.$overflowHelper = buildOverflowHelper(this.$input);
-            this._checkLanguageDirection();
-            if (this.$hint.length === 0) {
-                this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
-            }
-        }
-        Input.normalizeQuery = function(str) {
-            return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
-        };
-        _.mixin(Input.prototype, EventEmitter, {
-            _onBlur: function onBlur() {
-                this.resetInputValue();
-                this.trigger("blurred");
-            },
-            _onFocus: function onFocus() {
-                this.queryWhenFocused = this.query;
-                this.trigger("focused");
-            },
-            _onKeydown: function onKeydown($e) {
-                var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
-                this._managePreventDefault(keyName, $e);
-                if (keyName && this._shouldTrigger(keyName, $e)) {
-                    this.trigger(keyName + "Keyed", $e);
-                }
-            },
-            _onInput: function onInput() {
-                this._setQuery(this.getInputValue());
-                this.clearHintIfInvalid();
-                this._checkLanguageDirection();
-            },
-            _managePreventDefault: function managePreventDefault(keyName, $e) {
-                var preventDefault;
-                switch (keyName) {
-                  case "up":
-                  case "down":
-                    preventDefault = !withModifier($e);
-                    break;
-
-                  default:
-                    preventDefault = false;
-                }
-                preventDefault && $e.preventDefault();
-            },
-            _shouldTrigger: function shouldTrigger(keyName, $e) {
-                var trigger;
-                switch (keyName) {
-                  case "tab":
-                    trigger = !withModifier($e);
-                    break;
-
-                  default:
-                    trigger = true;
-                }
-                return trigger;
-            },
-            _checkLanguageDirection: function checkLanguageDirection() {
-                var dir = (this.$input.css("direction") || "ltr").toLowerCase();
-                if (this.dir !== dir) {
-                    this.dir = dir;
-                    this.$hint.attr("dir", dir);
-                    this.trigger("langDirChanged", dir);
-                }
-            },
-            _setQuery: function setQuery(val, silent) {
-                var areEquivalent, hasDifferentWhitespace;
-                areEquivalent = areQueriesEquivalent(val, this.query);
-                hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false;
-                this.query = val;
-                if (!silent && !areEquivalent) {
-                    this.trigger("queryChanged", this.query);
-                } else if (!silent && hasDifferentWhitespace) {
-                    this.trigger("whitespaceChanged", this.query);
-                }
-            },
-            bind: function() {
-                var that = this, onBlur, onFocus, onKeydown, onInput;
-                onBlur = _.bind(this._onBlur, this);
-                onFocus = _.bind(this._onFocus, this);
-                onKeydown = _.bind(this._onKeydown, this);
-                onInput = _.bind(this._onInput, this);
-                this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
-                if (!_.isMsie() || _.isMsie() > 9) {
-                    this.$input.on("input.tt", onInput);
-                } else {
-                    this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
-                        if (specialKeyCodeMap[$e.which || $e.keyCode]) {
-                            return;
-                        }
-                        _.defer(_.bind(that._onInput, that, $e));
-                    });
-                }
-                return this;
-            },
-            focus: function focus() {
-                this.$input.focus();
-            },
-            blur: function blur() {
-                this.$input.blur();
-            },
-            getLangDir: function getLangDir() {
-                return this.dir;
-            },
-            getQuery: function getQuery() {
-                return this.query || "";
-            },
-            setQuery: function setQuery(val, silent) {
-                this.setInputValue(val);
-                this._setQuery(val, silent);
-            },
-            hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() {
-                return this.query !== this.queryWhenFocused;
-            },
-            getInputValue: function getInputValue() {
-                return this.$input.val();
-            },
-            setInputValue: function setInputValue(value) {
-                this.$input.val(value);
-                this.clearHintIfInvalid();
-                this._checkLanguageDirection();
-            },
-            resetInputValue: function resetInputValue() {
-                this.setInputValue(this.query);
-            },
-            getHint: function getHint() {
-                return this.$hint.val();
-            },
-            setHint: function setHint(value) {
-                this.$hint.val(value);
-            },
-            clearHint: function clearHint() {
-                this.setHint("");
-            },
-            clearHintIfInvalid: function clearHintIfInvalid() {
-                var val, hint, valIsPrefixOfHint, isValid;
-                val = this.getInputValue();
-                hint = this.getHint();
-                valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
-                isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
-                !isValid && this.clearHint();
-            },
-            hasFocus: function hasFocus() {
-                return this.$input.is(":focus");
-            },
-            hasOverflow: function hasOverflow() {
-                var constraint = this.$input.width() - 2;
-                this.$overflowHelper.text(this.getInputValue());
-                return this.$overflowHelper.width() >= constraint;
-            },
-            isCursorAtEnd: function() {
-                var valueLength, selectionStart, range;
-                valueLength = this.$input.val().length;
-                selectionStart = this.$input[0].selectionStart;
-                if (_.isNumber(selectionStart)) {
-                    return selectionStart === valueLength;
-                } else if (document.selection) {
-                    range = document.selection.createRange();
-                    range.moveStart("character", -valueLength);
-                    return valueLength === range.text.length;
-                }
-                return true;
-            },
-            destroy: function destroy() {
-                this.$hint.off(".tt");
-                this.$input.off(".tt");
-                this.$overflowHelper.remove();
-                this.$hint = this.$input = this.$overflowHelper = $("<div>");
-            }
-        });
-        return Input;
-        function buildOverflowHelper($input) {
-            return $('<pre aria-hidden="true"></pre>').css({
-                position: "absolute",
-                visibility: "hidden",
-                whiteSpace: "pre",
-                fontFamily: $input.css("font-family"),
-                fontSize: $input.css("font-size"),
-                fontStyle: $input.css("font-style"),
-                fontVariant: $input.css("font-variant"),
-                fontWeight: $input.css("font-weight"),
-                wordSpacing: $input.css("word-spacing"),
-                letterSpacing: $input.css("letter-spacing"),
-                textIndent: $input.css("text-indent"),
-                textRendering: $input.css("text-rendering"),
-                textTransform: $input.css("text-transform")
-            }).insertAfter($input);
-        }
-        function areQueriesEquivalent(a, b) {
-            return Input.normalizeQuery(a) === Input.normalizeQuery(b);
-        }
-        function withModifier($e) {
-            return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
-        }
-    }();
-    var Dataset = function() {
-        "use strict";
-        var keys, nameGenerator;
-        keys = {
-            val: "tt-selectable-display",
-            obj: "tt-selectable-object"
-        };
-        nameGenerator = _.getIdGenerator();
-        function Dataset(o, www) {
-            o = o || {};
-            o.templates = o.templates || {};
-            o.templates.notFound = o.templates.notFound || o.templates.empty;
-            if (!o.source) {
-                $.error("missing source");
-            }
-            if (!o.node) {
-                $.error("missing node");
-            }
-            if (o.name && !isValidName(o.name)) {
-                $.error("invalid dataset name: " + o.name);
-            }
-            www.mixin(this);
-            this.highlight = !!o.highlight;
-            this.name = o.name || nameGenerator();
-            this.limit = o.limit || 5;
-            this.displayFn = getDisplayFn(o.display || o.displayKey);
-            this.templates = getTemplates(o.templates, this.displayFn);
-            this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
-            this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
-            this._resetLastSuggestion();
-            this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
-        }
-        Dataset.extractData = function extractData(el) {
-            var $el = $(el);
-            if ($el.data(keys.obj)) {
-                return {
-                    val: $el.data(keys.val) || "",
-                    obj: $el.data(keys.obj) || null
-                };
-            }
-            return null;
-        };
-        _.mixin(Dataset.prototype, EventEmitter, {
-            _overwrite: function overwrite(query, suggestions) {
-                suggestions = suggestions || [];
-                if (suggestions.length) {
-                    this._renderSuggestions(query, suggestions);
-                } else if (this.async && this.templates.pending) {
-                    this._renderPending(query);
-                } else if (!this.async && this.templates.notFound) {
-                    this._renderNotFound(query);
-                } else {
-                    this._empty();
-                }
-                this.trigger("rendered", this.name, suggestions, false);
-            },
-            _append: function append(query, suggestions) {
-                suggestions = suggestions || [];
-                if (suggestions.length && this.$lastSuggestion.length) {
-                    this._appendSuggestions(query, suggestions);
-                } else if (suggestions.length) {
-                    this._renderSuggestions(query, suggestions);
-                } else if (!this.$lastSuggestion.length && this.templates.notFound) {
-                    this._renderNotFound(query);
-                }
-                this.trigger("rendered", this.name, suggestions, true);
-            },
-            _renderSuggestions: function renderSuggestions(query, suggestions) {
-                var $fragment;
-                $fragment = this._getSuggestionsFragment(query, suggestions);
-                this.$lastSuggestion = $fragment.children().last();
-                this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions));
-            },
-            _appendSuggestions: function appendSuggestions(query, suggestions) {
-                var $fragment, $lastSuggestion;
-                $fragment = this._getSuggestionsFragment(query, suggestions);
-                $lastSuggestion = $fragment.children().last();
-                this.$lastSuggestion.after($fragment);
-                this.$lastSuggestion = $lastSuggestion;
-            },
-            _renderPending: function renderPending(query) {
-                var template = this.templates.pending;
-                this._resetLastSuggestion();
-                template && this.$el.html(template({
-                    query: query,
-                    dataset: this.name
-                }));
-            },
-            _renderNotFound: function renderNotFound(query) {
-                var template = this.templates.notFound;
-                this._resetLastSuggestion();
-                template && this.$el.html(template({
-                    query: query,
-                    dataset: this.name
-                }));
-            },
-            _empty: function empty() {
-                this.$el.empty();
-                this._resetLastSuggestion();
-            },
-            _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) {
-                var that = this, fragment;
-                fragment = document.createDocumentFragment();
-                _.each(suggestions, function getSuggestionNode(suggestion) {
-                    var $el, context;
-                    context = that._injectQuery(query, suggestion);
-                    $el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
-                    fragment.appendChild($el[0]);
-                });
-                this.highlight && highlight({
-                    className: this.classes.highlight,
-                    node: fragment,
-                    pattern: query
-                });
-                return $(fragment);
-            },
-            _getFooter: function getFooter(query, suggestions) {
-                return this.templates.footer ? this.templates.footer({
-                    query: query,
-                    suggestions: suggestions,
-                    dataset: this.name
-                }) : null;
-            },
-            _getHeader: function getHeader(query, suggestions) {
-                return this.templates.header ? this.templates.header({
-                    query: query,
-                    suggestions: suggestions,
-                    dataset: this.name
-                }) : null;
-            },
-            _resetLastSuggestion: function resetLastSuggestion() {
-                this.$lastSuggestion = $();
-            },
-            _injectQuery: function injectQuery(query, obj) {
-                return _.isObject(obj) ? _.mixin({
-                    _query: query
-                }, obj) : obj;
-            },
-            update: function update(query) {
-                var that = this, canceled = false, syncCalled = false, rendered = 0;
-                this.cancel();
-                this.cancel = function cancel() {
-                    canceled = true;
-                    that.cancel = $.noop;
-                    that.async && that.trigger("asyncCanceled", query);
-                };
-                this.source(query, sync, async);
-                !syncCalled && sync([]);
-                function sync(suggestions) {
-                    if (syncCalled) {
-                        return;
-                    }
-                    syncCalled = true;
-                    suggestions = (suggestions || []).slice(0, that.limit);
-                    rendered = suggestions.length;
-                    that._overwrite(query, suggestions);
-                    if (rendered < that.limit && that.async) {
-                        that.trigger("asyncRequested", query);
-                    }
-                }
-                function async(suggestions) {
-                    suggestions = suggestions || [];
-                    if (!canceled && rendered < that.limit) {
-                        that.cancel = $.noop;
-                        rendered += suggestions.length;
-                        that._append(query, suggestions.slice(0, that.limit - rendered));
-                        that.async && that.trigger("asyncReceived", query);
-                    }
-                }
-            },
-            cancel: $.noop,
-            clear: function clear() {
-                this._empty();
-                this.cancel();
-                this.trigger("cleared");
-            },
-            isEmpty: function isEmpty() {
-                return this.$el.is(":empty");
-            },
-            destroy: function destroy() {
-                this.$el = $("<div>");
-            }
-        });
-        return Dataset;
-        function getDisplayFn(display) {
-            display = display || _.stringify;
-            return _.isFunction(display) ? display : displayFn;
-            function displayFn(obj) {
-                return obj[display];
-            }
-        }
-        function getTemplates(templates, displayFn) {
-            return {
-                notFound: templates.notFound && _.templatify(templates.notFound),
-                pending: templates.pending && _.templatify(templates.pending),
-                header: templates.header && _.templatify(templates.header),
-                footer: templates.footer && _.templatify(templates.footer),
-                suggestion: templates.suggestion || suggestionTemplate
-            };
-            function suggestionTemplate(context) {
-                return $("<div>").text(displayFn(context));
-            }
-        }
-        function isValidName(str) {
-            return /^[_a-zA-Z0-9-]+$/.test(str);
-        }
-    }();
-    var Menu = function() {
-        "use strict";
-        function Menu(o, www) {
-            var that = this;
-            o = o || {};
-            if (!o.node) {
-                $.error("node is required");
-            }
-            www.mixin(this);
-            this.$node = $(o.node);
-            this.query = null;
-            this.datasets = _.map(o.datasets, initializeDataset);
-            function initializeDataset(oDataset) {
-                var node = that.$node.find(oDataset.node).first();
-                oDataset.node = node.length ? node : $("<div>").appendTo(that.$node);
-                return new Dataset(oDataset, www);
-            }
-        }
-        _.mixin(Menu.prototype, EventEmitter, {
-            _onSelectableClick: function onSelectableClick($e) {
-                this.trigger("selectableClicked", $($e.currentTarget));
-            },
-            _onRendered: function onRendered(type, dataset, suggestions, async) {
-                this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
-                this.trigger("datasetRendered", dataset, suggestions, async);
-            },
-            _onCleared: function onCleared() {
-                this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
-                this.trigger("datasetCleared");
-            },
-            _propagate: function propagate() {
-                this.trigger.apply(this, arguments);
-            },
-            _allDatasetsEmpty: function allDatasetsEmpty() {
-                return _.every(this.datasets, isDatasetEmpty);
-                function isDatasetEmpty(dataset) {
-                    return dataset.isEmpty();
-                }
-            },
-            _getSelectables: function getSelectables() {
-                return this.$node.find(this.selectors.selectable);
-            },
-            _removeCursor: function _removeCursor() {
-                var $selectable = this.getActiveSelectable();
-                $selectable && $selectable.removeClass(this.classes.cursor);
-            },
-            _ensureVisible: function ensureVisible($el) {
-                var elTop, elBottom, nodeScrollTop, nodeHeight;
-                elTop = $el.position().top;
-                elBottom = elTop + $el.outerHeight(true);
-                nodeScrollTop = this.$node.scrollTop();
-                nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10);
-                if (elTop < 0) {
-                    this.$node.scrollTop(nodeScrollTop + elTop);
-                } else if (nodeHeight < elBottom) {
-                    this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight));
-                }
-            },
-            bind: function() {
-                var that = this, onSelectableClick;
-                onSelectableClick = _.bind(this._onSelectableClick, this);
-                this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
-                _.each(this.datasets, function(dataset) {
-                    dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
-                });
-                return this;
-            },
-            isOpen: function isOpen() {
-                return this.$node.hasClass(this.classes.open);
-            },
-            open: function open() {
-                this.$node.addClass(this.classes.open);
-            },
-            close: function close() {
-                this.$node.removeClass(this.classes.open);
-                this._removeCursor();
-            },
-            setLanguageDirection: function setLanguageDirection(dir) {
-                this.$node.attr("dir", dir);
-            },
-            selectableRelativeToCursor: function selectableRelativeToCursor(delta) {
-                var $selectables, $oldCursor, oldIndex, newIndex;
-                $oldCursor = this.getActiveSelectable();
-                $selectables = this._getSelectables();
-                oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1;
-                newIndex = oldIndex + delta;
-                newIndex = (newIndex + 1) % ($selectables.length + 1) - 1;
-                newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex;
-                return newIndex === -1 ? null : $selectables.eq(newIndex);
-            },
-            setCursor: function setCursor($selectable) {
-                this._removeCursor();
-                if ($selectable = $selectable && $selectable.first()) {
-                    $selectable.addClass(this.classes.cursor);
-                    this._ensureVisible($selectable);
-                }
-            },
-            getSelectableData: function getSelectableData($el) {
-                return $el && $el.length ? Dataset.extractData($el) : null;
-            },
-            getActiveSelectable: function getActiveSelectable() {
-                var $selectable = this._getSelectables().filter(this.selectors.cursor).first();
-                return $selectable.length ? $selectable : null;
-            },
-            getTopSelectable: function getTopSelectable() {
-                var $selectable = this._getSelectables().first();
-                return $selectable.length ? $selectable : null;
-            },
-            update: function update(query) {
-                var isValidUpdate = query !== this.query;
-                if (isValidUpdate) {
-                    this.query = query;
-                    _.each(this.datasets, updateDataset);
-                }
-                return isValidUpdate;
-                function updateDataset(dataset) {
-                    dataset.update(query);
-                }
-            },
-            empty: function empty() {
-                _.each(this.datasets, clearDataset);
-                this.query = null;
-                this.$node.addClass(this.classes.empty);
-                function clearDataset(dataset) {
-                    dataset.clear();
-                }
-            },
-            destroy: function destroy() {
-                this.$node.off(".tt");
-                this.$node = $("<div>");
-                _.each(this.datasets, destroyDataset);
-                function destroyDataset(dataset) {
-                    dataset.destroy();
-                }
-            }
-        });
-        return Menu;
-    }();
-    var DefaultMenu = function() {
-        "use strict";
-        var s = Menu.prototype;
-        function DefaultMenu() {
-            Menu.apply(this, [].slice.call(arguments, 0));
-        }
-        _.mixin(DefaultMenu.prototype, Menu.prototype, {
-            open: function open() {
-                !this._allDatasetsEmpty() && this._show();
-                return s.open.apply(this, [].slice.call(arguments, 0));
-            },
-            close: function close() {
-                this._hide();
-                return s.close.apply(this, [].slice.call(arguments, 0));
-            },
-            _onRendered: function onRendered() {
-                if (this._allDatasetsEmpty()) {
-                    this._hide();
-                } else {
-                    this.isOpen() && this._show();
-                }
-                return s._onRendered.apply(this, [].slice.call(arguments, 0));
-            },
-            _onCleared: function onCleared() {
-                if (this._allDatasetsEmpty()) {
-                    this._hide();
-                } else {
-                    this.isOpen() && this._show();
-                }
-                return s._onCleared.apply(this, [].slice.call(arguments, 0));
-            },
-            setLanguageDirection: function setLanguageDirection(dir) {
-                this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl);
-                return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0));
-            },
-            _hide: function hide() {
-                this.$node.hide();
-            },
-            _show: function show() {
-                this.$node.css("display", "block");
-            }
-        });
-        return DefaultMenu;
-    }();
-    var Typeahead = function() {
-        "use strict";
-        function Typeahead(o, www) {
-            var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged;
-            o = o || {};
-            if (!o.input) {
-                $.error("missing input");
-            }
-            if (!o.menu) {
-                $.error("missing menu");
-            }
-            if (!o.eventBus) {
-                $.error("missing event bus");
-            }
-            www.mixin(this);
-            this.eventBus = o.eventBus;
-            this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
-            this.input = o.input;
-            this.menu = o.menu;
-            this.enabled = true;
-            this.active = false;
-            this.input.hasFocus() && this.activate();
-            this.dir = this.input.getLangDir();
-            this._hacks();
-            this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this);
-            onFocused = c(this, "activate", "open", "_onFocused");
-            onBlurred = c(this, "deactivate", "_onBlurred");
-            onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed");
-            onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed");
-            onEscKeyed = c(this, "isActive", "_onEscKeyed");
-            onUpKeyed = c(this, "isActive", "open", "_onUpKeyed");
-            onDownKeyed = c(this, "isActive", "open", "_onDownKeyed");
-            onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed");
-            onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed");
-            onQueryChanged = c(this, "_openIfActive", "_onQueryChanged");
-            onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged");
-            this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this);
-        }
-        _.mixin(Typeahead.prototype, {
-            _hacks: function hacks() {
-                var $input, $menu;
-                $input = this.input.$input || $("<div>");
-                $menu = this.menu.$node || $("<div>");
-                $input.on("blur.tt", function($e) {
-                    var active, isActive, hasActive;
-                    active = document.activeElement;
-                    isActive = $menu.is(active);
-                    hasActive = $menu.has(active).length > 0;
-                    if (_.isMsie() && (isActive || hasActive)) {
-                        $e.preventDefault();
-                        $e.stopImmediatePropagation();
-                        _.defer(function() {
-                            $input.focus();
-                        });
-                    }
-                });
-                $menu.on("mousedown.tt", function($e) {
-                    $e.preventDefault();
-                });
-            },
-            _onSelectableClicked: function onSelectableClicked(type, $el) {
-                this.select($el);
-            },
-            _onDatasetCleared: function onDatasetCleared() {
-                this._updateHint();
-            },
-            _onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
-                this._updateHint();
-                this.eventBus.trigger("render", suggestions, async, dataset);
-            },
-            _onAsyncRequested: function onAsyncRequested(type, dataset, query) {
-                this.eventBus.trigger("asyncrequest", query, dataset);
-            },
-            _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
-                this.eventBus.trigger("asynccancel", query, dataset);
-            },
-            _onAsyncReceived: function onAsyncReceived(type, dataset, query) {
-                this.eventBus.trigger("asyncreceive", query, dataset);
-            },
-            _onFocused: function onFocused() {
-                this._minLengthMet() && this.menu.update(this.input.getQuery());
-            },
-            _onBlurred: function onBlurred() {
-                if (this.input.hasQueryChangedSinceLastFocus()) {
-                    this.eventBus.trigger("change", this.input.getQuery());
-                }
-            },
-            _onEnterKeyed: function onEnterKeyed(type, $e) {
-                var $selectable;
-                if ($selectable = this.menu.getActiveSelectable()) {
-                    this.select($selectable) && $e.preventDefault();
-                }
-            },
-            _onTabKeyed: function onTabKeyed(type, $e) {
-                var $selectable;
-                if ($selectable = this.menu.getActiveSelectable()) {
-                    this.select($selectable) && $e.preventDefault();
-                } else if ($selectable = this.menu.getTopSelectable()) {
-                    this.autocomplete($selectable) && $e.preventDefault();
-                }
-            },
-            _onEscKeyed: function onEscKeyed() {
-                this.close();
-            },
-            _onUpKeyed: function onUpKeyed() {
-                this.moveCursor(-1);
-            },
-            _onDownKeyed: function onDownKeyed() {
-                this.moveCursor(+1);
-            },
-            _onLeftKeyed: function onLeftKeyed() {
-                if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
-                    this.autocomplete(this.menu.getTopSelectable());
-                }
-            },
-            _onRightKeyed: function onRightKeyed() {
-                if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
-                    this.autocomplete(this.menu.getTopSelectable());
-                }
-            },
-            _onQueryChanged: function onQueryChanged(e, query) {
-                this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
-            },
-            _onWhitespaceChanged: function onWhitespaceChanged() {
-                this._updateHint();
-            },
-            _onLangDirChanged: function onLangDirChanged(e, dir) {
-                if (this.dir !== dir) {
-                    this.dir = dir;
-                    this.menu.setLanguageDirection(dir);
-                }
-            },
-            _openIfActive: function openIfActive() {
-                this.isActive() && this.open();
-            },
-            _minLengthMet: function minLengthMet(query) {
-                query = _.isString(query) ? query : this.input.getQuery() || "";
-                return query.length >= this.minLength;
-            },
-            _updateHint: function updateHint() {
-                var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
-                $selectable = this.menu.getTopSelectable();
-                data = this.menu.getSelectableData($selectable);
-                val = this.input.getInputValue();
-                if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
-                    query = Input.normalizeQuery(val);
-                    escapedQuery = _.escapeRegExChars(query);
-                    frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
-                    match = frontMatchRegEx.exec(data.val);
-                    match && this.input.setHint(val + match[1]);
-                } else {
-                    this.input.clearHint();
-                }
-            },
-            isEnabled: function isEnabled() {
-                return this.enabled;
-            },
-            enable: function enable() {
-                this.enabled = true;
-            },
-            disable: function disable() {
-                this.enabled = false;
-            },
-            isActive: function isActive() {
-                return this.active;
-            },
-            activate: function activate() {
-                if (this.isActive()) {
-                    return true;
-                } else if (!this.isEnabled() || this.eventBus.before("active")) {
-                    return false;
-                } else {
-                    this.active = true;
-                    this.eventBus.trigger("active");
-                    return true;
-                }
-            },
-            deactivate: function deactivate() {
-                if (!this.isActive()) {
-                    return true;
-                } else if (this.eventBus.before("idle")) {
-                    return false;
-                } else {
-                    this.active = false;
-                    this.close();
-                    this.eventBus.trigger("idle");
-                    return true;
-                }
-            },
-            isOpen: function isOpen() {
-                return this.menu.isOpen();
-            },
-            open: function open() {
-                if (!this.isOpen() && !this.eventBus.before("open")) {
-                    this.menu.open();
-                    this._updateHint();
-                    this.eventBus.trigger("open");
-                }
-                return this.isOpen();
-            },
-            close: function close() {
-                if (this.isOpen() && !this.eventBus.before("close")) {
-                    this.menu.close();
-                    this.input.clearHint();
-                    this.input.resetInputValue();
-                    this.eventBus.trigger("close");
-                }
-                return !this.isOpen();
-            },
-            setVal: function setVal(val) {
-                this.input.setQuery(_.toStr(val));
-            },
-            getVal: function getVal() {
-                return this.input.getQuery();
-            },
-            select: function select($selectable) {
-                var data = this.menu.getSelectableData($selectable);
-                if (data && !this.eventBus.before("select", data.obj)) {
-                    this.input.setQuery(data.val, true);
-                    this.eventBus.trigger("select", data.obj);
-                    this.close();
-                    return true;
-                }
-                return false;
-            },
-            autocomplete: function autocomplete($selectable) {
-                var query, data, isValid;
-                query = this.input.getQuery();
-                data = this.menu.getSelectableData($selectable);
-                isValid = data && query !== data.val;
-                if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
-                    this.input.setQuery(data.val);
-                    this.eventBus.trigger("autocomplete", data.obj);
-                    return true;
-                }
-                return false;
-            },
-            moveCursor: function moveCursor(delta) {
-                var query, $candidate, data, payload, cancelMove;
-                query = this.input.getQuery();
-                $candidate = this.menu.selectableRelativeToCursor(delta);
-                data = this.menu.getSelectableData($candidate);
-                payload = data ? data.obj : null;
-                cancelMove = this._minLengthMet() && this.menu.update(query);
-                if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
-                    this.menu.setCursor($candidate);
-                    if (data) {
-                        this.input.setInputValue(data.val);
-                    } else {
-                        this.input.resetInputValue();
-                        this._updateHint();
-                    }
-                    this.eventBus.trigger("cursorchange", payload);
-                    return true;
-                }
-                return false;
-            },
-            destroy: function destroy() {
-                this.input.destroy();
-                this.menu.destroy();
-            }
-        });
-        return Typeahead;
-        function c(ctx) {
-            var methods = [].slice.call(arguments, 1);
-            return function() {
-                var args = [].slice.call(arguments);
-                _.each(methods, function(method) {
-                    return ctx[method].apply(ctx, args);
-                });
-            };
-        }
-    }();
-    (function() {
-        "use strict";
-        var old, keys, methods;
-        old = $.fn.typeahead;
-        keys = {
-            www: "tt-www",
-            attrs: "tt-attrs",
-            typeahead: "tt-typeahead"
-        };
-        methods = {
-            initialize: function initialize(o, datasets) {
-                var www;
-                datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
-                o = o || {};
-                www = WWW(o.classNames);
-                return this.each(attach);
-                function attach() {
-                    var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
-                    _.each(datasets, function(d) {
-                        d.highlight = !!o.highlight;
-                    });
-                    $input = $(this);
-                    $wrapper = $(www.html.wrapper);
-                    $hint = $elOrNull(o.hint);
-                    $menu = $elOrNull(o.menu);
-                    defaultHint = o.hint !== false && !$hint;
-                    defaultMenu = o.menu !== false && !$menu;
-                    defaultHint && ($hint = buildHintFromInput($input, www));
-                    defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
-                    $hint && $hint.val("");
-                    $input = prepInput($input, www);
-                    if (defaultHint || defaultMenu) {
-                        $wrapper.css(www.css.wrapper);
-                        $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
-                        $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
-                    }
-                    MenuConstructor = defaultMenu ? DefaultMenu : Menu;
-                    eventBus = new EventBus({
-                        el: $input
-                    });
-                    input = new Input({
-                        hint: $hint,
-                        input: $input
-                    }, www);
-                    menu = new MenuConstructor({
-                        node: $menu,
-                        datasets: datasets
-                    }, www);
-                    typeahead = new Typeahead({
-                        input: input,
-                        menu: menu,
-                        eventBus: eventBus,
-                        minLength: o.minLength
-                    }, www);
-                    $input.data(keys.www, www);
-                    $input.data(keys.typeahead, typeahead);
-                }
-            },
-            isEnabled: function isEnabled() {
-                var enabled;
-                ttEach(this.first(), function(t) {
-                    enabled = t.isEnabled();
-                });
-                return enabled;
-            },
-            enable: function enable() {
-                ttEach(this, function(t) {
-                    t.enable();
-                });
-                return this;
-            },
-            disable: function disable() {
-                ttEach(this, function(t) {
-                    t.disable();
-                });
-                return this;
-            },
-            isActive: function isActive() {
-                var active;
-                ttEach(this.first(), function(t) {
-                    active = t.isActive();
-                });
-                return active;
-            },
-            activate: function activate() {
-                ttEach(this, function(t) {
-                    t.activate();
-                });
-                return this;
-            },
-            deactivate: function deactivate() {
-                ttEach(this, function(t) {
-                    t.deactivate();
-                });
-                return this;
-            },
-            isOpen: function isOpen() {
-                var open;
-                ttEach(this.first(), function(t) {
-                    open = t.isOpen();
-                });
-                return open;
-            },
-            open: function open() {
-                ttEach(this, function(t) {
-                    t.open();
-                });
-                return this;
-            },
-            close: function close() {
-                ttEach(this, function(t) {
-                    t.close();
-                });
-                return this;
-            },
-            select: function select(el) {
-                var success = false, $el = $(el);
-                ttEach(this.first(), function(t) {
-                    success = t.select($el);
-                });
-                return success;
-            },
-            autocomplete: function autocomplete(el) {
-                var success = false, $el = $(el);
-                ttEach(this.first(), function(t) {
-                    success = t.autocomplete($el);
-                });
-                return success;
-            },
-            moveCursor: function moveCursoe(delta) {
-                var success = false;
-                ttEach(this.first(), function(t) {
-                    success = t.moveCursor(delta);
-                });
-                return success;
-            },
-            val: function val(newVal) {
-                var query;
-                if (!arguments.length) {
-                    ttEach(this.first(), function(t) {
-                        query = t.getVal();
-                    });
-                    return query;
-                } else {
-                    ttEach(this, function(t) {
-                        t.setVal(newVal);
-                    });
-                    return this;
-                }
-            },
-            destroy: function destroy() {
-                ttEach(this, function(typeahead, $input) {
-                    revert($input);
-                    typeahead.destroy();
-                });
-                return this;
-            }
-        };
-        $.fn.typeahead = function(method) {
-            if (methods[method]) {
-                return methods[method].apply(this, [].slice.call(arguments, 1));
-            } else {
-                return methods.initialize.apply(this, arguments);
-            }
-        };
-        $.fn.typeahead.noConflict = function noConflict() {
-            $.fn.typeahead = old;
-            return this;
-        };
-        function ttEach($els, fn) {
-            $els.each(function() {
-                var $input = $(this), typeahead;
-                (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
-            });
-        }
-        function buildHintFromInput($input, www) {
-            return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder required").attr({
-                autocomplete: "off",
-                spellcheck: "false",
-                tabindex: -1
-            });
-        }
-        function prepInput($input, www) {
-            $input.data(keys.attrs, {
-                dir: $input.attr("dir"),
-                autocomplete: $input.attr("autocomplete"),
-                spellcheck: $input.attr("spellcheck"),
-                style: $input.attr("style")
-            });
-            $input.addClass(www.classes.input).attr({
-                autocomplete: "off",
-                spellcheck: false
-            });
-            try {
-                !$input.attr("dir") && $input.attr("dir", "auto");
-            } catch (e) {}
-            return $input;
-        }
-        function getBackgroundStyles($el) {
-            return {
-                backgroundAttachment: $el.css("background-attachment"),
-                backgroundClip: $el.css("background-clip"),
-                backgroundColor: $el.css("background-color"),
-                backgroundImage: $el.css("background-image"),
-                backgroundOrigin: $el.css("background-origin"),
-                backgroundPosition: $el.css("background-position"),
-                backgroundRepeat: $el.css("background-repeat"),
-                backgroundSize: $el.css("background-size")
-            };
-        }
-        function revert($input) {
-            var www, $wrapper;
-            www = $input.data(keys.www);
-            $wrapper = $input.parent().filter(www.selectors.wrapper);
-            _.each($input.data(keys.attrs), function(val, key) {
-                _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
-            });
-            $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
-            if ($wrapper.length) {
-                $input.detach().insertAfter($wrapper);
-                $wrapper.remove();
-            }
-        }
-        function $elOrNull(obj) {
-            var isValid, $el;
-            isValid = _.isJQuery(obj) || _.isElement(obj);
-            $el = isValid ? $(obj).first() : [];
-            return $el.length ? $el : null;
-        }
-    })();
-});
\ No newline at end of file