Ajax Search Lite - Version 4.6.2

Version Description

  • Keyword highlighting implemented
  • IE11 back-end fixes
  • Removed unused and deprecated files
  • W3C style validation related fix
Download this release

Release Info

Developer wpdreams
Plugin Icon 128x128 Ajax Search Lite
Version 4.6.2
Comparing to
See all releases

Code changes from version 4.6.5 to 4.6.2

Files changed (45) hide show
  1. ajax-search-lite.php +6 -3
  2. backend/settings/assets/search_instance.js +0 -31
  3. backend/settings/assets/types.js +1 -0
  4. backend/settings/class/customfselect.class.php +1 -1
  5. backend/settings/class/text.class.php +1 -1
  6. backend/settings/class/textsmall.class.php +2 -2
  7. backend/settings/default_options.php +1 -4
  8. backend/settings/types.inc.php +1 -0
  9. backend/tabs/instance/general/behavior.php +28 -14
  10. backend/tabs/instance/general/sources.php +2 -20
  11. css/fonts/icons2.eot +0 -0
  12. css/fonts/icons2.svg +0 -14
  13. css/fonts/icons2.ttf +0 -0
  14. css/fonts/icons2.woff +0 -0
  15. css/fonts/icons2.woff2 +0 -0
  16. css/style-classic-blue.css +54 -5
  17. css/style-curvy-black.css +50 -9
  18. css/style-curvy-blue.css +50 -9
  19. css/style-curvy-red.css +50 -9
  20. css/style-simple-blue.css +54 -5
  21. css/style-simple-grey.css +38 -5
  22. css/style-simple-red.css +40 -5
  23. css/style-underline.css +36 -9
  24. css/style.basic.css +487 -284
  25. includes/classes/actions/class-asl-stylesheets.php +1 -16
  26. includes/classes/core/class-asl-filters.php +1 -7
  27. includes/classes/core/class-asl-init.php +9 -2
  28. includes/classes/core/class-asl-manager.php +10 -26
  29. includes/classes/filters/class-asl-formoverride.php +1 -1
  30. includes/classes/filters/class-asl-wooformoverride.php +0 -38
  31. includes/classes/filters/filters.inc.php +0 -1
  32. includes/classes/search/search_content.class.php +13 -37
  33. includes/functions/functions.php +3 -4
  34. includes/views/asl.shortcode.php +60 -73
  35. js/min-scoped/jquery.ajaxsearchlite.min.js +14 -2
  36. js/min/jquery.ajaxsearchlite.min.js +14 -2
  37. js/nomin-scoped/asl_wrapper.js +1 -83
  38. js/nomin-scoped/jquery.ajaxsearchlite.js +2 -6
  39. js/nomin-scoped/jquery.mCustomScrollbar.js +945 -6
  40. js/nomin-scoped/jquery.mousewheel.js +86 -0
  41. js/nomin/asl_wrapper.js +1 -83
  42. js/nomin/jquery.ajaxsearchlite.js +2 -6
  43. js/nomin/jquery.mCustomScrollbar.js +946 -6
  44. js/nomin/jquery.mousewheel.js +84 -0
  45. readme.txt +13 -28
ajax-search-lite.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ajax Search Lite
4
  Plugin URI: http://wp-dreams.com
5
  Description: The lite version of the most powerful ajax powered search engine for WordPress.
6
- Version: 4.6.5
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
@@ -16,13 +16,16 @@ defined('ABSPATH') or die("You can't access this file directly.");
16
 
17
  define('ASL_PATH', plugin_dir_path(__FILE__));
18
  define('ASL_FILE', __FILE__);
 
 
19
  define('ASL_INCLUDES_PATH', plugin_dir_path(__FILE__)."/includes/");
20
  define('ASL_CLASSES_PATH', plugin_dir_path(__FILE__)."/includes/classes/");
21
  define('ASL_FUNCTIONS_PATH', plugin_dir_path(__FILE__)."/includes/functions/");
 
22
  define('ASL_DIR', 'ajax-search-lite');
23
  define('ASL_URL', plugin_dir_url(__FILE__));
24
- define('ASL_CURRENT_VERSION', 4650);
25
- define('ASL_CURR_VER_STRING', "4.6.5");
26
  define('ASL_DEBUG', 0);
27
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
28
 
3
  Plugin Name: Ajax Search Lite
4
  Plugin URI: http://wp-dreams.com
5
  Description: The lite version of the most powerful ajax powered search engine for WordPress.
6
+ Version: 4.6.2
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
16
 
17
  define('ASL_PATH', plugin_dir_path(__FILE__));
18
  define('ASL_FILE', __FILE__);
19
+ define('ASL_CSS_PATH', plugin_dir_path(__FILE__)."/css/");
20
+ define('ASL_CACHE_PATH', plugin_dir_path(__FILE__)."/cache/");
21
  define('ASL_INCLUDES_PATH', plugin_dir_path(__FILE__)."/includes/");
22
  define('ASL_CLASSES_PATH', plugin_dir_path(__FILE__)."/includes/classes/");
23
  define('ASL_FUNCTIONS_PATH', plugin_dir_path(__FILE__)."/includes/functions/");
24
+ define('ASL_TT_CACHE_PATH', plugin_dir_path(__FILE__)."/includes/cache/");
25
  define('ASL_DIR', 'ajax-search-lite');
26
  define('ASL_URL', plugin_dir_url(__FILE__));
27
+ define('ASL_CURRENT_VERSION', 4620);
28
+ define('ASL_CURR_VER_STRING', "4.6.2");
29
  define('ASL_DEBUG', 0);
30
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
31
 
backend/settings/assets/search_instance.js CHANGED
@@ -22,35 +22,4 @@ jQuery(function ($) {
22
  } else {
23
  $('.tabs a[tabid=1]').click();
24
  }
25
-
26
- $('input[name="search_all_cf"]').change(function(){
27
- if ($(this).val() == 1)
28
- $('input[name="customfields"]').parent().addClass('disabled');
29
- else
30
- $('input[name="customfields"]').parent().removeClass('disabled');
31
- });
32
- $('input[name="search_all_cf"]').change();
33
-
34
- $('input[name="redirectonclick"] + .wpdreamsYesNoInner').click(function(){
35
- if ($(this).prev().val() == 0)
36
- $('select[name="redirect_click_to"]').parent().addClass('disabled');
37
- else
38
- $('select[name="redirect_click_to"]').parent().removeClass('disabled');
39
- });
40
- $('input[name="redirect_on_enter"] + .wpdreamsYesNoInner').click(function(){
41
- if ($(this).prev().val() == 0)
42
- $('select[name="redirect_enter_to"]').parent().addClass('disabled');
43
- else
44
- $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
45
- });
46
-
47
- if ( $('input[name="redirectonclick"]').val() == 0 )
48
- $('select[name="redirect_click_to"]').parent().addClass('disabled');
49
- else
50
- $('select[name="redirect_click_to"]').parent().removeClass('disabled');
51
-
52
- if ( $('input[name="redirect_on_enter"]').val() == 0 )
53
- $('select[name="redirect_enter_to"]').parent().addClass('disabled');
54
- else
55
- $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
56
  });
22
  } else {
23
  $('.tabs a[tabid=1]').click();
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  });
backend/settings/assets/types.js CHANGED
@@ -962,6 +962,7 @@ jQuery(function($){
962
  var items = $('ul[id*=sortable_conn] li', parent);
963
  var hidden = $('input[name=' + name + ']', parent);
964
  var val = "";
 
965
  items.each(function () {
966
  val += "|" + $('label', this).html() + ";" + $('input', this).val();
967
  });
962
  var items = $('ul[id*=sortable_conn] li', parent);
963
  var hidden = $('input[name=' + name + ']', parent);
964
  var val = "";
965
+ //console.log(val);
966
  items.each(function () {
967
  val += "|" + $('label', this).html() + ";" + $('input', this).val();
968
  });
backend/settings/class/customfselect.class.php CHANGED
@@ -56,7 +56,7 @@ if (!class_exists("wpdreamsCustomFSelect")) {
56
  final function get_custom_fields_list() {
57
  global $wpdb;
58
  $ret = array();
59
- $types = $wpdb->get_results("SELECT * FROM " . $wpdb->postmeta . " GROUP BY meta_key LIMIT 300", ARRAY_A);
60
  if ($types != null && is_array($types)) {
61
  foreach ($types as $k => $v) {
62
  $_t = array();
56
  final function get_custom_fields_list() {
57
  global $wpdb;
58
  $ret = array();
59
+ $types = $wpdb->get_results("SELECT * FROM " . $wpdb->postmeta . " WHERE substring(meta_key,1,1)<>'_' GROUP BY meta_key LIMIT 300", ARRAY_A);
60
  if ($types != null && is_array($types)) {
61
  foreach ($types as $k => $v) {
62
  $_t = array();
backend/settings/class/text.class.php CHANGED
@@ -17,7 +17,7 @@ if (!class_exists("wpdreamsText")) {
17
  echo "<div class='wpdreamsText'>";
18
  if ($this->label != "")
19
  echo "<label for='wpdreamstext_" . self::$_instancenumber . "'>" . $this->label . "</label>";
20
- echo "<input isparam=1 type='text' id='wpdreamstext_" . self::$_instancenumber . "' name='" . $this->name . "' value=\"" . stripslashes(esc_html($this->data)) . "\" />";
21
  echo "
22
  <div class='triggerer'></div>
23
  </div>";
17
  echo "<div class='wpdreamsText'>";
18
  if ($this->label != "")
19
  echo "<label for='wpdreamstext_" . self::$_instancenumber . "'>" . $this->label . "</label>";
20
+ echo "<input isparam=1 type='text' id='wpdreamstext_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
21
  echo "
22
  <div class='triggerer'></div>
23
  </div>";
backend/settings/class/textsmall.class.php CHANGED
@@ -12,12 +12,12 @@ if (!class_exists("wpdreamsTextSmall")) {
12
  * @copyright Copyright (c) 2014, Ernest Marcinko
13
  */
14
  class wpdreamsTextSmall extends wpdreamsType {
15
- public function getType() {
16
  parent::getType();
17
  echo "<div class='wpdreamsTextSmall'>";
18
  if ($this->label != "")
19
  echo "<label for='wpdreamstextsmall_" . self::$_instancenumber . "'>" . $this->label . "</label>";
20
- echo "<input isparam=1 class='small' type='text' id='wpdreamstextsmall_" . self::$_instancenumber . "' name='" . $this->name . "' value=\"" . stripslashes(esc_html($this->data)) . "\" />";
21
  echo "
22
  <div class='triggerer'></div>
23
  </div>";
12
  * @copyright Copyright (c) 2014, Ernest Marcinko
13
  */
14
  class wpdreamsTextSmall extends wpdreamsType {
15
+ function getType() {
16
  parent::getType();
17
  echo "<div class='wpdreamsTextSmall'>";
18
  if ($this->label != "")
19
  echo "<label for='wpdreamstextsmall_" . self::$_instancenumber . "'>" . $this->label . "</label>";
20
+ echo "<input isparam=1 class='small' type='text' id='wpdreamstextsmall_" . self::$_instancenumber . "' name='" . $this->name . "' value='" . $this->data . "' />";
21
  echo "
22
  <div class='triggerer'></div>
23
  </div>";
backend/settings/default_options.php CHANGED
@@ -24,7 +24,7 @@ function asl_do_init_options() {
24
  /* Compatibility defaults */
25
  $options['asl_compatibility_def'] = array(
26
  // CSS JS
27
- 'js_source' => "min",
28
  'js_init' => "dynamic",
29
  "detect_ajax" => 0,
30
  // DB
@@ -40,8 +40,6 @@ function asl_do_init_options() {
40
  $options['asl_defaults'] = array(
41
  'theme' => 'simple-red',
42
  'override_search_form' => 0,
43
- 'override_woo_search_form' => 0,
44
- 'keyword_logic' => "OR",
45
  'triggeronclick' => 1,
46
  'trigger_on_facet_change' => 1,
47
  'redirectonclick' => 0,
@@ -55,7 +53,6 @@ function asl_do_init_options() {
55
  'searchintitle' => 1,
56
  'searchincontent' => 1,
57
  'searchinexcerpt' => 1,
58
- 'search_all_cf' => 0,
59
  'customfields' => "",
60
  'override_default_results' => 0,
61
 
24
  /* Compatibility defaults */
25
  $options['asl_compatibility_def'] = array(
26
  // CSS JS
27
+ 'js_source' => "nomin",
28
  'js_init' => "dynamic",
29
  "detect_ajax" => 0,
30
  // DB
40
  $options['asl_defaults'] = array(
41
  'theme' => 'simple-red',
42
  'override_search_form' => 0,
 
 
43
  'triggeronclick' => 1,
44
  'trigger_on_facet_change' => 1,
45
  'redirectonclick' => 0,
53
  'searchintitle' => 1,
54
  'searchincontent' => 1,
55
  'searchinexcerpt' => 1,
 
56
  'customfields' => "",
57
  'override_default_results' => 0,
58
 
backend/settings/types.inc.php CHANGED
@@ -34,6 +34,7 @@ include('class/textarea-isparam.class.php');
34
  include('class/upload.class.php');
35
  include('class/yesno.class.php');
36
 
 
37
  add_action('admin_print_styles', 'admin_stylesV04');
38
  add_action('admin_enqueue_scripts', 'admin_scriptsV04');;
39
 
34
  include('class/upload.class.php');
35
  include('class/yesno.class.php');
36
 
37
+
38
  add_action('admin_print_styles', 'admin_stylesV04');
39
  add_action('admin_enqueue_scripts', 'admin_scriptsV04');;
40
 
backend/tabs/instance/general/behavior.php CHANGED
@@ -1,16 +1,3 @@
1
- <div class="item">
2
- <?php
3
- $o = new wpdreamsCustomSelect("keyword_logic", __("Keyword (phrase) logic?", "ajax-search-lite"), array(
4
- 'selects'=>array(
5
- array("option" => "OR", "value" => "OR"),
6
- array("option" => "AND", "value" => "AND")
7
- ),
8
- 'value'=>$sd['keyword_logic']
9
- ));
10
- $params[$o->getName()] = $o->getData();
11
- ?>
12
- <div class="descMsg">This determines if the result should match either of the entered phrases (OR logic) or all of the entered phrases (AND logic).</div>
13
- </div>
14
  <div class="item">
15
  <?php
16
  $o = new wpdreamsYesNo("triggeronclick", __("Trigger search when clicking on search icon?", "ajax-search-lite"),
@@ -109,4 +96,31 @@
109
  $params[$o->getName()] = $o->getData();
110
  ?>
111
  <p class="descMsg"><?php echo __("Might not work with some Themes.", "ajax-search-lite"); ?></p>
112
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="item">
2
  <?php
3
  $o = new wpdreamsYesNo("triggeronclick", __("Trigger search when clicking on search icon?", "ajax-search-lite"),
96
  $params[$o->getName()] = $o->getData();
97
  ?>
98
  <p class="descMsg"><?php echo __("Might not work with some Themes.", "ajax-search-lite"); ?></p>
99
+ </div>
100
+ <script>
101
+ jQuery(function($) {
102
+ $('input[name="redirectonclick"] + .wpdreamsYesNoInner').click(function(){
103
+ if ($(this).prev().val() == 0)
104
+ $('select[name="redirect_click_to"]').parent().addClass('disabled');
105
+ else
106
+ $('select[name="redirect_click_to"]').parent().removeClass('disabled');
107
+ });
108
+ $('input[name="redirect_on_enter"] + .wpdreamsYesNoInner').click(function(){
109
+ if ($(this).prev().val() == 0)
110
+ $('select[name="redirect_enter_to"]').parent().addClass('disabled');
111
+ else
112
+ $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
113
+ });
114
+
115
+ if ( $('input[name="redirectonclick"]').val() == 0 )
116
+ $('select[name="redirect_click_to"]').parent().addClass('disabled');
117
+ else
118
+ $('select[name="redirect_click_to"]').parent().removeClass('disabled');
119
+
120
+ if ( $('input[name="redirect_on_enter"]').val() == 0 )
121
+ $('select[name="redirect_enter_to"]').parent().addClass('disabled');
122
+ else
123
+ $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
124
+
125
+ });
126
+ </script>
backend/tabs/instance/general/sources.php CHANGED
@@ -27,16 +27,6 @@ $themes = array(
27
  ?>
28
  <p class="descMsg"><?php echo __("Works with most themes, which use the searchform.php theme file to display their search forms.", "ajax-search-lite"); ?></p>
29
  </div>
30
- <?php if ( class_exists("WooCommerce") ): ?>
31
- <div class="item">
32
- <?php
33
- $o = new wpdreamsYesNo("override_woo_search_form", __("Try to replace the WooCommerce search with Ajax Search Lite form?", "ajax-search-lite"),
34
- $sd["override_woo_search_form"]);
35
- $params[$o->getName()] = $o->getData();
36
- ?>
37
- <p class="descMsg"><?php echo __("Works with most themes, which use the searchform.php theme file to display their search forms.", "ajax-search-lite"); ?></p>
38
- </div>
39
- <?php endif; ?>
40
  <div class="item">
41
  <?php
42
  $o = new wpdreamsYesNo("searchinposts", __("Search in posts?", "ajax-search-lite"),
@@ -78,16 +68,8 @@ $themes = array(
78
  $params[$o->getName()] = $o->getData();
79
  ?>
80
  </div>
81
- <div class="item">
82
- <?php
83
- $o = new wpdreamsYesNo("search_all_cf", __("Search all custom fields?", "ajax-search-lite"),
84
- $sd['search_all_cf']);
85
- $params[$o->getName()] = $o->getData();
86
- ?>
87
- </div>
88
- <div class="item">
89
- <?php
90
- $o = new wpdreamsCustomFields("customfields", __("..or search in selected custom fields?", "ajax-search-lite"),
91
  $sd['customfields']);
92
  $params[$o->getName()] = $o->getData();
93
  $params['selected-'.$o->getName()] = $o->getSelected();
27
  ?>
28
  <p class="descMsg"><?php echo __("Works with most themes, which use the searchform.php theme file to display their search forms.", "ajax-search-lite"); ?></p>
29
  </div>
 
 
 
 
 
 
 
 
 
 
30
  <div class="item">
31
  <?php
32
  $o = new wpdreamsYesNo("searchinposts", __("Search in posts?", "ajax-search-lite"),
68
  $params[$o->getName()] = $o->getData();
69
  ?>
70
  </div>
71
+ <div class="item"><?php
72
+ $o = new wpdreamsCustomFields("customfields", __("Search in custom fields", "ajax-search-lite"),
 
 
 
 
 
 
 
 
73
  $sd['customfields']);
74
  $params[$o->getName()] = $o->getData();
75
  $params['selected-'.$o->getName()] = $o->getSelected();
css/fonts/icons2.eot DELETED
Binary file
css/fonts/icons2.svg DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
5
- <defs>
6
- <font id="icons" horiz-adv-x="1000" >
7
- <font-face font-family="icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
- <missing-glyph horiz-adv-x="1000" />
9
- <glyph glyph-name="ok" unicode="&#xe800;" d="M352-10l-334 333 158 160 176-174 400 401 159-160z" horiz-adv-x="928" />
10
-
11
- <glyph glyph-name="forward" unicode="&#xe801;" d="M1000 493q0-15-11-25l-285-286q-11-11-25-11t-26 11-10 25v143h-125q-55 0-98-3t-86-12-74-24-59-39-45-56-27-77-10-101q0-31 3-69 0-4 2-13t1-15q0-8-5-14t-13-6q-9 0-15 10-4 5-8 12t-7 17-6 13q-71 159-71 252 0 111 30 186 90 225 488 225h125v143q0 14 10 25t26 10 25-10l285-286q11-11 11-25z" horiz-adv-x="1000" />
12
- </font>
13
- </defs>
14
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/fonts/icons2.ttf DELETED
Binary file
css/fonts/icons2.woff DELETED
Binary file
css/fonts/icons2.woff2 DELETED
Binary file
css/style-classic-blue.css CHANGED
@@ -262,6 +262,49 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
262
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  div[id*="ajaxsearchliteres"] span.highlighted {
266
  font-weight: bold;
267
  color: #d9312b;
@@ -298,11 +341,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
298
 
299
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
300
  background-color: rgb(34, 34, 34);
301
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
302
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
303
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
304
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
305
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
306
  }
307
 
308
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
262
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
263
  }
264
 
265
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
266
+ background: #fff; /* rgba fallback */
267
+ background: rgba(255, 255, 255, 0.9);
268
+ filter: "alpha(opacity=90)";
269
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
270
+ }
271
+
272
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
273
+ background: rgba(255, 255, 255, 0.95);
274
+ filter: "alpha(opacity=95)";
275
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
276
+ }
277
+
278
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
279
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
280
+ background: rgba(255, 255, 255, 1);
281
+ filter: "alpha(opacity=100)";
282
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
283
+ }
284
+
285
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
286
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
287
+ background: rgb(250, 250, 250);
288
+ filter: "alpha(opacity=100)";
289
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
290
+ }
291
+
292
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
293
+ border-color: rgba(136, 183, 213, 0);
294
+ border-top-color: rgb(10, 63, 77);
295
+ border-width: 6px;
296
+ left: 50%;
297
+ margin-left: -6px;
298
+ }
299
+
300
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
301
+ border-color: rgba(136, 183, 213, 0);
302
+ border-bottom-color: rgb(10, 63, 77);
303
+ border-width: 6px;
304
+ left: 50%;
305
+ margin-left: -6px;
306
+ }
307
+
308
  div[id*="ajaxsearchliteres"] span.highlighted {
309
  font-weight: bold;
310
  color: #d9312b;
341
 
342
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
343
  background-color: rgb(34, 34, 34);
344
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
345
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
346
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
347
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
348
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
349
+ }
350
+
351
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
352
+ border: 3px solid rgb(255, 255, 255);
353
+ border-right: none;
354
+ border-top: none;
355
  }
356
 
357
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-curvy-black.css CHANGED
@@ -259,12 +259,47 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
259
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
260
  }
261
 
262
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown {
263
- border-color: rgb(62, 62, 62) transparent transparent transparent;
 
 
 
264
  }
265
 
266
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp {
267
- border-color: transparent transparent rgb(62, 62, 62) transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  }
269
 
270
  div[id*="ajaxsearchliteres"] span.highlighted {
@@ -305,11 +340,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
305
  }
306
 
307
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
308
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
309
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
310
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
311
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
312
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
313
  }
314
 
315
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
259
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
260
  }
261
 
262
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
263
+ background: #fff; /* rgba fallback */
264
+ background: rgba(255, 255, 255, 0.9);
265
+ filter: "alpha(opacity=90)";
266
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
267
  }
268
 
269
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
270
+ background: rgba(255, 255, 255, 0.95);
271
+ filter: "alpha(opacity=95)";
272
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
273
+ }
274
+
275
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
276
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
277
+ background: rgba(255, 255, 255, 1);
278
+ filter: "alpha(opacity=100)";
279
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
280
+ }
281
+
282
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
283
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
284
+ background: rgb(250, 250, 250);
285
+ filter: "alpha(opacity=100)";
286
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
287
+ }
288
+
289
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
290
+ border-color: rgba(136, 183, 213, 0);
291
+ border-top-color: rgb(62, 62, 62);
292
+ border-width: 6px;
293
+ left: 50%;
294
+ margin-left: -6px;
295
+ }
296
+
297
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
298
+ border-color: rgba(136, 183, 213, 0);
299
+ border-bottom-color: rgb(62, 62, 62);
300
+ border-width: 6px;
301
+ left: 50%;
302
+ margin-left: -6px;
303
  }
304
 
305
  div[id*="ajaxsearchliteres"] span.highlighted {
340
  }
341
 
342
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
343
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
344
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
345
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
346
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
347
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
348
+ }
349
+
350
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
351
+ border: 3px solid rgb(255, 255, 255);
352
+ border-right: none;
353
+ border-top: none;
354
  }
355
 
356
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-curvy-blue.css CHANGED
@@ -257,12 +257,47 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
257
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
258
  }
259
 
260
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown {
261
- border-color: rgb(62, 62, 62) transparent transparent transparent;
 
 
 
262
  }
263
 
264
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp {
265
- border-color: transparent transparent rgb(62, 62, 62) transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  }
267
 
268
  div[id*="ajaxsearchliteres"] span.highlighted {
@@ -303,11 +338,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
303
  }
304
 
305
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
306
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
307
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
308
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
309
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
310
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
311
  }
312
 
313
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
257
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
258
  }
259
 
260
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
261
+ background: #fff; /* rgba fallback */
262
+ background: rgba(255, 255, 255, 0.9);
263
+ filter: "alpha(opacity=90)";
264
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
265
  }
266
 
267
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
268
+ background: rgba(255, 255, 255, 0.95);
269
+ filter: "alpha(opacity=95)";
270
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
271
+ }
272
+
273
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
274
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
275
+ background: rgba(255, 255, 255, 1);
276
+ filter: "alpha(opacity=100)";
277
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
278
+ }
279
+
280
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
281
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
282
+ background: rgb(250, 250, 250);
283
+ filter: "alpha(opacity=100)";
284
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
285
+ }
286
+
287
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
288
+ border-color: rgba(136, 183, 213, 0);
289
+ border-top-color: rgb(62, 62, 62);
290
+ border-width: 6px;
291
+ left: 50%;
292
+ margin-left: -6px;
293
+ }
294
+
295
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
296
+ border-color: rgba(136, 183, 213, 0);
297
+ border-bottom-color: rgb(62, 62, 62);
298
+ border-width: 6px;
299
+ left: 50%;
300
+ margin-left: -6px;
301
  }
302
 
303
  div[id*="ajaxsearchliteres"] span.highlighted {
338
  }
339
 
340
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
341
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
342
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
343
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
344
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
345
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
346
+ }
347
+
348
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
349
+ border: 3px solid rgb(255, 255, 255);
350
+ border-right: none;
351
+ border-top: none;
352
  }
353
 
354
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-curvy-red.css CHANGED
@@ -259,12 +259,47 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
259
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
260
  }
261
 
262
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown {
263
- border-color: rgb(62, 62, 62) transparent transparent transparent;
 
 
 
264
  }
265
 
266
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp {
267
- border-color: transparent transparent rgb(62, 62, 62) transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  }
269
 
270
  div[id*="ajaxsearchliteres"] span.highlighted {
@@ -305,11 +340,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
305
  }
306
 
307
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
308
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
309
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
310
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
311
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
312
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
313
  }
314
 
315
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
259
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
260
  }
261
 
262
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
263
+ background: #fff; /* rgba fallback */
264
+ background: rgba(255, 255, 255, 0.9);
265
+ filter: "alpha(opacity=90)";
266
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
267
  }
268
 
269
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
270
+ background: rgba(255, 255, 255, 0.95);
271
+ filter: "alpha(opacity=95)";
272
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
273
+ }
274
+
275
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
276
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
277
+ background: rgba(255, 255, 255, 1);
278
+ filter: "alpha(opacity=100)";
279
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
280
+ }
281
+
282
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
283
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
284
+ background: rgb(250, 250, 250);
285
+ filter: "alpha(opacity=100)";
286
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
287
+ }
288
+
289
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
290
+ border-color: rgba(136, 183, 213, 0);
291
+ border-top-color: rgb(62, 62, 62);
292
+ border-width: 6px;
293
+ left: 50%;
294
+ margin-left: -6px;
295
+ }
296
+
297
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
298
+ border-color: rgba(136, 183, 213, 0);
299
+ border-bottom-color: rgb(62, 62, 62);
300
+ border-width: 6px;
301
+ left: 50%;
302
+ margin-left: -6px;
303
  }
304
 
305
  div[id*="ajaxsearchliteres"] span.highlighted {
340
  }
341
 
342
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
343
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
344
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
345
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
346
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
347
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
348
+ }
349
+
350
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
351
+ border: 3px solid rgb(255, 255, 255);
352
+ border-right: none;
353
+ border-top: none;
354
  }
355
 
356
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-simple-blue.css CHANGED
@@ -280,6 +280,49 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
280
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  div[id*="ajaxsearchliteres"] span.highlighted {
284
  font-weight: bold;
285
  color: #d9312b;
@@ -315,11 +358,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
315
 
316
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
317
  background-color: rgb(34, 34, 34);
318
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
319
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
320
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
321
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
322
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
323
  }
324
 
325
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
280
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
281
  }
282
 
283
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
284
+ background: #fff; /* rgba fallback */
285
+ background: rgba(rgb(255, 255, 255), 0.9);
286
+ filter: "alpha(opacity=90)";
287
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
288
+ }
289
+
290
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
291
+ background: rgba(rgb(255, 255, 255), 0.95);
292
+ filter: "alpha(opacity=95)";
293
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
294
+ }
295
+
296
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
297
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
298
+ background: rgba(rgb(255, 255, 255), 1);
299
+ filter: "alpha(opacity=100)";
300
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
301
+ }
302
+
303
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
304
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
305
+ background: rgb(250, 250, 250);
306
+ filter: "alpha(opacity=100)";
307
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
308
+ }
309
+
310
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
311
+ border-color: rgba(136, 183, 213, 0);
312
+ border-top-color: rgb(255, 255, 255);
313
+ border-width: 6px;
314
+ left: 50%;
315
+ margin-left: -6px;
316
+ }
317
+
318
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
319
+ border-color: rgba(136, 183, 213, 0);
320
+ border-bottom-color: rgb(255, 255, 255);
321
+ border-width: 6px;
322
+ left: 50%;
323
+ margin-left: -6px;
324
+ }
325
+
326
  div[id*="ajaxsearchliteres"] span.highlighted {
327
  font-weight: bold;
328
  color: #d9312b;
358
 
359
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
360
  background-color: rgb(34, 34, 34);
361
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
362
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
363
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
364
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
365
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
366
+ }
367
+
368
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
369
+ border: 3px solid rgb(255, 255, 255);
370
+ border-right: none;
371
+ border-top: none;
372
  }
373
 
374
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-simple-grey.css CHANGED
@@ -282,6 +282,33 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
282
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
283
  }
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
286
  border-color: rgba(136, 183, 213, 0);
287
  border-top-color: rgb(255, 255, 255);
@@ -333,11 +360,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
333
 
334
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
335
  background-color: rgb(34, 34, 34);
336
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
337
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
338
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
339
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
340
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
341
  }
342
 
343
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
282
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
283
  }
284
 
285
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
286
+ background: #fff; /* rgba fallback */
287
+ background: rgba(rgb(255, 255, 255), 0.9);
288
+ filter: "alpha(opacity=90)";
289
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
290
+ }
291
+
292
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
293
+ background: rgba(rgb(255, 255, 255), 0.95);
294
+ filter: "alpha(opacity=95)";
295
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
296
+ }
297
+
298
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
299
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
300
+ background: rgba(rgb(255, 255, 255), 1);
301
+ filter: "alpha(opacity=100)";
302
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
303
+ }
304
+
305
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
306
+ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
307
+ background: rgb(250, 250, 250);
308
+ filter: "alpha(opacity=100)";
309
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
310
+ }
311
+
312
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
313
  border-color: rgba(136, 183, 213, 0);
314
  border-top-color: rgb(255, 255, 255);
360
 
361
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
362
  background-color: rgb(34, 34, 34);
363
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
364
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
365
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
366
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
367
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
368
+ }
369
+
370
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
371
+ border: 3px solid rgb(255, 255, 255);
372
+ border-right: none;
373
+ border-top: none;
374
  }
375
 
376
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-simple-red.css CHANGED
@@ -319,6 +319,19 @@ div[id*="ajaxsearchliteres"] .results .item .etc .asl_date {
319
  }
320
 
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
323
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
324
  background: rgba(rgb(255, 255, 255), 1);
@@ -348,6 +361,22 @@ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dra
348
  -ms-filter: "alpha(opacity=100)"; /* old ie */
349
  }
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  div[id*="ajaxsearchliteres"] span.highlighted {
352
  font-weight: bold;
353
  color: #d9312b;
@@ -403,11 +432,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
403
 
404
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
405
  background-color: rgb(34, 34, 34);
406
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
407
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
408
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
409
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
410
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
411
  }
412
 
413
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
319
  }
320
 
321
 
322
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
323
+ background: #fff; /* rgba fallback */
324
+ background: rgba(rgb(255, 255, 255), 0.9);
325
+ filter: "alpha(opacity=90)";
326
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
327
+ }
328
+
329
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
330
+ background: rgba(rgb(255, 255, 255), 0.95);
331
+ filter: "alpha(opacity=95)";
332
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
333
+ }
334
+
335
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
336
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
337
  background: rgba(rgb(255, 255, 255), 1);
361
  -ms-filter: "alpha(opacity=100)"; /* old ie */
362
  }
363
 
364
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
365
+ border-color: rgba(136, 183, 213, 0);
366
+ border-top-color: rgb(255, 255, 255);
367
+ border-width: 6px;
368
+ left: 50%;
369
+ margin-left: -6px;
370
+ }
371
+
372
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
373
+ border-color: rgba(136, 183, 213, 0);
374
+ border-bottom-color: rgb(255, 255, 255);
375
+ border-width: 6px;
376
+ left: 50%;
377
+ margin-left: -6px;
378
+ }
379
+
380
  div[id*="ajaxsearchliteres"] span.highlighted {
381
  font-weight: bold;
382
  color: #d9312b;
432
 
433
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
434
  background-color: rgb(34, 34, 34);
435
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
436
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
437
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
438
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
439
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
440
+ }
441
+
442
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
443
+ border: 3px solid rgb(255, 255, 255);
444
+ border-right: none;
445
+ border-top: none;
446
  }
447
 
448
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style-underline.css CHANGED
@@ -257,6 +257,19 @@ div[id*="ajaxsearchliteres"] .results .item p.desc {
257
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
261
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
262
  background: rgba(255, 255, 255, 1);
@@ -271,12 +284,20 @@ div[id*="ajaxsearchliteres"].horizontal .mCSB_scrollTools .mCSB_dragger.mCSB_dra
271
  -ms-filter: "alpha(opacity=100)"; /* old ie */
272
  }
273
 
274
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown {
275
- border-color: rgb(62, 62, 62) transparent transparent transparent;
 
 
 
 
276
  }
277
 
278
- div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp {
279
- border-color: transparent transparent rgb(62, 62, 62) transparent;
 
 
 
 
280
  }
281
 
282
  div[id*="ajaxsearchliteres"] span.highlighted {
@@ -317,11 +338,17 @@ div[id*="ajaxsearchlitesettings"].searchsettings .label {
317
  }
318
 
319
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
320
- background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
321
- background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
322
- background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
323
- background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));
324
- background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(54, 55, 58));;
 
 
 
 
 
 
325
  }
326
 
327
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
257
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
258
  }
259
 
260
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
261
+ background: #fff; /* rgba fallback */
262
+ background: rgba(255, 255, 255, 0.9);
263
+ filter: "alpha(opacity=90)";
264
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
265
+ }
266
+
267
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
268
+ background: rgba(255, 255, 255, 0.95);
269
+ filter: "alpha(opacity=95)";
270
+ -ms-filter: "alpha(opacity=95)"; /* old ie */
271
+ }
272
+
273
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
274
  div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
275
  background: rgba(255, 255, 255, 1);
284
  -ms-filter: "alpha(opacity=100)"; /* old ie */
285
  }
286
 
287
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonDown:after {
288
+ border-color: rgba(136, 183, 213, 0);
289
+ border-top-color: rgb(62, 62, 62);
290
+ border-width: 6px;
291
+ left: 50%;
292
+ margin-left: -6px;
293
  }
294
 
295
+ div[id*="ajaxsearchliteres"] .mCSB_scrollTools .mCSB_buttonUp:after {
296
+ border-color: rgba(136, 183, 213, 0);
297
+ border-bottom-color: rgb(62, 62, 62);
298
+ border-width: 6px;
299
+ left: 50%;
300
+ margin-left: -6px;
301
  }
302
 
303
  div[id*="ajaxsearchliteres"] span.highlighted {
338
  }
339
 
340
  div[id*="ajaxsearchlitesettings"].searchsettings .option label {
341
+ background-image: linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
342
+ background-image: -webkit-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
343
+ background-image: -moz-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
344
+ background-image: -o-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));
345
+ background-image: -ms-linear-gradient(180deg, rgb(34, 34, 34), rgb(69, 72, 77));;
346
+ }
347
+
348
+ div[id*="ajaxsearchlitesettings"].searchsettings .option label:after {
349
+ border: 3px solid rgb(255, 255, 255);
350
+ border-right: none;
351
+ border-top: none;
352
  }
353
 
354
  div[id*="ajaxsearchlitesettings"].searchsettings fieldset .categoryfilter {
css/style.basic.css CHANGED
@@ -49,6 +49,8 @@ div[id*='ajaxsearchlite'].asl_main_container {
49
  -webkit-transition: width 130ms linear;
50
  }
51
 
 
 
52
  /* General css reset */
53
 
54
  div[id*='ajaxsearchlite'],
@@ -553,6 +555,256 @@ div[id*='ajaxsearchliteres'] .resdrg {
553
  height: auto;
554
  }
555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  div[id*='ajaxsearchlite'] .group:first-of-type {
557
  margin: 0px 0 -3px;
558
  }
@@ -565,19 +817,11 @@ div[id*='ajaxsearchlitesettings'].searchsettings {
565
  z-index: 1101;
566
  border-radius: 0 0 3px 3px;
567
  visibility: hidden;
568
- padding: 0;
569
- }
570
-
571
- div[id*='ajaxsearchlitesettings'].searchsettings form {
572
- display: flex;
573
- flex-wrap: wrap;
574
- /* some themes like to add un-removable margin and padding.. */
575
- margin: 0 0 12px 0 !important;
576
- padding: 0 !important;
577
  }
578
 
579
  div[id*='ajaxsearchlitesettings'].searchsettings .option {
580
- margin: 2px 10px 0 10px;
581
  *padding-bottom: 10px;
582
  }
583
 
@@ -589,7 +833,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option {
589
  div[id*='ajaxsearchlitesettings'].searchsettings .label {
590
  font-size: 14px;
591
  line-height: 20px !important;
592
- margin: 0;
593
  width: 150px;
594
  text-shadow: none;
595
  padding: 0;
@@ -612,27 +856,10 @@ div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .label {
612
  float: right !important;
613
  }
614
 
615
- div[id*='ajaxsearchlitesettings'].searchsettings .asl_option {
616
- display: flex;
617
- flex-direction: row;
618
- -webkit-flex-direction: row;
619
- align-items: flex-start;
620
- margin: 0 0 10px 0;
621
- }
622
-
623
- div[id*='ajaxsearchlitesettings'].searchsettings .asl_option.asl-o-last,
624
- div[id*='ajaxsearchlitesettings'].searchsettings .asl_option:last-child {
625
- margin-bottom: 0;
626
- }
627
-
628
  div[id*='ajaxsearchlitesettings'].searchsettings .option {
629
  width: 17px;
630
  height: 17px;
631
  position: relative;
632
- flex-grow: 0;
633
- -webkit-flex-grow: 0;
634
- flex-shrink: 0;
635
- -webkit-flex-shrink: 0;
636
  }
637
 
638
  div[id*='ajaxsearchlitesettings'].searchsettings .option label {
@@ -642,10 +869,11 @@ div[id*='ajaxsearchlitesettings'].searchsettings .option label {
642
  height: 17px;
643
  top: 0;
644
  padding: 0;
645
- border-radius: 2px;
646
- -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .2);
647
- -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .2);
648
- box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .2);
 
649
  }
650
 
651
  div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option label {
@@ -653,24 +881,26 @@ div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option label {
653
  }
654
 
655
  div[id*='ajaxsearchlitesettings'].searchsettings .option label:after {
 
 
656
  opacity: 0;
657
- font-family: 'aslsicons2';
658
- content: "\e800";
659
- font-weight: normal !important;
660
  background: transparent;
661
- border: none !important;
 
662
  box-sizing: content-box;
663
- color: white;
664
- height: 100%;
665
- width: 100%;
666
- padding: 0 !important;
667
- margin: 1px 0 0 0px !important;
668
- line-height: 17px;
669
- text-align: center;
670
- text-decoration: none;
671
- text-shadow: none;
672
- display: block;
673
- font-size: 11px;
674
  }
675
 
676
  div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option label:after {
@@ -697,7 +927,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings fieldset {
697
  div[id*='ajaxsearchlitesettings'].searchsettings fieldset {
698
  background: transparent;
699
  font-size: 0.9em;
700
- margin: 12px 0 0 !important;
701
  padding: 0px;
702
  width: 192px;
703
  }
@@ -707,119 +937,31 @@ div[id*='ajaxsearchlitesettings'].searchsettings fieldset .label {
707
  display: block;
708
  }
709
 
710
- div[id*='ajaxsearchlitesettings'].searchsettings form fieldset legend {
711
- padding: 5px 0 8px 10px;
712
- }
713
-
714
- /*
715
- ------------------------------------------------------------------------------------------------------------------------
716
- 10. SCROLLBAR
717
- 10.1. BASIC STYLE
718
- ------------------------------------------------------------------------------------------------------------------------
719
- */
720
-
721
- div[id*='ajaxsearchlite'] .mCustomScrollBox .mCSB_scrollTools {
722
- width: 16px;
723
- height: 100%;
724
- top: 0;
725
- right: 0;
726
- }
727
-
728
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerContainer {
729
- height: 100%;
730
- -webkit-box-sizing: border-box;
731
- -moz-box-sizing: border-box;
732
- box-sizing: border-box;
733
- margin: 2px 0;
734
- }
735
-
736
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp,
737
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
738
- position: relative;
739
- margin: -8px 0px 0 3px;
740
- background-position: 0 0;
741
- background: transparent;
742
- border-color: transparent transparent rgb(255, 255, 255) transparent;
743
- border-style: solid;
744
- border-width: 0 5px 6px 5px;
745
- width: 0;
746
- height: 0;
747
- padding: 10px 0 0 0;
748
- background: 0;
749
- opacity: 0.4;
750
- filter: "alpha(opacity=40)";
751
- -ms-filter: "alpha(opacity=40)"; /* old ie */
752
- display: block;
753
- overflow: hidden;
754
- cursor: pointer;
755
- }
756
-
757
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
758
- margin: -16px 0px 0 3px;
759
- border-width: 6px 5px 0 5px;
760
- border-color: rgb(255, 255, 255) transparent transparent transparent;
761
- position: relative;
762
- top: 100%;
763
- }
764
-
765
- div[id*='ajaxsearchlite'] .mCustomScrollbar{ -ms-touch-action: pinch-zoom; touch-action: pinch-zoom; /* direct pointer events to js */ }
766
- div[id*='ajaxsearchlite'] .mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; }
767
-
768
- div[id*='ajaxsearchlite'] .mCustomScrollBox{ /* contains plugin's markup */
769
- position: relative;
770
- overflow: hidden;
771
- height: 100%;
772
- max-width: 100%;
773
- outline: none;
774
- direction: ltr;
775
- }
776
-
777
- div[id*='ajaxsearchlite'] .mCSB_container{ /* contains the original content */
778
- overflow: hidden;
779
  width: auto;
780
- height: auto;
 
781
  }
782
 
783
-
784
- /*
785
- ------------------------------------------------------------------------------------------------------------------------
786
- 10.2. VERTICAL SCROLLBAR
787
- y-axis
788
- ------------------------------------------------------------------------------------------------------------------------
789
- */
790
-
791
- div[id*='ajaxsearchlite'] .mCSB_inside > .mCSB_container{ margin-right: 20px; }
792
-
793
- div[id*='ajaxsearchlite'] .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
794
-
795
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */
796
  margin-right: 0;
797
- margin-left: 30px;
798
  }
799
 
800
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */
 
 
 
801
 
802
- div[id*='ajaxsearchlite'] .mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */
803
- position: absolute;
804
  width: 16px;
805
- height: auto;
806
- left: auto;
807
  top: 0;
808
  right: 0;
809
- bottom: 0;
810
  }
811
 
812
- div[id*='ajaxsearchlite'] .mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */
813
-
814
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools,
815
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */
816
- right: auto;
817
- left: 0;
818
- }
819
-
820
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */
821
-
822
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */
823
  position: absolute;
824
  top: 0;
825
  left: 0;
@@ -828,25 +970,27 @@ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerContainer{ /* contains
828
  height: auto;
829
  }
830
 
831
- div[id*='ajaxsearchlite'] .mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; }
 
 
832
 
833
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerRail{
834
  width: 2px;
835
  height: 100%;
836
  margin: 0 auto;
837
- -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
 
 
838
  }
839
 
840
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger{ /* the draggable element */
841
  cursor: pointer;
842
  width: 100%;
843
- height: 30px; /* minimum dragger height */
844
- z-index: 1;
845
  }
846
 
847
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
848
- width: 6px;
849
- box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.5);
850
  height: 100%;
851
  margin: 0 auto;
852
  -webkit-border-radius: 10px;
@@ -855,156 +999,215 @@ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
855
  text-align: center;
856
  }
857
 
858
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
859
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ }
860
-
861
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
862
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ }
863
 
864
- /*
865
- ------------------------------------------------------------------------------------------------------------------------
866
- 10.4. VERTICAL AND HORIZONTAL SCROLLBARS
867
- yx-axis
868
- ------------------------------------------------------------------------------------------------------------------------
869
- */
870
 
871
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper{
872
- position: absolute;
873
  height: auto;
874
- width: auto;
 
875
  overflow: hidden;
876
- top: 0;
877
- left: 0;
878
- right: 0;
879
- bottom: 0;
880
- margin-right: 30px;
 
 
 
 
881
  margin-bottom: 30px;
882
  }
883
 
884
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper > .mCSB_container{
885
- padding-right: 30px;
886
- padding-bottom: 30px;
887
- -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
 
 
 
 
888
  }
889
 
890
- div[id*='ajaxsearchlite'] .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; }
 
 
 
 
 
 
 
 
 
 
 
891
 
892
- div[id*='ajaxsearchlite'] .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; }
 
 
 
893
 
894
- /* non-visible horizontal scrollbar */
895
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; }
 
 
 
 
 
 
896
 
897
- /* non-visible vertical scrollbar/RTL direction/left-side scrollbar */
898
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,
899
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; }
 
 
 
 
 
 
 
 
900
 
901
- /* RTL direction/left-side scrollbar */
902
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; }
 
 
903
 
904
- /* non-visible scrollbar/RTL direction/left-side scrollbar */
905
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; }
 
906
 
907
- div[id*='ajaxsearchlite'] .mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */
908
- margin-right: 0;
909
- margin-left: 30px;
 
 
910
  }
911
 
912
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{ padding-right: 0; }
 
 
 
 
 
913
 
914
- div[id*='ajaxsearchlite'] .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{ padding-bottom: 0; }
 
 
 
 
 
 
915
 
916
- div[id*='ajaxsearchlite'] .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{
917
- margin-right: 0; /* non-visible scrollbar */
918
- margin-left: 0;
 
 
 
919
  }
920
 
921
- /* non-visible horizontal scrollbar */
922
- div[id*='ajaxsearchlite'] .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; }
 
 
 
923
 
924
- /*
925
- ------------------------------------------------------------------------------------------------------------------------
926
- 10.5. TRANSITIONS
927
- ------------------------------------------------------------------------------------------------------------------------
928
- */
 
929
 
930
- div[id*='ajaxsearchlite'] .mCSB_scrollTools,
931
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
932
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp,
933
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
934
- -webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
935
- -moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
936
- -o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
937
- transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
938
- }
939
-
940
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */
941
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,
942
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,
943
- div[id*='ajaxsearchlite'] .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{
944
- -webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s,
945
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
946
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
947
- opacity .2s ease-in-out, background-color .2s ease-in-out;
948
- -moz-transition: width .2s ease-out .2s, height .2s ease-out .2s,
949
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
950
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
951
- opacity .2s ease-in-out, background-color .2s ease-in-out;
952
- -o-transition: width .2s ease-out .2s, height .2s ease-out .2s,
953
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
954
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
955
- opacity .2s ease-in-out, background-color .2s ease-in-out;
956
- transition: width .2s ease-out .2s, height .2s ease-out .2s,
957
- margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
958
- margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
959
- opacity .2s ease-in-out, background-color .2s ease-in-out;
960
- }
961
-
962
- /*
963
- ----------------------------------------
964
- 10.6. THEMES
965
- ----------------------------------------
966
- */
967
-
968
- /* default theme ("light") */
969
-
970
- div[id*='ajaxsearchlite'] .mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
971
-
972
- div[id*='ajaxsearchlite'] .mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools,
973
- div[id*='ajaxsearchlite'] .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; }
974
-
975
- div[id*='ajaxsearchlite'] .mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag,
976
- div[id*='ajaxsearchlite'] .mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,
977
- div[id*='ajaxsearchlite'] .mCustomScrollBox:hover > .mCSB_scrollTools,
978
- div[id*='ajaxsearchlite'] .mCustomScrollBox:hover ~ .mCSB_scrollTools,
979
- div[id*='ajaxsearchlite'] .mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools,
980
- div[id*='ajaxsearchlite'] .mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; }
981
-
982
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerRail{
983
- background-color: #000; background-color: rgba(0,0,0,0.4);
984
- filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
985
- }
986
-
987
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
988
- background-color: #fff; background-color: rgba(255,255,255,1);
989
- filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)";
990
- }
991
-
992
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
993
- background-color: #fff; background-color: rgba(255,255,255,1);
994
- filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)";
995
- }
996
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
997
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
998
- background-color: #fff; background-color: rgba(255,255,255,1);
999
- filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)";
1000
- }
1001
-
1002
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp{
1003
  background-position: 0 0;
1004
  }
1005
 
1006
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp:hover,
1007
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown:hover { opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
 
1008
 
1009
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp:active,
1010
- div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown:active { opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  -webkit-transition: width 130ms linear;
50
  }
51
 
52
+ @import url(https://fonts.googleapis.com/css?family=Open+Sans:300|Open+Sans:400|Open+Sans:700);
53
+
54
  /* General css reset */
55
 
56
  div[id*='ajaxsearchlite'],
555
  height: auto;
556
  }
557
 
558
+ div[id*='ajaxsearchliteres'].horizontal .resdrg {
559
+ height: auto;
560
+ width: auto;
561
+ }
562
+
563
+ div[id*='ajaxsearchlite'] .mCSB_container {
564
+ width: auto;
565
+ margin-right: 20px;
566
+ overflow: hidden;
567
+ }
568
+
569
+ div[id*='ajaxsearchlite'] .mCSB_container.mCS_no_scrollbar {
570
+ margin-right: 0;
571
+ }
572
+
573
+ div[id*='ajaxsearchlite'] .mCustomScrollBox .mCSB_scrollTools {
574
+ width: 16px;
575
+ height: 100%;
576
+ top: 0;
577
+ right: 0;
578
+ }
579
+
580
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerContainer {
581
+ height: 100%;
582
+ -webkit-box-sizing: border-box;
583
+ -moz-box-sizing: border-box;
584
+ box-sizing: border-box;
585
+ }
586
+
587
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp + .mCSB_draggerContainer {
588
+ padding-bottom: 40px;
589
+ margin-top: 20px;
590
+ }
591
+
592
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerRail {
593
+ width: 2px;
594
+ height: 100%;
595
+ margin: 0 auto;
596
+ -webkit-border-radius: 10px;
597
+ -moz-border-radius: 10px;
598
+ border-radius: 10px;
599
+ }
600
+
601
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger {
602
+ cursor: pointer;
603
+ width: 100%;
604
+ height: 30px;
605
+ }
606
+
607
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
608
+ width: 6px;
609
+ box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.5);
610
+ height: 100%;
611
+ margin: 0 auto;
612
+ -webkit-border-radius: 10px;
613
+ -moz-border-radius: 10px;
614
+ border-radius: 10px;
615
+ text-align: center;
616
+ }
617
+
618
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp,
619
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
620
+ height: 20px;
621
+ -overflow: hidden;
622
+ margin: 0 auto;
623
+ cursor: pointer;
624
+ }
625
+
626
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
627
+ bottom: 0;
628
+ margin-top: -40px;
629
+ }
630
+
631
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_container {
632
+ height: auto;
633
+ margin-right: 0;
634
+ margin-bottom: 20px;
635
+ overflow: hidden;
636
+ }
637
+
638
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
639
+ margin-bottom: 0;
640
+ }
641
+
642
+ div[id*='ajaxsearchlite'] .mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools {
643
+ width: 100%;
644
+ height: 26px;
645
+ top: auto;
646
+ right: auto;
647
+ bottom: 0;
648
+ left: 0;
649
+ overflow: hidden;
650
+ }
651
+
652
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
653
+ height: 23px;
654
+ width: auto;
655
+ -webkit-box-sizing: border-box;
656
+ -moz-box-sizing: border-box;
657
+ box-sizing: border-box;
658
+ overflow: hidden;
659
+ }
660
+
661
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft + .mCSB_draggerContainer {
662
+ padding-bottom: 0;
663
+ padding-right: 20px;
664
+ }
665
+
666
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail {
667
+ width: 100%;
668
+ height: 2px;
669
+ margin: 7px 0;
670
+ -webkit-border-radius: 10px;
671
+ -moz-border-radius: 10px;
672
+ border-radius: 10px;
673
+ }
674
+
675
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger {
676
+ width: 30px;
677
+ height: 100%;
678
+ }
679
+
680
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
681
+ width: 100%;
682
+ height: 4px;
683
+ margin: 6px auto;
684
+ -webkit-border-radius: 10px;
685
+ -moz-border-radius: 10px;
686
+ border-radius: 10px;
687
+ }
688
+
689
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft,
690
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
691
+ width: 20px;
692
+ height: 100%;
693
+ overflow: hidden;
694
+ margin: 0 auto;
695
+ cursor: pointer;
696
+ float: left;
697
+ }
698
+
699
+ div[id*='ajaxsearchlite'] .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
700
+ right: 0;
701
+ bottom: auto;
702
+ margin-left: -40px;
703
+ margin-top: -16px;
704
+ float: right;
705
+ }
706
+
707
+ div[id*='ajaxsearchlite'] .mCustomScrollBox .mCSB_scrollTools {
708
+ opacity: 0.75;
709
+ }
710
+
711
+ div[id*='ajaxsearchlite'] .mCustomScrollBox:hover .mCSB_scrollTools {
712
+ opacity: 1;
713
+ }
714
+
715
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_draggerRail {
716
+ background: #000; /* rgba fallback */
717
+ background: rgba(0, 0, 0, 0.4);
718
+ filter: "alpha(opacity=40)";
719
+ -ms-filter: "alpha(opacity=40)"; /* old ie */
720
+ }
721
+
722
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp,
723
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown,
724
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonLeft,
725
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonRight {
726
+ padding: 10px 0 0 0;
727
+ background: 0;
728
+ opacity: 0.4;
729
+ filter: "alpha(opacity=40)";
730
+ -ms-filter: "alpha(opacity=40)"; /* old ie */
731
+ }
732
+
733
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
734
+ height: 0;
735
+ position: relative;
736
+ }
737
+
738
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown:after {
739
+ top: 100%;
740
+ border: solid transparent;
741
+ content: " ";
742
+ height: 0;
743
+ width: 0;
744
+ position: absolute;
745
+ }
746
+
747
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp {
748
+ position: relative;
749
+ margin: 10px 0 0 0;
750
+ height: 0;
751
+ }
752
+
753
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp:after {
754
+ bottom: 100%;
755
+ border: solid transparent;
756
+ content: " ";
757
+ height: 0;
758
+ width: 0;
759
+ position: absolute;
760
+ }
761
+
762
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp {
763
+ background-position: 0 0;
764
+ /*
765
+ sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
766
+ */
767
+ }
768
+
769
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown {
770
+ background-position: 0 -20px;
771
+ /*
772
+ sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
773
+ */
774
+ }
775
+
776
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonLeft {
777
+ background-position: 0 -40px;
778
+ /*
779
+ sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
780
+ */
781
+ }
782
+
783
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonRight {
784
+ background-position: 0 -56px;
785
+ /*
786
+ sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
787
+ */
788
+ }
789
+
790
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp:hover,
791
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown:hover,
792
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonLeft:hover,
793
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonRight:hover {
794
+ opacity: 0.75;
795
+ filter: "alpha(opacity=75)";
796
+ -ms-filter: "alpha(opacity=75)"; /* old ie */
797
+ }
798
+
799
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonUp:active,
800
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonDown:active,
801
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonLeft:active,
802
+ div[id*='ajaxsearchlite'] .mCSB_scrollTools .mCSB_buttonRight:active {
803
+ opacity: 0.9;
804
+ filter: "alpha(opacity=90)";
805
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
806
+ }
807
+
808
  div[id*='ajaxsearchlite'] .group:first-of-type {
809
  margin: 0px 0 -3px;
810
  }
817
  z-index: 1101;
818
  border-radius: 0 0 3px 3px;
819
  visibility: hidden;
820
+ padding: 0 0 8px 0;
 
 
 
 
 
 
 
 
821
  }
822
 
823
  div[id*='ajaxsearchlitesettings'].searchsettings .option {
824
+ margin: 10px;
825
  *padding-bottom: 10px;
826
  }
827
 
833
  div[id*='ajaxsearchlitesettings'].searchsettings .label {
834
  font-size: 14px;
835
  line-height: 20px !important;
836
+ margin: -29px 10px 0 38px;
837
  width: 150px;
838
  text-shadow: none;
839
  padding: 0;
856
  float: right !important;
857
  }
858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
859
  div[id*='ajaxsearchlitesettings'].searchsettings .option {
860
  width: 17px;
861
  height: 17px;
862
  position: relative;
 
 
 
 
863
  }
864
 
865
  div[id*='ajaxsearchlitesettings'].searchsettings .option label {
869
  height: 17px;
870
  top: 0;
871
  padding: 0;
872
+ border-radius: 4px;
873
+ -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .4);
874
+ -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .4);
875
+ box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, .4);
876
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#222222', endColorstr='#45484d', GradientType=0);
877
  }
878
 
879
  div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option label {
881
  }
882
 
883
  div[id*='ajaxsearchlitesettings'].searchsettings .option label:after {
884
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
885
+ filter: alpha(opacity=0);
886
  opacity: 0;
887
+ content: "";
888
+ position: absolute;
 
889
  background: transparent;
890
+ border-top: none;
891
+ border-right: none;
892
  box-sizing: content-box;
893
+
894
+ height: 3px;
895
+ left: 4px;
896
+ top: 5px;
897
+ width: 6px;
898
+
899
+ -webkit-transform: rotate(-45deg);
900
+ -moz-transform: rotate(-45deg);
901
+ -o-transform: rotate(-45deg);
902
+ -ms-transform: rotate(-45deg);
903
+ transform: rotate(-45deg);
904
  }
905
 
906
  div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option label:after {
927
  div[id*='ajaxsearchlitesettings'].searchsettings fieldset {
928
  background: transparent;
929
  font-size: 0.9em;
930
+ margin: 5px 0 0;
931
  padding: 0px;
932
  width: 192px;
933
  }
937
  display: block;
938
  }
939
 
940
+ /* basic scrollbar styling */
941
+ /* vertical scrollbar */
942
+ .results .mCSB_container {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
943
  width: auto;
944
+ margin-right: 30px;
945
+ overflow: hidden;
946
  }
947
 
948
+ .results .mCSB_container.mCS_no_scrollbar {
 
 
 
 
 
 
 
 
 
 
 
 
949
  margin-right: 0;
 
950
  }
951
 
952
+ .results .mCS_disabled > .mCustomScrollBox > .mCSB_container.mCS_no_scrollbar,
953
+ .results .mCS_destroyed > .mCustomScrollBox > .mCSB_container.mCS_no_scrollbar {
954
+ margin-right: 30px;
955
+ }
956
 
957
+ .results .mCustomScrollBox > .mCSB_scrollTools {
 
958
  width: 16px;
959
+ height: 100%;
 
960
  top: 0;
961
  right: 0;
 
962
  }
963
 
964
+ .results .mCSB_scrollTools .mCSB_draggerContainer {
 
 
 
 
 
 
 
 
 
 
965
  position: absolute;
966
  top: 0;
967
  left: 0;
970
  height: auto;
971
  }
972
 
973
+ .results .mCSB_scrollTools a + .mCSB_draggerContainer {
974
+ margin: 20px 0;
975
+ }
976
 
977
+ .results .mCSB_scrollTools .mCSB_draggerRail {
978
  width: 2px;
979
  height: 100%;
980
  margin: 0 auto;
981
+ -webkit-border-radius: 10px;
982
+ -moz-border-radius: 10px;
983
+ border-radius: 10px;
984
  }
985
 
986
+ .results .mCSB_scrollTools .mCSB_dragger {
987
  cursor: pointer;
988
  width: 100%;
989
+ height: 30px;
 
990
  }
991
 
992
+ .results .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
993
+ width: 4px;
 
994
  height: 100%;
995
  margin: 0 auto;
996
  -webkit-border-radius: 10px;
999
  text-align: center;
1000
  }
1001
 
1002
+ .results .mCSB_scrollTools .mCSB_buttonUp,
1003
+ .results .mCSB_scrollTools .mCSB_buttonDown {
1004
+ display: block;
1005
+ }
 
1006
 
1007
+ .results .mCSB_scrollTools .mCSB_buttonDown {
1008
+ top: 100%;
1009
+ margin-top: -40px;
1010
+ }
 
 
1011
 
1012
+ /* horizontal scrollbar */
1013
+ .results .mCSB_horizontal > .mCSB_container {
1014
  height: auto;
1015
+ margin-right: 0;
1016
+ margin-bottom: 30px;
1017
  overflow: hidden;
1018
+ }
1019
+
1020
+ .results .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar {
1021
+ margin-bottom: 0;
1022
+ }
1023
+
1024
+ .results .mCS_disabled > .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar,
1025
+ .results .mCS_destroyed > .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar {
1026
+ margin-right: 0;
1027
  margin-bottom: 30px;
1028
  }
1029
 
1030
+ .results .mCSB_horizontal.mCustomScrollBox > .mCSB_scrollTools {
1031
+ width: 100%;
1032
+ height: 16px;
1033
+ top: auto;
1034
+ right: auto;
1035
+ bottom: 0;
1036
+ left: 0;
1037
+ overflow: hidden;
1038
  }
1039
 
1040
+ .results .mCSB_horizontal > .mCSB_scrollTools a + .mCSB_draggerContainer {
1041
+ margin: 0 20px;
1042
+ }
1043
+
1044
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_draggerRail {
1045
+ width: 100%;
1046
+ height: 2px;
1047
+ margin: 7px 0;
1048
+ -webkit-border-radius: 10px;
1049
+ -moz-border-radius: 10px;
1050
+ border-radius: 10px;
1051
+ }
1052
 
1053
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_dragger {
1054
+ width: 30px;
1055
+ height: 100%;
1056
+ }
1057
 
1058
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
1059
+ width: 100%;
1060
+ height: 4px;
1061
+ margin: 6px auto;
1062
+ -webkit-border-radius: 10px;
1063
+ -moz-border-radius: 10px;
1064
+ border-radius: 10px;
1065
+ }
1066
 
1067
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_buttonLeft,
1068
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_buttonRight {
1069
+ display: block;
1070
+ position: relative;
1071
+ width: 20px;
1072
+ height: 100%;
1073
+ overflow: hidden;
1074
+ margin: 0 auto;
1075
+ cursor: pointer;
1076
+ float: left;
1077
+ }
1078
 
1079
+ .results .mCSB_horizontal > .mCSB_scrollTools .mCSB_buttonRight {
1080
+ margin-left: -40px;
1081
+ float: right;
1082
+ }
1083
 
1084
+ .results .mCustomScrollBox {
1085
+ -ms-touch-action: none; /*MSPointer events - direct all pointer events to js*/
1086
+ }
1087
 
1088
+ /* default scrollbar colors and backgrounds (default theme) */
1089
+ .results .mCustomScrollBox > .mCSB_scrollTools {
1090
+ opacity: 0.75;
1091
+ filter: "alpha(opacity=75)";
1092
+ -ms-filter: "alpha(opacity=75)"; /* old ie */
1093
  }
1094
 
1095
+ div[id*='ajaxsearchlitesettings'] .mCustomScrollBox:hover > .mCSB_scrollTools,
1096
+ .results .mCustomScrollBox:hover > .mCSB_scrollTools {
1097
+ opacity: 1;
1098
+ filter: "alpha(opacity=100)";
1099
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
1100
+ }
1101
 
1102
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_draggerRail,
1103
+ .results .mCSB_scrollTools .mCSB_draggerRail {
1104
+ background: #000; /* rgba fallback */
1105
+ background: rgba(0, 0, 0, 0.4);
1106
+ filter: "alpha(opacity=40)";
1107
+ -ms-filter: "alpha(opacity=40)"; /* old ie */
1108
+ }
1109
 
1110
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
1111
+ .results .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
1112
+ background: #fff; /* rgba fallback */
1113
+ background: rgba(255, 255, 255, 1);
1114
+ filter: "alpha(opacity=100)";
1115
+ -ms-filter: "alpha(opacity=100)"; /* old ie */
1116
  }
1117
 
1118
+ .results .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
1119
+ background: rgba(255, 255, 255, 0.85);
1120
+ filter: "alpha(opacity=85)";
1121
+ -ms-filter: "alpha(opacity=85)"; /* old ie */
1122
+ }
1123
 
1124
+ .results .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
1125
+ .results .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
1126
+ background: rgba(255, 255, 255, 0.9);
1127
+ filter: "alpha(opacity=90)";
1128
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
1129
+ }
1130
 
1131
+ .results .mCSB_scrollTools .mCSB_buttonUp {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1132
  background-position: 0 0;
1133
  }
1134
 
1135
+ .results .mCSB_scrollTools .mCSB_buttonDown {
1136
+ background-position: 0 -20px;
1137
+ }
1138
 
1139
+ div[id*='ajaxsearchliteres'] {
1140
+ position: absolute !important;
1141
+ }
1142
+
1143
+ div[id*='ajaxsearchliteres'].horizontal .results .mCSB_scrollTools .mCSB_buttonLeft,
1144
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonLeft {
1145
+ position: relative;
1146
+ background: transparent;
1147
+ margin-left: 9px;
1148
+ }
1149
+
1150
+ div[id*='ajaxsearchliteres'].horizontal .results .mCSB_scrollTools .mCSB_buttonLeft:after,
1151
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonLeft:after {
1152
+ border: solid transparent;
1153
+ content: " ";
1154
+ height: 0;
1155
+ width: 0;
1156
+ position: absolute;
1157
+ pointer-events: none;
1158
+ }
1159
+
1160
+ div[id*='ajaxsearchliteres'].horizontal .results .mCSB_scrollTools .mCSB_buttonRight,
1161
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonRight {
1162
+ position: relative;
1163
+ background: transparent;
1164
+ margin-right: 9px;
1165
+ margin-top: 0px;
1166
+ }
1167
+
1168
+ div[id*='ajaxsearchliteres'].horizontal .results .mCSB_scrollTools .mCSB_buttonRight:after,
1169
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonRight:after {
1170
+ border: solid transparent;
1171
+ content: " ";
1172
+ height: 0;
1173
+ width: 0;
1174
+ position: absolute;
1175
+ pointer-events: none;
1176
+ }
1177
+
1178
+ div[id*='ajaxsearchliteres'] .results .mCSB_horizontal > .mCSB_scrollTools a + .mCSB_draggerContainer {
1179
+ margin: 10px 12px 0 36px
1180
+ }
1181
+
1182
+ .results .mCSB_scrollTools .mCSB_buttonRight {
1183
+ background-position: 0 -56px;
1184
+ /*
1185
+ sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
1186
+ */
1187
+ }
1188
+
1189
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonUp:hover,
1190
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonDown:hover,
1191
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonLeft:hover,
1192
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonRight:hover,
1193
+ .results .mCSB_scrollTools .mCSB_buttonUp:hover,
1194
+ .results .mCSB_scrollTools .mCSB_buttonDown:hover,
1195
+ .results .mCSB_scrollTools .mCSB_buttonLeft:hover,
1196
+ .results .mCSB_scrollTools .mCSB_buttonRight:hover {
1197
+ opacity: 0.75;
1198
+ filter: "alpha(opacity=75)";
1199
+ -ms-filter: "alpha(opacity=75)"; /* old ie */
1200
+ }
1201
+
1202
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonUp:active,
1203
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonDown:active,
1204
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonLeft:active,
1205
+ div[id*='ajaxsearchlitesettings'] .mCSB_scrollTools .mCSB_buttonRight:active,
1206
+ .results .mCSB_scrollTools .mCSB_buttonUp:active,
1207
+ .results .mCSB_scrollTools .mCSB_buttonDown:active,
1208
+ .results .mCSB_scrollTools .mCSB_buttonLeft:active,
1209
+ .results .mCSB_scrollTools .mCSB_buttonRight:active {
1210
+ opacity: 0.9;
1211
+ filter: "alpha(opacity=90)";
1212
+ -ms-filter: "alpha(opacity=90)"; /* old ie */
1213
+ }
includes/classes/actions/class-asl-stylesheets.php CHANGED
@@ -34,30 +34,15 @@ if (!class_exists("WD_ASL_StyleSheets_Action")) {
34
 
35
  add_action('wp_head', array($this, 'inlineCSS'), 10, 0);
36
 
37
-
38
  // Don't print if on the back-end
39
- if ( !is_admin() ) {
40
  $inst = wd_asl()->instances->get(0);
41
  $asl_options = $inst['data'];
42
  wp_register_style('wpdreams-asl-basic', ASL_URL.'css/style.basic.css', array(), ASL_CURR_VER_STRING);
43
  wp_enqueue_style('wpdreams-asl-basic');
44
  wp_enqueue_style('wpdreams-ajaxsearchlite', ASL_URL.'css/style-'.$asl_options['theme'].'.css', array(), ASL_CURR_VER_STRING);
45
- wp_register_style('wpdreams-gf-opensans', '//fonts.googleapis.com/css?family=Open+Sans:300|Open+Sans:400|Open+Sans:700', array(), ASL_CURR_VER_STRING);
46
- wp_enqueue_style('wpdreams-gf-opensans');
47
  }
48
-
49
  self::$inline_css = "
50
- @font-face {
51
- font-family: 'aslsicons2';
52
- src: url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.eot');
53
- src: url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.eot?#iefix') format('embedded-opentype'),
54
- url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.woff2') format('woff2'),
55
- url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.woff') format('woff'),
56
- url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.ttf') format('truetype'),
57
- url('".str_replace('http:',"",plugins_url())."/ajax-search-lite/css/fonts/icons2.svg#icons') format('svg');
58
- font-weight: normal;
59
- font-style: normal;
60
- }
61
  div[id*='ajaxsearchlite'].wpdreams_asl_container {
62
  width: ".$asl_options['box_width'].";
63
  margin: ".wpdreams_four_to_string($asl_options['box_margin']).";
34
 
35
  add_action('wp_head', array($this, 'inlineCSS'), 10, 0);
36
 
 
37
  // Don't print if on the back-end
38
+ if (!is_admin()) {
39
  $inst = wd_asl()->instances->get(0);
40
  $asl_options = $inst['data'];
41
  wp_register_style('wpdreams-asl-basic', ASL_URL.'css/style.basic.css', array(), ASL_CURR_VER_STRING);
42
  wp_enqueue_style('wpdreams-asl-basic');
43
  wp_enqueue_style('wpdreams-ajaxsearchlite', ASL_URL.'css/style-'.$asl_options['theme'].'.css', array(), ASL_CURR_VER_STRING);
 
 
44
  }
 
45
  self::$inline_css = "
 
 
 
 
 
 
 
 
 
 
 
46
  div[id*='ajaxsearchlite'].wpdreams_asl_container {
47
  width: ".$asl_options['box_width'].";
48
  margin: ".wpdreams_four_to_string($asl_options['box_margin']).";
includes/classes/core/class-asl-filters.php CHANGED
@@ -50,13 +50,7 @@ if ( !class_exists("WD_ASL_Filters") ) {
50
  array(
51
  "filter" => "get_search_form",
52
  "handler" => "FormOverride",
53
- "priority" => 999999999,
54
- "args" => 1
55
- ),
56
- array(
57
- "filter" => "get_product_search_form",
58
- "handler" => "WooFormOverride",
59
- "priority" => 999999999,
60
  "args" => 1
61
  ),
62
  array(
50
  array(
51
  "filter" => "get_search_form",
52
  "handler" => "FormOverride",
53
+ "priority" => 1,
 
 
 
 
 
 
54
  "args" => 1
55
  ),
56
  array(
includes/classes/core/class-asl-init.php CHANGED
@@ -92,9 +92,11 @@ class WD_ASL_Init {
92
  }
93
  wp_register_script('wpdreams-gestures', ASL_URL . 'js/' . $js_source . '/jquery.gestures.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
94
  wp_enqueue_script('wpdreams-gestures');
 
 
95
  wp_register_script('wpdreams-highlight', ASL_URL . 'js/' . $js_source . '/jquery.highlight.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
96
  wp_enqueue_script('wpdreams-highlight');
97
- wp_register_script('wpdreams-scroll', ASL_URL . 'js/' . $js_source . '/jquery.mCustomScrollbar.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
98
  wp_enqueue_script('wpdreams-scroll');
99
  wp_register_script('wpdreams-ajaxsearchlite', ASL_URL . 'js/' . $js_source . '/jquery.ajaxsearchlite.js', array($prereq, "wpdreams-scroll"), ASL_CURR_VER_STRING, $load_in_footer);
100
  wp_enqueue_script('wpdreams-ajaxsearchlite');
@@ -137,7 +139,12 @@ class WD_ASL_Init {
137
  * Tries to chmod the CSS and CACHE directories
138
  */
139
  public function chmod() {
140
- // Nothing to do here yet :)
 
 
 
 
 
141
  }
142
 
143
 
92
  }
93
  wp_register_script('wpdreams-gestures', ASL_URL . 'js/' . $js_source . '/jquery.gestures.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
94
  wp_enqueue_script('wpdreams-gestures');
95
+ wp_register_script('wpdreams-mousewheel', ASL_URL . 'js/' . $js_source . '/jquery.mousewheel.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
96
+ wp_enqueue_script('wpdreams-mousewheel');
97
  wp_register_script('wpdreams-highlight', ASL_URL . 'js/' . $js_source . '/jquery.highlight.js', array($prereq), ASL_CURR_VER_STRING, $load_in_footer);
98
  wp_enqueue_script('wpdreams-highlight');
99
+ wp_register_script('wpdreams-scroll', ASL_URL . 'js/' . $js_source . '/jquery.mCustomScrollbar.js', array($prereq, 'wpdreams-mousewheel'), ASL_CURR_VER_STRING, $load_in_footer);
100
  wp_enqueue_script('wpdreams-scroll');
101
  wp_register_script('wpdreams-ajaxsearchlite', ASL_URL . 'js/' . $js_source . '/jquery.ajaxsearchlite.js', array($prereq, "wpdreams-scroll"), ASL_CURR_VER_STRING, $load_in_footer);
102
  wp_enqueue_script('wpdreams-ajaxsearchlite');
139
  * Tries to chmod the CSS and CACHE directories
140
  */
141
  public function chmod() {
142
+ if (@chmod(ASL_CSS_PATH, 0777) == false)
143
+ @chmod(ASL_CSS_PATH, 0755);
144
+ if (@chmod(ASL_CACHE_PATH, 0777) == false)
145
+ @chmod(ASL_CACHE_PATH, 0755);
146
+ if (@chmod(ASL_TT_CACHE_PATH, 0777) == false)
147
+ @chmod(ASL_TT_CACHE_PATH, 0755);
148
  }
149
 
150
 
includes/classes/core/class-asl-manager.php CHANGED
@@ -46,16 +46,6 @@ if (!class_exists("WD_ASL_Manager")) {
46
  do_action("wd_asl_before_load");
47
 
48
  $this->preLoad();
49
- $this->loadInstances();
50
- /**
51
- * Available after this point:
52
- * (WD_ASL_Init) wd_asl()->instances, (global) $wd_asl->instances
53
- */
54
- $this->loadSession();
55
- /**
56
- * Available after this point:
57
- * (WD_ASL_Init) wd_asl()->session, (global) $wd_asl->session
58
- */
59
  register_activation_hook(ASL_FILE, array($this, 'activationHook'));
60
  /**
61
  * Available after this point:
@@ -72,6 +62,11 @@ if (!class_exists("WD_ASL_Manager")) {
72
  * Available after this point:
73
  * $this->context
74
  */
 
 
 
 
 
75
  $this->loadIncludes();
76
  $this->loadShortcodes();
77
  $this->loadAssets();
@@ -92,6 +87,11 @@ if (!class_exists("WD_ASL_Manager")) {
92
  * Preloading: for functions and other stuff needed
93
  */
94
  private function preLoad() {
 
 
 
 
 
95
  require_once(ASL_PATH . "/backend/settings/default_options.php");
96
  require_once(ASL_CLASSES_PATH . "etc/class.asl-mb.php");
97
 
@@ -102,22 +102,6 @@ if (!class_exists("WD_ASL_Manager")) {
102
  wd_asl()->debug = new wdDebugData( 'asl_debug_data' );
103
  }
104
 
105
- /**
106
- * Conditional session loader
107
- */
108
- public function loadSession() {
109
- // Initialize the session only if needed and only on search results pages
110
- if ( isset($_GET['s']) ) {
111
- foreach (wd_asl()->instances->get() as $instance) {
112
- if ($instance['data']['override_default_results'] == 1) {
113
- require_once(ASL_CLASSES_PATH . "session/wp-session.inc.php");
114
- wd_asl()->wp_session = WP_Session::get_instance();
115
- break;
116
- }
117
- }
118
- }
119
- }
120
-
121
  /**
122
  * Gets the call context for further use
123
  */
46
  do_action("wd_asl_before_load");
47
 
48
  $this->preLoad();
 
 
 
 
 
 
 
 
 
 
49
  register_activation_hook(ASL_FILE, array($this, 'activationHook'));
50
  /**
51
  * Available after this point:
62
  * Available after this point:
63
  * $this->context
64
  */
65
+ $this->loadInstances();
66
+ /**
67
+ * Available after this point:
68
+ * (WD_ASL_Init) wd_asl()->instances, (global) $wd_asl->instances
69
+ */
70
  $this->loadIncludes();
71
  $this->loadShortcodes();
72
  $this->loadAssets();
87
  * Preloading: for functions and other stuff needed
88
  */
89
  private function preLoad() {
90
+
91
+ // Initialize the session
92
+ require_once(ASL_CLASSES_PATH . "session/wp-session.inc.php");
93
+ wd_asl()->wp_session = WP_Session::get_instance();
94
+
95
  require_once(ASL_PATH . "/backend/settings/default_options.php");
96
  require_once(ASL_CLASSES_PATH . "etc/class.asl-mb.php");
97
 
102
  wd_asl()->debug = new wdDebugData( 'asl_debug_data' );
103
  }
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  /**
106
  * Gets the call context for further use
107
  */
includes/classes/filters/class-asl-formoverride.php CHANGED
@@ -15,7 +15,7 @@ if (!class_exists("WD_ASL_FormOverride_Filter")) {
15
  */
16
  class WD_ASL_FormOverride_Filter extends WD_ASL_Filter_Abstract {
17
 
18
- public function handle( $form = "" ) {
19
  $inst = wd_asl()->instances->get(0);
20
 
21
  if ( $inst['data']['override_search_form'] )
15
  */
16
  class WD_ASL_FormOverride_Filter extends WD_ASL_Filter_Abstract {
17
 
18
+ function handle( $form = "" ) {
19
  $inst = wd_asl()->instances->get(0);
20
 
21
  if ( $inst['data']['override_search_form'] )
includes/classes/filters/class-asl-wooformoverride.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- if (!defined('ABSPATH')) die('-1');
3
-
4
- if (!class_exists("WD_ASL_WooFormOverride_Filter")) {
5
- /**
6
- * Class WD_ASL_WooFormOverride_Filter
7
- *
8
- * Handles the default search form layout override for WooCommerce
9
- *
10
- * @class WD_ASL_WooFormOverride_Filter
11
- * @version 1.0
12
- * @package AjaxSearchLite/Classes/Filters
13
- * @category Class
14
- * @author Ernest Marcinko
15
- */
16
- class WD_ASL_WooFormOverride_Filter extends WD_ASL_Filter_Abstract {
17
-
18
- public function handle( $form = "" ) {
19
- $inst = wd_asl()->instances->get(0);
20
-
21
- if ( $inst['data']['override_woo_search_form'] )
22
- return do_shortcode("[wpdreams_ajaxsearchlite]");
23
-
24
- return $form;
25
- }
26
-
27
- // ------------------------------------------------------------
28
- // ---------------- SINGLETON SPECIFIC --------------------
29
- // ------------------------------------------------------------
30
- public static function getInstance() {
31
- if ( ! ( self::$_instance instanceof self ) ) {
32
- self::$_instance = new self();
33
- }
34
-
35
- return self::$_instance;
36
- }
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/filters/filters.inc.php CHANGED
@@ -4,5 +4,4 @@ if (!defined('ABSPATH')) die('-1');
4
  require_once(ASL_CLASSES_PATH . "filters/class-asl-abstract.php");
5
  require_once(ASL_CLASSES_PATH . "filters/class-asl-searchoverride.php");
6
  require_once(ASL_CLASSES_PATH . "filters/class-asl-formoverride.php");
7
- require_once(ASL_CLASSES_PATH . "filters/class-asl-wooformoverride.php");
8
  require_once(ASL_CLASSES_PATH . "filters/class-asl-etc_fixes.php");
4
  require_once(ASL_CLASSES_PATH . "filters/class-asl-abstract.php");
5
  require_once(ASL_CLASSES_PATH . "filters/class-asl-searchoverride.php");
6
  require_once(ASL_CLASSES_PATH . "filters/class-asl-formoverride.php");
 
7
  require_once(ASL_CLASSES_PATH . "filters/class-asl-etc_fixes.php");
includes/classes/search/search_content.class.php CHANGED
@@ -29,9 +29,6 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
29
  $pre_like = '';
30
  $suf_like = '';
31
 
32
- $kw_logic = $sd['keyword_logic'];
33
- $op = strtoupper( $kw_logic );
34
-
35
  /**
36
  * On forced case sensitivity: Let's add BINARY keyword before the LIKE
37
  * On forced case in-sensitivity: Append the lower() function around each field
@@ -101,6 +98,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
101
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
102
  //$parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')";
103
 
 
104
  if ( count( $_s ) > 0 ) {
105
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_title" . $suf_field . " LIKE $pre_like'%", $words );
106
  } else {
@@ -126,6 +124,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
126
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
127
  //$parts[] = "(lower($wpdb->posts.post_content) REGEXP '$words')";
128
 
 
129
  if ( count( $_s ) > 0 ) {
130
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_content" . $suf_field . " LIKE $pre_like'%", $words );
131
  } else {
@@ -149,6 +148,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
149
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
150
  //$parts[] = "(lower($wpdb->posts.post_excerpt) REGEXP '$words')";
151
 
 
152
  if ( count( $_s ) > 0 ) {
153
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_excerpt" . $suf_field . " LIKE $pre_like'%", $words );
154
  } else {
@@ -172,6 +172,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
172
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
173
  //$parts[] = "(lower($wpdb->terms.name) REGEXP '$words')";
174
 
 
175
  if ( count( $_s ) > 0 ) {
176
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->terms . ".name" . $suf_field . " LIKE $pre_like'%", $words );
177
  } else {
@@ -186,27 +187,19 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
186
  /*---------------------------------------------------------------*/
187
 
188
  /*---------------------- Custom Fields --------------------------*/
189
- if ( $sd['search_all_cf'] == 1 ) {
190
- $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
191
- if ( count( $_s ) > 0 ) {
192
- $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%", $words );
193
- } else {
194
- $_like = $s;
195
- }
196
- $parts[] = "( " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%" . $_like . "%'$suf_like )";
197
- $postmeta_join = "LEFT JOIN $wpdb->postmeta ON $wpdb->postmeta.post_id = $wpdb->posts.ID";
198
- } else if ( isset( $searchData['selected-customfields'] ) ) {
199
  $selected_customfields = $searchData['selected-customfields'];
200
  if ( is_array( $selected_customfields ) && count( $selected_customfields ) > 0 ) {
201
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
 
202
 
203
  foreach ( $selected_customfields as $cfield ) {
204
- if ( count( $_s ) > 0 ) {
205
- $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%", $words );
206
- } else {
207
- $_like = $s;
208
- }
209
- $parts[] = "( $wpdb->postmeta.meta_key='$cfield' AND " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%" . $_like . "%'$suf_like )";
210
  }
211
  $postmeta_join = "LEFT JOIN $wpdb->postmeta ON $wpdb->postmeta.post_id = $wpdb->posts.ID";
212
 
@@ -360,22 +353,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
360
  // .. SUBSELECT: excludes all the object_ids that are part of the array
361
  // This is used because of multiple object_ids (posts in more than 1 category)
362
  if ( $term_logic == 'and' ) {
363
- if ( in_array(1, $all_terms) ) {
364
- $empty_term_query = "";
365
- } else {
366
- $empty_term_query = "
367
- NOT EXISTS (
368
- SELECT *
369
- FROM $wpdb->term_relationships as xt
370
- INNER JOIN $wpdb->term_taxonomy as tt ON ( xt.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'category')
371
- WHERE
372
- xt.object_id = $wpdb->posts.ID
373
- ) OR ";
374
- }
375
-
376
  $term_query = "(
377
- $empty_term_query
378
-
379
  $wpdb->posts.ID IN (
380
  SELECT DISTINCT(tr.object_id)
381
  FROM $wpdb->term_relationships AS tr
@@ -384,7 +362,6 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
384
  AND tr.object_id NOT IN (
385
  SELECT DISTINCT(trs.object_id)
386
  FROM $wpdb->term_relationships AS trs
387
- LEFT JOIN $wpdb->term_taxonomy as tts ON (trs.term_taxonomy_id = tts.term_taxonomy_id AND tts.taxonomy = 'category')
388
  WHERE trs.term_taxonomy_id IN ($words)
389
  )
390
  )
@@ -400,7 +377,6 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
400
  // LITE VERSION DOESNT NEED THESE
401
  // ---------------------------------------------------------------------
402
 
403
-
404
  /*------------------------ Exclude id's -------------------------*/
405
  if ( isset( $searchData['excludeposts'] ) && $searchData['excludeposts'] != "" ) {
406
  $exclude_posts = "($wpdb->posts.ID NOT IN (" . $searchData['excludeposts'] . "))";
@@ -537,7 +513,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
537
  "queries", false, true, false, 5
538
  );
539
 
540
- //var_dump($querystr);die("!!");
541
  //var_dump($pageposts);die("!!");
542
 
543
  $this->results = $pageposts;
29
  $pre_like = '';
30
  $suf_like = '';
31
 
 
 
 
32
  /**
33
  * On forced case sensitivity: Let's add BINARY keyword before the LIKE
34
  * On forced case in-sensitivity: Append the lower() function around each field
98
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
99
  //$parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')";
100
 
101
+ $op = 'OR';
102
  if ( count( $_s ) > 0 ) {
103
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_title" . $suf_field . " LIKE $pre_like'%", $words );
104
  } else {
124
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
125
  //$parts[] = "(lower($wpdb->posts.post_content) REGEXP '$words')";
126
 
127
+ $op = 'OR';
128
  if ( count( $_s ) > 0 ) {
129
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_content" . $suf_field . " LIKE $pre_like'%", $words );
130
  } else {
148
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
149
  //$parts[] = "(lower($wpdb->posts.post_excerpt) REGEXP '$words')";
150
 
151
+ $op = 'OR';
152
  if ( count( $_s ) > 0 ) {
153
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->posts . ".post_excerpt" . $suf_field . " LIKE $pre_like'%", $words );
154
  } else {
172
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
173
  //$parts[] = "(lower($wpdb->terms.name) REGEXP '$words')";
174
 
175
+ $op = 'OR';
176
  if ( count( $_s ) > 0 ) {
177
  $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->terms . ".name" . $suf_field . " LIKE $pre_like'%", $words );
178
  } else {
187
  /*---------------------------------------------------------------*/
188
 
189
  /*---------------------- Custom Fields --------------------------*/
190
+ if ( isset( $searchData['selected-customfields'] ) ) {
 
 
 
 
 
 
 
 
 
191
  $selected_customfields = $searchData['selected-customfields'];
192
  if ( is_array( $selected_customfields ) && count( $selected_customfields ) > 0 ) {
193
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
194
+ $op = 'OR';
195
 
196
  foreach ( $selected_customfields as $cfield ) {
197
+ if ( count( $_s ) > 0 ) {
198
+ $_like = implode( "%'$suf_like " . $op . " " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%", $words );
199
+ } else {
200
+ $_like = $s;
201
+ }
202
+ $parts[] = "( $wpdb->postmeta.meta_key='$cfield' AND " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%" . $_like . "%'$suf_like )";
203
  }
204
  $postmeta_join = "LEFT JOIN $wpdb->postmeta ON $wpdb->postmeta.post_id = $wpdb->posts.ID";
205
 
353
  // .. SUBSELECT: excludes all the object_ids that are part of the array
354
  // This is used because of multiple object_ids (posts in more than 1 category)
355
  if ( $term_logic == 'and' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  $term_query = "(
 
 
357
  $wpdb->posts.ID IN (
358
  SELECT DISTINCT(tr.object_id)
359
  FROM $wpdb->term_relationships AS tr
362
  AND tr.object_id NOT IN (
363
  SELECT DISTINCT(trs.object_id)
364
  FROM $wpdb->term_relationships AS trs
 
365
  WHERE trs.term_taxonomy_id IN ($words)
366
  )
367
  )
377
  // LITE VERSION DOESNT NEED THESE
378
  // ---------------------------------------------------------------------
379
 
 
380
  /*------------------------ Exclude id's -------------------------*/
381
  if ( isset( $searchData['excludeposts'] ) && $searchData['excludeposts'] != "" ) {
382
  $exclude_posts = "($wpdb->posts.ID NOT IN (" . $searchData['excludeposts'] . "))";
513
  "queries", false, true, false, 5
514
  );
515
 
516
+ //var_dump($querystr);//die("!!");
517
  //var_dump($pageposts);die("!!");
518
 
519
  $this->results = $pageposts;
includes/functions/functions.php CHANGED
@@ -391,10 +391,9 @@ if (!function_exists("asl_generate_html_results")) {
391
  if (!function_exists('asl_icl_t')) {
392
  /* Ajax Search Lite wrapper for WPML print */
393
  function asl_icl_t($name, $value) {
394
- if (function_exists('icl_t')) {
395
- return stripslashes( esc_html( icl_t('ajax-search-lite', $name, $value)) );
396
- }
397
- return stripslashes( esc_html($value) );
398
  }
399
  }
400
 
391
  if (!function_exists('asl_icl_t')) {
392
  /* Ajax Search Lite wrapper for WPML print */
393
  function asl_icl_t($name, $value) {
394
+ if (function_exists('icl_t'))
395
+ return icl_t('ajax-search-lite', $name, $value);
396
+ return $value;
 
397
  }
398
  }
399
 
includes/views/asl.shortcode.php CHANGED
@@ -120,61 +120,52 @@ if ( isset($style['_fo']) ) {
120
  </div>
121
  <?php endif; ?>
122
 
123
- <div class="asl_option<?php echo(($style['showexactmatches'] != 1) ? " hiddend" : ""); ?>">
124
- <div class="option">
125
- <input type="checkbox" value="checked" id="set_exactonly<?php echo $id; ?>"
126
- name="set_exactonly" <?php echo $_checked["set_exactonly"]; ?>/>
127
- <label for="set_exactonly<?php echo $id; ?>"></label>
128
- </div>
129
- <div class="label">
130
- <?php echo asl_icl_t('Exact matches filter', $style['exactmatchestext']); ?>
131
- </div>
132
  </div>
133
- <div class="asl_option<?php echo(($style['showsearchintitle'] != 1) ? " hiddend" : ""); ?>">
134
- <div class="option">
135
- <input type="checkbox" value="None" id="set_intitle<?php echo $id; ?>"
136
- name="set_intitle" <?php echo $_checked["set_intitle"]; ?>/>
137
- <label for="set_intitle<?php echo $id; ?>"></label>
138
- </div>
139
- <div class="label">
140
- <?php echo asl_icl_t('Search in title filter', $style['searchintitletext']); ?>
141
- </div>
142
  </div>
143
- <div class="asl_option<?php echo(($style['showsearchincontent'] != 1) ? " hiddend" : ""); ?>">
144
- <div class="option">
145
- <input type="checkbox" value="None" id="set_incontent<?php echo $id; ?>"
146
- name="set_incontent" <?php echo $_checked["set_incontent"]; ?>/>
147
- <label for="set_incontent<?php echo $id; ?>"></label>
148
- </div>
149
- <div class="label">
150
- <?php echo asl_icl_t('Search in content filter', $style['searchincontenttext']); ?>
151
- </div>
152
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
153
  <div class="option hiddend">
154
  <input type="checkbox" value="None" id="set_inexcerpt<?php echo $id; ?>"
155
  name="set_inexcerpt" <?php echo $_checked["set_inexcerpt"]; ?>/>
156
  <label for="set_inexcerpt<?php echo $id; ?>"></label>
157
  </div>
158
 
159
- <div class="asl_option<?php echo(($style['showsearchinposts'] != 1) ? " hiddend" : ""); ?>">
160
- <div class="option">
161
- <input type="checkbox" value="None" id="set_inposts<?php echo $id; ?>"
162
- name="set_inposts" <?php echo $_checked["set_inposts"]; ?>/>
163
- <label for="set_inposts<?php echo $id; ?>"></label>
164
- </div>
165
- <div class="label">
166
- <?php echo asl_icl_t('Search in posts filter', $style['searchinpoststext']); ?>
167
- </div>
168
  </div>
169
- <div class="asl_option<?php echo(($style['showsearchinpages'] != 1) ? " hiddend" : ""); ?>">
170
- <div class="option">
171
- <input type="checkbox" value="None" id="set_inpages<?php echo $id; ?>"
172
- name="set_inpages" <?php echo $_checked["set_inpages"]; ?>/>
173
- <label for="set_inpages<?php echo $id; ?>"></label>
174
- </div>
175
- <div class="label">
176
- <?php echo asl_icl_t('Search in pages filter', $style['searchinpagestext']); ?>
177
- </div>
 
178
  </div>
179
  <?php
180
 
@@ -193,16 +184,14 @@ if ( isset($style['_fo']) ) {
193
  $hidden = "";
194
  $flat_show_customtypes[] = $v[0];
195
  ?>
196
- <div class="asl_option">
197
- <div class="option">
198
- <input type="checkbox" value="<?php echo $v[0]; ?>"
199
- id="<?php echo $id; ?>customset_<?php echo $id . $i; ?>"
200
- name="customset[]" <?php echo(($selected) ? 'checked="checked"' : ''); ?>/>
201
- <label for="<?php echo $id; ?>customset_<?php echo $id . $i; ?>"></label>
202
- </div>
203
- <div class="label">
204
- <?php echo asl_icl_t('Search filter for post type: ' . $v[1], $v[1]); ?>
205
- </div>
206
  </div>
207
  <?php
208
  $i++;
@@ -258,16 +247,14 @@ if ( isset($style['_fo']) ) {
258
  $hidden = ' hiddend';
259
  }
260
  ?>
261
- <div class="asl_option<?php echo $hidden; ?>">
262
- <div class="option">
263
- <input type="checkbox" value="<?php echo $v; ?>"
264
- id="<?php echo $id; ?>categoryset_<?php echo $v; ?>"
265
- name="categoryset[]" <?php echo(($selected) ? 'checked="checked"' : ''); ?>/>
266
- <label for="<?php echo $id; ?>categoryset_<?php echo $v; ?>"></label>
267
- </div>
268
- <div class="label">
269
- <?php echo asl_icl_t('Search filter for category: ' . $val, $val); ?>
270
- </div>
271
  </div>
272
  <?php
273
  }
@@ -381,13 +368,13 @@ if ( isset($style['_fo']) ) {
381
  }
382
  <?php $_asl_script_out = ob_get_clean(); ?>
383
  <?php if (wd_asl()->o['asl_compatibility']['js_init'] == "blocking"): ?>
384
- <script type="text/javascript">
385
- /* <![CDATA[ */
386
- if ( typeof ASL_INSTANCES == "undefined" )
387
- var ASL_INSTANCES = {};
388
- ASL_INSTANCES['<?php echo $id; ?>'] = <?php echo $_asl_script_out; ?>;
389
- /* ]]> */
390
- </script>
391
  <?php else: ?>
392
- <div class="asl_init_data wpdreams_asl_data_ct" style="display:none !important;" id="asl_init_id_<?php echo $id; ?>" data-asldata="<?php echo base64_encode($_asl_script_out); ?>"></div>
 
 
393
  <?php endif; ?>
120
  </div>
121
  <?php endif; ?>
122
 
123
+ <div class="option<?php echo(($style['showexactmatches'] != 1) ? " hiddend" : ""); ?>">
124
+ <input type="checkbox" value="checked" id="set_exactonly<?php echo $id; ?>"
125
+ name="set_exactonly" <?php echo $_checked["set_exactonly"]; ?>/>
126
+ <label for="set_exactonly<?php echo $id; ?>"></label>
 
 
 
 
 
127
  </div>
128
+ <div class="label<?php echo(($style['showexactmatches'] != 1) ? " hiddend" : ""); ?>">
129
+ <?php echo $style['exactmatchestext']; ?>
 
 
 
 
 
 
 
130
  </div>
131
+ <div class="option<?php echo(($style['showsearchintitle'] != 1) ? " hiddend" : ""); ?>">
132
+ <input type="checkbox" value="None" id="set_intitle<?php echo $id; ?>"
133
+ name="set_intitle" <?php echo $_checked["set_intitle"]; ?>/>
134
+ <label for="set_intitle<?php echo $id; ?>"></label>
 
 
 
 
 
135
  </div>
136
+ <div class="label<?php echo(($style['showsearchintitle'] != 1) ? " hiddend" : ""); ?>">
137
+ <?php echo $style['searchintitletext']; ?>
138
+ </div>
139
+ <div class="option<?php echo(($style['showsearchincontent'] != 1) ? " hiddend" : ""); ?>">
140
+ <input type="checkbox" value="None" id="set_incontent<?php echo $id; ?>"
141
+ name="set_incontent" <?php echo $_checked["set_incontent"]; ?>/>
142
+ <label for="set_incontent<?php echo $id; ?>"></label>
143
+ </div>
144
+ <div class="label<?php echo(($style['showsearchincontent'] != 1) ? " hiddend" : ""); ?>">
145
+ <?php echo $style['searchincontenttext']; ?>
146
+ </div>
147
+
148
  <div class="option hiddend">
149
  <input type="checkbox" value="None" id="set_inexcerpt<?php echo $id; ?>"
150
  name="set_inexcerpt" <?php echo $_checked["set_inexcerpt"]; ?>/>
151
  <label for="set_inexcerpt<?php echo $id; ?>"></label>
152
  </div>
153
 
154
+ <div class="option<?php echo(($style['showsearchinposts'] != 1) ? " hiddend" : ""); ?>">
155
+ <input type="checkbox" value="None" id="set_inposts<?php echo $id; ?>"
156
+ name="set_inposts" <?php echo $_checked["set_inposts"]; ?>/>
157
+ <label for="set_inposts<?php echo $id; ?>"></label>
 
 
 
 
 
158
  </div>
159
+ <div class="label<?php echo(($style['showsearchinposts'] != 1) ? " hiddend" : ""); ?>">
160
+ <?php echo $style['searchinpoststext']; ?>
161
+ </div>
162
+ <div class="option<?php echo(($style['showsearchinpages'] != 1) ? " hiddend" : ""); ?>">
163
+ <input type="checkbox" value="None" id="set_inpages<?php echo $id; ?>"
164
+ name="set_inpages" <?php echo $_checked["set_inpages"]; ?>/>
165
+ <label for="set_inpages<?php echo $id; ?>"></label>
166
+ </div>
167
+ <div class="label<?php echo(($style['showsearchinpages'] != 1) ? " hiddend" : ""); ?>">
168
+ <?php echo $style['searchinpagestext']; ?>
169
  </div>
170
  <?php
171
 
184
  $hidden = "";
185
  $flat_show_customtypes[] = $v[0];
186
  ?>
187
+ <div class="option<?php echo $hidden; ?>">
188
+ <input type="checkbox" value="<?php echo $v[0]; ?>"
189
+ id="<?php echo $id; ?>customset_<?php echo $id . $i; ?>"
190
+ name="customset[]" <?php echo(($selected) ? 'checked="checked"' : ''); ?>/>
191
+ <label for="<?php echo $id; ?>customset_<?php echo $id . $i; ?>"></label>
192
+ </div>
193
+ <div class="label<?php echo $hidden; ?>">
194
+ <?php echo $v[1]; ?>
 
 
195
  </div>
196
  <?php
197
  $i++;
247
  $hidden = ' hiddend';
248
  }
249
  ?>
250
+ <div class="option<?php echo $hidden; ?>">
251
+ <input type="checkbox" value="<?php echo $v; ?>"
252
+ id="<?php echo $id; ?>categoryset_<?php echo $v; ?>"
253
+ name="categoryset[]" <?php echo(($selected) ? 'checked="checked"' : ''); ?>/>
254
+ <label for="<?php echo $id; ?>categoryset_<?php echo $v; ?>"></label>
255
+ </div>
256
+ <div class="label<?php echo $hidden; ?>">
257
+ <?php echo $val; ?>
 
 
258
  </div>
259
  <?php
260
  }
368
  }
369
  <?php $_asl_script_out = ob_get_clean(); ?>
370
  <?php if (wd_asl()->o['asl_compatibility']['js_init'] == "blocking"): ?>
371
+ <script type="text/javascript">
372
+ if ( typeof ASL_INSTANCES == "undefined" )
373
+ var ASL_INSTANCES = {};
374
+ ASL_INSTANCES['<?php echo $id; ?>'] = <?php echo $_asl_script_out; ?>;
375
+ </script>
 
 
376
  <?php else: ?>
377
+ <div class="asl_init_data wpdreams_asl_data_ct" style="display:none !important;" id="asl_init_id_<?php echo $id; ?>">
378
+ <?php echo $_asl_script_out; ?>
379
+ </div>
380
  <?php endif; ?>
js/min-scoped/jquery.ajaxsearchlite.min.js CHANGED
@@ -1,4 +1,16 @@
1
  /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
- !function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){var c=[],l=c.slice,ki=c.concat,ni=c.push,di=c.indexOf,ct={},hf=ct.toString,nt=ct.hasOwnProperty,r={},gi="1.11.1",i=function(n,t){return new i.fn.init(n,t)},cf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,lf=/^-ms-/,af=/-([\da-z])/gi,vf=function(n,t){return t.toUpperCase()};i.fn=i.prototype={jquery:gi,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ni,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(gi+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!nt.call(n,"constructor")&&!nt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return nt.call(n,t);for(t in n);return void 0===t||nt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[hf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(lf,"ms-").replace(af,vf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ti(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(cf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ti(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ni.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(di)return di.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ti(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ki.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});function ti(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}var tt=function(n){var it,u,t,ht,oi,et,wt,si,ct,y,rt,p,e,l,a,o,g,lt,ot,f="sizzle"+-new Date,s=n.document,v=0,ki=0,hi=ni(),ci=ni(),li=ni(),bt=function(n,t){return n===t&&(rt=!0),0},ut="undefined",ai=1<<31,di={}.hasOwnProperty,w=[],gi=w.pop,nr=w.push,b=w.push,vi=w.slice,nt=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ft="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=ft.replace("w","w#"),pi="\\["+i+"*("+ft+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+yi+"))|)"+i+"*\\]",dt=":("+ft+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pi+")*)|.*)\\)|)",at=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),tr=new RegExp("^"+i+"*,"+i+"*"),ir=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),rr=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),ur=new RegExp(dt),fr=new RegExp("^"+yi+"$"),vt={ID:new RegExp("^#("+ft+")"),CLASS:new RegExp("^\\.("+ft+")"),TAG:new RegExp("^("+ft.replace("w","w*")+")"),ATTR:new RegExp("^"+pi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,st=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{b.apply(w=vi.call(s.childNodes),s.childNodes);w[s.childNodes.length].nodeType}catch(yr){b={apply:w.length?function(n,t){nr.apply(n,vi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}function r(n,t,i,r){var w,h,c,v,k,y,d,l,nt,g;if((t?t.ownerDocument||t:s)!==e&&p(t),t=t||e,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(a&&!r){if(w=sr.exec(n))if(c=w[1]){if(9===v){if(h=t.getElementById(c),!h||!h.parentNode)return i;if(h.id===c)return i.push(h),i}else if(t.ownerDocument&&(h=t.ownerDocument.getElementById(c))&&ot(t,h)&&h.id===c)return i.push(h),i}else{if(w[2])return b.apply(i,t.getElementsByTagName(n)),i;if((c=w[3])&&u.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(c)),i}if(u.qsa&&(!o||!o.test(n))){if(l=d=f,nt=t,g=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(y=et(n),(d=t.getAttribute("id"))?l=d.replace(hr,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",k=y.length;k--;)y[k]=l+yt(y[k]);nt=gt.test(n)&&ii(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,i,r)}function ni(){var i=[];function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}return n}function h(n){return n[f]=!0,n}function c(n){var t=e.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||ai)-(~n.sourceIndex||ai);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!==ut&&n}u=r.support={};oi=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};p=r.setDocument=function(n){var v,r=n?n.ownerDocument||n:s,h=r.defaultView;return r!==e&&9===r.nodeType&&r.documentElement?(e=r,l=r.documentElement,a=!oi(r),h&&h!==h.top&&(h.addEventListener?h.addEventListener("unload",function(){p()},!1):h.attachEvent&&h.attachEvent("onunload",function(){p()})),u.attributes=c(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=c(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=st.test(r.getElementsByClassName)&&c(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),u.getById=c(function(n){return l.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!==ut&&a){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==ut&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==ut)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==ut&&a)return t.getElementsByClassName(n)},g=[],o=[],(u.qsa=st.test(r.querySelectorAll))&&(c(function(n){n.innerHTML="<select msallowclip=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowclip^='']").length&&o.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+i+"*(?:value|"+kt+")");n.querySelectorAll(":checked").length||o.push(":checked")}),c(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(u.matchesSelector=st.test(lt=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&c(function(n){u.disconnectedMatch=lt.call(n,"div");lt.call(n,"[s!='']:x");g.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),g=g.length&&new RegExp(g.join("|")),v=st.test(l.compareDocumentPosition),ot=v||st.test(l.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===s&&ot(s,n)?-1:t===r||t.ownerDocument===s&&ot(s,t)?1:y?nt.call(y,n)-nt.call(y,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,h=t.parentNode,f=[n],e=[t];if(!o||!h)return n===r?-1:t===r?1:o?-1:h?1:y?nt.call(y,n)-nt.call(y,t):0;if(o===h)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===s?-1:e[u]===s?1:0},r):e};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==e&&p(n),t=t.replace(rr,"='$1']"),!(!u.matchesSelector||!a||g&&g.test(t)||o&&o.test(t)))try{var i=lt.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,e,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==e&&p(n),ot(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==e&&p(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!a):void 0;return void 0!==r?r:u.attributes||!a?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,y=!u.sortStable&&n.slice(0),n.sort(bt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return y=null,n};ht=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ht(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=ht(r);return i};t=r.selectors={cacheLength:50,createPseudo:h,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[3]||n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&ur.test(t)&&(i=et(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==ut&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt.call(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:h(function(n){var i=[],r=[],t=wt(n.replace(at,"$1"));return t[f]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return r(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||ht(t)).indexOf(n)>-1}}),lang:h(function(n){return fr.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=a?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===l},focus:function(n){return n===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=cr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=lr(it);function bi(){}bi.prototype=t.filters=t.pseudos;t.setFilters=new bi;et=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=tr.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=ir.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),u=u.slice(e.length));for(o in t.filter)(f=vt[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):ci(n,h).slice(0)};function yt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[v,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===v&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),h(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||ar(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:pt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function ei(n){for(var s,u,r,o=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return nt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ct)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>i;i++)if(u=t.relative[n[i].type])e=[ri(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;o>r;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,r>i&&ei(n.slice(i,r)),o>r&&ei(n=n.slice(r)),o>r&&yt(n))}e.push(u)}return ui(e)}function vr(n,i){var u=i.length>0,f=n.length>0,o=function(o,s,h,c,l){var y,d,w,k=0,a="0",g=o&&[],p=[],nt=ct,tt=o||f&&t.find.TAG("*",l),it=v+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ct=s!==e&&s);a!==rt&&null!=(y=tt[a]);a++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(v=it)}u&&((y=!w&&y)&&k--,o&&g.push(y))}if(k+=a,u&&a!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(o){if(k>0)while(a--)g[a]||p[a]||(p[a]=gi.call(c));p=pt(p)}b.apply(c,p);l&&!o&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(v=it,ct=nt),g};return u?h(o):o}return wt=r.compile=function(n,t){var r,u=[],e=[],i=li[n+" "];if(!i){for(t||(t=et(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=li(n,vr(e,u));i.selector=n}return i},si=r.select=function(n,i,r,f){var s,e,o,l,v,c="function"==typeof n&&n,h=!f&&et(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&a&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(k,d),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[l=o.type])break;if((v=t.find[l])&&(f=v(o.matches[0].replace(k,d),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&yt(e),!n)return b.apply(r,f),r;break}}}return(c||wt(n,h))(f,i,!a,r,gt.test(n)&&ii(i.parentNode)||i),r},u.sortStable=f.split("").sort(bt).join("")===f,u.detectDuplicates=!!rt,p(),u.sortDetached=c(function(n){return 1&n.compareDocumentPosition(e.createElement("div"))}),c(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&c(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ti("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),c(function(n){return null==n.getAttribute("disabled")})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=tt;i.expr=tt.selectors;i.expr[":"]=i.expr.pseudos;i.unique=tt.uniqueSort;i.text=tt.getText;i.isXMLDoc=tt.isXML;i.contains=tt.contains;var nr=i.expr.match.needsContext,tr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,yf=/^.[^:#\[\.,]*$/;function ii(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(yf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ii(this,n||[],!1))},not:function(n){return this.pushStack(ii(this,n||[],!0))},is:function(n){return!!ii(this,"string"==typeof n&&nr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,pf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,wf=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:pf.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),tr.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};wf.prototype=i.fn;ft=i(u);var bf=/^(?:parents|prev(?:Until|All))/,kf={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=nr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});function ir(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ir(n,"nextSibling")},prev:function(n){return ir(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(kf[n]||(f=i.unique(f)),bf.test(n)&&(f=f.reverse())),this.pushStack(f)}});var h=/\S+/g,rr={};function df(n){var t=rr[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}i.Callbacks=function(n){n="string"==typeof n?rr[n]||df(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});var lt;i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});function ur(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(ur(),i.ready())}i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}ur();i.ready()}}()}return lt.promise(t)};var s="undefined";for(var gf in i(r))break;r.ownLast="0"!==gf;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};var ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/([A-Z])/g;function fr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(te,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ne.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ri(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function er(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function or(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ri(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ri(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ri(n)},data:function(n,t,i){return er(n,t,i)},removeData:function(n,t){return or(n,t)},_data:function(n,t,i){return er(n,t,i,!0)},_removeData:function(n,t){return or(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),fr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?fr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,p=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},w=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},ui=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var fi=/^(?:input|select|textarea)$/i,ie=/^key/,re=/^(?:mouse|pointer|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;function vt(){return!0}function it(){return!1}function cr(){try{return u.activeElement}catch(n){}}i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,o,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==s&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=hr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(o=i.event.special[e]||{},e=(f?o.delegateType:o.bindType)||e,o=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,o.setup&&o.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),o.add&&(o.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=hr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=nt.call(t,"type")?t.type:t,v=nt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!sr.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,sr.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=re.test(r)?this.mouseHooks:ie.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},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(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===cr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===s&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return fi.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;fi.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!fi.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});function lr(n){var i=ar.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}var ar="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ue=/ jQuery\d+="(?:null|\d+)"/g,vr=new RegExp("<(?:"+ar+")[\\s/>]","i"),ei=/^\s+/,yr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pr=/<([\w:]+)/,wr=/<tbody/i,fe=/<|&#?\w+;/,ee=/<(?:script|style|link)/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,br=/^$|\/(?:java|ecma)script/i,se=/^true\/(.*)/,he=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,o={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:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ce=lr(u),oi=ce.appendChild(u.createElement("div"));o.optgroup=o.option;o.tbody=o.tfoot=o.colgroup=o.caption=o.thead;o.th=o.td;function f(n,t){var e,u,o=0,r=typeof n.getElementsByTagName!==s?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==s?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[o]);o++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function le(n){ui.test(n.type)&&(n.defaultChecked=n.checked)}function kr(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function dr(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function gr(n){var t=se.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function si(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function nu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ae(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(dr(t).text=n.text,gr(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&ui.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!vr.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(oi.innerHTML=n.outerHTML,oi.removeChild(s=oi.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ae(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)nu(c,e[o]);else nu(n,s);return e=f(s,"script"),e.length>0&&si(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,s,b,h,p,w,a,k=n.length,v=lr(t),l=[],y=0;k>y;y++)if(s=n[y],s||0===s)if("object"===i.type(s))i.merge(l,s.nodeType?[s]:s);else if(fe.test(s)){for(h=h||v.appendChild(t.createElement("div")),p=(pr.exec(s)||["",""])[1].toLowerCase(),a=o[p]||o._default,h.innerHTML=a[1]+s.replace(yr,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&ei.test(s)&&l.push(t.createTextNode(ei.exec(s)[0])),!r.tbody)for(s="table"!==p||wr.test(s)?"<table>"!==a[1]||wr.test(s)?0:h:h.firstChild,c=s&&s.childNodes.length;c--;)i.nodeName(w=s.childNodes[c],"tbody")&&!w.childNodes.length&&s.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(s));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),le),y=0;s=l[y++];)if((!e||-1===i.inArray(s,e))&&(b=i.contains(s.ownerDocument,s),h=f(v.appendChild(s),"script"),b&&si(h),u))for(c=0;s=h[c++];)br.test(s.type||"")&&u.push(s);return h=null,v},cleanData:function(n,t){for(var u,e,f,o,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],o=f&&l[f])){if(o.events)for(e in o.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,o.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==s?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return w(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&si(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return w(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ue,""):void 0;if(!("string"!=typeof n||ee.test(n)||!r.htmlSerialize&&vr.test(n)||!r.leadingWhitespace&&ei.test(n)||o[(pr.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(yr,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(s){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ki.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&oe.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),dr),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,gr),e=0;c>e;e++)u=o[e],br.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(he,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ni.apply(f,u.get());return this.pushStack(f)}});var ot,tu={};function iu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=tu[n];return t||(t=iu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=iu(n,r),ot.detach()),tu[n]=t),t}!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==s&&(t.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",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var ru=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),b,k,ve=/^(top|right|bottom|left)$/;n.getComputedStyle?(b=function(n){return n.ownerDocument.defaultView.getComputedStyle(n,null)},k=function(n,t,r){var e,o,s,u,f=n.style;return r=r||b(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&ru.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(b=function(n){return n.currentStyle},k=function(n,t,i){var o,f,e,r,u=n.style;return i=i||b(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ve.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});function uu(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var f,t,l,o,s,e,h;if(f=u.createElement("div"),f.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",l=f.getElementsByTagName("a")[0],t=l&&l.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.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",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var hi=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/,pe=/^(none|table(?!-c[ea]).+)/,we=new RegExp("^("+at+")(.*)$","i"),be=new RegExp("^([+-])=("+at+")","i"),ke={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"];function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=we.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=b(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=k(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+cu(n,t,u||(s?"border":"content"),o,e)+"px"}i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=k(n,"opacity");return""===i?"1":i}}}},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:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=ou(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=be.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=ou(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=k(n,t,u)),"normal"===f&&t in fu&&(f=fu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return pe.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ke,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,u,f){var e=f&&b(n);return hu(n,u,f?cu(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ye.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(hi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=hi.test(f)?f.replace(hi,e):f+" "+e)}});i.cssHooks.marginRight=uu(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},k,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};ru.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return w(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=b(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,de=/^(?:toggle|show|hide)$/,au=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),ge=/queueHooks$/,bt=[no],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=au.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&au.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};function vu(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function yu(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function no(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],de.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=yu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function to(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function pu(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||vu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||vu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(to(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,yu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}i.Animation=i.extend(pu,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pu(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&ge.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();var io=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(io,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,wu,v=i.expr.attrHandle,ci=/^(?:checked|selected)$/i,d=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return w(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===s?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?wu:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&d||!ci.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(d?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});wu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&d||!ci.test(r)?n.setAttribute(!d&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&d||!ci.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&d||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});d||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});var ro=/^(?:input|select|textarea|button|object)$/i,uo=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return w(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ro.test(n.nodeName)||uo.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");var li=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===s||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(li," ").indexOf(i)>=0)return!0;return!1}});i.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(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var ai=i.now(),vi=/\?/,fo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(fo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var g,y,eo=/#.*$/,bu=/([?&])_=[^&]*/,oo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,so=/^(?:GET|HEAD)$/,ho=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,du={},yi={},gu="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}g=ku.exec(y.toLowerCase())||[];function nf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function tf(n,t,r,u){var f={},o=n===yi;function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}return e(t.dataTypes[0])||!f["*"]&&e("*")}function pi(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function co(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function lo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(g[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gu,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":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:nf(du),ajaxTransport:nf(yi),ajax:function(n,t){"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=oo.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(nt.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(eo,"").replace(ho,g[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=ku.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===g[1]&&s[2]===g[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(g[3]||("http:"===g[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),tf(du,r,t,u),2===e)return u;l=r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!so.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(vi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=bu.test(f)?f.replace(bu,"$1_="+ai++):f+(vi.test(f)?"&":"?")+"_="+ai++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+gu+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=tf(yi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");function w(n,t,s,h){var v,it,g,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=co(r,u,s)),y=lo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,g=y.error,v=!g)):(g=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?nt.resolveWith(o,[it,c,u]):nt.rejectWith(o,[u,c,g]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:g]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var ao=/%20/g,vo=/\[\]$/,rf=/\r?\n/g,yo=/^(?:submit|button|image|reset|file)$/i,po=/^(?:input|select|textarea|keygen)/i;function wi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||vo.test(n)?u(n,i):wi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)wi(n+"["+f+"]",t[f],r,u)}i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)wi(r,n[r],t,f);return u.join("&").replace(ao,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&po.test(this.nodeName)&&!yo.test(n)&&(this.checked||!ui.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(rf,"\r\n")}}):{name:t.name,value:r.replace(rf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&uf()||bo()}:uf;var wo=0,gt={},ht=i.ajaxSettings.xhr();n.ActiveXObject&&i(n).on("unload",function(){for(var n in gt)gt[n](void 0,!0)});r.cors=!!ht&&"withCredentials"in ht;ht=r.ajax=!!ht;ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++wo;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete gt[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=gt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}});function uf(){try{return new n.XMLHttpRequest}catch(t){}}function bo(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ff=[],bi=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ff.pop()||i.expando+"_"+ai++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(bi.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bi.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(bi,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,ff.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")});i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=tr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))};var ef=i.fn.load;i.fn.load=function(n,t,r){if("string"!=typeof n&&ef)return ef.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this};i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length};var of=n.document.documentElement;function sf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}};i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==s&&(u=r.getBoundingClientRect()),f=sf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||of;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||of})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return w(this,function(n,u,f){var e=sf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}});i.each(["top","left"],function(n,t){i.cssHooks[t]=uu(r.pixelPosition,function(n,r){if(r)return(r=k(n,t),pt.test(r)?i(n).position()[t]+"px":r)})});i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return w(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})});i.fn.size=function(){return this.length};i.fn.andSelf=i.fn.addBack;"function"==typeof define&&define.amd&&define("asljQuery",[],function(){return i});var ko=n.jQuery,go=n.$;return i.noConflict=function(t){return n.$===i&&(n.$=go),t&&n.jQuery===i&&(n.asljQuery=ko),i},typeof t===s&&(n.asljQuery=n.$=i),i}),function(n,t,i){(function(t){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],t):typeof module!="undefined"&&module.exports?t(require("jquery")):t(n)})(function(n){var u="left",f="right",e="up",o="down",y="in",p="out",w="none",tt="auto",b="swipe",k="pinch",d="tap",it="doubletap",rt="longtap",g="horizontal",nt="vertical",a="all",ft=10,ut="start",s="move",t="end",r="cancel",l="ontouchstart"in i,v=i.navigator.msPointerEnabled&&!i.navigator.pointerEnabled&&!l,h=(i.navigator.pointerEnabled||i.navigator.msPointerEnabled)&&!l,c="TouchSwipe";n.fn.swipe=function(t){var r=n(this),i=r.data(c);if(i&&typeof t=="string"){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&typeof t=="object")i.option.apply(this,arguments);else if(!i&&(typeof t=="object"||!t))return et.apply(this,arguments);return r};n.fn.swipe.version="1.6.15";n.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe.phases={PHASE_START:ut,PHASE_MOVE:s,PHASE_END:t,PHASE_CANCEL:r};n.fn.swipe.directions={LEFT:u,RIGHT:f,UP:e,DOWN:o,IN:y,OUT:p};n.fn.swipe.pageScroll={NONE:w,HORIZONTAL:g,VERTICAL:nt,AUTO:tt};n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:a};function et(t){return t&&t.allowPageScroll===undefined&&(t.swipe!==undefined||t.swipeStatus!==undefined)&&(t.allowPageScroll=w),t.click!==undefined&&t.tap===undefined&&(t.tap=t.click),t||(t={}),t=n.extend({},n.fn.swipe.defaults,t),this.each(function(){var r=n(this),i=r.data(c);i||(i=new ot(this,t),r.data(c,i))})}function ot(i,et){var et=n.extend({},et),si=l||h||!et.fallbackToMouseEvents,hi=si?h?v?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ki=si?h?v?"MSPointerMove":"pointermove":"touchmove":"mousemove",di=si?h?v?"MSPointerUp":"pointerup":"touchend":"mouseup",ri=si?h?"mouseleave":null:"mouseleave",ci=h?v?"MSPointerCancel":"pointercancel":"touchcancel",at=0,vt=null,yt=null,lt=0,gt=0,ni=0,pt=1,bt=0,kt=0,li=null,ot=n(i),st="start",ct=0,ht={},gi=0,ai=0,vi=0,nr=0,ti=0,fi=null,ei=null;try{ot.bind(hi,tr);ot.bind(ci,ui)}catch(ff){n.error("events not supported "+hi+","+ci+" on jQuery.swipe")}this.enable=function(){return ot.bind(hi,tr),ot.bind(ci,ui),ot};this.disable=function(){return lr(),ot};this.destroy=function(){lr();ot.data(c,null);ot=null};this.option=function(t,i){if(typeof t=="object")et=n.extend(et,t);else if(et[t]!==undefined){if(i===undefined)return et[t];et[t]=i}else if(t)n.error("Option "+t+" does not exist on jQuery.swipe.options");else return et;return null};function tr(t){if(!pu()&&!(n(t.target).closest(et.excludedElements,ot).length>0)){var i=t.originalEvent?t.originalEvent:t,f,u=i.touches,e=u?u[0]:i;return(st=ut,u?ct=u.length:et.preventDefaultEvents!==!1&&t.preventDefault(),at=0,vt=null,yt=null,kt=null,lt=0,gt=0,ni=0,pt=1,bt=0,li=ku(),dr(),wi(0,e),!u||ct===et.fingers||et.fingers===a||oi()?(gi=ii(),ct==2&&(wi(1,u[1]),gt=ni=cr(ht[0].start,ht[1].start)),(et.swipeStatus||et.pinchStatus)&&(f=wt(i,st))):f=!1,f===!1)?(st=r,wt(i,st),f):(et.hold&&(ei=setTimeout(n.proxy(function(){ot.trigger("hold",[i.target]);et.hold&&(f=et.hold.call(ot,i,i.target))},this),et.longTapThreshold)),pi(!0),null)}}function ir(n){var f=n.originalEvent?n.originalEvent:n;if(st!==t&&st!==r&&!yi()){var o,i=f.touches,h=i?i[0]:f,u=gr(h);if(ai=ii(),i&&(ct=i.length),et.hold&&clearTimeout(ei),st=s,ct==2&&(gt==0?(wi(1,i[1]),gt=ni=cr(ht[0].start,ht[1].start)):(gr(i[1]),ni=cr(ht[0].end,ht[1].end),kt=gu(ht[0].end,ht[1].end)),pt=du(gt,ni),bt=Math.abs(gt-ni)),ct===et.fingers||et.fingers===a||!i||oi()){if(vt=iu(u.start,u.end),yt=iu(u.last,u.end),uu(n,yt),at=nf(u.start,u.end),lt=tu(),bu(vt,at),o=wt(f,st),!et.triggerOnTouchEnd||et.triggerOnTouchLeave){var e=!0;if(et.triggerOnTouchLeave){var c=rf(this);e=uf(u.end,c)}!et.triggerOnTouchEnd&&e?st=fr(s):et.triggerOnTouchLeave&&!e&&(st=fr(t));(st==r||st==t)&&wt(f,st)}}else st=r,wt(f,st);o===!1&&(st=r,wt(f,st))}}function rr(n){var i=n.originalEvent?n.originalEvent:n,u=i.touches;if(u){if(u.length&&!yi())return yu(i),!0;if(u.length&&yi())return!0}return yi()&&(ct=nr),ai=ii(),lt=tu(),or()||!er()?(st=r,wt(i,st)):et.triggerOnTouchEnd||et.triggerOnTouchEnd==!1&&st===s?(et.preventDefaultEvents!==!1&&n.preventDefault(),st=t,wt(i,st)):!et.triggerOnTouchEnd&&br()?(st=t,dt(i,st,d)):st===s&&(st=r,wt(i,st)),pi(!1),null}function ui(){ct=0;ai=0;gi=0;gt=0;ni=0;pt=1;dr();pi(!1)}function ur(n){var i=n.originalEvent?n.originalEvent:n;et.triggerOnTouchLeave&&(st=fr(t),wt(i,st))}function lr(){ot.unbind(hi,tr);ot.unbind(ci,ui);ot.unbind(ki,ir);ot.unbind(di,rr);ri&&ot.unbind(ri,ur);pi(!1)}function fr(n){var i=n,f=ar(),u=er(),e=or();return!f||e?i=r:u&&n==s&&(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)?i=t:!u&&n==t&&et.triggerOnTouchLeave&&(i=r),i}function wt(n,i){var u,f=n.touches;return(eu()||sr())&&(u=dt(n,i,b)),(fu()||oi())&&u!==!1&&(u=dt(n,i,k)),au()&&u!==!1?u=dt(n,i,it):vu()&&u!==!1?u=dt(n,i,rt):lu()&&u!==!1&&(u=dt(n,i,d)),i===r&&(sr()&&(u=dt(n,i,b)),oi()&&(u=dt(n,i,k)),ui(n)),i===t&&(f?f.length||ui(n):ui(n)),u}function dt(i,s,h){var c;if(h==b){if(ot.trigger("swipeStatus",[s,vt||null,at||0,lt||0,ct,ht,yt]),et.swipeStatus&&(c=et.swipeStatus.call(ot,i,s,vt||null,at||0,lt||0,ct,ht,yt),c===!1))return!1;if(s==t&&yr()){if(clearTimeout(fi),clearTimeout(ei),ot.trigger("swipe",[vt,at,lt,ct,ht,yt]),et.swipe&&(c=et.swipe.call(ot,i,vt,at,lt,ct,ht,yt),c===!1))return!1;switch(vt){case u:ot.trigger("swipeLeft",[vt,at,lt,ct,ht,yt]);et.swipeLeft&&(c=et.swipeLeft.call(ot,i,vt,at,lt,ct,ht,yt));break;case f:ot.trigger("swipeRight",[vt,at,lt,ct,ht,yt]);et.swipeRight&&(c=et.swipeRight.call(ot,i,vt,at,lt,ct,ht,yt));break;case e:ot.trigger("swipeUp",[vt,at,lt,ct,ht,yt]);et.swipeUp&&(c=et.swipeUp.call(ot,i,vt,at,lt,ct,ht,yt));break;case o:ot.trigger("swipeDown",[vt,at,lt,ct,ht,yt]);et.swipeDown&&(c=et.swipeDown.call(ot,i,vt,at,lt,ct,ht,yt))}}}if(h==k){if(ot.trigger("pinchStatus",[s,kt||null,bt||0,lt||0,ct,pt,ht]),et.pinchStatus&&(c=et.pinchStatus.call(ot,i,s,kt||null,bt||0,lt||0,ct,pt,ht),c===!1))return!1;if(s==t&&vr())switch(kt){case y:ot.trigger("pinchIn",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchIn&&(c=et.pinchIn.call(ot,i,kt||null,bt||0,lt||0,ct,pt,ht));break;case p:ot.trigger("pinchOut",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchOut&&(c=et.pinchOut.call(ot,i,kt||null,bt||0,lt||0,ct,pt,ht))}}return h==d?(s===r||s===t)&&(clearTimeout(fi),clearTimeout(ei),hr()&&!su()?(ti=ii(),fi=setTimeout(n.proxy(function(){ti=null;ot.trigger("tap",[i.target]);et.tap&&(c=et.tap.call(ot,i,i.target))},this),et.doubleTapThreshold)):(ti=null,ot.trigger("tap",[i.target]),et.tap&&(c=et.tap.call(ot,i,i.target)))):h==it?(s===r||s===t)&&(clearTimeout(fi),clearTimeout(ei),ti=null,ot.trigger("doubletap",[i.target]),et.doubleTap&&(c=et.doubleTap.call(ot,i,i.target))):h==rt&&(s===r||s===t)&&(clearTimeout(fi),ti=null,ot.trigger("longtap",[i.target]),et.longTap&&(c=et.longTap.call(ot,i,i.target))),c}function er(){var n=!0;return et.threshold!==null&&(n=at>=et.threshold),n}function or(){var n=!1;return et.cancelThreshold!==null&&vt!==null&&(n=nu(vt)-at>=et.cancelThreshold),n}function ru(){return et.pinchThreshold!==null?bt>=et.pinchThreshold:!0}function ar(){return et.maxTimeThreshold?lt>=et.maxTimeThreshold?!1:!0:!0}function uu(n,t){if(et.preventDefaultEvents!==!1)if(et.allowPageScroll===w)n.preventDefault();else{var i=et.allowPageScroll===tt;switch(t){case u:(et.swipeLeft&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case f:(et.swipeRight&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case e:(et.swipeUp&&i||!i&&et.allowPageScroll!=nt)&&n.preventDefault();break;case o:(et.swipeDown&&i||!i&&et.allowPageScroll!=nt)&&n.preventDefault()}}}function vr(){var n=pr(),t=wr(),i=ru();return n&&t&&i}function oi(){return!!(et.pinchStatus||et.pinchIn||et.pinchOut)}function fu(){return!!(vr()&&oi())}function yr(){var n=ar(),t=er(),i=pr(),r=wr(),u=or();return!u&&r&&i&&t&&n}function sr(){return!!(et.swipe||et.swipeStatus||et.swipeLeft||et.swipeRight||et.swipeUp||et.swipeDown)}function eu(){return!!(yr()&&sr())}function pr(){return ct===et.fingers||et.fingers===a||!l}function wr(){return ht[0].end.x!==0}function br(){return!!et.tap}function hr(){return!!et.doubleTap}function ou(){return!!et.longTap}function kr(){if(ti==null)return!1;var n=ii();return hr()&&n-ti<=et.doubleTapThreshold}function su(){return kr()}function hu(){return(ct===1||!l)&&(isNaN(at)||at<et.threshold)}function cu(){return lt>et.longTapThreshold&&at<ft}function lu(){return!!(hu()&&br())}function au(){return!!(kr()&&hr())}function vu(){return!!(cu()&&ou())}function yu(n){vi=ii();nr=n.touches.length+1}function dr(){vi=0;nr=0}function yi(){var n=!1;if(vi){var t=ii()-vi;t<=et.fingerReleaseThreshold&&(n=!0)}return n}function pu(){return!!(ot.data(c+"_intouch")===!0)}function pi(n){ot&&(n===!0?(ot.bind(ki,ir),ot.bind(di,rr),ri&&ot.bind(ri,ur)):(ot.unbind(ki,ir,!1),ot.unbind(di,rr,!1),ri&&ot.unbind(ri,ur,!1)),ot.data(c+"_intouch",n===!0))}function wi(n,t){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=t.pageX||t.clientX,i.start.y=i.last.y=i.end.y=t.pageY||t.clientY,ht[n]=i,i}function gr(n){var i=n.identifier!==undefined?n.identifier:0,t=wu(i);return t===null&&(t=wi(i,n)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function wu(n){return ht[n]||null}function bu(n,t){t=Math.max(t,nu(n));li[n].distance=t}function nu(n){return li[n]?li[n].distance:undefined}function ku(){var n={};return n[u]=bi(u),n[f]=bi(f),n[e]=bi(e),n[o]=bi(o),n}function bi(n){return{direction:n,distance:0}}function tu(){return ai-gi}function cr(n,t){var i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);return Math.round(Math.sqrt(i*i+r*r))}function du(n,t){var i=t/n*1;return i.toFixed(2)}function gu(){return pt<1?p:y}function nf(n,t){return Math.round(Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)))}function tf(n,t){var r=n.x-t.x,u=t.y-n.y,f=Math.atan2(u,r),i=Math.round(f*180/Math.PI);return i<0&&(i=360-Math.abs(i)),i}function iu(n,t){var i=tf(n,t);return i<=45&&i>=0?u:i<=360&&i>=315?u:i>=135&&i<=225?f:i>45&&i<135?o:e}function ii(){var n=new Date;return n.getTime()}function rf(t){t=n(t);var i=t.offset();return{left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()}}function uf(n,t){return n.x>t.left&&n.x<t.right&&n.y>t.top&&n.y<t.bottom}}})}(asljQuery,asljQuery,window),function(n){n.extend({highlight:function(t,i,r,u){if(t.nodeType===3){var o=t.data.match(i);if(o){var s=document.createElement(r||"span");s.className=u||"highlight";var f=t.splitText(o.index);f.splitText(o[0].length);var h=f.cloneNode(!0);return s.appendChild(h),f.parentNode.replaceChild(s,f),1}}else if(t.nodeType===1&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&!(t.tagName===r.toUpperCase()&&t.className===u))for(var e=0;e<t.childNodes.length;e++)e+=n.highlight(t.childNodes[e],i,r,u);return 0}});n.fn.unhighlight=function(t){var i={className:"highlight",element:"span"};return n.extend(i,t),this.find(i.element+"."+i.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()};n.fn.highlight=function(t,i){var r={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(n.extend(r,i),t.constructor===String&&(t=[t]),t=n.grep(t,function(n){return n!=""}),t=n.map(t,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),t.length==0)return this;var f=r.caseSensitive?"":"i",u="("+t.join("|")+")";r.wordsOnly&&(u="\\b"+u+"\\b");var e=new RegExp(u,f);return this.each(function(){n.highlight(this,e,r.element,r.className)})}}(asljQuery,asljQuery,window),function(n,t,i){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(n)}(function(n){function f(r){var f=r||i.event,w=l.call(arguments,1),a=0,h=0,s=0,v=0,b=0,k=0;if(r=n.event.fix(f),r.type="mousewheel","detail"in f&&(s=-1*f.detail),"wheelDelta"in f&&(s=f.wheelDelta),"wheelDeltaY"in f&&(s=f.wheelDeltaY),"wheelDeltaX"in f&&(h=-1*f.wheelDeltaX),"axis"in f&&f.axis===f.HORIZONTAL_AXIS&&(h=-1*s,s=0),a=0===s?h:s,"deltaY"in f&&(s=-1*f.deltaY,a=s),"deltaX"in f&&(h=f.deltaX,0===s&&(a=-1*h)),0!==s||0!==h){if(1===f.deltaMode){var y=n.data(this,"mousewheel-line-height");a*=y;s*=y;h*=y}else if(2===f.deltaMode){var p=n.data(this,"mousewheel-page-height");a*=p;s*=p;h*=p}if(v=Math.max(Math.abs(s),Math.abs(h)),(!t||t>v)&&(t=v,o(f,v)&&(t/=40)),o(f,v)&&(a/=40,h/=40,s/=40),a=Math[a>=1?"floor":"ceil"](a/t),h=Math[h>=1?"floor":"ceil"](h/t),s=Math[s>=1?"floor":"ceil"](s/t),u.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();b=r.clientX-d.left;k=r.clientY-d.top}return r.deltaX=h,r.deltaY=s,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,a,h,s),e&&clearTimeout(e),e=setTimeout(c,200),(n.event.dispatch||n.event.handle).apply(this,w)}}function c(){t=null}function o(n,t){return u.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var e,t,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(n.event.fixHooks)for(var h=s.length;h;)n.event.fixHooks[s[--h]]=n.event.mouseHooks;var u=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],f,!1);else this.onmousewheel=f;n.data(this,"mousewheel-line-height",u.getLineHeight(this));n.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],f,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(n)}(function(n){function f(r){var f=r||i.event,w=l.call(arguments,1),a=0,h=0,s=0,v=0,b=0,k=0;if(r=n.event.fix(f),r.type="mousewheel","detail"in f&&(s=-1*f.detail),"wheelDelta"in f&&(s=f.wheelDelta),"wheelDeltaY"in f&&(s=f.wheelDeltaY),"wheelDeltaX"in f&&(h=-1*f.wheelDeltaX),"axis"in f&&f.axis===f.HORIZONTAL_AXIS&&(h=-1*s,s=0),a=0===s?h:s,"deltaY"in f&&(s=-1*f.deltaY,a=s),"deltaX"in f&&(h=f.deltaX,0===s&&(a=-1*h)),0!==s||0!==h){if(1===f.deltaMode){var y=n.data(this,"mousewheel-line-height");a*=y;s*=y;h*=y}else if(2===f.deltaMode){var p=n.data(this,"mousewheel-page-height");a*=p;s*=p;h*=p}if(v=Math.max(Math.abs(s),Math.abs(h)),(!t||t>v)&&(t=v,o(f,v)&&(t/=40)),o(f,v)&&(a/=40,h/=40,s/=40),a=Math[a>=1?"floor":"ceil"](a/t),h=Math[h>=1?"floor":"ceil"](h/t),s=Math[s>=1?"floor":"ceil"](s/t),u.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();b=r.clientX-d.left;k=r.clientY-d.top}return r.deltaX=h,r.deltaY=s,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,a,h,s),e&&clearTimeout(e),e=setTimeout(c,200),(n.event.dispatch||n.event.handle).apply(this,w)}}function c(){t=null}function o(n,t){return u.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var e,t,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(n.event.fixHooks)for(var h=s.length;h;)n.event.fixHooks[s[--h]]=n.event.mouseHooks;var u=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],f,!1);else this.onmousewheel=f;n.data(this,"mousewheel-line-height",u.getLineHeight(this));n.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],f,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});typeof n.fn.mCustomScrollbar=="undefined"?!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t:t(n,i,document)}(function(n){!function(t){var i="function"==typeof define&&define.amd,r="undefined"!=typeof module&&module.exports,u="https:"==document.location.protocol?"https:":"http:";i||(r?require("jquery-mousewheel")(n):n.event.special.mousewheel||n("head").append(decodeURI("%3Cscript src="+u+"//"+"cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"+"%3E%3C/script%3E")));t()}(function(){var c,l="mCustomScrollbar",t="mCS",rt=".mCustomScrollbar",st={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},wt=0,k={},w=i.attachEvent&&!i.addEventListener?1:0,o=!1,r=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],h={init:function(i){var i=n.extend(!0,{},st,i),e=y.call(this);if(i.live){var u=i.liveSelector||this.selector||rt,f=n(u);if("off"===i.live)return void d(u);k[u]=setTimeout(function(){f.mCustomScrollbar(i);"once"===i.live&&f.length&&d(u)},500)}else d(u);return i.setWidth=i.set_width?i.set_width:i.setWidth,i.setHeight=i.set_height?i.set_height:i.setHeight,i.axis=i.horizontalScroll?"x":bt(i.axis),i.scrollInertia=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia,"object"!=typeof i.mouseWheel&&1==i.mouseWheel&&(i.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),i.mouseWheel.scrollAmount=i.mouseWheelPixels?i.mouseWheelPixels:i.mouseWheel.scrollAmount,i.mouseWheel.normalizeDelta=i.advanced.normalizeMouseWheelDelta?i.advanced.normalizeMouseWheelDelta:i.mouseWheel.normalizeDelta,i.scrollButtons.scrollType=kt(i.scrollButtons.scrollType),ht(i),n(e).each(function(){var u=n(this);if(!u.data(t)){u.data(t,{idx:++wt,opt:i,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=u.data(t),f=e.opt,o=u.data("mcs-axis"),s=u.data("mcs-scrollbar-position"),c=u.data("mcs-theme");o&&(f.axis=o);s&&(f.scrollbarPosition=s);c&&(f.theme=c,ht(f));dt.call(this);e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this);n("#mCSB_"+e.idx+"_container img:not(."+r[2]+")").addClass(r[2]);h.update.call(null,u)}})},update:function(i,u){var e=i||y.call(this);return n(e).each(function(){var o=n(this);if(o.data(t)){var e=o.data(t),i=e.opt,h=n("#mCSB_"+e.idx+"_container"),a=n("#mCSB_"+e.idx),c=[n("#mCSB_"+e.idx+"_dragger_vertical"),n("#mCSB_"+e.idx+"_dragger_horizontal")];if(!h.length)return;e.tweenRunning&&s(o);u&&e&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this);o.hasClass(r[3])&&o.removeClass(r[3]);o.hasClass(r[4])&&o.removeClass(r[4]);a.css("max-height","none");a.height()!==o.height()&&a.css("max-height",o.height());gt.call(this);"y"===i.axis||i.advanced.autoExpandHorizontalScroll||h.css("width",ct(h));e.overflowed=ri.call(this);lt.call(this);i.autoDraggerLength&&ti.call(this);ii.call(this);ui.call(this);var l=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)];"x"!==i.axis&&(e.overflowed[0]?c[0].height()>c[0].parent().height()?p.call(this):(f(o,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(p.call(this),"y"===i.axis?nt.call(this):"yx"===i.axis&&e.overflowed[1]&&f(o,l[1].toString(),{dir:"x",dur:0,overwrite:"none"})));"y"!==i.axis&&(e.overflowed[1]?c[1].width()>c[1].parent().width()?p.call(this):(f(o,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(p.call(this),"x"===i.axis?nt.call(this):"yx"===i.axis&&e.overflowed[0]&&f(o,l[0].toString(),{dir:"y",dur:0,overwrite:"none"})));u&&e&&(2===u&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===u&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this));ot.call(this)}})},scrollTo:function(i,r){if("undefined"!=typeof i&&null!=i){var u=y.call(this);return n(u).each(function(){var s=n(this);if(s.data(t)){var o=s.data(t),h=o.opt,c={trigger:"external",scrollInertia:h.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},u=n.extend(!0,{},c,r),e=et.call(this,i),l=u.scrollInertia>0&&u.scrollInertia<17?17:u.scrollInertia;e[0]=vt.call(this,e[0],"y");e[1]=vt.call(this,e[1],"x");u.moveDragger&&(e[0]*=o.scrollRatio.y,e[1]*=o.scrollRatio.x);u.dur=bi()?0:l;setTimeout(function(){null!==e[0]&&"undefined"!=typeof e[0]&&"x"!==h.axis&&o.overflowed[0]&&(u.dir="y",u.overwrite="all",f(s,e[0].toString(),u));null!==e[1]&&"undefined"!=typeof e[1]&&"y"!==h.axis&&o.overflowed[1]&&(u.dir="x",u.overwrite="none",f(s,e[1].toString(),u))},u.timeout)}})}},stop:function(){var i=y.call(this);return n(i).each(function(){var i=n(this);i.data(t)&&s(i)})},disable:function(i){var u=y.call(this);return n(u).each(function(){var u=n(this);u.data(t)&&(u.data(t),ot.call(this,"remove"),nt.call(this),i&&p.call(this),lt.call(this,!0),u.addClass(r[3]))})},destroy:function(){var i=y.call(this);return n(i).each(function(){var f=n(this);if(f.data(t)){var u=f.data(t),e=u.opt,s=n("#mCSB_"+u.idx),o=n("#mCSB_"+u.idx+"_container"),h=n(".mCSB_"+u.idx+"_scrollbar");e.live&&d(e.liveSelector||n(i).selector);ot.call(this,"remove");nt.call(this);p.call(this);f.removeData(t);v(this,"mcs");h.remove();o.find("img."+r[2]).removeClass(r[2]);s.replaceWith(o.contents());f.removeClass(l+" _"+t+"_"+u.idx+" "+r[6]+" "+r[7]+" "+r[5]+" "+r[3]).addClass(r[4])}})}},y=function(){return"object"!=typeof n(this)||n(this).length<1?rt:this},ht=function(t){t.autoDraggerLength=n.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1?!1:t.autoDraggerLength;t.autoExpandScrollbar=n.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1?!1:t.autoExpandScrollbar;t.scrollButtons.enable=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!1:t.scrollButtons.enable;t.autoHideScrollbar=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!0:t.autoHideScrollbar;t.scrollbarPosition=n.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},d=function(n){k[n]&&(clearTimeout(k[n]),v(k,n))},bt=function(n){return"yx"===n||"xy"===n||"auto"===n?"yx":"x"===n||"horizontal"===n?"x":"y"},kt=function(n){return"stepped"===n||"pixels"===n||"step"===n||"click"===n?"stepped":"stepless"},dt=function(){var f=n(this),u=f.data(t),i=u.opt,h=i.autoExpandScrollbar?" "+r[1]+"_expand":"",e=["<div id='mCSB_"+u.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+h+"'><div class='"+r[12]+"'><div id='mCSB_"+u.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>","<div id='mCSB_"+u.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+h+"'><div class='"+r[12]+"'><div id='mCSB_"+u.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>"],v="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?e[0]+e[1]:"x"===i.axis?e[1]:e[0],y="yx"===i.axis?"<div id='mCSB_"+u.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=i.autoHideScrollbar?" "+r[6]:"",w="x"!==i.axis&&"rtl"===u.langDir?" "+r[7]:"";i.setWidth&&f.css("width",i.setWidth);i.setHeight&&f.css("height",i.setHeight);i.setLeft="y"!==i.axis&&"rtl"===u.langDir?"989999px":i.setLeft;f.addClass(l+" _"+t+"_"+u.idx+p+w).wrapInner("<div id='mCSB_"+u.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+v+"'><div id='mCSB_"+u.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSB_"+u.idx),s=n("#mCSB_"+u.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||s.css("width",ct(s));"outside"===i.scrollbarPosition?("static"===f.css("position")&&f.css("position","relative"),f.css("overflow","visible"),a.addClass("mCSB_outside").after(c)):(a.addClass("mCSB_inside").append(c),s.wrap(y));ni.call(this);var o=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")];o[0].css("min-height",o[0].height());o[1].css("min-width",o[1].width())},ct=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return n(this).outerWidth(!0)}).get())],r=t.parent().width();return i[0]>r?i[0]:i[1]>r?i[1]:"100%"},gt=function(){var e=n(this),u=e.data(t),r=u.opt,i=n("#mCSB_"+u.idx+"_container");if(r.advanced.autoExpandHorizontalScroll&&"y"!==r.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var f=Math.ceil(i[0].scrollWidth);3===r.advanced.autoExpandHorizontalScroll||2!==r.advanced.autoExpandHorizontalScroll&&f>i.parent().width()?i.css({width:f,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},ni=function(){var s=n(this),o=s.data(t),u=o.opt,h=n(".mCSB_"+o.idx+"_scrollbar:first"),f=it(u.scrollButtons.tabindex)?"tabindex='"+u.scrollButtons.tabindex+"'":"",i=["<a href='#' class='"+r[13]+"' "+f+" />","<a href='#' class='"+r[14]+"' "+f+" />","<a href='#' class='"+r[15]+"' "+f+" />","<a href='#' class='"+r[16]+"' "+f+" />"],e=["x"===u.axis?i[2]:i[0],"x"===u.axis?i[3]:i[1],i[2],i[3]];u.scrollButtons.enable&&h.prepend(e[0]).append(e[1]).next(".mCSB_scrollTools").prepend(e[2]).append(e[3])},ti=function(){var s=n(this),u=s.data(t),f=n("#mCSB_"+u.idx),e=n("#mCSB_"+u.idx+"_container"),r=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")],o=[f.height()/e.outerHeight(!1),f.width()/e.outerWidth(!1)],i=[parseInt(r[0].css("min-height")),Math.round(o[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(o[1]*r[1].parent().width())],h=w&&i[1]<i[0]?i[0]:i[1],c=w&&i[3]<i[2]?i[2]:i[3];r[0].css({height:h,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":i[0]+"px"});r[1].css({width:c,"max-width":r[1].parent().width()-10})},ii=function(){var s=n(this),i=s.data(t),u=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),r=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e=[f.outerHeight(!1)-u.height(),f.outerWidth(!1)-u.width()],o=[e[0]/(r[0].parent().height()-r[0].height()),e[1]/(r[1].parent().width()-r[1].width())];i.scrollRatio={y:o[0],x:o[1]}},g=function(n,t,i){var f=i?r[0]+"_expanded":"",u=n.closest(".mCSB_scrollTools");"active"===t?(n.toggleClass(r[0]+" "+f),u.toggleClass(r[1]),n[0]._draggable=n[0]._draggable?0:1):n[0]._draggable||("hide"===t?(n.removeClass(r[0]),u.removeClass(r[1])):(n.addClass(r[0]),u.addClass(r[1])))},ri=function(){var h=n(this),r=h.data(t),e=n("#mCSB_"+r.idx),i=n("#mCSB_"+r.idx+"_container"),u=null==r.overflowed?i.height():i.outerHeight(!1),f=null==r.overflowed?i.width():i.outerWidth(!1),o=i[0].scrollHeight,s=i[0].scrollWidth;return o>u&&(u=o),s>f&&(f=s),[u>e.height(),f>e.width()]},p=function(){var r=n(this),i=r.data(t),u=i.opt,c=n("#mCSB_"+i.idx),e=n("#mCSB_"+i.idx+"_container"),h=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")];if(s(r),("x"!==u.axis&&!i.overflowed[0]||"y"===u.axis&&i.overflowed[0])&&(h[0].add(e).css("top",0),f(r,"_resetY")),"y"!==u.axis&&!i.overflowed[1]||"x"===u.axis&&i.overflowed[1]){var o=dx=0;"rtl"===i.langDir&&(o=c.width()-e.outerWidth(!1),dx=Math.abs(o/i.scrollRatio.x));e.css("left",o);h[1].css("left",dx);f(r,"_resetX")}},ui=function(){function u(){e=setTimeout(function(){n.event.special.mousewheel?(clearTimeout(e),si.call(f[0])):u()},100)}var f=n(this),r=f.data(t),i=r.opt;if(!r.bindEvents){if(fi.call(this),i.contentTouchScroll&&ei.call(this),oi.call(this),i.mouseWheel.enable){var e;u()}ci.call(this);ai.call(this);i.advanced.autoScrollOnFocus&&li.call(this);i.scrollButtons.enable&&vi.call(this);i.keyboard.enable&&yi.call(this);r.bindEvents=!0}},nt=function(){var f=n(this),i=f.data(t),u=i.opt,o=t+"_"+i.idx,s=".mCSB_"+i.idx+"_scrollbar",e=n("#mCSB_"+i.idx+",#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,"+s+" ."+r[12]+",#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSB_"+i.idx+"_container");u.advanced.releaseDraggableSelectors&&e.add(n(u.advanced.releaseDraggableSelectors));u.advanced.extraDraggableSelectors&&e.add(n(u.advanced.extraDraggableSelectors));i.bindEvents&&(n(document).add(n(!a()||top.document)).unbind("."+o),e.each(function(){n(this).unbind("."+o)}),clearTimeout(f[0]._focusTimeout),v(f[0],"_focusTimeout"),clearTimeout(i.sequential.step),v(i.sequential,"step"),clearTimeout(h[0].onCompleteTimeout),v(h[0],"onCompleteTimeout"),i.bindEvents=!1)},lt=function(i){var h=n(this),u=h.data(t),o=u.opt,c=n("#mCSB_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSB_"+u.idx+"_container"),e=[n("#mCSB_"+u.idx+"_scrollbar_vertical"),n("#mCSB_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSB_dragger"),e[1].find(".mCSB_dragger")];"x"!==o.axis&&(u.overflowed[0]&&!i?(e[0].add(s[0]).add(e[0].children("a")).css("display","block"),f.removeClass(r[8]+" "+r[10])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[0].css("display","none"),f.removeClass(r[10])):(e[0].css("display","none"),f.addClass(r[10])),f.addClass(r[8])));"y"!==o.axis&&(u.overflowed[1]&&!i?(e[1].add(s[1]).add(e[1].children("a")).css("display","block"),f.removeClass(r[9]+" "+r[11])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[1].css("display","none"),f.removeClass(r[11])):(e[1].css("display","none"),f.addClass(r[11])),f.addClass(r[9])));u.overflowed[0]||u.overflowed[1]?h.removeClass(r[5]):h.addClass(r[5])},u=function(t){var e=t.type,i=t.target.ownerDocument!==document&&null!==frameElement?[n(frameElement).offset().top,n(frameElement).offset().left]:null,r=a()&&t.target.ownerDocument!==top.document&&null!==frameElement?[n(t.view.frameElement).offset().top,n(t.view.frameElement).offset().left]:[0,0];switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+r[0],t.originalEvent.pageX-i[1]+r[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var u=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],f=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[u.screenY,u.screenX,f>1]:[u.pageY,u.pageX,f>1];default:return i?[t.pageY-i[0]+r[0],t.pageX-i[1]+r[1],!1]:[t.pageY,t.pageX,!1]}},fi=function(){function k(n,t,r,u){if(p[0].idleTimer=h.scrollInertia<233?250:0,i.attr("id")===y[1])var o="x",s=(i[0].offsetLeft-t+u)*e.scrollRatio.x;else var o="y",s=(i[0].offsetTop-n+r)*e.scrollRatio.y;f(v,s.toString(),{dir:o,drag:!0})}var i,c,l,v=n(this),e=v.data(t),h=e.opt,r=t+"_"+e.idx,y=["mCSB_"+e.idx+"_dragger_vertical","mCSB_"+e.idx+"_dragger_horizontal"],p=n("#mCSB_"+e.idx+"_container"),b=n("#"+y[0]+",#"+y[1]),d=h.advanced.releaseDraggableSelectors?b.add(n(h.advanced.releaseDraggableSelectors)):b,nt=h.advanced.extraDraggableSelectors?n(!a()||top.document).add(n(h.advanced.extraDraggableSelectors)):n(!a()||top.document);b.bind("contextmenu."+r,function(n){n.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),pt(t)){o=!0;w&&(document.onselectstart=function(){return!1});at.call(p,!1);s(v);i=n(this);var r=i.offset(),f=u(t)[0]-r.top,e=u(t)[1]-r.left,a=i.height()+r.top,y=i.width()+r.left;a>f&&f>0&&y>e&&e>0&&(c=f,l=e);g(i,"active",h.autoExpandScrollbar)}}).bind("touchmove."+r,function(n){n.stopImmediatePropagation();n.preventDefault();var t=i.offset(),r=u(n)[0]-t.top,f=u(n)[1]-t.left;k(c,l,r,f)});n(document).add(nt).bind("mousemove."+r+" pointermove."+r+" MSPointerMove."+r,function(n){if(i){var t=i.offset(),r=u(n)[0]-t.top,f=u(n)[1]-t.left;if(c===r&&l===f)return;k(c,l,r,f)}}).add(d).bind("mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(){i&&(g(i,"active",h.autoExpandScrollbar),i=null);o=!1;w&&(document.onselectstart=null);at.call(p,!0)})},ei=function(){function at(n){if(!tt(n)||o||u(n)[2])return void(c=0);c=1;it=0;rt=0;st=1;g.removeClass("mCS_touch_action");var t=w.offset();k=u(n)[0]-t.top;d=u(n)[1]-t.left;v=[u(n)[0],u(n)[1]]}function vt(n){if(tt(n)&&!o&&!u(n)[2]&&(r.documentTouchScroll||n.preventDefault(),n.stopImmediatePropagation(),(!rt||it)&&st)){gt=b();var s=ut.offset(),t=u(n)[0]-s.top,f=u(n)[1]-s.left,h="mcsLinearOut";if(et.push(t),ot.push(f),v[2]=Math.abs(u(n)[0]-v[0]),v[3]=Math.abs(u(n)[1]-v[1]),i.overflowed[0])var c=ft[0].parent().height()-ft[0].height(),l=k-t>0&&t-k>-(c*i.scrollRatio.y)&&(2*v[3]<v[2]||"yx"===r.axis);if(i.overflowed[1])var a=ft[1].parent().width()-ft[1].width(),y=d-f>0&&f-d>-(a*i.scrollRatio.x)&&(2*v[2]<v[3]||"yx"===r.axis);l||y?(ii||n.preventDefault(),it=1):(rt=1,g.addClass("mCS_touch_action"));ii&&n.preventDefault();e="yx"===r.axis?[k-t,d-f]:"x"===r.axis?[null,d-f]:[k-t,null];w[0].idleTimer=250;i.overflowed[0]&&nt(e[0],ni,h,"y","all",!0);i.overflowed[1]&&nt(e[1],ni,h,"x",lt,!0)}}function yt(n){if(!tt(n)||o||u(n)[2])return void(c=0);c=1;n.stopImmediatePropagation();s(g);dt=b();var t=ut.offset();bt=u(n)[0]-t.top;kt=u(n)[1]-t.left;et=[];ot=[]}function pt(n){if(tt(n)&&!o&&!u(n)[2]){st=0;n.stopImmediatePropagation();it=0;rt=0;ht=b();var c=ut.offset(),l=u(n)[0]-c.top,a=u(n)[1]-c.left;if(!(ht-gt>30)){h=1e3/(ht-dt);var v="mcsEaseOut",s=2.5>h,p=s?[et[et.length-2],ot[ot.length-2]]:[0,0];y=s?[l-p[0],a-p[1]]:[l-bt,a-kt];var t=[Math.abs(y[0]),Math.abs(y[1])];h=s?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[h,h];var f=[Math.abs(w[0].offsetTop)-y[0]*wt(t[0]/h[0],h[0]),Math.abs(w[0].offsetLeft)-y[1]*wt(t[1]/h[1],h[1])];e="yx"===r.axis?[f[0],f[1]]:"x"===r.axis?[null,f[1]]:[f[0],null];ct=[4*t[0]+r.scrollInertia,4*t[1]+r.scrollInertia];var k=parseInt(r.contentTouchScroll)||0;e[0]=t[0]>k?e[0]:0;e[1]=t[1]>k?e[1]:0;i.overflowed[0]&&nt(e[0],ct[0],v,"y",lt,!1);i.overflowed[1]&&nt(e[1],ct[1],v,"x",lt,!1)}}}function wt(n,t){var i=[1.5*t,2*t,t/1.5,t/2];return n>90?t>4?i[0]:i[3]:n>60?t>3?i[3]:i[2]:n>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function nt(n,t,i,r,u,e){n&&f(g,n.toString(),{dur:t,scrollEasing:i,dir:r,overwrite:u,drag:e})}var st,k,d,bt,kt,dt,gt,ht,y,h,e,ct,it,rt,g=n(this),i=g.data(t),r=i.opt,l=t+"_"+i.idx,ut=n("#mCSB_"+i.idx),w=n("#mCSB_"+i.idx+"_container"),ft=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],et=[],ot=[],ni=0,lt="yx"===r.axis?"none":"all",v=[],ti=w.find("iframe"),p=["touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,"touchmove."+l+" pointermove."+l+" MSPointerMove."+l,"touchend."+l+" pointerup."+l+" MSPointerUp."+l],ii=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;w.bind(p[0],function(n){at(n)}).bind(p[1],function(n){vt(n)});ut.bind(p[0],function(n){yt(n)}).bind(p[2],function(n){pt(n)});ti.length&&ti.each(function(){n(this).bind("load",function(){a(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){at(n);yt(n)}).bind(p[1],function(n){vt(n)}).bind(p[2],function(n){pt(n)})})})},oi=function(){function p(){return i.getSelection?i.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function r(n,t,i){a.type=i&&f?"stepped":"stepless";a.scrollAmount=10;ft(v,n,t,"mcsLinearOut",i?60:null)}var f,v=n(this),e=v.data(t),y=e.opt,a=e.sequential,h=t+"_"+e.idx,s=n("#mCSB_"+e.idx+"_container"),l=s.parent();s.bind("mousedown."+h,function(){c||f||(f=1,o=!0)}).add(document).bind("mousemove."+h,function(n){if(!c&&f&&p()){var o=s.offset(),t=u(n)[0]-o.top+s[0].offsetTop,i=u(n)[1]-o.left+s[0].offsetLeft;t>0&&t<l.height()&&i>0&&i<l.width()?a.step&&r("off",null,"stepped"):("x"!==y.axis&&e.overflowed[0]&&(0>t?r("on",38):t>l.height()&&r("on",40)),"y"!==y.axis&&e.overflowed[1]&&(0>i?r("on",37):i>l.width()&&r("on",39)))}}).bind("mouseup."+h+" dragend."+h,function(){c||(f&&(f=0,r("off",null)),o=!1)})},si=function(){function h(t,h){if(s(o),!hi(o,t.target)){var v="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):w&&t.deltaFactor<100?100:t.deltaFactor||100,y=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var a="x",l=[Math.round(v*r.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],p="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.width()?.9*e.width():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetLeft),b=u[1][0].offsetLeft,d=u[1].parent().width()-u[1].width(),c="y"===i.mouseWheel.axis?t.deltaY||h:t.deltaX;else var a="y",l=[Math.round(v*r.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],p="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.height()?.9*e.height():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetTop),b=u[0][0].offsetTop,d=u[0].parent().height()-u[0].height(),c=t.deltaY||h;("y"!==a||r.overflowed[0])&&("x"!==a||r.overflowed[1])&&((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(c=-c),i.mouseWheel.normalizeDelta&&(c=0>c?-1:1),(c>0&&0!==b||0>c&&b!==d||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(p=t.deltaFactor,y=17),f(o,(k-c*p).toString(),{dir:a,dur:y}))}}if(n(this).data(t)){var o=n(this),r=o.data(t),i=r.opt,c=t+"_"+r.idx,e=n("#mCSB_"+r.idx),u=[n("#mCSB_"+r.idx+"_dragger_vertical"),n("#mCSB_"+r.idx+"_dragger_horizontal")],l=n("#mCSB_"+r.idx+"_container").find("iframe");l.length&&l.each(function(){n(this).bind("load",function(){a(this)&&n(this.contentDocument||this.contentWindow.document).bind("mousewheel."+c,function(n,t){h(n,t)})})});e.bind("mousewheel."+c,function(n,t){h(n,t)})}},ut={},a=function(t){var r=!1,i=!1,u=null;if(void 0===t?i="#empty":void 0!==n(t).attr("id")&&(i=n(t).attr("id")),i!==!1&&void 0!==ut[i])return ut[i];if(t){try{var f=t.contentDocument||t.contentWindow.document;u=f.body.innerHTML}catch(e){}r=null!==u}else{try{var f=top.document;u=f.body.innerHTML}catch(e){}r=null!==u}return i!==!1&&(ut[i]=r),r},at=function(n){var t=this.find("iframe");if(t.length){var i=n?"auto":"none";t.css("pointer-events",i)}},hi=function(i,r){var u=r.nodeName.toLowerCase(),f=i.data(t).opt.mouseWheel.disableOver;return n.inArray(u,f)>-1&&!(n.inArray(u,["select","textarea"])>-1&&!n(r).is(":focus"))},ci=function(){var e,h=n(this),u=h.data(t),i=t+"_"+u.idx,c=n("#mCSB_"+u.idx+"_container"),l=c.parent(),a=n(".mCSB_"+u.idx+"_scrollbar ."+r[12]);a.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(t){o=!0;n(t.target).hasClass("mCSB_dragger")||(e=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){o=!1}).bind("click."+i,function(t){if(e&&(e=0,n(t.target).hasClass(r[12])||n(t.target).hasClass("mCSB_draggerRail"))){s(h);var i=n(this),o=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!u.overflowed[1])return;var v="x",a=t.pageX>o.offset().left?-1:1,y=Math.abs(c[0].offsetLeft)-a*.9*l.width()}else{if(!u.overflowed[0])return;var v="y",a=t.pageY>o.offset().top?-1:1,y=Math.abs(c[0].offsetTop)-a*.9*l.height()}f(h,y.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},li=function(){var i=n(this),o=i.data(t),u=o.opt,c=t+"_"+o.idx,r=n("#mCSB_"+o.idx+"_container"),h=r.parent();r.bind("focusin."+c,function(){var t=n(document.activeElement),c=r.find(".mCustomScrollBox").length,o=0;t.is(u.advanced.autoScrollOnFocus)&&(s(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=c?(o+17)*c:0,i[0]._focusTimeout=setTimeout(function(){var n=[e(t)[0],e(t)[1]],s=[r[0].offsetTop,r[0].offsetLeft],c=[s[0]+n[0]>=0&&s[0]+n[0]<h.height()-t.outerHeight(!1),s[1]+n[1]>=0&&s[0]+n[1]<h.width()-t.outerWidth(!1)],l="yx"!==u.axis||c[0]||c[1]?"all":"none";"x"===u.axis||c[0]||f(i,n[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:o});"y"===u.axis||c[1]||f(i,n[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:o})},i[0]._focusTimer))})},ai=function(){var u=n(this),i=u.data(t),f=t+"_"+i.idx,r=n("#mCSB_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSB_"+i.idx+"_scrollbar").css("visibility","hidden")})},vi=function(){var f=n(this),r=f.data(t),e=r.opt,u=r.sequential,i=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",h=n(s+">a");h.bind("contextmenu."+i,function(n){n.preventDefault()}).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(t){function i(n,t){u.scrollAmount=e.scrollButtons.scrollAmount;ft(f,n,t)}if(t.preventDefault(),pt(t)){var s=n(this).attr("class");switch(u.type=e.scrollButtons.scrollType,t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===u.type)return;o=!0;r.tweenRunning=!1;i("on",s);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===u.type)return;o=!1;u.dir&&i("off",s);break;case"click":if("stepped"!==u.type||r.tweenRunning)return;i("on",s)}}})},yi=function(){function l(t){function l(n,t){o.type=r.keyboard.scrollType;o.scrollAmount=r.keyboard.scrollAmount;"stepped"===o.type&&i.tweenRunning||ft(e,n,t)}switch(t.type){case"blur":i.tweenRunning&&o.dir&&l("off",null);break;case"keydown":case"keyup":var c=t.keyCode?t.keyCode:t.which,a="on";if("x"!==r.axis&&(38===c||40===c)||"y"!==r.axis&&(37===c||39===c)){if((38===c||40===c)&&!i.overflowed[0]||(37===c||39===c)&&!i.overflowed[1])return;"keyup"===t.type&&(a="off");n(document.activeElement).is(v)||(t.preventDefault(),t.stopImmediatePropagation(),l(a,c))}else if(33===c||34===c){if((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){s(e);var y=34===c?-1:1;if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",w=Math.abs(u[0].offsetLeft)-y*.9*h.width();else var p="y",w=Math.abs(u[0].offsetTop)-y*.9*h.height();f(e,w.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}else if((35===c||36===c)&&!n(document.activeElement).is(v)&&((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",w=35===c?Math.abs(h.width()-u.outerWidth(!1)):0;else var p="y",w=35===c?Math.abs(h.height()-u.outerHeight(!1)):0;f(e,w.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}}var e=n(this),i=e.data(t),r=i.opt,o=i.sequential,c=t+"_"+i.idx,w=n("#mCSB_"+i.idx),u=n("#mCSB_"+i.idx+"_container"),h=u.parent(),v="input,textarea,select,datalist,keygen,[contenteditable='true']",y=u.find("iframe"),p=["blur."+c+" keydown."+c+" keyup."+c];y.length&&y.each(function(){n(this).bind("load",function(){a(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){l(n)})})});w.attr("tabindex","0").bind(p[0],function(n){l(n)})},ft=function(i,u,e,o,h){function y(n){l.snapAmount&&(c.scrollAmount=l.snapAmount instanceof Array?"x"===c.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var r="stepped"!==c.type,u=h?h:n?r?k/1.5:d:1e3/60,e=n?r?7.5:40:2.5,t=[Math.abs(p[0].offsetTop),Math.abs(p[0].offsetLeft)],s=[a.scrollRatio.y>10?10:a.scrollRatio.y,a.scrollRatio.x>10?10:a.scrollRatio.x],w="x"===c.dir[0]?t[1]+c.dir[1]*s[1]*e:t[0]+c.dir[1]*s[0]*e,b="x"===c.dir[0]?t[1]+c.dir[1]*parseInt(c.scrollAmount):t[0]+c.dir[1]*parseInt(c.scrollAmount),v="auto"!==c.scrollAmount?b:w,g=o?o:n?r?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",nt=!!n;return n&&17>u&&(v="x"===c.dir[0]?t[1]:t[0]),f(i,v.toString(),{dir:c.dir[0],scrollEasing:g,dur:u,onComplete:nt}),n?void(c.dir=!1):(clearTimeout(c.step),void(c.step=setTimeout(function(){y()},u)))}function b(){clearTimeout(c.step);v(c,"step");s(i)}var a=i.data(t),l=a.opt,c=a.sequential,p=n("#mCSB_"+a.idx+"_container"),w="stepped"===c.type,k=l.scrollInertia<26?26:l.scrollInertia,d=l.scrollInertia<1?17:l.scrollInertia;switch(u){case"on":if(c.dir=[e===r[16]||e===r[15]||39===e||37===e?"x":"y",e===r[13]||e===r[15]||38===e||37===e?-1:1],s(i),it(e)&&"stepped"===c.type)return;y(w);break;case"off":b();(w||a.tweenRunning&&c.dir)&&y(!0)}},et=function(i){var u=n(this).data(t).opt,r=[];return"function"==typeof i&&(i=i()),i instanceof Array?r=i.length>1?[i[0],i[1]]:"x"===u.axis?[null,i[0]]:[i[0],null]:(r[0]=i.y?i.y:i.x||"x"===u.axis?null:i,r[1]=i.x?i.x:i.y||"y"===u.axis?null:i),"function"==typeof r[0]&&(r[0]=r[0]()),"function"==typeof r[1]&&(r[1]=r[1]()),r},vt=function(i,r){if(null!=i&&"undefined"!=typeof i){var s=n(this),c=s.data(t),v=c.opt,u=n("#mCSB_"+c.idx+"_container"),o=u.parent(),y=typeof i;r||(r="x"===v.axis?"x":"y");var p="x"===r?u.outerWidth(!1)-o.width():u.outerHeight(!1)-o.height(),l="x"===r?u[0].offsetLeft:u[0].offsetTop,w="x"===r?"left":"top";switch(y){case"function":return i();case"object":var f=i.jquery?i:n(i);return f.length?"x"===r?e(f)[1]:e(f)[0]:void 0;case"string":case"number":if(it(i))return Math.abs(i);if(-1!==i.indexOf("%"))return Math.abs(p*parseInt(i)/100);if(-1!==i.indexOf("-="))return Math.abs(l-parseInt(i.split("-=")[1]));if(-1!==i.indexOf("+=")){var a=l+parseInt(i.split("+=")[1]);return a>=0?0:Math.abs(a)}if(-1!==i.indexOf("px")&&it(i.split("px")[0]))return Math.abs(i.split("px")[0]);if("top"===i||"left"===i)return 0;if("bottom"===i)return Math.abs(o.height()-u.outerHeight(!1));if("right"===i)return Math.abs(o.width()-u.outerWidth(!1));if("first"===i||"last"===i){var f=u.find(":"+i);return"x"===r?e(f)[1]:e(f)[0]}return n(i).length?"x"===r?e(n(i))[1]:e(n(i))[0]:(u.css(w,i),void h.update.call(null,s[0]))}}},ot=function(i){function c(){return clearTimeout(e[0].autoUpdate),0===o.parents("html").length?void(o=null):void(e[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(u.poll.change.n=a(),u.poll.change.n!==u.poll.change.o)?(u.poll.change.o=u.poll.change.n,void s(3)):f.advanced.updateOnContentResize&&(u.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+e[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,u.poll.size.n!==u.poll.size.o)?(u.poll.size.o=u.poll.size.n,void s(1)):!f.advanced.updateOnImageLoad||"auto"===f.advanced.updateOnImageLoad&&"y"===f.axis||(u.poll.img.n=e.find("img").length,u.poll.img.n===u.poll.img.o)?void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&c()):(u.poll.img.o=u.poll.img.n,void e.find("img").each(function(){l(this)}))},f.advanced.autoUpdateTimeout))}function l(t){function u(n,t){return function(){return t.apply(n,arguments)}}function f(){this.onload=null;n(t).addClass(r[2]);s(2)}if(n(t).hasClass(r[2]))return void s();var i=new Image;i.onload=u(i,f);i.src=t.src}function a(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var n=0,t=e.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){n+=this.offsetHeight+this.offsetWidth}),n}function s(n){clearTimeout(e[0].autoUpdate);h.update.call(null,o[0],n)}var o=n(this),u=o.data(t),f=u.opt,e=n("#mCSB_"+u.idx+"_container");return i?(clearTimeout(e[0].autoUpdate),void v(e[0],"autoUpdate")):void c()},pi=function(n,t,i){return Math.round(n/t)*t-i},s=function(i){var r=i.data(t),u=n("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");u.each(function(){wi.call(this)})},f=function(i,r,u){function h(n){return f&&e.callbacks[n]&&"function"==typeof e.callbacks[n]}function it(){return[e.callbacks.alwaysTriggerOffsets||w>=l[0]+v,e.callbacks.alwaysTriggerOffsets||-y>=w]}function a(){var n=[o[0].offsetTop,o[0].offsetLeft],t=[c[0].offsetTop,c[0].offsetLeft],r=[o.outerHeight(!1),o.outerWidth(!1)],f=[p.height(),p.width()];i[0].mcs={content:o,top:n[0],left:n[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(n[0])/(Math.abs(r[0])-f[0])),leftPct:Math.round(100*Math.abs(n[1])/(Math.abs(r[1])-f[1])),direction:u.dir}}var f=i.data(t),e=f.opt,rt={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:e.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},u=n.extend(rt,u),k=[u.dur,u.drag?0:u.dur],p=n("#mCSB_"+f.idx),o=n("#mCSB_"+f.idx+"_container"),b=o.parent(),d=e.callbacks.onTotalScrollOffset?et.call(i,e.callbacks.onTotalScrollOffset):[0,0],nt=e.callbacks.onTotalScrollBackOffset?et.call(i,e.callbacks.onTotalScrollBackOffset):[0,0];if(f.trigger=u.trigger,0===b.scrollTop()&&0===b.scrollLeft()||(n(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),b.scrollTop(0).scrollLeft(0)),"_resetY"!==r||f.contentReset.y||(h("onOverflowYNone")&&e.callbacks.onOverflowYNone.call(i[0]),f.contentReset.y=1),"_resetX"!==r||f.contentReset.x||(h("onOverflowXNone")&&e.callbacks.onOverflowXNone.call(i[0]),f.contentReset.x=1),"_resetY"!==r&&"_resetX"!==r){if(!f.contentReset.y&&i[0].mcs||!f.overflowed[0]||(h("onOverflowY")&&e.callbacks.onOverflowY.call(i[0]),f.contentReset.x=null),!f.contentReset.x&&i[0].mcs||!f.overflowed[1]||(h("onOverflowX")&&e.callbacks.onOverflowX.call(i[0]),f.contentReset.x=null),e.snapAmount){var ut=e.snapAmount instanceof Array?"x"===u.dir?e.snapAmount[1]:e.snapAmount[0]:e.snapAmount;r=pi(r,ut,e.snapOffset)}switch(u.dir){case"x":var c=n("#mCSB_"+f.idx+"_dragger_horizontal"),tt="left",w=o[0].offsetLeft,l=[p.width()-o.outerWidth(!1),c.parent().width()-c.width()],s=[r,0===r?0:r/f.scrollRatio.x],v=d[1],y=nt[1],ft=v>0?v/f.scrollRatio.x:0,ot=y>0?y/f.scrollRatio.x:0;break;case"y":var c=n("#mCSB_"+f.idx+"_dragger_vertical"),tt="top",w=o[0].offsetTop,l=[p.height()-o.outerHeight(!1),c.parent().height()-c.height()],s=[r,0===r?0:r/f.scrollRatio.y],v=d[0],y=nt[0],ft=v>0?v/f.scrollRatio.y:0,ot=y>0?y/f.scrollRatio.y:0}s[1]<0||0===s[0]&&0===s[1]?s=[0,0]:s[1]>=l[1]?s=[l[0],l[1]]:s[0]=-s[0];i[0].mcs||(a(),h("onInit")&&e.callbacks.onInit.call(i[0]));clearTimeout(o[0].onCompleteTimeout);yt(c[0],tt,Math.round(s[1]),k[1],u.scrollEasing);!f.tweenRunning&&(0===w&&s[0]>=0||w===l[0]&&s[0]<=l[0])||yt(o[0],tt,Math.round(s[0]),k[0],u.scrollEasing,u.overwrite,{onStart:function(){u.callbacks&&u.onStart&&!f.tweenRunning&&(h("onScrollStart")&&(a(),e.callbacks.onScrollStart.call(i[0])),f.tweenRunning=!0,g(c),f.cbOffsets=it())},onUpdate:function(){u.callbacks&&u.onUpdate&&h("whileScrolling")&&(a(),e.callbacks.whileScrolling.call(i[0]))},onComplete:function(){if(u.callbacks&&u.onComplete){"yx"===e.axis&&clearTimeout(o[0].onCompleteTimeout);var n=o[0].idleTimer||0;o[0].onCompleteTimeout=setTimeout(function(){h("onScroll")&&(a(),e.callbacks.onScroll.call(i[0]));h("onTotalScroll")&&s[1]>=l[1]-ft&&f.cbOffsets[0]&&(a(),e.callbacks.onTotalScroll.call(i[0]));h("onTotalScrollBack")&&s[1]<=ot&&f.cbOffsets[1]&&(a(),e.callbacks.onTotalScrollBack.call(i[0]));f.tweenRunning=!1;o[0].idleTimer=0;g(c,"hide")},n)}}})}},yt=function(n,t,r,u,f,e,o){function v(){s.stop||(h||g.call(),h=b()-it,y(),h>=s.time&&(s.time=h>s.time?h+c-(h-s.time):h+c-1,s.time<h+1&&(s.time=h+1)),s.time<u?s.id=l(v):tt.call())}function y(){u>0?(s.currVal=d(s.time,a,rt,u,f),p[t]=Math.round(s.currVal)+"px"):p[t]=r+"px";nt.call()}function w(){c=1e3/60;s.time=h+c;l=i.requestAnimationFrame?i.requestAnimationFrame:function(n){return y(),setTimeout(n,.01)};s.id=l(v)}function k(){null!=s.id&&(i.requestAnimationFrame?i.cancelAnimationFrame(s.id):clearTimeout(s.id),s.id=null)}function d(n,t,i,r,u){switch(u){case"linear":case"mcsLinear":return i*n/r+t;case"mcsLinearOut":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeInOutSmooth":return n/=r/2,1>n?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeInOutStrong":return n/=r/2,1>n?i/2*Math.pow(2,10*(n-1))+t:(n--,i/2*(-Math.pow(2,-10*n)+2)+t);case"easeInOut":case"mcsEaseInOut":return n/=r/2,1>n?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t);case"easeOutSmooth":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutStrong":return i*(-Math.pow(2,-10*n/r)+1)+t;case"easeOut":case"mcsEaseOut":default:var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n)}}n._mTween||(n._mTween={top:{},left:{}});var c,l,o=o||{},g=o.onStart||function(){},nt=o.onUpdate||function(){},tt=o.onComplete||function(){},it=b(),h=0,a=n.offsetTop,p=n.style,s=n._mTween[t];"left"===t&&(a=n.offsetLeft);var rt=r-a;s.stop=0;"none"!==e&&k();w()},b=function(){return i.performance&&i.performance.now?i.performance.now():i.performance&&i.performance.webkitNow?i.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},wi=function(){var n=this;n._mTween||(n._mTween={top:{},left:{}});for(var u=["top","left"],r=0;r<u.length;r++){var t=u[r];n._mTween[t].id&&(i.requestAnimationFrame?i.cancelAnimationFrame(n._mTween[t].id):clearTimeout(n._mTween[t].id),n._mTween[t].id=null,n._mTween[t].stop=1)}},v=function(n,t){try{delete n[t]}catch(i){n[t]=null}},pt=function(n){return!(n.which&&1!==n.which)},tt=function(n){var t=n.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},it=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},e=function(n){var t=n.parents(".mCSB_container");return[n.offset().top-t.offset().top,n.offset().left-t.offset().left]},bi=function(){function t(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var n=0;n<t.length;n++)if(t[n]+"Hidden"in document)return t[n]+"Hidden";return null}var n=t();return n?document[n]:!1};n.fn[l]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):h.init.apply(this,arguments)};n[l]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):h.init.apply(this,arguments)};n[l].defaults=st;i[l]=!0;n(i).bind("load",function(){n(rt)[l]();n.extend(n.expr[":"],{mcsInView:n.expr[":"].mcsInView||function(t){var f,r,i=n(t),u=i.parents(".mCSB_container");if(u.length)return f=u.parent(),r=[u[0].offsetTop,u[0].offsetLeft],r[0]+e(i)[0]>=0&&r[0]+e(i)[0]<f.height()-i.outerHeight(!1)&&r[1]+e(i)[1]>=0&&r[1]+e(i)[1]<f.width()-i.outerWidth(!1)},mcsInSight:n.expr[":"].mcsInSight||function(t,i,r){var f,u,o,s,h=n(t),c=h.parents(".mCSB_container"),l="exact"===r[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return f=[h.outerHeight(!1),h.outerWidth(!1)],o=[c[0].offsetTop+e(h)[0],c[0].offsetLeft+e(h)[1]],u=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],s=[f[0]<u[0]?l[0]:l[1],f[1]<u[1]?l[0]:l[1]],o[0]-u[0]*s[0][0]<0&&o[0]+f[0]-u[0]*s[0][1]>=0&&o[1]-u[1]*s[1][0]<0&&o[1]+f[1]-u[1]*s[1][1]>=0},mcsOverflow:n.expr[":"].mcsOverflow||function(i){var r=n(i).data(t);if(r)return r.overflowed[0]||r.overflowed[1]}})})})}):console.log("ASP: scrollbar detected, skipping loading")}(asljQuery,asljQuery,window),function(n,t,i){
 
 
 
 
 
 
 
 
 
 
 
 
3
  /*! Ajax Search Lite 4.6 js */
4
- (function(n){var r={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore a",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.firstClick=!0;r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),n("fieldset",r.n.searchsettings).each(function(){n(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),r.createVerticalScroll(),f()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),this},duplicateCheck:function(){var i=this,t={};n("div[id*=ajaxsearchlite]").each(function(){t.hasOwnProperty(this.id)?n(this).remove():t[this.id]="true"})},analytics:function(n){var t=this;t.o.analytics&&t.o.analyticsString!=""&&typeof ga=="function"&&ga("send","pageview",{page:"/"+t.o.analyticsString.replace("{asl_term}",n),title:"Ajax Search"})},createVerticalScroll:function(){var i=this;i.scroll=i.n.results.mCustomScrollbar({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSB_container",i.n.results).position().top),h=n(".mCSB_container .resdrg").children(),f=0,o=3e3,u=4e3,c=1e4,e=1e4,r=null;h.each(function(){u=Math.abs(Math.abs(s)-f);u<o&&(c=u,e=f,r=n(this));f+=n(this).outerHeight(!0);o=u});r.hasClass("group")&&(e=e+(r.outerHeight(!0)-r.outerHeight(!1)));i.scroll.mCustomScrollbar("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}})},createHorizontalScroll:function(){var n=this;n.scroll=n.n.results.mCustomScrollbar({horizontalScroll:!0,contentTouchScroll:!0,scrollButtons:{enable:!0,scrollType:"pixels",scrollSpeed:"auto",scrollAmount:100}})},initEvents:function(){var r=this;n(r.n.text.parent()).submit(function(n){n.preventDefault();r.n.text.keyup()});r.n.text.click(function(){r.firstClick&&(n(this).val(""),r.firstClick=!1)});r.n.resultsDiv.css({opacity:0});n(document).bind("click touchend",function(){(r.hideSettings(),r.opened!=!1&&r.o.closeOnDocClick==1)&&r.hideResults()});r.n.proclose.bind("click touchend",function(){r.opened!=!1&&(r.n.text.val(""),r.n.textAutocomplete.val(""),r.hideResults(),r.n.text.focus())});n(r.elem).bind("click touchend",function(n){n.stopImmediatePropagation()});r.n.resultsDiv.bind("click touchend",function(n){n.stopImmediatePropagation()});r.n.searchsettings.bind("click touchend",function(n){n.stopImmediatePropagation()});var u=!1;r.n.text.focus(function(){u=!0});var f="touchend";r.n.results.hasClass("mCustomScrollbar")&&(f="mousedown");r.n.resultsDiv.bind(f,function(n){if(t()&&u){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),r.n.results.hasClass("mCustomScrollbar"))r.n.resultsDiv.one("click","a.asl_res_url",function(n){return n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1});return document.activeElement.blur(),u=!1,!1}});r.n.prosettings.on("click",function(){r.n.prosettings.data("opened")==0?r.showSettings():r.hideSettings()});var e;n(i).on("resize",function(){clearTimeout(e);e=setTimeout(function(){r.resize()},250)});var o;n(i).on("scroll",function(){clearTimeout(o);o=setTimeout(function(){r.scrolling(!1)},250)});r.initNavigationEvent();n(i).trigger("resize");n(i).trigger("scroll");r.initMagnifierEvent();r.initAutocompleteEvent();r.initFacetEvents()},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).keydown(function(r){if(i.event)var u=i.event.keyCode,f=i.event.type;else if(r)var u=r.which,f=r.type;n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"&&(u==40&&(r.stopPropagation(),r.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next().next(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),u==38&&(r.stopPropagation(),r.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev().prev(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),u==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(r.stopPropagation(),r.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click()))})},initMagnifierEvent:function(){var t=this,r;t.n.promagnifier.add(t.n.text).bind("click keyup",function(f){i.event?(t.keycode=i.event.keyCode,t.ktype=i.event.type):f&&(t.keycode=f.which,t.ktype=f.type);var e=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(r);return}if(!e&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="results_page"||e&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo=="results_page"){var o="?s="+t.n.text.val();t.o.overridewpdefault?u(t.o.homeurl+o+"&asl_active=1","post",{p_asl_data:n("form",t.n.searchsettings).serialize()}):u(t.o.homeurl+o,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()});t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(r);return}t.keycode>=37&&t.keycode<=40||n(this).hasClass("orig")&&t.ktype=="click"||(t.o.triggeronclick!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="keyup")&&(t.post!=null&&t.post.abort(),clearTimeout(r),r=setTimeout(function(){t.search()},300))})},initFacetEvents:function(){var t=this;t.o.trigger_on_facet_change==1&&n("input",t.n.searchsettings).change(function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.search())})},destroy:function(){return this.each(function(){var t=n.extend({},this,r);n(i).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var r=this;r.o.autocomplete.enabled!=1||t()||r.n.text.keyup(function(t){i.event?(r.keycode=i.event.keyCode,r.ktype=i.event.type):t&&(r.keycode=t.which,r.ktype=t.type);var u=39;n("body").hasClass("rtl")&&(u=37);r.keycode==u&&r.n.textAutocomplete.val()!=""?(t.preventDefault(),r.n.text.val(r.n.textAutocomplete.val()),r.post!=null&&r.post.abort(),r.search()):(r.postAuto!=null&&r.postAuto.abort(),r.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};t.analytics(t.n.text.val());t.post=n.post(ASL.ajaxurl,i,function(i){if(i=i.replace(/^\s*[\r\n]/gm,""),i=i.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1],t.n.resdrg.html(""),t.n.resdrg.html(i),n(".asl_keyword",t.n.resdrg).bind("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).keydown();n("form",t.n.container).trigger("submit","ajax");t.search()}),t.n.items=n(".item",t.n.resultsDiv),n(".asl_res_url",t.n.resultsDiv).length>0&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="results_page"||t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="results_page")return location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"),!1;t.showResults();t.scrollToResults();t.n.items.length==0?t.n.showmore!=null&&t.n.showmore.css("display","none"):t.n.showmore!=null&&(t.n.showmore.css("display","block"),t.n.showmore.attr("href",t.o.homeurl+"?s="+t.n.text.val()))},"text")}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.scrolling(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});t()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var f=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,o=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.scroll.mCustomScrollbar("update");t.resize();var r=0,u=0;t.n.items.each(function(){u+=n(this).outerHeight(!0);r++});r=r<1?1:r;u=u/r*f;t.n.results.css({height:u})}if(i.sscroll=t.scroll,t.scroll.mCustomScrollbar("disable",!0),t.scroll.mCustomScrollbar("update"),t.resize(),t.scroll.mCustomScrollbar("scrollTo",0),t.o.highlight==1){var e=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:e})}}if(t.resize(),t.n.items.length==0){var u=n(".nores",t.n.results).outerHeight(!0)>t.o.resultitemheight?t.o.resultitemheight:n(".nores",t.n.results).outerHeight(!0);t.n.results.css({height:11110});t.scroll.mCustomScrollbar("update");t.n.results.css({height:"auto"})}t.addAnimation();t.scrolling(!0);t.searching=!1},hideVerticalResults:function(){var t=this;t.disableMobileScroll=!1;t.n.resultsDiv.animate({opacity:0,height:0},{duration:120,complete:function(){n(this).css({visibility:"hidden",display:"none"})}})},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.scrolling(!0);t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustomScrollbar({contentTouchScroll:!0}));t.n.prosettings.data("opened",1)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},resize:function(){var t=this,i=0;if(n("body").css("position")!="static"&&(i=n("body").offset().top),f()&&0&&(t.n.proinput.css({width:t.n.probox.width()-8-(t.n.proinput.outerWidth(!1)-t.n.proinput.width())-t.n.proloading.outerWidth(!0)-t.n.prosettings.outerWidth(!0)-t.n.promagnifier.outerWidth(!0)-10}),t.n.text.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),position:"absolute",zIndex:2}),t.n.textAutocomplete.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),opacity:.25,zIndex:1})),t.n.prosettings.attr("opened")!=0&&(t.o.settingsimagepos=="left"?t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left}):t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left+t.n.prosettings.width()-t.n.searchsettings.width()})),t.n.resultsDiv.css("visibility")!="hidden"&&t.o.resultsposition!="block"){var r=t.n.container.width()-(t.n.resultsDiv.outerWidth(!0)-t.n.resultsDiv.width()),u=r<240?240:r;t.n.resultsDiv.css({width:u,top:t.n.container.offset().top+t.n.container.outerHeight(!0)+10-i,left:t.n.container.offset().left+(r-u)})}},scrolling:function(t){var i=this,r=0;if(n("body").css("position")!="static"&&(r=n("body").offset().top),(t==!0||i.n.searchsettings.css("visibility")=="visible")&&(i.o.settingsimagepos=="left"?i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left}):i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left+i.n.prosettings.width()-i.n.searchsettings.width()})),t==!0||i.n.resultsDiv.css("visibility")=="visible"){var u=i.n.container.width()-(i.n.resultsDiv.outerWidth(!0)-i.n.resultsDiv.width()),f=u<240?240:u;(i.o.resultsposition!="hover"&&i.n.resultsAppend.length>0||i.n.container.hasClass("hiddend"))&&(f="auto");i.n.resultsDiv.css({width:f,top:i.n.container.offset().top+i.n.container.outerHeight(!0)+10-r,left:i.n.container.offset().left+(u-f)})}}};function t(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function u(t,i,r){"use strict";var u;u=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(u)});u.appendTo("body").submit()}function f(){var n=i.navigator.userAgent,t=n.indexOf("MSIE "),r=n.indexOf("Trident/");return t>0||r>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",r)})(n)}(asljQuery,asljQuery,window),function(n,t,i){i.ASL=i.ASL||{};i.ASL.getScope=function(){return typeof n!="undefined"?n:typeof i[ASL.js_scope]!="undefined"?i[ASL.js_scope]:eval(ASL.js_scope)};i.ASL.initialized=!1;i.ASL.initialize=function(n){var t=i.ASL.getScope(),r=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0)t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))});else{typeof n!="undefined"&&(r="div[id*=asl_init_id_"+n+"]");function u(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function f(n){var t="",s,h,c,l,e,r,o,i=0,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=f.indexOf(n.charAt(i++)),e=f.indexOf(n.charAt(i++)),r=f.indexOf(n.charAt(i++)),o=f.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|r>>2,c=(r&3)<<6|o,t=t+String.fromCharCode(s),r!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return u(t)}t(r).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=f(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).ajaxsearchlite(r)})}i.ASL.initialized=!0};i.ASL.ready=function(){var n=this,t=n.getScope(),r=null;t(document).ready(function(){n.initialize()});t(i).load(function(){i.ASL.initialized||(n.initialize(),console.log("ASL initialized via window.load"))});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&t("body").bind("DOMSubtreeModified",function(){clearTimeout(r);r=setTimeout(function(){n.initialize()},500)})};i._ASL=ASL;i._ASL.ready()}(asljQuery,asljQuery,window);
1
  /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
+ !function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){var c=[],l=c.slice,ki=c.concat,ni=c.push,di=c.indexOf,ct={},hf=ct.toString,nt=ct.hasOwnProperty,r={},gi="1.11.1",i=function(n,t){return new i.fn.init(n,t)},cf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,lf=/^-ms-/,af=/-([\da-z])/gi,vf=function(n,t){return t.toUpperCase()};i.fn=i.prototype={jquery:gi,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ni,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(gi+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!nt.call(n,"constructor")&&!nt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return nt.call(n,t);for(t in n);return void 0===t||nt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[hf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(lf,"ms-").replace(af,vf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ti(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(cf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ti(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ni.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(di)return di.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ti(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ki.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});function ti(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}var tt=function(n){var it,u,t,ht,oi,et,wt,si,ct,y,rt,p,e,l,a,o,g,lt,ot,f="sizzle"+-new Date,s=n.document,v=0,ki=0,hi=ni(),ci=ni(),li=ni(),bt=function(n,t){return n===t&&(rt=!0),0},ut="undefined",ai=1<<31,di={}.hasOwnProperty,w=[],gi=w.pop,nr=w.push,b=w.push,vi=w.slice,nt=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ft="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=ft.replace("w","w#"),pi="\\["+i+"*("+ft+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+yi+"))|)"+i+"*\\]",dt=":("+ft+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pi+")*)|.*)\\)|)",at=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),tr=new RegExp("^"+i+"*,"+i+"*"),ir=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),rr=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),ur=new RegExp(dt),fr=new RegExp("^"+yi+"$"),vt={ID:new RegExp("^#("+ft+")"),CLASS:new RegExp("^\\.("+ft+")"),TAG:new RegExp("^("+ft.replace("w","w*")+")"),ATTR:new RegExp("^"+pi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,st=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{b.apply(w=vi.call(s.childNodes),s.childNodes);w[s.childNodes.length].nodeType}catch(yr){b={apply:w.length?function(n,t){nr.apply(n,vi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}function r(n,t,i,r){var w,h,c,v,k,y,d,l,nt,g;if((t?t.ownerDocument||t:s)!==e&&p(t),t=t||e,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(a&&!r){if(w=sr.exec(n))if(c=w[1]){if(9===v){if(h=t.getElementById(c),!h||!h.parentNode)return i;if(h.id===c)return i.push(h),i}else if(t.ownerDocument&&(h=t.ownerDocument.getElementById(c))&&ot(t,h)&&h.id===c)return i.push(h),i}else{if(w[2])return b.apply(i,t.getElementsByTagName(n)),i;if((c=w[3])&&u.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(c)),i}if(u.qsa&&(!o||!o.test(n))){if(l=d=f,nt=t,g=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(y=et(n),(d=t.getAttribute("id"))?l=d.replace(hr,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",k=y.length;k--;)y[k]=l+yt(y[k]);nt=gt.test(n)&&ii(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,i,r)}function ni(){var i=[];function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}return n}function h(n){return n[f]=!0,n}function c(n){var t=e.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||ai)-(~n.sourceIndex||ai);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!==ut&&n}u=r.support={};oi=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};p=r.setDocument=function(n){var v,r=n?n.ownerDocument||n:s,h=r.defaultView;return r!==e&&9===r.nodeType&&r.documentElement?(e=r,l=r.documentElement,a=!oi(r),h&&h!==h.top&&(h.addEventListener?h.addEventListener("unload",function(){p()},!1):h.attachEvent&&h.attachEvent("onunload",function(){p()})),u.attributes=c(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=c(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=st.test(r.getElementsByClassName)&&c(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),u.getById=c(function(n){return l.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!==ut&&a){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==ut&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==ut)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==ut&&a)return t.getElementsByClassName(n)},g=[],o=[],(u.qsa=st.test(r.querySelectorAll))&&(c(function(n){n.innerHTML="<select msallowclip=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowclip^='']").length&&o.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+i+"*(?:value|"+kt+")");n.querySelectorAll(":checked").length||o.push(":checked")}),c(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(u.matchesSelector=st.test(lt=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&c(function(n){u.disconnectedMatch=lt.call(n,"div");lt.call(n,"[s!='']:x");g.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),g=g.length&&new RegExp(g.join("|")),v=st.test(l.compareDocumentPosition),ot=v||st.test(l.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===s&&ot(s,n)?-1:t===r||t.ownerDocument===s&&ot(s,t)?1:y?nt.call(y,n)-nt.call(y,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,h=t.parentNode,f=[n],e=[t];if(!o||!h)return n===r?-1:t===r?1:o?-1:h?1:y?nt.call(y,n)-nt.call(y,t):0;if(o===h)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===s?-1:e[u]===s?1:0},r):e};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==e&&p(n),t=t.replace(rr,"='$1']"),!(!u.matchesSelector||!a||g&&g.test(t)||o&&o.test(t)))try{var i=lt.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,e,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==e&&p(n),ot(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==e&&p(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!a):void 0;return void 0!==r?r:u.attributes||!a?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,y=!u.sortStable&&n.slice(0),n.sort(bt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return y=null,n};ht=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ht(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=ht(r);return i};t=r.selectors={cacheLength:50,createPseudo:h,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[3]||n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&ur.test(t)&&(i=et(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==ut&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt.call(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:h(function(n){var i=[],r=[],t=wt(n.replace(at,"$1"));return t[f]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return r(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||ht(t)).indexOf(n)>-1}}),lang:h(function(n){return fr.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=a?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===l},focus:function(n){return n===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=cr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=lr(it);function bi(){}bi.prototype=t.filters=t.pseudos;t.setFilters=new bi;et=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=tr.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=ir.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),u=u.slice(e.length));for(o in t.filter)(f=vt[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):ci(n,h).slice(0)};function yt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[v,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===v&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),h(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||ar(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:pt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function ei(n){for(var s,u,r,o=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return nt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ct)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>i;i++)if(u=t.relative[n[i].type])e=[ri(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;o>r;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,r>i&&ei(n.slice(i,r)),o>r&&ei(n=n.slice(r)),o>r&&yt(n))}e.push(u)}return ui(e)}function vr(n,i){var u=i.length>0,f=n.length>0,o=function(o,s,h,c,l){var y,d,w,k=0,a="0",g=o&&[],p=[],nt=ct,tt=o||f&&t.find.TAG("*",l),it=v+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ct=s!==e&&s);a!==rt&&null!=(y=tt[a]);a++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(v=it)}u&&((y=!w&&y)&&k--,o&&g.push(y))}if(k+=a,u&&a!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(o){if(k>0)while(a--)g[a]||p[a]||(p[a]=gi.call(c));p=pt(p)}b.apply(c,p);l&&!o&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(v=it,ct=nt),g};return u?h(o):o}return wt=r.compile=function(n,t){var r,u=[],e=[],i=li[n+" "];if(!i){for(t||(t=et(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=li(n,vr(e,u));i.selector=n}return i},si=r.select=function(n,i,r,f){var s,e,o,l,v,c="function"==typeof n&&n,h=!f&&et(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&a&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(k,d),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[l=o.type])break;if((v=t.find[l])&&(f=v(o.matches[0].replace(k,d),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&yt(e),!n)return b.apply(r,f),r;break}}}return(c||wt(n,h))(f,i,!a,r,gt.test(n)&&ii(i.parentNode)||i),r},u.sortStable=f.split("").sort(bt).join("")===f,u.detectDuplicates=!!rt,p(),u.sortDetached=c(function(n){return 1&n.compareDocumentPosition(e.createElement("div"))}),c(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&c(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ti("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),c(function(n){return null==n.getAttribute("disabled")})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=tt;i.expr=tt.selectors;i.expr[":"]=i.expr.pseudos;i.unique=tt.uniqueSort;i.text=tt.getText;i.isXMLDoc=tt.isXML;i.contains=tt.contains;var nr=i.expr.match.needsContext,tr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,yf=/^.[^:#\[\.,]*$/;function ii(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(yf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ii(this,n||[],!1))},not:function(n){return this.pushStack(ii(this,n||[],!0))},is:function(n){return!!ii(this,"string"==typeof n&&nr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,pf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,wf=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:pf.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),tr.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};wf.prototype=i.fn;ft=i(u);var bf=/^(?:parents|prev(?:Until|All))/,kf={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=nr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});function ir(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ir(n,"nextSibling")},prev:function(n){return ir(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(kf[n]||(f=i.unique(f)),bf.test(n)&&(f=f.reverse())),this.pushStack(f)}});var h=/\S+/g,rr={};function df(n){var t=rr[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}i.Callbacks=function(n){n="string"==typeof n?rr[n]||df(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});var lt;i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});function ur(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(ur(),i.ready())}i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}ur();i.ready()}}()}return lt.promise(t)};var s="undefined";for(var gf in i(r))break;r.ownLast="0"!==gf;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};var ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/([A-Z])/g;function fr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(te,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ne.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ri(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function er(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function or(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ri(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ri(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ri(n)},data:function(n,t,i){return er(n,t,i)},removeData:function(n,t){return or(n,t)},_data:function(n,t,i){return er(n,t,i,!0)},_removeData:function(n,t){return or(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),fr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?fr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,p=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},w=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},ui=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var fi=/^(?:input|select|textarea)$/i,ie=/^key/,re=/^(?:mouse|pointer|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;function vt(){return!0}function it(){return!1}function cr(){try{return u.activeElement}catch(n){}}i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,o,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==s&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=hr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(o=i.event.special[e]||{},e=(f?o.delegateType:o.bindType)||e,o=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,o.setup&&o.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),o.add&&(o.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=hr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=nt.call(t,"type")?t.type:t,v=nt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!sr.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,sr.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=re.test(r)?this.mouseHooks:ie.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},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(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===cr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===s&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return fi.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;fi.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!fi.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});function lr(n){var i=ar.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}var ar="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ue=/ jQuery\d+="(?:null|\d+)"/g,vr=new RegExp("<(?:"+ar+")[\\s/>]","i"),ei=/^\s+/,yr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pr=/<([\w:]+)/,wr=/<tbody/i,fe=/<|&#?\w+;/,ee=/<(?:script|style|link)/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,br=/^$|\/(?:java|ecma)script/i,se=/^true\/(.*)/,he=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,o={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:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ce=lr(u),oi=ce.appendChild(u.createElement("div"));o.optgroup=o.option;o.tbody=o.tfoot=o.colgroup=o.caption=o.thead;o.th=o.td;function f(n,t){var e,u,o=0,r=typeof n.getElementsByTagName!==s?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==s?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[o]);o++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function le(n){ui.test(n.type)&&(n.defaultChecked=n.checked)}function kr(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function dr(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function gr(n){var t=se.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function si(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function nu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ae(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(dr(t).text=n.text,gr(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&ui.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!vr.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(oi.innerHTML=n.outerHTML,oi.removeChild(s=oi.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ae(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)nu(c,e[o]);else nu(n,s);return e=f(s,"script"),e.length>0&&si(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,s,b,h,p,w,a,k=n.length,v=lr(t),l=[],y=0;k>y;y++)if(s=n[y],s||0===s)if("object"===i.type(s))i.merge(l,s.nodeType?[s]:s);else if(fe.test(s)){for(h=h||v.appendChild(t.createElement("div")),p=(pr.exec(s)||["",""])[1].toLowerCase(),a=o[p]||o._default,h.innerHTML=a[1]+s.replace(yr,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&ei.test(s)&&l.push(t.createTextNode(ei.exec(s)[0])),!r.tbody)for(s="table"!==p||wr.test(s)?"<table>"!==a[1]||wr.test(s)?0:h:h.firstChild,c=s&&s.childNodes.length;c--;)i.nodeName(w=s.childNodes[c],"tbody")&&!w.childNodes.length&&s.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(s));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),le),y=0;s=l[y++];)if((!e||-1===i.inArray(s,e))&&(b=i.contains(s.ownerDocument,s),h=f(v.appendChild(s),"script"),b&&si(h),u))for(c=0;s=h[c++];)br.test(s.type||"")&&u.push(s);return h=null,v},cleanData:function(n,t){for(var u,e,f,o,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],o=f&&l[f])){if(o.events)for(e in o.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,o.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==s?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return w(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&si(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return w(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ue,""):void 0;if(!("string"!=typeof n||ee.test(n)||!r.htmlSerialize&&vr.test(n)||!r.leadingWhitespace&&ei.test(n)||o[(pr.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(yr,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(s){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ki.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&oe.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),dr),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,gr),e=0;c>e;e++)u=o[e],br.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(he,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ni.apply(f,u.get());return this.pushStack(f)}});var ot,tu={};function iu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=tu[n];return t||(t=iu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=iu(n,r),ot.detach()),tu[n]=t),t}!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==s&&(t.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",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var ru=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),b,k,ve=/^(top|right|bottom|left)$/;n.getComputedStyle?(b=function(n){return n.ownerDocument.defaultView.getComputedStyle(n,null)},k=function(n,t,r){var e,o,s,u,f=n.style;return r=r||b(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&ru.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(b=function(n){return n.currentStyle},k=function(n,t,i){var o,f,e,r,u=n.style;return i=i||b(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ve.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});function uu(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var f,t,l,o,s,e,h;if(f=u.createElement("div"),f.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",l=f.getElementsByTagName("a")[0],t=l&&l.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.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",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var hi=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/,pe=/^(none|table(?!-c[ea]).+)/,we=new RegExp("^("+at+")(.*)$","i"),be=new RegExp("^([+-])=("+at+")","i"),ke={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"];function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=we.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=b(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=k(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+cu(n,t,u||(s?"border":"content"),o,e)+"px"}i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=k(n,"opacity");return""===i?"1":i}}}},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:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=ou(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=be.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=ou(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=k(n,t,u)),"normal"===f&&t in fu&&(f=fu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return pe.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ke,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,u,f){var e=f&&b(n);return hu(n,u,f?cu(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ye.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(hi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=hi.test(f)?f.replace(hi,e):f+" "+e)}});i.cssHooks.marginRight=uu(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},k,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};ru.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return w(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=b(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,de=/^(?:toggle|show|hide)$/,au=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),ge=/queueHooks$/,bt=[no],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=au.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&au.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};function vu(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function yu(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function no(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],de.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=yu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function to(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function pu(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||vu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||vu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(to(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,yu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}i.Animation=i.extend(pu,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pu(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&ge.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();var io=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(io,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,wu,v=i.expr.attrHandle,ci=/^(?:checked|selected)$/i,d=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return w(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===s?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?wu:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&d||!ci.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(d?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});wu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&d||!ci.test(r)?n.setAttribute(!d&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&d||!ci.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&d||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});d||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});var ro=/^(?:input|select|textarea|button|object)$/i,uo=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return w(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ro.test(n.nodeName)||uo.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");var li=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===s||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(li," ").indexOf(i)>=0)return!0;return!1}});i.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(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var ai=i.now(),vi=/\?/,fo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(fo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var g,y,eo=/#.*$/,bu=/([?&])_=[^&]*/,oo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,so=/^(?:GET|HEAD)$/,ho=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,du={},yi={},gu="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}g=ku.exec(y.toLowerCase())||[];function nf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function tf(n,t,r,u){var f={},o=n===yi;function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}return e(t.dataTypes[0])||!f["*"]&&e("*")}function pi(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function co(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function lo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(g[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gu,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":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:nf(du),ajaxTransport:nf(yi),ajax:function(n,t){"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=oo.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(nt.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(eo,"").replace(ho,g[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=ku.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===g[1]&&s[2]===g[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(g[3]||("http:"===g[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),tf(du,r,t,u),2===e)return u;l=r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!so.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(vi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=bu.test(f)?f.replace(bu,"$1_="+ai++):f+(vi.test(f)?"&":"?")+"_="+ai++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+gu+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=tf(yi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");function w(n,t,s,h){var v,it,g,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=co(r,u,s)),y=lo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,g=y.error,v=!g)):(g=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?nt.resolveWith(o,[it,c,u]):nt.rejectWith(o,[u,c,g]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:g]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var ao=/%20/g,vo=/\[\]$/,rf=/\r?\n/g,yo=/^(?:submit|button|image|reset|file)$/i,po=/^(?:input|select|textarea|keygen)/i;function wi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||vo.test(n)?u(n,i):wi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)wi(n+"["+f+"]",t[f],r,u)}i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)wi(r,n[r],t,f);return u.join("&").replace(ao,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&po.test(this.nodeName)&&!yo.test(n)&&(this.checked||!ui.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(rf,"\r\n")}}):{name:t.name,value:r.replace(rf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&uf()||bo()}:uf;var wo=0,gt={},ht=i.ajaxSettings.xhr();n.ActiveXObject&&i(n).on("unload",function(){for(var n in gt)gt[n](void 0,!0)});r.cors=!!ht&&"withCredentials"in ht;ht=r.ajax=!!ht;ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++wo;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete gt[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=gt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}});function uf(){try{return new n.XMLHttpRequest}catch(t){}}function bo(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ff=[],bi=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ff.pop()||i.expando+"_"+ai++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(bi.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bi.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(bi,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,ff.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")});i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=tr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))};var ef=i.fn.load;i.fn.load=function(n,t,r){if("string"!=typeof n&&ef)return ef.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this};i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length};var of=n.document.documentElement;function sf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}};i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==s&&(u=r.getBoundingClientRect()),f=sf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||of;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||of})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return w(this,function(n,u,f){var e=sf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}});i.each(["top","left"],function(n,t){i.cssHooks[t]=uu(r.pixelPosition,function(n,r){if(r)return(r=k(n,t),pt.test(r)?i(n).position()[t]+"px":r)})});i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return w(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})});i.fn.size=function(){return this.length};i.fn.andSelf=i.fn.addBack;"function"==typeof define&&define.amd&&define("asljQuery",[],function(){return i});var ko=n.jQuery,go=n.$;return i.noConflict=function(t){return n.$===i&&(n.$=go),t&&n.jQuery===i&&(n.asljQuery=ko),i},typeof t===s&&(n.asljQuery=n.$=i),i}),function(n,t,i){(function(t){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],t):typeof module!="undefined"&&module.exports?t(require("jquery")):t(n)})(function(n){var u="left",f="right",e="up",o="down",y="in",p="out",w="none",tt="auto",b="swipe",k="pinch",d="tap",it="doubletap",rt="longtap",g="horizontal",nt="vertical",a="all",ft=10,ut="start",s="move",t="end",r="cancel",l="ontouchstart"in i,v=i.navigator.msPointerEnabled&&!i.navigator.pointerEnabled&&!l,h=(i.navigator.pointerEnabled||i.navigator.msPointerEnabled)&&!l,c="TouchSwipe";n.fn.swipe=function(t){var r=n(this),i=r.data(c);if(i&&typeof t=="string"){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&typeof t=="object")i.option.apply(this,arguments);else if(!i&&(typeof t=="object"||!t))return et.apply(this,arguments);return r};n.fn.swipe.version="1.6.15";n.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe.phases={PHASE_START:ut,PHASE_MOVE:s,PHASE_END:t,PHASE_CANCEL:r};n.fn.swipe.directions={LEFT:u,RIGHT:f,UP:e,DOWN:o,IN:y,OUT:p};n.fn.swipe.pageScroll={NONE:w,HORIZONTAL:g,VERTICAL:nt,AUTO:tt};n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:a};function et(t){return t&&t.allowPageScroll===undefined&&(t.swipe!==undefined||t.swipeStatus!==undefined)&&(t.allowPageScroll=w),t.click!==undefined&&t.tap===undefined&&(t.tap=t.click),t||(t={}),t=n.extend({},n.fn.swipe.defaults,t),this.each(function(){var r=n(this),i=r.data(c);i||(i=new ot(this,t),r.data(c,i))})}function ot(i,et){var et=n.extend({},et),si=l||h||!et.fallbackToMouseEvents,hi=si?h?v?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ki=si?h?v?"MSPointerMove":"pointermove":"touchmove":"mousemove",di=si?h?v?"MSPointerUp":"pointerup":"touchend":"mouseup",ri=si?h?"mouseleave":null:"mouseleave",ci=h?v?"MSPointerCancel":"pointercancel":"touchcancel",at=0,vt=null,yt=null,lt=0,gt=0,ni=0,pt=1,bt=0,kt=0,li=null,ot=n(i),st="start",ct=0,ht={},gi=0,ai=0,vi=0,nr=0,ti=0,fi=null,ei=null;try{ot.bind(hi,tr);ot.bind(ci,ui)}catch(ff){n.error("events not supported "+hi+","+ci+" on jQuery.swipe")}this.enable=function(){return ot.bind(hi,tr),ot.bind(ci,ui),ot};this.disable=function(){return lr(),ot};this.destroy=function(){lr();ot.data(c,null);ot=null};this.option=function(t,i){if(typeof t=="object")et=n.extend(et,t);else if(et[t]!==undefined){if(i===undefined)return et[t];et[t]=i}else if(t)n.error("Option "+t+" does not exist on jQuery.swipe.options");else return et;return null};function tr(t){if(!pu()&&!(n(t.target).closest(et.excludedElements,ot).length>0)){var i=t.originalEvent?t.originalEvent:t,f,u=i.touches,e=u?u[0]:i;return(st=ut,u?ct=u.length:et.preventDefaultEvents!==!1&&t.preventDefault(),at=0,vt=null,yt=null,kt=null,lt=0,gt=0,ni=0,pt=1,bt=0,li=ku(),dr(),wi(0,e),!u||ct===et.fingers||et.fingers===a||oi()?(gi=ii(),ct==2&&(wi(1,u[1]),gt=ni=cr(ht[0].start,ht[1].start)),(et.swipeStatus||et.pinchStatus)&&(f=wt(i,st))):f=!1,f===!1)?(st=r,wt(i,st),f):(et.hold&&(ei=setTimeout(n.proxy(function(){ot.trigger("hold",[i.target]);et.hold&&(f=et.hold.call(ot,i,i.target))},this),et.longTapThreshold)),pi(!0),null)}}function ir(n){var f=n.originalEvent?n.originalEvent:n;if(st!==t&&st!==r&&!yi()){var o,i=f.touches,h=i?i[0]:f,u=gr(h);if(ai=ii(),i&&(ct=i.length),et.hold&&clearTimeout(ei),st=s,ct==2&&(gt==0?(wi(1,i[1]),gt=ni=cr(ht[0].start,ht[1].start)):(gr(i[1]),ni=cr(ht[0].end,ht[1].end),kt=gu(ht[0].end,ht[1].end)),pt=du(gt,ni),bt=Math.abs(gt-ni)),ct===et.fingers||et.fingers===a||!i||oi()){if(vt=iu(u.start,u.end),yt=iu(u.last,u.end),uu(n,yt),at=nf(u.start,u.end),lt=tu(),bu(vt,at),o=wt(f,st),!et.triggerOnTouchEnd||et.triggerOnTouchLeave){var e=!0;if(et.triggerOnTouchLeave){var c=rf(this);e=uf(u.end,c)}!et.triggerOnTouchEnd&&e?st=fr(s):et.triggerOnTouchLeave&&!e&&(st=fr(t));(st==r||st==t)&&wt(f,st)}}else st=r,wt(f,st);o===!1&&(st=r,wt(f,st))}}function rr(n){var i=n.originalEvent?n.originalEvent:n,u=i.touches;if(u){if(u.length&&!yi())return yu(i),!0;if(u.length&&yi())return!0}return yi()&&(ct=nr),ai=ii(),lt=tu(),or()||!er()?(st=r,wt(i,st)):et.triggerOnTouchEnd||et.triggerOnTouchEnd==!1&&st===s?(et.preventDefaultEvents!==!1&&n.preventDefault(),st=t,wt(i,st)):!et.triggerOnTouchEnd&&br()?(st=t,dt(i,st,d)):st===s&&(st=r,wt(i,st)),pi(!1),null}function ui(){ct=0;ai=0;gi=0;gt=0;ni=0;pt=1;dr();pi(!1)}function ur(n){var i=n.originalEvent?n.originalEvent:n;et.triggerOnTouchLeave&&(st=fr(t),wt(i,st))}function lr(){ot.unbind(hi,tr);ot.unbind(ci,ui);ot.unbind(ki,ir);ot.unbind(di,rr);ri&&ot.unbind(ri,ur);pi(!1)}function fr(n){var i=n,f=ar(),u=er(),e=or();return!f||e?i=r:u&&n==s&&(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)?i=t:!u&&n==t&&et.triggerOnTouchLeave&&(i=r),i}function wt(n,i){var u,f=n.touches;return(eu()||sr())&&(u=dt(n,i,b)),(fu()||oi())&&u!==!1&&(u=dt(n,i,k)),au()&&u!==!1?u=dt(n,i,it):vu()&&u!==!1?u=dt(n,i,rt):lu()&&u!==!1&&(u=dt(n,i,d)),i===r&&(sr()&&(u=dt(n,i,b)),oi()&&(u=dt(n,i,k)),ui(n)),i===t&&(f?f.length||ui(n):ui(n)),u}function dt(i,s,h){var c;if(h==b){if(ot.trigger("swipeStatus",[s,vt||null,at||0,lt||0,ct,ht,yt]),et.swipeStatus&&(c=et.swipeStatus.call(ot,i,s,vt||null,at||0,lt||0,ct,ht,yt),c===!1))return!1;if(s==t&&yr()){if(clearTimeout(fi),clearTimeout(ei),ot.trigger("swipe",[vt,at,lt,ct,ht,yt]),et.swipe&&(c=et.swipe.call(ot,i,vt,at,lt,ct,ht,yt),c===!1))return!1;switch(vt){case u:ot.trigger("swipeLeft",[vt,at,lt,ct,ht,yt]);et.swipeLeft&&(c=et.swipeLeft.call(ot,i,vt,at,lt,ct,ht,yt));break;case f:ot.trigger("swipeRight",[vt,at,lt,ct,ht,yt]);et.swipeRight&&(c=et.swipeRight.call(ot,i,vt,at,lt,ct,ht,yt));break;case e:ot.trigger("swipeUp",[vt,at,lt,ct,ht,yt]);et.swipeUp&&(c=et.swipeUp.call(ot,i,vt,at,lt,ct,ht,yt));break;case o:ot.trigger("swipeDown",[vt,at,lt,ct,ht,yt]);et.swipeDown&&(c=et.swipeDown.call(ot,i,vt,at,lt,ct,ht,yt))}}}if(h==k){if(ot.trigger("pinchStatus",[s,kt||null,bt||0,lt||0,ct,pt,ht]),et.pinchStatus&&(c=et.pinchStatus.call(ot,i,s,kt||null,bt||0,lt||0,ct,pt,ht),c===!1))return!1;if(s==t&&vr())switch(kt){case y:ot.trigger("pinchIn",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchIn&&(c=et.pinchIn.call(ot,i,kt||null,bt||0,lt||0,ct,pt,ht));break;case p:ot.trigger("pinchOut",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchOut&&(c=et.pinchOut.call(ot,i,kt||null,bt||0,lt||0,ct,pt,ht))}}return h==d?(s===r||s===t)&&(clearTimeout(fi),clearTimeout(ei),hr()&&!su()?(ti=ii(),fi=setTimeout(n.proxy(function(){ti=null;ot.trigger("tap",[i.target]);et.tap&&(c=et.tap.call(ot,i,i.target))},this),et.doubleTapThreshold)):(ti=null,ot.trigger("tap",[i.target]),et.tap&&(c=et.tap.call(ot,i,i.target)))):h==it?(s===r||s===t)&&(clearTimeout(fi),clearTimeout(ei),ti=null,ot.trigger("doubletap",[i.target]),et.doubleTap&&(c=et.doubleTap.call(ot,i,i.target))):h==rt&&(s===r||s===t)&&(clearTimeout(fi),ti=null,ot.trigger("longtap",[i.target]),et.longTap&&(c=et.longTap.call(ot,i,i.target))),c}function er(){var n=!0;return et.threshold!==null&&(n=at>=et.threshold),n}function or(){var n=!1;return et.cancelThreshold!==null&&vt!==null&&(n=nu(vt)-at>=et.cancelThreshold),n}function ru(){return et.pinchThreshold!==null?bt>=et.pinchThreshold:!0}function ar(){return et.maxTimeThreshold?lt>=et.maxTimeThreshold?!1:!0:!0}function uu(n,t){if(et.preventDefaultEvents!==!1)if(et.allowPageScroll===w)n.preventDefault();else{var i=et.allowPageScroll===tt;switch(t){case u:(et.swipeLeft&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case f:(et.swipeRight&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case e:(et.swipeUp&&i||!i&&et.allowPageScroll!=nt)&&n.preventDefault();break;case o:(et.swipeDown&&i||!i&&et.allowPageScroll!=nt)&&n.preventDefault()}}}function vr(){var n=pr(),t=wr(),i=ru();return n&&t&&i}function oi(){return!!(et.pinchStatus||et.pinchIn||et.pinchOut)}function fu(){return!!(vr()&&oi())}function yr(){var n=ar(),t=er(),i=pr(),r=wr(),u=or();return!u&&r&&i&&t&&n}function sr(){return!!(et.swipe||et.swipeStatus||et.swipeLeft||et.swipeRight||et.swipeUp||et.swipeDown)}function eu(){return!!(yr()&&sr())}function pr(){return ct===et.fingers||et.fingers===a||!l}function wr(){return ht[0].end.x!==0}function br(){return!!et.tap}function hr(){return!!et.doubleTap}function ou(){return!!et.longTap}function kr(){if(ti==null)return!1;var n=ii();return hr()&&n-ti<=et.doubleTapThreshold}function su(){return kr()}function hu(){return(ct===1||!l)&&(isNaN(at)||at<et.threshold)}function cu(){return lt>et.longTapThreshold&&at<ft}function lu(){return!!(hu()&&br())}function au(){return!!(kr()&&hr())}function vu(){return!!(cu()&&ou())}function yu(n){vi=ii();nr=n.touches.length+1}function dr(){vi=0;nr=0}function yi(){var n=!1;if(vi){var t=ii()-vi;t<=et.fingerReleaseThreshold&&(n=!0)}return n}function pu(){return!!(ot.data(c+"_intouch")===!0)}function pi(n){ot&&(n===!0?(ot.bind(ki,ir),ot.bind(di,rr),ri&&ot.bind(ri,ur)):(ot.unbind(ki,ir,!1),ot.unbind(di,rr,!1),ri&&ot.unbind(ri,ur,!1)),ot.data(c+"_intouch",n===!0))}function wi(n,t){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=t.pageX||t.clientX,i.start.y=i.last.y=i.end.y=t.pageY||t.clientY,ht[n]=i,i}function gr(n){var i=n.identifier!==undefined?n.identifier:0,t=wu(i);return t===null&&(t=wi(i,n)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function wu(n){return ht[n]||null}function bu(n,t){t=Math.max(t,nu(n));li[n].distance=t}function nu(n){return li[n]?li[n].distance:undefined}function ku(){var n={};return n[u]=bi(u),n[f]=bi(f),n[e]=bi(e),n[o]=bi(o),n}function bi(n){return{direction:n,distance:0}}function tu(){return ai-gi}function cr(n,t){var i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);return Math.round(Math.sqrt(i*i+r*r))}function du(n,t){var i=t/n*1;return i.toFixed(2)}function gu(){return pt<1?p:y}function nf(n,t){return Math.round(Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)))}function tf(n,t){var r=n.x-t.x,u=t.y-n.y,f=Math.atan2(u,r),i=Math.round(f*180/Math.PI);return i<0&&(i=360-Math.abs(i)),i}function iu(n,t){var i=tf(n,t);return i<=45&&i>=0?u:i<=360&&i>=315?u:i>=135&&i<=225?f:i>45&&i<135?o:e}function ii(){var n=new Date;return n.getTime()}function rf(t){t=n(t);var i=t.offset();return{left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()}}function uf(n,t){return n.x>t.left&&n.x<t.right&&n.y>t.top&&n.y<t.bottom}}})}(asljQuery,asljQuery,window),function(n,t,i){
3
+ /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
4
+ * Licensed under the MIT License (LICENSE.txt).
5
+ *
6
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
7
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
8
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
9
+ *
10
+ * Version: 3.0.6
11
+ *
12
+ * Requires: 1.2.2+
13
+ */
14
+ (function(n){var t=["DOMMouseScroll","mousewheel"];if(n.event.fixHooks)for(var u=t.length;u;)n.event.fixHooks[t[--u]]=n.event.mouseHooks;n.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var n=t.length;n;)this.addEventListener(t[--n],r,!1);else this.onmousewheel=r},teardown:function(){if(this.removeEventListener)for(var n=t.length;n;)this.removeEventListener(t[--n],r,!1);else this.onmousewheel=null}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}});function r(t){var r=t||i.event,o=[].slice.call(arguments,1),u=0,e=0,f=0;return t=n.event.fix(r),t.type="mousewheel",r.wheelDelta&&(u=r.wheelDelta/120),r.detail&&(u=-r.detail/3),f=u,r.axis!==undefined&&r.axis===r.HORIZONTAL_AXIS&&(f=0,e=-1*u),r.wheelDeltaY!==undefined&&(f=r.wheelDeltaY/120),r.wheelDeltaX!==undefined&&(e=-1*r.wheelDeltaX/120),o.unshift(t,u,e,f),(n.event.dispatch||n.event.handle).apply(this,o)}})(n)}(asljQuery,asljQuery,window),function(n){n.extend({highlight:function(t,i,r,u){if(t.nodeType===3){var o=t.data.match(i);if(o){var s=document.createElement(r||"span");s.className=u||"highlight";var f=t.splitText(o.index);f.splitText(o[0].length);var h=f.cloneNode(!0);return s.appendChild(h),f.parentNode.replaceChild(s,f),1}}else if(t.nodeType===1&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&!(t.tagName===r.toUpperCase()&&t.className===u))for(var e=0;e<t.childNodes.length;e++)e+=n.highlight(t.childNodes[e],i,r,u);return 0}});n.fn.unhighlight=function(t){var i={className:"highlight",element:"span"};return n.extend(i,t),this.find(i.element+"."+i.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()};n.fn.highlight=function(t,i){var r={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(n.extend(r,i),t.constructor===String&&(t=[t]),t=n.grep(t,function(n){return n!=""}),t=n.map(t,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),t.length==0)return this;var f=r.caseSensitive?"":"i",u="("+t.join("|")+")";r.wordsOnly&&(u="\\b"+u+"\\b");var e=new RegExp(u,f);return this.each(function(){n.highlight(this,e,r.element,r.className)})}}(asljQuery,asljQuery,window),function(n,t,i){(function(n){var r={init:function(t){var r={set_width:!1,set_height:!1,horizontalScroll:!1,scrollInertia:950,mouseWheel:!0,mouseWheelPixels:"auto",autoDraggerLength:!0,autoHideScrollbar:!1,snapAmount:null,snapOffset:0,scrollButtons:{enable:!1,scrollType:"continuous",scrollSpeed:"auto",scrollAmount:40},advanced:{updateOnBrowserResize:!0,updateOnContentResize:!1,autoExpandHorizontalScroll:!1,autoScrollOnFocus:!0,normalizeMouseWheelDelta:!1},contentTouchScroll:!0,callbacks:{onScrollStart:function(){},onScroll:function(){},onTotalScroll:function(){},onTotalScrollBack:function(){},onTotalScrollOffset:0,onTotalScrollBackOffset:0,whileScrolling:function(){}},theme:"light"},t=n.extend(!0,r,t);return this.each(function(){var r=n(this);if(t.set_width&&r.css("width",t.set_width),t.set_height&&r.css("height",t.set_height),n(document).data("mCustomScrollbar-index")){var p=parseInt(n(document).data("mCustomScrollbar-index"));n(document).data("mCustomScrollbar-index",p+1)}else n(document).data("mCustomScrollbar-index","1");r.wrapInner("<div class='mCustomScrollBox"+" mCS-"+t.theme+"' id='mCSB_"+n(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+n(document).data("mCustomScrollbar-index"));var u=r.children(".mCustomScrollBox");if(t.horizontalScroll){u.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");var l=u.children(".mCSB_h_wrapper");l.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({width:l.children().outerWidth(),position:"relative"}).unwrap()}else u.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");var f=u.children(".mCSB_container");n.support.touch&&f.addClass("mCS_touch");f.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'><\/div><\/div><div class='mCSB_draggerRail'><\/div><\/div><\/div>");var s=u.children(".mCSB_scrollTools"),w=s.children(".mCSB_draggerContainer"),e=w.children(".mCSB_dragger");if(t.horizontalScroll?e.data("minDraggerWidth",e.width()):e.data("minDraggerHeight",e.height()),t.scrollButtons.enable&&(t.horizontalScroll?s.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'><\/a>"):s.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'><\/a>")),u.bind("scroll",function(){r.is(".mCS_disabled")||u.scrollTop(0).scrollLeft(0)}),r.data({mCS_Init:!0,mCustomScrollbarIndex:n(document).data("mCustomScrollbar-index"),horizontalScroll:t.horizontalScroll,scrollInertia:t.scrollInertia,scrollEasing:"mcsEaseOut",mouseWheel:t.mouseWheel,mouseWheelPixels:t.mouseWheelPixels,autoDraggerLength:t.autoDraggerLength,autoHideScrollbar:t.autoHideScrollbar,snapAmount:t.snapAmount,snapOffset:t.snapOffset,scrollButtons_enable:t.scrollButtons.enable,scrollButtons_scrollType:t.scrollButtons.scrollType,scrollButtons_scrollSpeed:t.scrollButtons.scrollSpeed,scrollButtons_scrollAmount:t.scrollButtons.scrollAmount,autoExpandHorizontalScroll:t.advanced.autoExpandHorizontalScroll,autoScrollOnFocus:t.advanced.autoScrollOnFocus,normalizeMouseWheelDelta:t.advanced.normalizeMouseWheelDelta,contentTouchScroll:t.contentTouchScroll,onScrollStart_Callback:t.callbacks.onScrollStart,onScroll_Callback:t.callbacks.onScroll,onTotalScroll_Callback:t.callbacks.onTotalScroll,onTotalScrollBack_Callback:t.callbacks.onTotalScrollBack,onTotalScroll_Offset:t.callbacks.onTotalScrollOffset,onTotalScrollBack_Offset:t.callbacks.onTotalScrollBackOffset,whileScrolling_Callback:t.callbacks.whileScrolling,bindEvent_scrollbar_drag:!1,bindEvent_content_touch:!1,bindEvent_scrollbar_click:!1,bindEvent_mousewheel:!1,bindEvent_buttonsContinuous_y:!1,bindEvent_buttonsContinuous_x:!1,bindEvent_buttonsPixels_y:!1,bindEvent_buttonsPixels_x:!1,bindEvent_focusin:!1,bindEvent_autoHideScrollbar:!1,mCSB_buttonScrollRight:!1,mCSB_buttonScrollLeft:!1,mCSB_buttonScrollDown:!1,mCSB_buttonScrollUp:!1}),t.horizontalScroll)r.css("max-width")!=="none"&&(t.advanced.updateOnContentResize||(t.advanced.updateOnContentResize=!0));else if(r.css("max-height")!=="none"){var o=!1,h=parseInt(r.css("max-height"));r.css("max-height").indexOf("%")>=0&&(o=h,h=r.parent().height()*o/100);r.css("overflow","hidden");u.css("max-height",h)}if(r.mCustomScrollbar("update"),t.advanced.updateOnBrowserResize){var c,a=n(i).width(),v=n(i).height();n(i).bind("resize."+r.data("mCustomScrollbarIndex"),function(){c&&clearTimeout(c);c=setTimeout(function(){if(!r.is(".mCS_disabled")&&!r.is(".mCS_destroyed")){var t=n(i).width(),f=n(i).height();(a!==t||v!==f)&&(r.css("max-height")!=="none"&&o&&u.css("max-height",r.parent().height()*o/100),r.mCustomScrollbar("update"),a=t,v=f)}},150)})}if(t.advanced.updateOnContentResize){var b;if(t.horizontalScroll)var y=f.outerWidth();else var y=f.outerHeight();b=setInterval(function(){if(t.horizontalScroll){t.advanced.autoExpandHorizontalScroll&&f.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:f.outerWidth(),position:"relative"}).unwrap();var n=f.outerWidth()}else var n=f.outerHeight();n!=y&&(r.mCustomScrollbar("update"),y=n)},300)}})},update:function(){var i=n(this),u=i.children(".mCustomScrollBox"),r=u.children(".mCSB_container");r.removeClass("mCS_no_scrollbar");i.removeClass("mCS_disabled mCS_destroyed");u.scrollTop(0).scrollLeft(0);var f=u.children(".mCSB_scrollTools"),e=f.children(".mCSB_draggerContainer"),t=e.children(".mCSB_dragger");if(i.data("horizontalScroll")){var p=f.children(".mCSB_buttonLeft"),w=f.children(".mCSB_buttonRight"),h=u.width();i.data("autoExpandHorizontalScroll")&&r.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:r.outerWidth(),position:"relative"}).unwrap();var c=r.outerWidth()}else var b=f.children(".mCSB_buttonUp"),k=f.children(".mCSB_buttonDown"),l=u.height(),a=r.outerHeight();if(a>l&&!i.data("horizontalScroll")){f.css("display","block");var o=e.height();if(i.data("autoDraggerLength")){var v=Math.round(l/a*o),d=t.data("minDraggerHeight");if(v<=d)t.css({height:d});else if(v>=o-10){var it=o-10;t.css({height:it})}else t.css({height:v});t.children(".mCSB_dragger_bar").css({"line-height":t.height()+"px"})}var rt=t.height(),g=(a-l)/(o-rt);i.data("scrollAmount",g).mCustomScrollbar("scrolling",u,r,e,t,b,k,p,w);var nt=Math.abs(r.position().top);i.mCustomScrollbar("scrollTo",nt,{scrollInertia:0,trigger:"internal"})}else if(c>h&&i.data("horizontalScroll")){f.css("display","block");var s=e.width();if(i.data("autoDraggerLength")){var y=Math.round(h/c*s),tt=t.data("minDraggerWidth");if(y<=tt)t.css({width:tt});else if(y>=s-10){var ut=s-10;t.css({width:ut})}else t.css({width:y})}var ft=t.width(),g=(c-h)/(s-ft);i.data("scrollAmount",g).mCustomScrollbar("scrolling",u,r,e,t,b,k,p,w);var nt=Math.abs(r.position().left);i.mCustomScrollbar("scrollTo",nt,{scrollInertia:0,trigger:"internal"})}else u.unbind("mousewheel focusin"),i.data("horizontalScroll")?t.add(r).css("left",0):t.add(r).css("top",0),f.css("display","none"),r.addClass("mCS_no_scrollbar"),i.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1})},scrolling:function(i,r,u,f,e,o,s,h){var c=n(this);if(!c.data("bindEvent_scrollbar_drag")){var v,y;n.support.msPointer?(f.bind("MSPointerDown",function(t){t.preventDefault();c.data({on_drag:!0});f.addClass("mCSB_dragger_onDrag");var i=n(this),e=i.offset(),r=t.originalEvent.pageX-e.left,u=t.originalEvent.pageY-e.top;r<i.width()&&r>0&&u<i.height()&&u>0&&(v=u,y=r)}),n(document).bind("MSPointerMove."+c.data("mCustomScrollbarIndex"),function(n){if(n.preventDefault(),c.data("on_drag")){var i=f,t=i.offset(),r=n.originalEvent.pageX-t.left,u=n.originalEvent.pageY-t.top;g(v,y,u,r)}}).bind("MSPointerUp."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")})):(f.bind("mousedown touchstart",function(t){t.preventDefault();t.stopImmediatePropagation();var e=n(this),u=e.offset(),i,r;if(t.type==="touchstart"){var o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=o.pageX-u.left;r=o.pageY-u.top}else c.data({on_drag:!0}),f.addClass("mCSB_dragger_onDrag"),i=t.pageX-u.left,r=t.pageY-u.top;i<e.width()&&i>0&&r<e.height()&&r>0&&(v=r,y=i)}).bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],u=n(this),r=u.offset(),f=i.pageX-r.left,e=i.pageY-r.top;g(v,y,e,f)}),n(document).bind("mousemove."+c.data("mCustomScrollbarIndex"),function(n){if(c.data("on_drag")){var i=f,t=i.offset(),r=n.pageX-t.left,u=n.pageY-t.top;g(v,y,u,r)}}).bind("mouseup."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")}));c.data({bindEvent_scrollbar_drag:!0})}function g(n,t,i,r){c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",f.position().left-t+r,{moveDragger:!0,trigger:"internal"}):c.mCustomScrollbar("scrollTo",f.position().top-n+i,{moveDragger:!0,trigger:"internal"})}if(n.support.touch&&c.data("contentTouchScroll")&&!c.data("bindEvent_content_touch")){var l,p,a,w,b,it,rt;r.bind("touchstart",function(t){t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this);a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;it=w;rt=b});r.bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this).parent();a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",rt-b,{trigger:"internal"}):c.mCustomScrollbar("scrollTo",it-w,{trigger:"internal"})})}if(c.data("bindEvent_scrollbar_click")||(u.bind("click",function(t){var i=(t.pageY-u.offset().top)*c.data("scrollAmount"),r=n(t.target);c.data("horizontalScroll")&&(i=(t.pageX-u.offset().left)*c.data("scrollAmount"));(r.hasClass("mCSB_draggerContainer")||r.hasClass("mCSB_draggerRail"))&&c.mCustomScrollbar("scrollTo",i,{trigger:"internal",scrollEasing:"draggerRailEase"})}),c.data({bindEvent_scrollbar_click:!0})),c.data("mouseWheel")&&(c.data("bindEvent_mousewheel")||(i.bind("mousewheel",function(n,t){var o,i=c.data("mouseWheelPixels"),s=Math.abs(r.position().top),e=f.position().top,h=u.height()-f.height();c.data("normalizeMouseWheelDelta")&&(t=t<0?-1:1);i==="auto"&&(i=100+Math.round(c.data("scrollAmount")/2));c.data("horizontalScroll")&&(e=f.position().left,h=u.width()-f.width(),s=Math.abs(r.position().left));(t>0&&e!==0||t<0&&e!==h)&&(n.preventDefault(),n.stopImmediatePropagation());o=s-t*i;c.mCustomScrollbar("scrollTo",o,{trigger:"internal"})}),c.data({bindEvent_mousewheel:!0}))),c.data("scrollButtons_enable"))if(c.data("scrollButtons_scrollType")==="pixels"){c.data("horizontalScroll")?(h.add(s).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",nt,tt),c.data({bindEvent_buttonsContinuous_x:!1}),c.data("bindEvent_buttonsPixels_x")||(h.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)+c.data("scrollButtons_scrollAmount"))}),s.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_x:!0}))):(o.add(e).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",nt,tt),c.data({bindEvent_buttonsContinuous_y:!1}),c.data("bindEvent_buttonsPixels_y")||(o.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)+c.data("scrollButtons_scrollAmount"))}),e.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_y:!0})));function k(n){f.data("preventAction")||(f.data("preventAction",!0),c.mCustomScrollbar("scrollTo",n,{trigger:"internal"}))}}else{if(c.data("horizontalScroll")){if(h.add(s).unbind("click"),c.data({bindEvent_buttonsPixels_x:!1}),!c.data("bindEvent_buttonsContinuous_x")){h.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollRight:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var nt=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollRight"))};h.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",nt);s.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollLeft:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var tt=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollLeft"))};s.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",tt);c.data({bindEvent_buttonsContinuous_x:!0})}}else if(o.add(e).unbind("click"),c.data({bindEvent_buttonsPixels_y:!1}),!c.data("bindEvent_buttonsContinuous_y")){o.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollDown:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var ut=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollDown"))};o.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ut);e.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollUp:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var ft=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollUp"))};e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ft);c.data({bindEvent_buttonsContinuous_y:!0})}function d(){var n=c.data("scrollButtons_scrollSpeed");return c.data("scrollButtons_scrollSpeed")==="auto"&&(n=Math.round((c.data("scrollInertia")+100)/40)),n}}c.data("autoScrollOnFocus")&&(c.data("bindEvent_focusin")||(i.bind("focusin",function(){i.scrollTop(0).scrollLeft(0);var t=n(document.activeElement);if(t.is("input,textarea,select,button,a[tabindex],area,object")){var f=r.position().top,u=t.position().top,e=i.height()-t.outerHeight();c.data("horizontalScroll")&&(f=r.position().left,u=t.position().left,e=i.width()-t.outerWidth());(f+u<0||f+u>e)&&c.mCustomScrollbar("scrollTo",u,{trigger:"internal"})}}),c.data({bindEvent_focusin:!0})));c.data("autoHideScrollbar")&&(c.data("bindEvent_autoHideScrollbar")||(i.bind("mouseenter",function(){i.addClass("mCS-mouse-over");t.showScrollbar.call(i.children(".mCSB_scrollTools"))}).bind("mouseleave touchend",function(n){i.removeClass("mCS-mouse-over");n.type==="mouseleave"&&t.hideScrollbar.call(i.children(".mCSB_scrollTools"))}),c.data({bindEvent_autoHideScrollbar:!0})))},scrollTo:function(i,r){var u=n(this),d={moveDragger:!1,trigger:"external",callbacks:!0,scrollInertia:u.data("scrollInertia"),scrollEasing:u.data("scrollEasing")},r=n.extend(d,r),e,o=u.children(".mCustomScrollBox"),f=o.children(".mCSB_container"),v=o.children(".mCSB_scrollTools"),y=v.children(".mCSB_draggerContainer"),s=y.children(".mCSB_dragger"),k=draggerSpeed=r.scrollInertia,w,c,b,l;if(!f.hasClass("mCS_no_scrollbar")&&(u.data({mCS_trigger:r.trigger}),u.data("mCS_Init")&&(r.callbacks=!1),i||i===0)){if(typeof i=="number")r.moveDragger?(e=i,i=u.data("horizontalScroll")?s.position().left*u.data("scrollAmount"):s.position().top*u.data("scrollAmount"),draggerSpeed=0):e=i/u.data("scrollAmount");else if(typeof i=="string"){var p;p=i==="top"?0:i!=="bottom"||u.data("horizontalScroll")?i==="left"?0:i==="right"&&u.data("horizontalScroll")?f.outerWidth()-o.width():i==="first"?u.find(".mCSB_container").find(":first"):i==="last"?u.find(".mCSB_container").find(":last"):u.find(i):f.outerHeight()-o.height();p.length===1?(i=u.data("horizontalScroll")?p.position().left:p.position().top,e=i/u.data("scrollAmount")):e=i=p}if(u.data("horizontalScroll")){u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset"));u.data("onTotalScroll_Offset")&&(l=o.width()-f.outerWidth()+u.data("onTotalScroll_Offset"));e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollLeft")),c||(w=!0)):e>=y.width()-s.width()?(e=y.width()-s.width(),i=o.width()-f.outerWidth(),clearInterval(u.data("mCSB_buttonScrollRight")),l||(b=!0)):i=-i;var a=u.data("snapAmount");a&&(i=Math.round(i/a)*a-u.data("snapOffset"));t.mTweenAxis.call(this,s[0],"left",Math.round(e),draggerSpeed,r.scrollEasing);t.mTweenAxis.call(this,f[0],"left",Math.round(i),k,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(v)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(w||c&&f.position().left>=c)&&h("onTotalScrollBack"),(b||l&&f.position().left<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(v))}})}else{u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset"));u.data("onTotalScroll_Offset")&&(l=o.height()-f.outerHeight()+u.data("onTotalScroll_Offset"));e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollUp")),c||(w=!0)):e>=y.height()-s.height()?(e=y.height()-s.height(),i=o.height()-f.outerHeight(),clearInterval(u.data("mCSB_buttonScrollDown")),l||(b=!0)):i=-i;var a=u.data("snapAmount");a&&(i=Math.round(i/a)*a-u.data("snapOffset"));t.mTweenAxis.call(this,s[0],"top",Math.round(e),draggerSpeed,r.scrollEasing);t.mTweenAxis.call(this,f[0],"top",Math.round(i),k,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(v)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(w||c&&f.position().top>=c)&&h("onTotalScrollBack"),(b||l&&f.position().top<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(v))}})}u.data("mCS_Init")&&u.data({mCS_Init:!1})}function h(n){this.mcs={top:f.position().top,left:f.position().left,draggerTop:s.position().top,draggerLeft:s.position().left,topPct:Math.round(100*Math.abs(f.position().top)/Math.abs(f.outerHeight()-o.height())),leftPct:Math.round(100*Math.abs(f.position().left)/Math.abs(f.outerWidth()-o.width()))};switch(n){case"onScrollStart":u.data("mCS_tweenRunning",!0).data("onScrollStart_Callback").call(u,this.mcs);break;case"whileScrolling":u.data("whileScrolling_Callback").call(u,this.mcs);break;case"onScroll":u.data("onScroll_Callback").call(u,this.mcs);break;case"onTotalScrollBack":u.data("onTotalScrollBack_Callback").call(u,this.mcs);break;case"onTotalScroll":u.data("onTotalScroll_Callback").call(u,this.mcs)}}},stop:function(){var i=n(this),r=i.children().children(".mCSB_container"),u=i.children().children().children().children(".mCSB_dragger");t.mTweenAxisStop.call(this,r[0]);t.mTweenAxisStop.call(this,u[0])},disable:function(t){var r=n(this),u=r.children(".mCustomScrollBox"),i=u.children(".mCSB_container"),f=u.children(".mCSB_scrollTools"),e=f.children().children(".mCSB_dragger");u.unbind("mousewheel focusin mouseenter mouseleave touchend");i.unbind("touchstart touchmove");t&&(r.data("horizontalScroll")?e.add(i).css("left",0):e.add(i).css("top",0));f.css("display","none");i.addClass("mCS_no_scrollbar");r.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1,bindEvent_content_touch:!1,bindEvent_autoHideScrollbar:!1}).addClass("mCS_disabled")},destroy:function(){var t=n(this);t.removeClass("mCustomScrollbar _mCS_"+t.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();n(document).unbind("mousemove."+t.data("mCustomScrollbarIndex")+" mouseup."+t.data("mCustomScrollbarIndex")+" MSPointerMove."+t.data("mCustomScrollbarIndex")+" MSPointerUp."+t.data("mCustomScrollbarIndex"));n(i).unbind("resize."+t.data("mCustomScrollbarIndex"))}},t={showScrollbar:function(){this.stop().animate({opacity:1},"fast")},hideScrollbar:function(){this.stop().animate({opacity:0},"fast")},mTweenAxis:function(n,t,r,u,f,e){var e=e||{},y=e.onStart||function(){},p=e.onUpdate||function(){},w=e.onComplete||function(){},b=l(),s,o=0,h=n.offsetTop,c=n.style;t==="left"&&(h=n.offsetLeft);var k=r-h;g();d();function l(){return i.performance&&i.performance.now?i.performance.now():i.performance&&i.performance.webkitNow?i.performance.webkitNow():Date.now?Date.now():(new Date).getTime()}function a(){o||y.call();o=l()-b;v();o>=n._time&&(n._time=o>n._time?o+s-(o-n._time):o+s-1,n._time<o+1&&(n._time=o+1));n._time<u?n._id=_request(a):w.call()}function v(){u>0?(n.currVal=nt(n._time,h,k,u,f),c[t]=Math.round(n.currVal)+"px"):c[t]=r+"px";p.call()}function d(){s=1e3/60;n._time=o+s;_request=i.requestAnimationFrame?i.requestAnimationFrame:function(n){return v(),setTimeout(n,.01)};n._id=_request(a)}function g(){n._id!=null&&(i.requestAnimationFrame?i.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)}function nt(n,t,i,r,u){switch(u){case"linear":return i*n/r+t;case"easeOutQuad":return n/=r,-i*n*(n-2)+t;case"easeInOutQuad":return(n/=r/2,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeOutCubic":return n/=r,n--,i*(n*n*n+1)+t;case"easeOutQuart":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutQuint":return n/=r,n--,i*(n*n*n*n*n+1)+t;case"easeOutCirc":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeOutSine":return i*Math.sin(n/r*(Math.PI/2))+t;case"easeOutExpo":return i*(-Math.pow(2,-10*n/r)+1)+t;case"mcsEaseOut":var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n);case"draggerRailEase":return(n/=r/2,n<1)?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t)}}},mTweenAxisStop:function(n){n._id!=null&&(i.requestAnimationFrame?i.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)},rafPolyfill:function(){for(var n=["ms","moz","webkit","o"],t=n.length;--t>-1&&!i.requestAnimationFrame;)i.requestAnimationFrame=i[n[t]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[n[t]+"CancelAnimationFrame"]||i[n[t]+"CancelRequestAnimationFrame"]}};t.rafPolyfill.call();n.support.touch=!!("ontouchstart"in i);n.support.msPointer=i.navigator.msPointerEnabled;var u="https:"==document.location.protocol?"https:":"http:";n.event.special.mousewheel||document.write('<script src="'+u+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');n.fn.mCustomScrollbar=function(t){if(r[t])return r[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return r.init.apply(this,arguments)}})(n)}(asljQuery,asljQuery,window),function(n,t,i){
15
  /*! Ajax Search Lite 4.6 js */
16
+ (function(n){var r={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore a",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.firstClick=!0;r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),r.createVerticalScroll(),f()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),this},duplicateCheck:function(){var i=this,t={};n("div[id*=ajaxsearchlite]").each(function(){t.hasOwnProperty(this.id)?n(this).remove():t[this.id]="true"})},analytics:function(n){var t=this;t.o.analytics&&t.o.analyticsString!=""&&typeof ga=="function"&&ga("send","pageview",{page:"/"+t.o.analyticsString.replace("{asl_term}",n),title:"Ajax Search"})},createVerticalScroll:function(){var i=this;i.scroll=i.n.results.mCustomScrollbar({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSB_container",i.n.results).position().top),h=n(".mCSB_container .resdrg").children(),f=0,o=3e3,u=4e3,c=1e4,e=1e4,r=null;h.each(function(){u=Math.abs(Math.abs(s)-f);u<o&&(c=u,e=f,r=n(this));f+=n(this).outerHeight(!0);o=u});r.hasClass("group")&&(e=e+(r.outerHeight(!0)-r.outerHeight(!1)));i.scroll.mCustomScrollbar("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}})},createHorizontalScroll:function(){var n=this;n.scroll=n.n.results.mCustomScrollbar({horizontalScroll:!0,contentTouchScroll:!0,scrollButtons:{enable:!0,scrollType:"pixels",scrollSpeed:"auto",scrollAmount:100}})},initEvents:function(){var r=this;n(r.n.text.parent()).submit(function(n){n.preventDefault();r.n.text.keyup()});r.n.text.click(function(){r.firstClick&&(n(this).val(""),r.firstClick=!1)});r.n.resultsDiv.css({opacity:0});n(document).bind("click touchend",function(){(r.hideSettings(),r.opened!=!1&&r.o.closeOnDocClick==1)&&r.hideResults()});r.n.proclose.bind("click touchend",function(){r.opened!=!1&&(r.n.text.val(""),r.n.textAutocomplete.val(""),r.hideResults(),r.n.text.focus())});n(r.elem).bind("click touchend",function(n){n.stopImmediatePropagation()});r.n.resultsDiv.bind("click touchend",function(n){n.stopImmediatePropagation()});r.n.searchsettings.bind("click touchend",function(n){n.stopImmediatePropagation()});var u=!1;r.n.text.focus(function(){u=!0});var f="touchend";r.n.results.hasClass("mCustomScrollbar")&&(f="mousedown");r.n.resultsDiv.bind(f,function(n){if(t()&&u){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),r.n.results.hasClass("mCustomScrollbar"))r.n.resultsDiv.one("click","a.asl_res_url",function(n){return n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1});return document.activeElement.blur(),u=!1,!1}});r.n.prosettings.on("click",function(){r.n.prosettings.data("opened")==0?r.showSettings():r.hideSettings()});var e;n(i).on("resize",function(){clearTimeout(e);e=setTimeout(function(){r.resize()},250)});var o;n(i).on("scroll",function(){clearTimeout(o);o=setTimeout(function(){r.scrolling(!1)},250)});r.initNavigationEvent();n(i).trigger("resize");n(i).trigger("scroll");r.initMagnifierEvent();r.initAutocompleteEvent();r.initFacetEvents()},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).keydown(function(r){if(i.event)var u=i.event.keyCode,f=i.event.type;else if(r)var u=r.which,f=r.type;n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"&&(u==40&&(r.stopPropagation(),r.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next().next(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),u==38&&(r.stopPropagation(),r.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev().prev(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),u==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(r.stopPropagation(),r.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click()))})},initMagnifierEvent:function(){var t=this,r;t.n.promagnifier.add(t.n.text).bind("click keyup",function(f){i.event?(t.keycode=i.event.keyCode,t.ktype=i.event.type):f&&(t.keycode=f.which,t.ktype=f.type);var e=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(r);return}if(!e&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="results_page"||e&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo=="results_page"){var o="?s="+t.n.text.val();t.o.overridewpdefault?u(t.o.homeurl+o+"&asl_active=1","post",{p_asl_data:n("form",t.n.searchsettings).serialize()}):u(t.o.homeurl+o,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()});t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(r);return}t.keycode>=37&&t.keycode<=40||n(this).hasClass("orig")&&t.ktype=="click"||(t.o.triggeronclick!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="keyup")&&(t.post!=null&&t.post.abort(),clearTimeout(r),r=setTimeout(function(){t.search()},300))})},initFacetEvents:function(){var t=this;t.o.trigger_on_facet_change==1&&n("input",t.n.searchsettings).change(function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.search())})},destroy:function(){return this.each(function(){var t=n.extend({},this,r);n(i).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var r=this;r.o.autocomplete.enabled!=1||t()||r.n.text.keyup(function(t){i.event?(r.keycode=i.event.keyCode,r.ktype=i.event.type):t&&(r.keycode=t.which,r.ktype=t.type);var u=39;n("body").hasClass("rtl")&&(u=37);r.keycode==u&&r.n.textAutocomplete.val()!=""?(t.preventDefault(),r.n.text.val(r.n.textAutocomplete.val()),r.post!=null&&r.post.abort(),r.search()):(r.postAuto!=null&&r.postAuto.abort(),r.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});t.hideSettings();var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};t.analytics(t.n.text.val());t.post=n.post(ajaxsearchlite.ajaxurl,i,function(i){if(i=i.replace(/^\s*[\r\n]/gm,""),i=i.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1],t.n.resdrg.html(""),t.n.resdrg.html(i),n(".asl_keyword",t.n.resdrg).bind("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).keydown();n("form",t.n.container).trigger("submit","ajax");t.search()}),t.n.items=n(".item",t.n.resultsDiv),n(".asl_res_url",t.n.resultsDiv).length>0&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="results_page"||t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="results_page")return location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"),!1;t.showResults();t.scrollToResults();t.n.items.length==0?t.n.showmore!=null&&t.n.showmore.css("display","none"):t.n.showmore!=null&&(t.n.showmore.css("display","block"),t.n.showmore.attr("href",t.o.homeurl+"?s="+t.n.text.val()))},"text")}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.scrolling(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});t()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var f=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,o=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.scroll.mCustomScrollbar("update");t.resize();var r=0,u=0;t.n.items.each(function(){u+=n(this).outerHeight(!0);r++});r=r<1?1:r;u=u/r*f;t.n.results.css({height:u})}if(i.sscroll=t.scroll,t.scroll.mCustomScrollbar("disable",!0),t.scroll.mCustomScrollbar("update"),t.resize(),t.scroll.mCustomScrollbar("scrollTo",0),t.o.highlight==1){var e=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:e})}}if(t.resize(),t.n.items.length==0){var u=n(".nores",t.n.results).outerHeight(!0)>t.o.resultitemheight?t.o.resultitemheight:n(".nores",t.n.results).outerHeight(!0);t.n.results.css({height:11110});t.scroll.mCustomScrollbar("update");t.n.results.css({height:"auto"})}t.addAnimation();t.scrolling(!0);t.searching=!1},hideVerticalResults:function(){var t=this;t.disableMobileScroll=!1;t.n.resultsDiv.animate({opacity:0,height:0},{duration:120,complete:function(){n(this).css({visibility:"hidden",display:"none"})}})},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.scrolling(!0);t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustomScrollbar({contentTouchScroll:!0}));t.n.prosettings.data("opened",1)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},resize:function(){var t=this,i=0;if(n("body").css("position")!="static"&&(i=n("body").offset().top),f()&&0&&(t.n.proinput.css({width:t.n.probox.width()-8-(t.n.proinput.outerWidth(!1)-t.n.proinput.width())-t.n.proloading.outerWidth(!0)-t.n.prosettings.outerWidth(!0)-t.n.promagnifier.outerWidth(!0)-10}),t.n.text.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),position:"absolute",zIndex:2}),t.n.textAutocomplete.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),opacity:.25,zIndex:1})),t.n.prosettings.attr("opened")!=0&&(t.o.settingsimagepos=="left"?t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left}):t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left+t.n.prosettings.width()-t.n.searchsettings.width()})),t.n.resultsDiv.css("visibility")!="hidden"&&t.o.resultsposition!="block"){var r=t.n.container.width()-(t.n.resultsDiv.outerWidth(!0)-t.n.resultsDiv.width()),u=r<240?240:r;t.n.resultsDiv.css({width:u,top:t.n.container.offset().top+t.n.container.outerHeight(!0)+10-i,left:t.n.container.offset().left+(r-u)})}},scrolling:function(t){var i=this,r=0;if(n("body").css("position")!="static"&&(r=n("body").offset().top),(t==!0||i.n.searchsettings.css("visibility")=="visible")&&(i.o.settingsimagepos=="left"?i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left}):i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left+i.n.prosettings.width()-i.n.searchsettings.width()})),t==!0||i.n.resultsDiv.css("visibility")=="visible"){var u=i.n.container.width()-(i.n.resultsDiv.outerWidth(!0)-i.n.resultsDiv.width()),f=u<240?240:u;(i.o.resultsposition!="hover"&&i.n.resultsAppend.length>0||i.n.container.hasClass("hiddend"))&&(f="auto");i.n.resultsDiv.css({width:f,top:i.n.container.offset().top+i.n.container.outerHeight(!0)+10-r,left:i.n.container.offset().left+(u-f)})}}};function t(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function u(t,i,r){"use strict";var u;u=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(u)});u.appendTo("body").submit()}function f(){var n=i.navigator.userAgent,t=n.indexOf("MSIE "),r=n.indexOf("Trident/");return t>0||r>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",r)})(n)}(asljQuery,asljQuery,window),function(n,t,i){i.ASL=i.ASL||{};i.ASL.getScope=function(){return typeof n!="undefined"?n:typeof i[ASL.js_scope]!="undefined"?i[ASL.js_scope]:eval(ASL.js_scope)};i.ASL.initialize=function(n){var t=i.ASL.getScope(),r=".asl_init_data";typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(r="div[id*=asl_init_id_"+n+"]"),t(r).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).html();if(typeof n=="undefined")return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).ajaxsearchlite(r)}))};i.ASL.ready=function(){var n=this,t=n.getScope(),i=null;t(document).ready(function(){n.initialize()});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&t("body").bind("DOMSubtreeModified",function(){clearTimeout(i);i=setTimeout(function(){n.initialize()},500)})};i._ASL=ASL;i._ASL.ready()}(asljQuery,asljQuery,window);
js/min/jquery.ajaxsearchlite.min.js CHANGED
@@ -1,3 +1,15 @@
1
- (function(n){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):typeof module!="undefined"&&module.exports?n(require("jquery")):n(jQuery)})(function(n){var r="left",u="right",f="up",e="down",v="in",y="out",p="none",nt="auto",w="swipe",b="pinch",k="tap",tt="doubletap",it="longtap",d="horizontal",g="vertical",l="all",ut=10,rt="start",o="move",t="end",i="cancel",c="ontouchstart"in window,a=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!c,s=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!c,h="TouchSwipe";n.fn.swipe=function(t){var r=n(this),i=r.data(h);if(i&&typeof t=="string"){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&typeof t=="object")i.option.apply(this,arguments);else if(!i&&(typeof t=="object"||!t))return ft.apply(this,arguments);return r};n.fn.swipe.version="1.6.15";n.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe.phases={PHASE_START:rt,PHASE_MOVE:o,PHASE_END:t,PHASE_CANCEL:i};n.fn.swipe.directions={LEFT:r,RIGHT:u,UP:f,DOWN:e,IN:v,OUT:y};n.fn.swipe.pageScroll={NONE:p,HORIZONTAL:d,VERTICAL:g,AUTO:nt};n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:l};function ft(t){return t&&t.allowPageScroll===undefined&&(t.swipe!==undefined||t.swipeStatus!==undefined)&&(t.allowPageScroll=p),t.click!==undefined&&t.tap===undefined&&(t.tap=t.click),t||(t={}),t=n.extend({},n.fn.swipe.defaults,t),this.each(function(){var r=n(this),i=r.data(h);i||(i=new et(this,t),r.data(h,i))})}function et(ft,et){var et=n.extend({},et),si=c||s||!et.fallbackToMouseEvents,hi=si?s?a?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ki=si?s?a?"MSPointerMove":"pointermove":"touchmove":"mousemove",di=si?s?a?"MSPointerUp":"pointerup":"touchend":"mouseup",ri=si?s?"mouseleave":null:"mouseleave",ci=s?a?"MSPointerCancel":"pointercancel":"touchcancel",at=0,vt=null,yt=null,lt=0,gt=0,ni=0,pt=1,bt=0,kt=0,li=null,ot=n(ft),st="start",ct=0,ht={},gi=0,ai=0,vi=0,nr=0,ti=0,fi=null,ei=null;try{ot.bind(hi,tr);ot.bind(ci,ui)}catch(ff){n.error("events not supported "+hi+","+ci+" on jQuery.swipe")}this.enable=function(){return ot.bind(hi,tr),ot.bind(ci,ui),ot};this.disable=function(){return lr(),ot};this.destroy=function(){lr();ot.data(h,null);ot=null};this.option=function(t,i){if(typeof t=="object")et=n.extend(et,t);else if(et[t]!==undefined){if(i===undefined)return et[t];et[t]=i}else if(t)n.error("Option "+t+" does not exist on jQuery.swipe.options");else return et;return null};function tr(t){if(!pu()&&!(n(t.target).closest(et.excludedElements,ot).length>0)){var r=t.originalEvent?t.originalEvent:t,f,u=r.touches,e=u?u[0]:r;return(st=rt,u?ct=u.length:et.preventDefaultEvents!==!1&&t.preventDefault(),at=0,vt=null,yt=null,kt=null,lt=0,gt=0,ni=0,pt=1,bt=0,li=ku(),dr(),wi(0,e),!u||ct===et.fingers||et.fingers===l||oi()?(gi=ii(),ct==2&&(wi(1,u[1]),gt=ni=cr(ht[0].start,ht[1].start)),(et.swipeStatus||et.pinchStatus)&&(f=wt(r,st))):f=!1,f===!1)?(st=i,wt(r,st),f):(et.hold&&(ei=setTimeout(n.proxy(function(){ot.trigger("hold",[r.target]);et.hold&&(f=et.hold.call(ot,r,r.target))},this),et.longTapThreshold)),pi(!0),null)}}function ir(n){var f=n.originalEvent?n.originalEvent:n;if(st!==t&&st!==i&&!yi()){var s,r=f.touches,h=r?r[0]:f,u=gr(h);if(ai=ii(),r&&(ct=r.length),et.hold&&clearTimeout(ei),st=o,ct==2&&(gt==0?(wi(1,r[1]),gt=ni=cr(ht[0].start,ht[1].start)):(gr(r[1]),ni=cr(ht[0].end,ht[1].end),kt=gu(ht[0].end,ht[1].end)),pt=du(gt,ni),bt=Math.abs(gt-ni)),ct===et.fingers||et.fingers===l||!r||oi()){if(vt=iu(u.start,u.end),yt=iu(u.last,u.end),uu(n,yt),at=nf(u.start,u.end),lt=tu(),bu(vt,at),s=wt(f,st),!et.triggerOnTouchEnd||et.triggerOnTouchLeave){var e=!0;if(et.triggerOnTouchLeave){var c=rf(this);e=uf(u.end,c)}!et.triggerOnTouchEnd&&e?st=fr(o):et.triggerOnTouchLeave&&!e&&(st=fr(t));(st==i||st==t)&&wt(f,st)}}else st=i,wt(f,st);s===!1&&(st=i,wt(f,st))}}function rr(n){var r=n.originalEvent?n.originalEvent:n,u=r.touches;if(u){if(u.length&&!yi())return yu(r),!0;if(u.length&&yi())return!0}return yi()&&(ct=nr),ai=ii(),lt=tu(),or()||!er()?(st=i,wt(r,st)):et.triggerOnTouchEnd||et.triggerOnTouchEnd==!1&&st===o?(et.preventDefaultEvents!==!1&&n.preventDefault(),st=t,wt(r,st)):!et.triggerOnTouchEnd&&br()?(st=t,dt(r,st,k)):st===o&&(st=i,wt(r,st)),pi(!1),null}function ui(){ct=0;ai=0;gi=0;gt=0;ni=0;pt=1;dr();pi(!1)}function ur(n){var i=n.originalEvent?n.originalEvent:n;et.triggerOnTouchLeave&&(st=fr(t),wt(i,st))}function lr(){ot.unbind(hi,tr);ot.unbind(ci,ui);ot.unbind(ki,ir);ot.unbind(di,rr);ri&&ot.unbind(ri,ur);pi(!1)}function fr(n){var r=n,f=ar(),u=er(),e=or();return!f||e?r=i:u&&n==o&&(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)?r=t:!u&&n==t&&et.triggerOnTouchLeave&&(r=i),r}function wt(n,r){var u,f=n.touches;return(eu()||sr())&&(u=dt(n,r,w)),(fu()||oi())&&u!==!1&&(u=dt(n,r,b)),au()&&u!==!1?u=dt(n,r,tt):vu()&&u!==!1?u=dt(n,r,it):lu()&&u!==!1&&(u=dt(n,r,k)),r===i&&(sr()&&(u=dt(n,r,w)),oi()&&(u=dt(n,r,b)),ui(n)),r===t&&(f?f.length||ui(n):ui(n)),u}function dt(o,s,h){var c;if(h==w){if(ot.trigger("swipeStatus",[s,vt||null,at||0,lt||0,ct,ht,yt]),et.swipeStatus&&(c=et.swipeStatus.call(ot,o,s,vt||null,at||0,lt||0,ct,ht,yt),c===!1))return!1;if(s==t&&yr()){if(clearTimeout(fi),clearTimeout(ei),ot.trigger("swipe",[vt,at,lt,ct,ht,yt]),et.swipe&&(c=et.swipe.call(ot,o,vt,at,lt,ct,ht,yt),c===!1))return!1;switch(vt){case r:ot.trigger("swipeLeft",[vt,at,lt,ct,ht,yt]);et.swipeLeft&&(c=et.swipeLeft.call(ot,o,vt,at,lt,ct,ht,yt));break;case u:ot.trigger("swipeRight",[vt,at,lt,ct,ht,yt]);et.swipeRight&&(c=et.swipeRight.call(ot,o,vt,at,lt,ct,ht,yt));break;case f:ot.trigger("swipeUp",[vt,at,lt,ct,ht,yt]);et.swipeUp&&(c=et.swipeUp.call(ot,o,vt,at,lt,ct,ht,yt));break;case e:ot.trigger("swipeDown",[vt,at,lt,ct,ht,yt]);et.swipeDown&&(c=et.swipeDown.call(ot,o,vt,at,lt,ct,ht,yt))}}}if(h==b){if(ot.trigger("pinchStatus",[s,kt||null,bt||0,lt||0,ct,pt,ht]),et.pinchStatus&&(c=et.pinchStatus.call(ot,o,s,kt||null,bt||0,lt||0,ct,pt,ht),c===!1))return!1;if(s==t&&vr())switch(kt){case v:ot.trigger("pinchIn",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchIn&&(c=et.pinchIn.call(ot,o,kt||null,bt||0,lt||0,ct,pt,ht));break;case y:ot.trigger("pinchOut",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchOut&&(c=et.pinchOut.call(ot,o,kt||null,bt||0,lt||0,ct,pt,ht))}}return h==k?(s===i||s===t)&&(clearTimeout(fi),clearTimeout(ei),hr()&&!su()?(ti=ii(),fi=setTimeout(n.proxy(function(){ti=null;ot.trigger("tap",[o.target]);et.tap&&(c=et.tap.call(ot,o,o.target))},this),et.doubleTapThreshold)):(ti=null,ot.trigger("tap",[o.target]),et.tap&&(c=et.tap.call(ot,o,o.target)))):h==tt?(s===i||s===t)&&(clearTimeout(fi),clearTimeout(ei),ti=null,ot.trigger("doubletap",[o.target]),et.doubleTap&&(c=et.doubleTap.call(ot,o,o.target))):h==it&&(s===i||s===t)&&(clearTimeout(fi),ti=null,ot.trigger("longtap",[o.target]),et.longTap&&(c=et.longTap.call(ot,o,o.target))),c}function er(){var n=!0;return et.threshold!==null&&(n=at>=et.threshold),n}function or(){var n=!1;return et.cancelThreshold!==null&&vt!==null&&(n=nu(vt)-at>=et.cancelThreshold),n}function ru(){return et.pinchThreshold!==null?bt>=et.pinchThreshold:!0}function ar(){return et.maxTimeThreshold?lt>=et.maxTimeThreshold?!1:!0:!0}function uu(n,t){if(et.preventDefaultEvents!==!1)if(et.allowPageScroll===p)n.preventDefault();else{var i=et.allowPageScroll===nt;switch(t){case r:(et.swipeLeft&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault();break;case u:(et.swipeRight&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault();break;case f:(et.swipeUp&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case e:(et.swipeDown&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault()}}}function vr(){var n=pr(),t=wr(),i=ru();return n&&t&&i}function oi(){return!!(et.pinchStatus||et.pinchIn||et.pinchOut)}function fu(){return!!(vr()&&oi())}function yr(){var n=ar(),t=er(),i=pr(),r=wr(),u=or();return!u&&r&&i&&t&&n}function sr(){return!!(et.swipe||et.swipeStatus||et.swipeLeft||et.swipeRight||et.swipeUp||et.swipeDown)}function eu(){return!!(yr()&&sr())}function pr(){return ct===et.fingers||et.fingers===l||!c}function wr(){return ht[0].end.x!==0}function br(){return!!et.tap}function hr(){return!!et.doubleTap}function ou(){return!!et.longTap}function kr(){if(ti==null)return!1;var n=ii();return hr()&&n-ti<=et.doubleTapThreshold}function su(){return kr()}function hu(){return(ct===1||!c)&&(isNaN(at)||at<et.threshold)}function cu(){return lt>et.longTapThreshold&&at<ut}function lu(){return!!(hu()&&br())}function au(){return!!(kr()&&hr())}function vu(){return!!(cu()&&ou())}function yu(n){vi=ii();nr=n.touches.length+1}function dr(){vi=0;nr=0}function yi(){var n=!1;if(vi){var t=ii()-vi;t<=et.fingerReleaseThreshold&&(n=!0)}return n}function pu(){return!!(ot.data(h+"_intouch")===!0)}function pi(n){ot&&(n===!0?(ot.bind(ki,ir),ot.bind(di,rr),ri&&ot.bind(ri,ur)):(ot.unbind(ki,ir,!1),ot.unbind(di,rr,!1),ri&&ot.unbind(ri,ur,!1)),ot.data(h+"_intouch",n===!0))}function wi(n,t){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=t.pageX||t.clientX,i.start.y=i.last.y=i.end.y=t.pageY||t.clientY,ht[n]=i,i}function gr(n){var i=n.identifier!==undefined?n.identifier:0,t=wu(i);return t===null&&(t=wi(i,n)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function wu(n){return ht[n]||null}function bu(n,t){t=Math.max(t,nu(n));li[n].distance=t}function nu(n){return li[n]?li[n].distance:undefined}function ku(){var n={};return n[r]=bi(r),n[u]=bi(u),n[f]=bi(f),n[e]=bi(e),n}function bi(n){return{direction:n,distance:0}}function tu(){return ai-gi}function cr(n,t){var i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);return Math.round(Math.sqrt(i*i+r*r))}function du(n,t){var i=t/n*1;return i.toFixed(2)}function gu(){return pt<1?y:v}function nf(n,t){return Math.round(Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)))}function tf(n,t){var r=n.x-t.x,u=t.y-n.y,f=Math.atan2(u,r),i=Math.round(f*180/Math.PI);return i<0&&(i=360-Math.abs(i)),i}function iu(n,t){var i=tf(n,t);return i<=45&&i>=0?r:i<=360&&i>=315?r:i>=135&&i<=225?u:i>45&&i<135?e:f}function ii(){var n=new Date;return n.getTime()}function rf(t){t=n(t);var i=t.offset();return{left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()}}function uf(n,t){return n.x>t.left&&n.x<t.right&&n.y>t.top&&n.y<t.bottom}}});jQuery.extend({highlight:function(n,t,i,r){if(n.nodeType===3){var e=n.data.match(t);if(e){var o=document.createElement(i||"span");o.className=r||"highlight";var u=n.splitText(e.index);u.splitText(e[0].length);var s=u.cloneNode(!0);return o.appendChild(s),u.parentNode.replaceChild(o,u),1}}else if(n.nodeType===1&&n.childNodes&&!/(script|style)/i.test(n.tagName)&&!(n.tagName===i.toUpperCase()&&n.className===r))for(var f=0;f<n.childNodes.length;f++)f+=jQuery.highlight(n.childNodes[f],t,i,r);return 0}});jQuery.fn.unhighlight=function(n){var t={className:"highlight",element:"span"};return jQuery.extend(t,n),this.find(t.element+"."+t.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()};jQuery.fn.highlight=function(n,t){var i={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(jQuery.extend(i,t),n.constructor===String&&(n=[n]),n=jQuery.grep(n,function(n){return n!=""}),n=jQuery.map(n,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),n.length==0)return this;var u=i.caseSensitive?"":"i",r="("+n.join("|")+")";i.wordsOnly&&(r="\\b"+r+"\\b");var f=new RegExp(r,u);return this.each(function(){jQuery.highlight(this,f,i.element,i.className)})};!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(i){var u=i||window.event,p=c.call(arguments,1),l=0,s=0,o=0,a=0,w=0,b=0;if(i=n.event.fix(u),i.type="mousewheel","detail"in u&&(o=-1*u.detail),"wheelDelta"in u&&(o=u.wheelDelta),"wheelDeltaY"in u&&(o=u.wheelDeltaY),"wheelDeltaX"in u&&(s=-1*u.wheelDeltaX),"axis"in u&&u.axis===u.HORIZONTAL_AXIS&&(s=-1*o,o=0),l=0===o?s:o,"deltaY"in u&&(o=-1*u.deltaY,l=o),"deltaX"in u&&(s=u.deltaX,0===o&&(l=-1*s)),0!==o||0!==s){if(1===u.deltaMode){var v=n.data(this,"mousewheel-line-height");l*=v;o*=v;s*=v}else if(2===u.deltaMode){var y=n.data(this,"mousewheel-page-height");l*=y;o*=y;s*=y}if(a=Math.max(Math.abs(o),Math.abs(s)),(!t||t>a)&&(t=a,e(u,a)&&(t/=40)),e(u,a)&&(l/=40,s/=40,o/=40),l=Math[l>=1?"floor":"ceil"](l/t),s=Math[s>=1?"floor":"ceil"](s/t),o=Math[o>=1?"floor":"ceil"](o/t),r.settings.normalizeOffset&&this.getBoundingClientRect){var k=this.getBoundingClientRect();w=i.clientX-k.left;b=i.clientY-k.top}return i.deltaX=s,i.deltaY=o,i.deltaFactor=t,i.offsetX=w,i.offsetY=b,i.deltaMode=0,p.unshift(i,l,s,o),f&&clearTimeout(f),f=setTimeout(h,200),(n.event.dispatch||n.event.handle).apply(this,p)}}function h(){t=null}function e(n,t){return r.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var f,t,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice;if(n.event.fixHooks)for(var s=o.length;s;)n.event.fixHooks[o[--s]]=n.event.mouseHooks;var r=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],u,!1);else this.onmousewheel=u;n.data(this,"mousewheel-line-height",r.getLineHeight(this));n.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],u,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(i){var u=i||window.event,p=c.call(arguments,1),l=0,s=0,o=0,a=0,w=0,b=0;if(i=n.event.fix(u),i.type="mousewheel","detail"in u&&(o=-1*u.detail),"wheelDelta"in u&&(o=u.wheelDelta),"wheelDeltaY"in u&&(o=u.wheelDeltaY),"wheelDeltaX"in u&&(s=-1*u.wheelDeltaX),"axis"in u&&u.axis===u.HORIZONTAL_AXIS&&(s=-1*o,o=0),l=0===o?s:o,"deltaY"in u&&(o=-1*u.deltaY,l=o),"deltaX"in u&&(s=u.deltaX,0===o&&(l=-1*s)),0!==o||0!==s){if(1===u.deltaMode){var v=n.data(this,"mousewheel-line-height");l*=v;o*=v;s*=v}else if(2===u.deltaMode){var y=n.data(this,"mousewheel-page-height");l*=y;o*=y;s*=y}if(a=Math.max(Math.abs(o),Math.abs(s)),(!t||t>a)&&(t=a,e(u,a)&&(t/=40)),e(u,a)&&(l/=40,s/=40,o/=40),l=Math[l>=1?"floor":"ceil"](l/t),s=Math[s>=1?"floor":"ceil"](s/t),o=Math[o>=1?"floor":"ceil"](o/t),r.settings.normalizeOffset&&this.getBoundingClientRect){var k=this.getBoundingClientRect();w=i.clientX-k.left;b=i.clientY-k.top}return i.deltaX=s,i.deltaY=o,i.deltaFactor=t,i.offsetX=w,i.offsetY=b,i.deltaMode=0,p.unshift(i,l,s,o),f&&clearTimeout(f),f=setTimeout(h,200),(n.event.dispatch||n.event.handle).apply(this,p)}}function h(){t=null}function e(n,t){return r.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var f,t,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice;if(n.event.fixHooks)for(var s=o.length;s;)n.event.fixHooks[o[--s]]=n.event.mouseHooks;var r=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],u,!1);else this.onmousewheel=u;n.data(this,"mousewheel-line-height",r.getLineHeight(this));n.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],u,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});typeof jQuery.fn.mCustomScrollbar=="undefined"?!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"undefined"!=typeof module&&module.exports?module.exports=n:n(jQuery,window,document)}(function(n){!function(t){var i="function"==typeof define&&define.amd,r="undefined"!=typeof module&&module.exports,u="https:"==document.location.protocol?"https:":"http:";i||(r?require("jquery-mousewheel")(n):n.event.special.mousewheel||n("head").append(decodeURI("%3Cscript src="+u+"//"+"cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"+"%3E%3C/script%3E")));t()}(function(){var h,c="mCustomScrollbar",t="mCS",it=".mCustomScrollbar",ot={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},pt=0,b={},p=window.attachEvent&&!window.addEventListener?1:0,e=!1,i=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],s={init:function(r){var r=n.extend(!0,{},ot,r),e=v.call(this);if(r.live){var u=r.liveSelector||this.selector||it,f=n(u);if("off"===r.live)return void k(u);b[u]=setTimeout(function(){f.mCustomScrollbar(r);"once"===r.live&&f.length&&k(u)},500)}else k(u);return r.setWidth=r.set_width?r.set_width:r.setWidth,r.setHeight=r.set_height?r.set_height:r.setHeight,r.axis=r.horizontalScroll?"x":wt(r.axis),r.scrollInertia=r.scrollInertia>0&&r.scrollInertia<17?17:r.scrollInertia,"object"!=typeof r.mouseWheel&&1==r.mouseWheel&&(r.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),r.mouseWheel.scrollAmount=r.mouseWheelPixels?r.mouseWheelPixels:r.mouseWheel.scrollAmount,r.mouseWheel.normalizeDelta=r.advanced.normalizeMouseWheelDelta?r.advanced.normalizeMouseWheelDelta:r.mouseWheel.normalizeDelta,r.scrollButtons.scrollType=bt(r.scrollButtons.scrollType),st(r),n(e).each(function(){var u=n(this);if(!u.data(t)){u.data(t,{idx:++pt,opt:r,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=u.data(t),f=e.opt,o=u.data("mcs-axis"),h=u.data("mcs-scrollbar-position"),c=u.data("mcs-theme");o&&(f.axis=o);h&&(f.scrollbarPosition=h);c&&(f.theme=c,st(f));kt.call(this);e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this);n("#mCSB_"+e.idx+"_container img:not(."+i[2]+")").addClass(i[2]);s.update.call(null,u)}})},update:function(r,f){var e=r||v.call(this);return n(e).each(function(){var s=n(this);if(s.data(t)){var e=s.data(t),r=e.opt,h=n("#mCSB_"+e.idx+"_container"),a=n("#mCSB_"+e.idx),c=[n("#mCSB_"+e.idx+"_dragger_vertical"),n("#mCSB_"+e.idx+"_dragger_horizontal")];if(!h.length)return;e.tweenRunning&&o(s);f&&e&&r.callbacks.onBeforeUpdate&&"function"==typeof r.callbacks.onBeforeUpdate&&r.callbacks.onBeforeUpdate.call(this);s.hasClass(i[3])&&s.removeClass(i[3]);s.hasClass(i[4])&&s.removeClass(i[4]);a.css("max-height","none");a.height()!==s.height()&&a.css("max-height",s.height());dt.call(this);"y"===r.axis||r.advanced.autoExpandHorizontalScroll||h.css("width",ht(h));e.overflowed=ii.call(this);ct.call(this);r.autoDraggerLength&&ni.call(this);ti.call(this);ri.call(this);var l=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)];"x"!==r.axis&&(e.overflowed[0]?c[0].height()>c[0].parent().height()?y.call(this):(u(s,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(y.call(this),"y"===r.axis?g.call(this):"yx"===r.axis&&e.overflowed[1]&&u(s,l[1].toString(),{dir:"x",dur:0,overwrite:"none"})));"y"!==r.axis&&(e.overflowed[1]?c[1].width()>c[1].parent().width()?y.call(this):(u(s,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(y.call(this),"x"===r.axis?g.call(this):"yx"===r.axis&&e.overflowed[0]&&u(s,l[0].toString(),{dir:"y",dur:0,overwrite:"none"})));f&&e&&(2===f&&r.callbacks.onImageLoad&&"function"==typeof r.callbacks.onImageLoad?r.callbacks.onImageLoad.call(this):3===f&&r.callbacks.onSelectorChange&&"function"==typeof r.callbacks.onSelectorChange?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&"function"==typeof r.callbacks.onUpdate&&r.callbacks.onUpdate.call(this));et.call(this)}})},scrollTo:function(i,r){if("undefined"!=typeof i&&null!=i){var f=v.call(this);return n(f).each(function(){var s=n(this);if(s.data(t)){var o=s.data(t),h=o.opt,c={trigger:"external",scrollInertia:h.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},f=n.extend(!0,{},c,r),e=ft.call(this,i),l=f.scrollInertia>0&&f.scrollInertia<17?17:f.scrollInertia;e[0]=at.call(this,e[0],"y");e[1]=at.call(this,e[1],"x");f.moveDragger&&(e[0]*=o.scrollRatio.y,e[1]*=o.scrollRatio.x);f.dur=wi()?0:l;setTimeout(function(){null!==e[0]&&"undefined"!=typeof e[0]&&"x"!==h.axis&&o.overflowed[0]&&(f.dir="y",f.overwrite="all",u(s,e[0].toString(),f));null!==e[1]&&"undefined"!=typeof e[1]&&"y"!==h.axis&&o.overflowed[1]&&(f.dir="x",f.overwrite="none",u(s,e[1].toString(),f))},f.timeout)}})}},stop:function(){var i=v.call(this);return n(i).each(function(){var i=n(this);i.data(t)&&o(i)})},disable:function(r){var u=v.call(this);return n(u).each(function(){var u=n(this);u.data(t)&&(u.data(t),et.call(this,"remove"),g.call(this),r&&y.call(this),ct.call(this,!0),u.addClass(i[3]))})},destroy:function(){var r=v.call(this);return n(r).each(function(){var f=n(this);if(f.data(t)){var u=f.data(t),e=u.opt,s=n("#mCSB_"+u.idx),o=n("#mCSB_"+u.idx+"_container"),h=n(".mCSB_"+u.idx+"_scrollbar");e.live&&k(e.liveSelector||n(r).selector);et.call(this,"remove");g.call(this);y.call(this);f.removeData(t);a(this,"mcs");h.remove();o.find("img."+i[2]).removeClass(i[2]);s.replaceWith(o.contents());f.removeClass(c+" _"+t+"_"+u.idx+" "+i[6]+" "+i[7]+" "+i[5]+" "+i[3]).addClass(i[4])}})}},v=function(){return"object"!=typeof n(this)||n(this).length<1?it:this},st=function(t){t.autoDraggerLength=n.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1?!1:t.autoDraggerLength;t.autoExpandScrollbar=n.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1?!1:t.autoExpandScrollbar;t.scrollButtons.enable=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!1:t.scrollButtons.enable;t.autoHideScrollbar=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!0:t.autoHideScrollbar;t.scrollbarPosition=n.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},k=function(n){b[n]&&(clearTimeout(b[n]),a(b,n))},wt=function(n){return"yx"===n||"xy"===n||"auto"===n?"yx":"x"===n||"horizontal"===n?"x":"y"},bt=function(n){return"stepped"===n||"pixels"===n||"step"===n||"click"===n?"stepped":"stepless"},kt=function(){var f=n(this),u=f.data(t),r=u.opt,h=r.autoExpandScrollbar?" "+i[1]+"_expand":"",e=["<div id='mCSB_"+u.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+h+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>","<div id='mCSB_"+u.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+h+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>"],v="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",l="yx"===r.axis?e[0]+e[1]:"x"===r.axis?e[1]:e[0],y="yx"===r.axis?"<div id='mCSB_"+u.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=r.autoHideScrollbar?" "+i[6]:"",w="x"!==r.axis&&"rtl"===u.langDir?" "+i[7]:"";r.setWidth&&f.css("width",r.setWidth);r.setHeight&&f.css("height",r.setHeight);r.setLeft="y"!==r.axis&&"rtl"===u.langDir?"989999px":r.setLeft;f.addClass(c+" _"+t+"_"+u.idx+p+w).wrapInner("<div id='mCSB_"+u.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+v+"'><div id='mCSB_"+u.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSB_"+u.idx),s=n("#mCSB_"+u.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||s.css("width",ht(s));"outside"===r.scrollbarPosition?("static"===f.css("position")&&f.css("position","relative"),f.css("overflow","visible"),a.addClass("mCSB_outside").after(l)):(a.addClass("mCSB_inside").append(l),s.wrap(y));gt.call(this);var o=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")];o[0].css("min-height",o[0].height());o[1].css("min-width",o[1].width())},ht=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return n(this).outerWidth(!0)}).get())],r=t.parent().width();return i[0]>r?i[0]:i[1]>r?i[1]:"100%"},dt=function(){var e=n(this),u=e.data(t),r=u.opt,i=n("#mCSB_"+u.idx+"_container");if(r.advanced.autoExpandHorizontalScroll&&"y"!==r.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var f=Math.ceil(i[0].scrollWidth);3===r.advanced.autoExpandHorizontalScroll||2!==r.advanced.autoExpandHorizontalScroll&&f>i.parent().width()?i.css({width:f,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},gt=function(){var s=n(this),o=s.data(t),u=o.opt,h=n(".mCSB_"+o.idx+"_scrollbar:first"),f=tt(u.scrollButtons.tabindex)?"tabindex='"+u.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+i[13]+"' "+f+" />","<a href='#' class='"+i[14]+"' "+f+" />","<a href='#' class='"+i[15]+"' "+f+" />","<a href='#' class='"+i[16]+"' "+f+" />"],e=["x"===u.axis?r[2]:r[0],"x"===u.axis?r[3]:r[1],r[2],r[3]];u.scrollButtons.enable&&h.prepend(e[0]).append(e[1]).next(".mCSB_scrollTools").prepend(e[2]).append(e[3])},ni=function(){var s=n(this),u=s.data(t),f=n("#mCSB_"+u.idx),e=n("#mCSB_"+u.idx+"_container"),r=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")],o=[f.height()/e.outerHeight(!1),f.width()/e.outerWidth(!1)],i=[parseInt(r[0].css("min-height")),Math.round(o[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(o[1]*r[1].parent().width())],h=p&&i[1]<i[0]?i[0]:i[1],c=p&&i[3]<i[2]?i[2]:i[3];r[0].css({height:h,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":i[0]+"px"});r[1].css({width:c,"max-width":r[1].parent().width()-10})},ti=function(){var s=n(this),i=s.data(t),u=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),r=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e=[f.outerHeight(!1)-u.height(),f.outerWidth(!1)-u.width()],o=[e[0]/(r[0].parent().height()-r[0].height()),e[1]/(r[1].parent().width()-r[1].width())];i.scrollRatio={y:o[0],x:o[1]}},d=function(n,t,r){var f=r?i[0]+"_expanded":"",u=n.closest(".mCSB_scrollTools");"active"===t?(n.toggleClass(i[0]+" "+f),u.toggleClass(i[1]),n[0]._draggable=n[0]._draggable?0:1):n[0]._draggable||("hide"===t?(n.removeClass(i[0]),u.removeClass(i[1])):(n.addClass(i[0]),u.addClass(i[1])))},ii=function(){var h=n(this),r=h.data(t),e=n("#mCSB_"+r.idx),i=n("#mCSB_"+r.idx+"_container"),u=null==r.overflowed?i.height():i.outerHeight(!1),f=null==r.overflowed?i.width():i.outerWidth(!1),o=i[0].scrollHeight,s=i[0].scrollWidth;return o>u&&(u=o),s>f&&(f=s),[u>e.height(),f>e.width()]},y=function(){var r=n(this),i=r.data(t),f=i.opt,c=n("#mCSB_"+i.idx),e=n("#mCSB_"+i.idx+"_container"),h=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")];if(o(r),("x"!==f.axis&&!i.overflowed[0]||"y"===f.axis&&i.overflowed[0])&&(h[0].add(e).css("top",0),u(r,"_resetY")),"y"!==f.axis&&!i.overflowed[1]||"x"===f.axis&&i.overflowed[1]){var s=dx=0;"rtl"===i.langDir&&(s=c.width()-e.outerWidth(!1),dx=Math.abs(s/i.scrollRatio.x));e.css("left",s);h[1].css("left",dx);u(r,"_resetX")}},ri=function(){function u(){e=setTimeout(function(){n.event.special.mousewheel?(clearTimeout(e),oi.call(f[0])):u()},100)}var f=n(this),r=f.data(t),i=r.opt;if(!r.bindEvents){if(ui.call(this),i.contentTouchScroll&&fi.call(this),ei.call(this),i.mouseWheel.enable){var e;u()}hi.call(this);li.call(this);i.advanced.autoScrollOnFocus&&ci.call(this);i.scrollButtons.enable&&ai.call(this);i.keyboard.enable&&vi.call(this);r.bindEvents=!0}},g=function(){var f=n(this),r=f.data(t),u=r.opt,o=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",e=n("#mCSB_"+r.idx+",#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,"+s+" ."+i[12]+",#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSB_"+r.idx+"_container");u.advanced.releaseDraggableSelectors&&e.add(n(u.advanced.releaseDraggableSelectors));u.advanced.extraDraggableSelectors&&e.add(n(u.advanced.extraDraggableSelectors));r.bindEvents&&(n(document).add(n(!l()||top.document)).unbind("."+o),e.each(function(){n(this).unbind("."+o)}),clearTimeout(f[0]._focusTimeout),a(f[0],"_focusTimeout"),clearTimeout(r.sequential.step),a(r.sequential,"step"),clearTimeout(h[0].onCompleteTimeout),a(h[0],"onCompleteTimeout"),r.bindEvents=!1)},ct=function(r){var h=n(this),u=h.data(t),o=u.opt,c=n("#mCSB_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSB_"+u.idx+"_container"),e=[n("#mCSB_"+u.idx+"_scrollbar_vertical"),n("#mCSB_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSB_dragger"),e[1].find(".mCSB_dragger")];"x"!==o.axis&&(u.overflowed[0]&&!r?(e[0].add(s[0]).add(e[0].children("a")).css("display","block"),f.removeClass(i[8]+" "+i[10])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[0].css("display","none"),f.removeClass(i[10])):(e[0].css("display","none"),f.addClass(i[10])),f.addClass(i[8])));"y"!==o.axis&&(u.overflowed[1]&&!r?(e[1].add(s[1]).add(e[1].children("a")).css("display","block"),f.removeClass(i[9]+" "+i[11])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[1].css("display","none"),f.removeClass(i[11])):(e[1].css("display","none"),f.addClass(i[11])),f.addClass(i[9])));u.overflowed[0]||u.overflowed[1]?h.removeClass(i[5]):h.addClass(i[5])},r=function(t){var e=t.type,i=t.target.ownerDocument!==document&&null!==frameElement?[n(frameElement).offset().top,n(frameElement).offset().left]:null,r=l()&&t.target.ownerDocument!==top.document&&null!==frameElement?[n(t.view.frameElement).offset().top,n(t.view.frameElement).offset().left]:[0,0];switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+r[0],t.originalEvent.pageX-i[1]+r[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var u=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],f=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[u.screenY,u.screenX,f>1]:[u.pageY,u.pageX,f>1];default:return i?[t.pageY-i[0]+r[0],t.pageX-i[1]+r[1],!1]:[t.pageY,t.pageX,!1]}},ui=function(){function k(n,t,r,f){if(w[0].idleTimer=h.scrollInertia<233?250:0,i.attr("id")===y[1])var e="x",o=(i[0].offsetLeft-t+f)*s.scrollRatio.x;else var e="y",o=(i[0].offsetTop-n+r)*s.scrollRatio.y;u(v,o.toString(),{dir:e,drag:!0})}var i,c,a,v=n(this),s=v.data(t),h=s.opt,f=t+"_"+s.idx,y=["mCSB_"+s.idx+"_dragger_vertical","mCSB_"+s.idx+"_dragger_horizontal"],w=n("#mCSB_"+s.idx+"_container"),b=n("#"+y[0]+",#"+y[1]),g=h.advanced.releaseDraggableSelectors?b.add(n(h.advanced.releaseDraggableSelectors)):b,nt=h.advanced.extraDraggableSelectors?n(!l()||top.document).add(n(h.advanced.extraDraggableSelectors)):n(!l()||top.document);b.bind("contextmenu."+f,function(n){n.preventDefault()}).bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),yt(t)){e=!0;p&&(document.onselectstart=function(){return!1});lt.call(w,!1);o(v);i=n(this);var u=i.offset(),f=r(t)[0]-u.top,s=r(t)[1]-u.left,l=i.height()+u.top,y=i.width()+u.left;l>f&&f>0&&y>s&&s>0&&(c=f,a=s);d(i,"active",h.autoExpandScrollbar)}}).bind("touchmove."+f,function(n){n.stopImmediatePropagation();n.preventDefault();var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;k(c,a,u,f)});n(document).add(nt).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(n){if(i){var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;if(c===u&&a===f)return;k(c,a,u,f)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){i&&(d(i,"active",h.autoExpandScrollbar),i=null);e=!1;p&&(document.onselectstart=null);lt.call(w,!0)})},fi=function(){function at(n){if(!nt(n)||e||r(n)[2])return void(h=0);h=1;it=0;rt=0;st=1;g.removeClass("mCS_touch_action");var t=b.offset();k=r(n)[0]-t.top;d=r(n)[1]-t.left;v=[r(n)[0],r(n)[1]]}function vt(n){if(nt(n)&&!e&&!r(n)[2]&&(f.documentTouchScroll||n.preventDefault(),n.stopImmediatePropagation(),(!rt||it)&&st)){gt=w();var o=ut.offset(),t=r(n)[0]-o.top,u=r(n)[1]-o.left,h="mcsLinearOut";if(et.push(t),ot.push(u),v[2]=Math.abs(r(n)[0]-v[0]),v[3]=Math.abs(r(n)[1]-v[1]),i.overflowed[0])var c=ft[0].parent().height()-ft[0].height(),l=k-t>0&&t-k>-(c*i.scrollRatio.y)&&(2*v[3]<v[2]||"yx"===f.axis);if(i.overflowed[1])var a=ft[1].parent().width()-ft[1].width(),y=d-u>0&&u-d>-(a*i.scrollRatio.x)&&(2*v[2]<v[3]||"yx"===f.axis);l||y?(ii||n.preventDefault(),it=1):(rt=1,g.addClass("mCS_touch_action"));ii&&n.preventDefault();s="yx"===f.axis?[k-t,d-u]:"x"===f.axis?[null,d-u]:[k-t,null];b[0].idleTimer=250;i.overflowed[0]&&tt(s[0],ni,h,"y","all",!0);i.overflowed[1]&&tt(s[1],ni,h,"x",lt,!0)}}function yt(n){if(!nt(n)||e||r(n)[2])return void(h=0);h=1;n.stopImmediatePropagation();o(g);dt=w();var t=ut.offset();bt=r(n)[0]-t.top;kt=r(n)[1]-t.left;et=[];ot=[]}function pt(n){if(nt(n)&&!e&&!r(n)[2]){st=0;n.stopImmediatePropagation();it=0;rt=0;ht=w();var h=ut.offset(),l=r(n)[0]-h.top,a=r(n)[1]-h.left;if(!(ht-gt>30)){c=1e3/(ht-dt);var v="mcsEaseOut",o=2.5>c,p=o?[et[et.length-2],ot[ot.length-2]]:[0,0];y=o?[l-p[0],a-p[1]]:[l-bt,a-kt];var t=[Math.abs(y[0]),Math.abs(y[1])];c=o?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[c,c];var u=[Math.abs(b[0].offsetTop)-y[0]*wt(t[0]/c[0],c[0]),Math.abs(b[0].offsetLeft)-y[1]*wt(t[1]/c[1],c[1])];s="yx"===f.axis?[u[0],u[1]]:"x"===f.axis?[null,u[1]]:[u[0],null];ct=[4*t[0]+f.scrollInertia,4*t[1]+f.scrollInertia];var k=parseInt(f.contentTouchScroll)||0;s[0]=t[0]>k?s[0]:0;s[1]=t[1]>k?s[1]:0;i.overflowed[0]&&tt(s[0],ct[0],v,"y",lt,!1);i.overflowed[1]&&tt(s[1],ct[1],v,"x",lt,!1)}}}function wt(n,t){var i=[1.5*t,2*t,t/1.5,t/2];return n>90?t>4?i[0]:i[3]:n>60?t>3?i[3]:i[2]:n>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function tt(n,t,i,r,f,e){n&&u(g,n.toString(),{dur:t,scrollEasing:i,dir:r,overwrite:f,drag:e})}var st,k,d,bt,kt,dt,gt,ht,y,c,s,ct,it,rt,g=n(this),i=g.data(t),f=i.opt,a=t+"_"+i.idx,ut=n("#mCSB_"+i.idx),b=n("#mCSB_"+i.idx+"_container"),ft=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],et=[],ot=[],ni=0,lt="yx"===f.axis?"none":"all",v=[],ti=b.find("iframe"),p=["touchstart."+a+" pointerdown."+a+" MSPointerDown."+a,"touchmove."+a+" pointermove."+a+" MSPointerMove."+a,"touchend."+a+" pointerup."+a+" MSPointerUp."+a],ii=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;b.bind(p[0],function(n){at(n)}).bind(p[1],function(n){vt(n)});ut.bind(p[0],function(n){yt(n)}).bind(p[2],function(n){pt(n)});ti.length&&ti.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){at(n);yt(n)}).bind(p[1],function(n){vt(n)}).bind(p[2],function(n){pt(n)})})})},ei=function(){function y(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function i(n,t,i){l.type=i&&u?"stepped":"stepless";l.scrollAmount=10;ut(a,n,t,"mcsLinearOut",i?60:null)}var u,a=n(this),f=a.data(t),v=f.opt,l=f.sequential,s=t+"_"+f.idx,o=n("#mCSB_"+f.idx+"_container"),c=o.parent();o.bind("mousedown."+s,function(){h||u||(u=1,e=!0)}).add(document).bind("mousemove."+s,function(n){if(!h&&u&&y()){var s=o.offset(),t=r(n)[0]-s.top+o[0].offsetTop,e=r(n)[1]-s.left+o[0].offsetLeft;t>0&&t<c.height()&&e>0&&e<c.width()?l.step&&i("off",null,"stepped"):("x"!==v.axis&&f.overflowed[0]&&(0>t?i("on",38):t>c.height()&&i("on",40)),"y"!==v.axis&&f.overflowed[1]&&(0>e?i("on",37):e>c.width()&&i("on",39)))}}).bind("mouseup."+s+" dragend."+s,function(){h||(u&&(u=0,i("off",null)),e=!1)})},oi=function(){function h(t,h){if(o(s),!si(s,t.target)){var v="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):p&&t.deltaFactor<100?100:t.deltaFactor||100,y=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var a="x",l=[Math.round(v*r.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],w="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.width()?.9*e.width():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetLeft),b=f[1][0].offsetLeft,d=f[1].parent().width()-f[1].width(),c="y"===i.mouseWheel.axis?t.deltaY||h:t.deltaX;else var a="y",l=[Math.round(v*r.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],w="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.height()?.9*e.height():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetTop),b=f[0][0].offsetTop,d=f[0].parent().height()-f[0].height(),c=t.deltaY||h;("y"!==a||r.overflowed[0])&&("x"!==a||r.overflowed[1])&&((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(c=-c),i.mouseWheel.normalizeDelta&&(c=0>c?-1:1),(c>0&&0!==b||0>c&&b!==d||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(w=t.deltaFactor,y=17),u(s,(k-c*w).toString(),{dir:a,dur:y}))}}if(n(this).data(t)){var s=n(this),r=s.data(t),i=r.opt,c=t+"_"+r.idx,e=n("#mCSB_"+r.idx),f=[n("#mCSB_"+r.idx+"_dragger_vertical"),n("#mCSB_"+r.idx+"_dragger_horizontal")],a=n("#mCSB_"+r.idx+"_container").find("iframe");a.length&&a.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind("mousewheel."+c,function(n,t){h(n,t)})})});e.bind("mousewheel."+c,function(n,t){h(n,t)})}},rt={},l=function(t){var r=!1,i=!1,u=null;if(void 0===t?i="#empty":void 0!==n(t).attr("id")&&(i=n(t).attr("id")),i!==!1&&void 0!==rt[i])return rt[i];if(t){try{var f=t.contentDocument||t.contentWindow.document;u=f.body.innerHTML}catch(e){}r=null!==u}else{try{var f=top.document;u=f.body.innerHTML}catch(e){}r=null!==u}return i!==!1&&(rt[i]=r),r},lt=function(n){var t=this.find("iframe");if(t.length){var i=n?"auto":"none";t.css("pointer-events",i)}},si=function(i,r){var u=r.nodeName.toLowerCase(),f=i.data(t).opt.mouseWheel.disableOver;return n.inArray(u,f)>-1&&!(n.inArray(u,["select","textarea"])>-1&&!n(r).is(":focus"))},hi=function(){var s,h=n(this),f=h.data(t),r=t+"_"+f.idx,c=n("#mCSB_"+f.idx+"_container"),l=c.parent(),a=n(".mCSB_"+f.idx+"_scrollbar ."+i[12]);a.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){e=!0;n(t.target).hasClass("mCSB_dragger")||(s=1)}).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(){e=!1}).bind("click."+r,function(t){if(s&&(s=0,n(t.target).hasClass(i[12])||n(t.target).hasClass("mCSB_draggerRail"))){o(h);var r=n(this),e=r.find(".mCSB_dragger");if(r.parent(".mCSB_scrollTools_horizontal").length>0){if(!f.overflowed[1])return;var v="x",a=t.pageX>e.offset().left?-1:1,y=Math.abs(c[0].offsetLeft)-a*.9*l.width()}else{if(!f.overflowed[0])return;var v="y",a=t.pageY>e.offset().top?-1:1,y=Math.abs(c[0].offsetTop)-a*.9*l.height()}u(h,y.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},ci=function(){var i=n(this),s=i.data(t),e=s.opt,c=t+"_"+s.idx,r=n("#mCSB_"+s.idx+"_container"),h=r.parent();r.bind("focusin."+c,function(){var t=n(document.activeElement),c=r.find(".mCustomScrollBox").length,s=0;t.is(e.advanced.autoScrollOnFocus)&&(o(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=c?(s+17)*c:0,i[0]._focusTimeout=setTimeout(function(){var n=[f(t)[0],f(t)[1]],o=[r[0].offsetTop,r[0].offsetLeft],c=[o[0]+n[0]>=0&&o[0]+n[0]<h.height()-t.outerHeight(!1),o[1]+n[1]>=0&&o[0]+n[1]<h.width()-t.outerWidth(!1)],l="yx"!==e.axis||c[0]||c[1]?"all":"none";"x"===e.axis||c[0]||u(i,n[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s});"y"===e.axis||c[1]||u(i,n[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s})},i[0]._focusTimer))})},li=function(){var u=n(this),i=u.data(t),f=t+"_"+i.idx,r=n("#mCSB_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSB_"+i.idx+"_scrollbar").css("visibility","hidden")})},ai=function(){var f=n(this),r=f.data(t),o=r.opt,u=r.sequential,i=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",h=n(s+">a");h.bind("contextmenu."+i,function(n){n.preventDefault()}).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(t){function i(n,t){u.scrollAmount=o.scrollButtons.scrollAmount;ut(f,n,t)}if(t.preventDefault(),yt(t)){var s=n(this).attr("class");switch(u.type=o.scrollButtons.scrollType,t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===u.type)return;e=!0;r.tweenRunning=!1;i("on",s);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===u.type)return;e=!1;u.dir&&i("off",s);break;case"click":if("stepped"!==u.type||r.tweenRunning)return;i("on",s)}}})},vi=function(){function a(t){function l(n,t){s.type=r.keyboard.scrollType;s.scrollAmount=r.keyboard.scrollAmount;"stepped"===s.type&&i.tweenRunning||ut(e,n,t)}switch(t.type){case"blur":i.tweenRunning&&s.dir&&l("off",null);break;case"keydown":case"keyup":var c=t.keyCode?t.keyCode:t.which,a="on";if("x"!==r.axis&&(38===c||40===c)||"y"!==r.axis&&(37===c||39===c)){if((38===c||40===c)&&!i.overflowed[0]||(37===c||39===c)&&!i.overflowed[1])return;"keyup"===t.type&&(a="off");n(document.activeElement).is(v)||(t.preventDefault(),t.stopImmediatePropagation(),l(a,c))}else if(33===c||34===c){if((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){o(e);var y=34===c?-1:1;if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",w=Math.abs(f[0].offsetLeft)-y*.9*h.width();else var p="y",w=Math.abs(f[0].offsetTop)-y*.9*h.height();u(e,w.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}else if((35===c||36===c)&&!n(document.activeElement).is(v)&&((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",w=35===c?Math.abs(h.width()-f.outerWidth(!1)):0;else var p="y",w=35===c?Math.abs(h.height()-f.outerHeight(!1)):0;u(e,w.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}}var e=n(this),i=e.data(t),r=i.opt,s=i.sequential,c=t+"_"+i.idx,w=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),h=f.parent(),v="input,textarea,select,datalist,keygen,[contenteditable='true']",y=f.find("iframe"),p=["blur."+c+" keydown."+c+" keyup."+c];y.length&&y.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){a(n)})})});w.attr("tabindex","0").bind(p[0],function(n){a(n)})},ut=function(r,f,e,s,h){function y(n){l.snapAmount&&(c.scrollAmount=l.snapAmount instanceof Array?"x"===c.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var i="stepped"!==c.type,f=h?h:n?i?k/1.5:d:1e3/60,e=n?i?7.5:40:2.5,t=[Math.abs(p[0].offsetTop),Math.abs(p[0].offsetLeft)],o=[v.scrollRatio.y>10?10:v.scrollRatio.y,v.scrollRatio.x>10?10:v.scrollRatio.x],w="x"===c.dir[0]?t[1]+c.dir[1]*o[1]*e:t[0]+c.dir[1]*o[0]*e,b="x"===c.dir[0]?t[1]+c.dir[1]*parseInt(c.scrollAmount):t[0]+c.dir[1]*parseInt(c.scrollAmount),a="auto"!==c.scrollAmount?b:w,g=s?s:n?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",nt=!!n;return n&&17>f&&(a="x"===c.dir[0]?t[1]:t[0]),u(r,a.toString(),{dir:c.dir[0],scrollEasing:g,dur:f,onComplete:nt}),n?void(c.dir=!1):(clearTimeout(c.step),void(c.step=setTimeout(function(){y()},f)))}function b(){clearTimeout(c.step);a(c,"step");o(r)}var v=r.data(t),l=v.opt,c=v.sequential,p=n("#mCSB_"+v.idx+"_container"),w="stepped"===c.type,k=l.scrollInertia<26?26:l.scrollInertia,d=l.scrollInertia<1?17:l.scrollInertia;switch(f){case"on":if(c.dir=[e===i[16]||e===i[15]||39===e||37===e?"x":"y",e===i[13]||e===i[15]||38===e||37===e?-1:1],o(r),tt(e)&&"stepped"===c.type)return;y(w);break;case"off":b();(w||v.tweenRunning&&c.dir)&&y(!0)}},ft=function(i){var u=n(this).data(t).opt,r=[];return"function"==typeof i&&(i=i()),i instanceof Array?r=i.length>1?[i[0],i[1]]:"x"===u.axis?[null,i[0]]:[i[0],null]:(r[0]=i.y?i.y:i.x||"x"===u.axis?null:i,r[1]=i.x?i.x:i.y||"y"===u.axis?null:i),"function"==typeof r[0]&&(r[0]=r[0]()),"function"==typeof r[1]&&(r[1]=r[1]()),r},at=function(i,r){if(null!=i&&"undefined"!=typeof i){var h=n(this),c=h.data(t),v=c.opt,u=n("#mCSB_"+c.idx+"_container"),o=u.parent(),y=typeof i;r||(r="x"===v.axis?"x":"y");var p="x"===r?u.outerWidth(!1)-o.width():u.outerHeight(!1)-o.height(),l="x"===r?u[0].offsetLeft:u[0].offsetTop,w="x"===r?"left":"top";switch(y){case"function":return i();case"object":var e=i.jquery?i:n(i);return e.length?"x"===r?f(e)[1]:f(e)[0]:void 0;case"string":case"number":if(tt(i))return Math.abs(i);if(-1!==i.indexOf("%"))return Math.abs(p*parseInt(i)/100);if(-1!==i.indexOf("-="))return Math.abs(l-parseInt(i.split("-=")[1]));if(-1!==i.indexOf("+=")){var a=l+parseInt(i.split("+=")[1]);return a>=0?0:Math.abs(a)}if(-1!==i.indexOf("px")&&tt(i.split("px")[0]))return Math.abs(i.split("px")[0]);if("top"===i||"left"===i)return 0;if("bottom"===i)return Math.abs(o.height()-u.outerHeight(!1));if("right"===i)return Math.abs(o.width()-u.outerWidth(!1));if("first"===i||"last"===i){var e=u.find(":"+i);return"x"===r?f(e)[1]:f(e)[0]}return n(i).length?"x"===r?f(n(i))[1]:f(n(i))[0]:(u.css(w,i),void s.update.call(null,h[0]))}}},et=function(r){function c(){return clearTimeout(e[0].autoUpdate),0===o.parents("html").length?void(o=null):void(e[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(u.poll.change.n=v(),u.poll.change.n!==u.poll.change.o)?(u.poll.change.o=u.poll.change.n,void h(3)):f.advanced.updateOnContentResize&&(u.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+e[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,u.poll.size.n!==u.poll.size.o)?(u.poll.size.o=u.poll.size.n,void h(1)):!f.advanced.updateOnImageLoad||"auto"===f.advanced.updateOnImageLoad&&"y"===f.axis||(u.poll.img.n=e.find("img").length,u.poll.img.n===u.poll.img.o)?void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&c()):(u.poll.img.o=u.poll.img.n,void e.find("img").each(function(){l(this)}))},f.advanced.autoUpdateTimeout))}function l(t){function u(n,t){return function(){return t.apply(n,arguments)}}function f(){this.onload=null;n(t).addClass(i[2]);h(2)}if(n(t).hasClass(i[2]))return void h();var r=new Image;r.onload=u(r,f);r.src=t.src}function v(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var n=0,t=e.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){n+=this.offsetHeight+this.offsetWidth}),n}function h(n){clearTimeout(e[0].autoUpdate);s.update.call(null,o[0],n)}var o=n(this),u=o.data(t),f=u.opt,e=n("#mCSB_"+u.idx+"_container");return r?(clearTimeout(e[0].autoUpdate),void a(e[0],"autoUpdate")):void c()},yi=function(n,t,i){return Math.round(n/t)*t-i},o=function(i){var r=i.data(t),u=n("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");u.each(function(){pi.call(this)})},u=function(i,r,u){function h(n){return f&&e.callbacks[n]&&"function"==typeof e.callbacks[n]}function it(){return[e.callbacks.alwaysTriggerOffsets||w>=l[0]+v,e.callbacks.alwaysTriggerOffsets||-y>=w]}function a(){var n=[o[0].offsetTop,o[0].offsetLeft],t=[c[0].offsetTop,c[0].offsetLeft],r=[o.outerHeight(!1),o.outerWidth(!1)],f=[p.height(),p.width()];i[0].mcs={content:o,top:n[0],left:n[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(n[0])/(Math.abs(r[0])-f[0])),leftPct:Math.round(100*Math.abs(n[1])/(Math.abs(r[1])-f[1])),direction:u.dir}}var f=i.data(t),e=f.opt,rt={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:e.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},u=n.extend(rt,u),k=[u.dur,u.drag?0:u.dur],p=n("#mCSB_"+f.idx),o=n("#mCSB_"+f.idx+"_container"),b=o.parent(),g=e.callbacks.onTotalScrollOffset?ft.call(i,e.callbacks.onTotalScrollOffset):[0,0],nt=e.callbacks.onTotalScrollBackOffset?ft.call(i,e.callbacks.onTotalScrollBackOffset):[0,0];if(f.trigger=u.trigger,0===b.scrollTop()&&0===b.scrollLeft()||(n(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),b.scrollTop(0).scrollLeft(0)),"_resetY"!==r||f.contentReset.y||(h("onOverflowYNone")&&e.callbacks.onOverflowYNone.call(i[0]),f.contentReset.y=1),"_resetX"!==r||f.contentReset.x||(h("onOverflowXNone")&&e.callbacks.onOverflowXNone.call(i[0]),f.contentReset.x=1),"_resetY"!==r&&"_resetX"!==r){if(!f.contentReset.y&&i[0].mcs||!f.overflowed[0]||(h("onOverflowY")&&e.callbacks.onOverflowY.call(i[0]),f.contentReset.x=null),!f.contentReset.x&&i[0].mcs||!f.overflowed[1]||(h("onOverflowX")&&e.callbacks.onOverflowX.call(i[0]),f.contentReset.x=null),e.snapAmount){var ut=e.snapAmount instanceof Array?"x"===u.dir?e.snapAmount[1]:e.snapAmount[0]:e.snapAmount;r=yi(r,ut,e.snapOffset)}switch(u.dir){case"x":var c=n("#mCSB_"+f.idx+"_dragger_horizontal"),tt="left",w=o[0].offsetLeft,l=[p.width()-o.outerWidth(!1),c.parent().width()-c.width()],s=[r,0===r?0:r/f.scrollRatio.x],v=g[1],y=nt[1],et=v>0?v/f.scrollRatio.x:0,ot=y>0?y/f.scrollRatio.x:0;break;case"y":var c=n("#mCSB_"+f.idx+"_dragger_vertical"),tt="top",w=o[0].offsetTop,l=[p.height()-o.outerHeight(!1),c.parent().height()-c.height()],s=[r,0===r?0:r/f.scrollRatio.y],v=g[0],y=nt[0],et=v>0?v/f.scrollRatio.y:0,ot=y>0?y/f.scrollRatio.y:0}s[1]<0||0===s[0]&&0===s[1]?s=[0,0]:s[1]>=l[1]?s=[l[0],l[1]]:s[0]=-s[0];i[0].mcs||(a(),h("onInit")&&e.callbacks.onInit.call(i[0]));clearTimeout(o[0].onCompleteTimeout);vt(c[0],tt,Math.round(s[1]),k[1],u.scrollEasing);!f.tweenRunning&&(0===w&&s[0]>=0||w===l[0]&&s[0]<=l[0])||vt(o[0],tt,Math.round(s[0]),k[0],u.scrollEasing,u.overwrite,{onStart:function(){u.callbacks&&u.onStart&&!f.tweenRunning&&(h("onScrollStart")&&(a(),e.callbacks.onScrollStart.call(i[0])),f.tweenRunning=!0,d(c),f.cbOffsets=it())},onUpdate:function(){u.callbacks&&u.onUpdate&&h("whileScrolling")&&(a(),e.callbacks.whileScrolling.call(i[0]))},onComplete:function(){if(u.callbacks&&u.onComplete){"yx"===e.axis&&clearTimeout(o[0].onCompleteTimeout);var n=o[0].idleTimer||0;o[0].onCompleteTimeout=setTimeout(function(){h("onScroll")&&(a(),e.callbacks.onScroll.call(i[0]));h("onTotalScroll")&&s[1]>=l[1]-et&&f.cbOffsets[0]&&(a(),e.callbacks.onTotalScroll.call(i[0]));h("onTotalScrollBack")&&s[1]<=ot&&f.cbOffsets[1]&&(a(),e.callbacks.onTotalScrollBack.call(i[0]));f.tweenRunning=!1;o[0].idleTimer=0;d(c,"hide")},n)}}})}},vt=function(n,t,i,r,u,f,e){function a(){o.stop||(s||d.call(),s=w()-tt,v(),s>=o.time&&(o.time=s>o.time?s+h-(s-o.time):s+h-1,o.time<s+1&&(o.time=s+1)),o.time<r?o.id=c(a):nt.call())}function v(){r>0?(o.currVal=k(o.time,l,it,r,u),y[t]=Math.round(o.currVal)+"px"):y[t]=i+"px";g.call()}function p(){h=1e3/60;o.time=s+h;c=window.requestAnimationFrame?window.requestAnimationFrame:function(n){return v(),setTimeout(n,.01)};o.id=c(a)}function b(){null!=o.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(o.id):clearTimeout(o.id),o.id=null)}function k(n,t,i,r,u){switch(u){case"linear":case"mcsLinear":return i*n/r+t;case"mcsLinearOut":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeInOutSmooth":return n/=r/2,1>n?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeInOutStrong":return n/=r/2,1>n?i/2*Math.pow(2,10*(n-1))+t:(n--,i/2*(-Math.pow(2,-10*n)+2)+t);case"easeInOut":case"mcsEaseInOut":return n/=r/2,1>n?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t);case"easeOutSmooth":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutStrong":return i*(-Math.pow(2,-10*n/r)+1)+t;case"easeOut":case"mcsEaseOut":default:var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n)}}n._mTween||(n._mTween={top:{},left:{}});var h,c,e=e||{},d=e.onStart||function(){},g=e.onUpdate||function(){},nt=e.onComplete||function(){},tt=w(),s=0,l=n.offsetTop,y=n.style,o=n._mTween[t];"left"===t&&(l=n.offsetLeft);var it=i-l;o.stop=0;"none"!==f&&b();p()},w=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},pi=function(){var n=this;n._mTween||(n._mTween={top:{},left:{}});for(var r=["top","left"],i=0;i<r.length;i++){var t=r[i];n._mTween[t].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._mTween[t].id):clearTimeout(n._mTween[t].id),n._mTween[t].id=null,n._mTween[t].stop=1)}},a=function(n,t){try{delete n[t]}catch(i){n[t]=null}},yt=function(n){return!(n.which&&1!==n.which)},nt=function(n){var t=n.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},tt=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},f=function(n){var t=n.parents(".mCSB_container");return[n.offset().top-t.offset().top,n.offset().left-t.offset().left]},wi=function(){function t(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var n=0;n<t.length;n++)if(t[n]+"Hidden"in document)return t[n]+"Hidden";return null}var n=t();return n?document[n]:!1};n.fn[c]=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):s.init.apply(this,arguments)};n[c]=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):s.init.apply(this,arguments)};n[c].defaults=ot;window[c]=!0;n(window).bind("load",function(){n(it)[c]();n.extend(n.expr[":"],{mcsInView:n.expr[":"].mcsInView||function(t){var e,r,i=n(t),u=i.parents(".mCSB_container");if(u.length)return e=u.parent(),r=[u[0].offsetTop,u[0].offsetLeft],r[0]+f(i)[0]>=0&&r[0]+f(i)[0]<e.height()-i.outerHeight(!1)&&r[1]+f(i)[1]>=0&&r[1]+f(i)[1]<e.width()-i.outerWidth(!1)},mcsInSight:n.expr[":"].mcsInSight||function(t,i,r){var e,u,o,s,h=n(t),c=h.parents(".mCSB_container"),l="exact"===r[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return e=[h.outerHeight(!1),h.outerWidth(!1)],o=[c[0].offsetTop+f(h)[0],c[0].offsetLeft+f(h)[1]],u=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],s=[e[0]<u[0]?l[0]:l[1],e[1]<u[1]?l[0]:l[1]],o[0]-u[0]*s[0][0]<0&&o[0]+e[0]-u[0]*s[0][1]>=0&&o[1]-u[1]*s[1][0]<0&&o[1]+e[1]-u[1]*s[1][1]>=0},mcsOverflow:n.expr[":"].mcsOverflow||function(i){var r=n(i).data(t);if(r)return r.overflowed[0]||r.overflowed[1]}})})})}):console.log("ASP: scrollbar detected, skipping loading");
 
 
 
 
 
 
 
 
 
 
 
 
2
  /*! Ajax Search Lite 4.6 js */
3
- (function(n){var i={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore a",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.firstClick=!0;r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),n("fieldset",r.n.searchsettings).each(function(){n(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),r.createVerticalScroll(),u()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),this},duplicateCheck:function(){var i=this,t={};n("div[id*=ajaxsearchlite]").each(function(){t.hasOwnProperty(this.id)?n(this).remove():t[this.id]="true"})},analytics:function(n){var t=this;t.o.analytics&&t.o.analyticsString!=""&&typeof ga=="function"&&ga("send","pageview",{page:"/"+t.o.analyticsString.replace("{asl_term}",n),title:"Ajax Search"})},createVerticalScroll:function(){var i=this;i.scroll=i.n.results.mCustomScrollbar({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSB_container",i.n.results).position().top),h=n(".mCSB_container .resdrg").children(),f=0,o=3e3,u=4e3,c=1e4,e=1e4,r=null;h.each(function(){u=Math.abs(Math.abs(s)-f);u<o&&(c=u,e=f,r=n(this));f+=n(this).outerHeight(!0);o=u});r.hasClass("group")&&(e=e+(r.outerHeight(!0)-r.outerHeight(!1)));i.scroll.mCustomScrollbar("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}})},createHorizontalScroll:function(){var n=this;n.scroll=n.n.results.mCustomScrollbar({horizontalScroll:!0,contentTouchScroll:!0,scrollButtons:{enable:!0,scrollType:"pixels",scrollSpeed:"auto",scrollAmount:100}})},initEvents:function(){var i=this;n(i.n.text.parent()).submit(function(n){n.preventDefault();i.n.text.keyup()});i.n.text.click(function(){i.firstClick&&(n(this).val(""),i.firstClick=!1)});i.n.resultsDiv.css({opacity:0});n(document).bind("click touchend",function(){(i.hideSettings(),i.opened!=!1&&i.o.closeOnDocClick==1)&&i.hideResults()});i.n.proclose.bind("click touchend",function(){i.opened!=!1&&(i.n.text.val(""),i.n.textAutocomplete.val(""),i.hideResults(),i.n.text.focus())});n(i.elem).bind("click touchend",function(n){n.stopImmediatePropagation()});i.n.resultsDiv.bind("click touchend",function(n){n.stopImmediatePropagation()});i.n.searchsettings.bind("click touchend",function(n){n.stopImmediatePropagation()});var r=!1;i.n.text.focus(function(){r=!0});var u="touchend";i.n.results.hasClass("mCustomScrollbar")&&(u="mousedown");i.n.resultsDiv.bind(u,function(n){if(t()&&r){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i.n.results.hasClass("mCustomScrollbar"))i.n.resultsDiv.one("click","a.asl_res_url",function(n){return n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1});return document.activeElement.blur(),r=!1,!1}});i.n.prosettings.on("click",function(){i.n.prosettings.data("opened")==0?i.showSettings():i.hideSettings()});var f;n(window).on("resize",function(){clearTimeout(f);f=setTimeout(function(){i.resize()},250)});var e;n(window).on("scroll",function(){clearTimeout(e);e=setTimeout(function(){i.scrolling(!1)},250)});i.initNavigationEvent();n(window).trigger("resize");n(window).trigger("scroll");i.initMagnifierEvent();i.initAutocompleteEvent();i.initFacetEvents()},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).keydown(function(i){if(window.event)var r=window.event.keyCode,u=window.event.type;else if(i)var r=i.which,u=i.type;n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"&&(r==40&&(i.stopPropagation(),i.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next().next(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),r==38&&(i.stopPropagation(),i.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev().prev(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),r==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(i.stopPropagation(),i.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click()))})},initMagnifierEvent:function(){var t=this,i;t.n.promagnifier.add(t.n.text).bind("click keyup",function(u){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):u&&(t.keycode=u.which,t.ktype=u.type);var f=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}if(!f&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="results_page"||f&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo=="results_page"){var e="?s="+t.n.text.val();t.o.overridewpdefault?r(t.o.homeurl+e+"&asl_active=1","post",{p_asl_data:n("form",t.n.searchsettings).serialize()}):r(t.o.homeurl+e,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()});t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}t.keycode>=37&&t.keycode<=40||n(this).hasClass("orig")&&t.ktype=="click"||(t.o.triggeronclick!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="keyup")&&(t.post!=null&&t.post.abort(),clearTimeout(i),i=setTimeout(function(){t.search()},300))})},initFacetEvents:function(){var t=this;t.o.trigger_on_facet_change==1&&n("input",t.n.searchsettings).change(function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.search())})},destroy:function(){return this.each(function(){var t=n.extend({},this,i);n(window).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var i=this;i.o.autocomplete.enabled!=1||t()||i.n.text.keyup(function(t){window.event?(i.keycode=window.event.keyCode,i.ktype=window.event.type):t&&(i.keycode=t.which,i.ktype=t.type);var r=39;n("body").hasClass("rtl")&&(r=37);i.keycode==r&&i.n.textAutocomplete.val()!=""?(t.preventDefault(),i.n.text.val(i.n.textAutocomplete.val()),i.post!=null&&i.post.abort(),i.search()):(i.postAuto!=null&&i.postAuto.abort(),i.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};t.analytics(t.n.text.val());t.post=n.post(ASL.ajaxurl,i,function(i){if(i=i.replace(/^\s*[\r\n]/gm,""),i=i.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1],t.n.resdrg.html(""),t.n.resdrg.html(i),n(".asl_keyword",t.n.resdrg).bind("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).keydown();n("form",t.n.container).trigger("submit","ajax");t.search()}),t.n.items=n(".item",t.n.resultsDiv),n(".asl_res_url",t.n.resultsDiv).length>0&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="results_page"||t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="results_page")return location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"),!1;t.showResults();t.scrollToResults();t.n.items.length==0?t.n.showmore!=null&&t.n.showmore.css("display","none"):t.n.showmore!=null&&(t.n.showmore.css("display","block"),t.n.showmore.attr("href",t.o.homeurl+"?s="+t.n.text.val()))},"text")}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.scrolling(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});t()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var u=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,e=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.scroll.mCustomScrollbar("update");t.resize();var i=0,r=0;t.n.items.each(function(){r+=n(this).outerHeight(!0);i++});i=i<1?1:i;r=r/i*u;t.n.results.css({height:r})}if(window.sscroll=t.scroll,t.scroll.mCustomScrollbar("disable",!0),t.scroll.mCustomScrollbar("update"),t.resize(),t.scroll.mCustomScrollbar("scrollTo",0),t.o.highlight==1){var f=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:f})}}if(t.resize(),t.n.items.length==0){var r=n(".nores",t.n.results).outerHeight(!0)>t.o.resultitemheight?t.o.resultitemheight:n(".nores",t.n.results).outerHeight(!0);t.n.results.css({height:11110});t.scroll.mCustomScrollbar("update");t.n.results.css({height:"auto"})}t.addAnimation();t.scrolling(!0);t.searching=!1},hideVerticalResults:function(){var t=this;t.disableMobileScroll=!1;t.n.resultsDiv.animate({opacity:0,height:0},{duration:120,complete:function(){n(this).css({visibility:"hidden",display:"none"})}})},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.scrolling(!0);t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustomScrollbar({contentTouchScroll:!0}));t.n.prosettings.data("opened",1)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},resize:function(){var t=this,i=0;if(n("body").css("position")!="static"&&(i=n("body").offset().top),u()&&0&&(t.n.proinput.css({width:t.n.probox.width()-8-(t.n.proinput.outerWidth(!1)-t.n.proinput.width())-t.n.proloading.outerWidth(!0)-t.n.prosettings.outerWidth(!0)-t.n.promagnifier.outerWidth(!0)-10}),t.n.text.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),position:"absolute",zIndex:2}),t.n.textAutocomplete.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),opacity:.25,zIndex:1})),t.n.prosettings.attr("opened")!=0&&(t.o.settingsimagepos=="left"?t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left}):t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left+t.n.prosettings.width()-t.n.searchsettings.width()})),t.n.resultsDiv.css("visibility")!="hidden"&&t.o.resultsposition!="block"){var r=t.n.container.width()-(t.n.resultsDiv.outerWidth(!0)-t.n.resultsDiv.width()),f=r<240?240:r;t.n.resultsDiv.css({width:f,top:t.n.container.offset().top+t.n.container.outerHeight(!0)+10-i,left:t.n.container.offset().left+(r-f)})}},scrolling:function(t){var i=this,r=0;if(n("body").css("position")!="static"&&(r=n("body").offset().top),(t==!0||i.n.searchsettings.css("visibility")=="visible")&&(i.o.settingsimagepos=="left"?i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left}):i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left+i.n.prosettings.width()-i.n.searchsettings.width()})),t==!0||i.n.resultsDiv.css("visibility")=="visible"){var u=i.n.container.width()-(i.n.resultsDiv.outerWidth(!0)-i.n.resultsDiv.width()),f=u<240?240:u;(i.o.resultsposition!="hover"&&i.n.resultsAppend.length>0||i.n.container.hasClass("hiddend"))&&(f="auto");i.n.resultsDiv.css({width:f,top:i.n.container.offset().top+i.n.container.outerHeight(!0)+10-r,left:i.n.container.offset().left+(u-f)})}}};function t(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function r(t,i,r){"use strict";var u;u=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(u)});u.appendTo("body").submit()}function u(){var n=window.navigator.userAgent,t=n.indexOf("MSIE "),i=n.indexOf("Trident/");return t>0||i>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",i)})(jQuery);window.ASL=window.ASL||{};window.ASL.getScope=function(){return typeof jQuery!="undefined"?jQuery:typeof window[ASL.js_scope]!="undefined"?window[ASL.js_scope]:eval(ASL.js_scope)};window.ASL.initialized=!1;window.ASL.initialize=function(n){var t=window.ASL.getScope(),i=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0)t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))});else{typeof n!="undefined"&&(i="div[id*=asl_init_id_"+n+"]");function r(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function u(n){var t="",s,h,c,l,e,u,o,i=0,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=f.indexOf(n.charAt(i++)),e=f.indexOf(n.charAt(i++)),u=f.indexOf(n.charAt(i++)),o=f.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|u>>2,c=(u&3)<<6|o,t=t+String.fromCharCode(s),u!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return r(t)}t(i).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=u(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).ajaxsearchlite(r)})}window.ASL.initialized=!0};window.ASL.ready=function(){var n=this,t=n.getScope(),i=null;t(document).ready(function(){n.initialize()});t(window).load(function(){window.ASL.initialized||(n.initialize(),console.log("ASL initialized via window.load"))});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&t("body").bind("DOMSubtreeModified",function(){clearTimeout(i);i=setTimeout(function(){n.initialize()},500)})};window._ASL=ASL;window._ASL.ready();
1
+ (function(n){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):typeof module!="undefined"&&module.exports?n(require("jquery")):n(jQuery)})(function(n){var r="left",u="right",f="up",e="down",v="in",y="out",p="none",nt="auto",w="swipe",b="pinch",k="tap",tt="doubletap",it="longtap",d="horizontal",g="vertical",l="all",ut=10,rt="start",o="move",t="end",i="cancel",c="ontouchstart"in window,a=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!c,s=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!c,h="TouchSwipe";n.fn.swipe=function(t){var r=n(this),i=r.data(h);if(i&&typeof t=="string"){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&typeof t=="object")i.option.apply(this,arguments);else if(!i&&(typeof t=="object"||!t))return ft.apply(this,arguments);return r};n.fn.swipe.version="1.6.15";n.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe.phases={PHASE_START:rt,PHASE_MOVE:o,PHASE_END:t,PHASE_CANCEL:i};n.fn.swipe.directions={LEFT:r,RIGHT:u,UP:f,DOWN:e,IN:v,OUT:y};n.fn.swipe.pageScroll={NONE:p,HORIZONTAL:d,VERTICAL:g,AUTO:nt};n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:l};function ft(t){return t&&t.allowPageScroll===undefined&&(t.swipe!==undefined||t.swipeStatus!==undefined)&&(t.allowPageScroll=p),t.click!==undefined&&t.tap===undefined&&(t.tap=t.click),t||(t={}),t=n.extend({},n.fn.swipe.defaults,t),this.each(function(){var r=n(this),i=r.data(h);i||(i=new et(this,t),r.data(h,i))})}function et(ft,et){var et=n.extend({},et),si=c||s||!et.fallbackToMouseEvents,hi=si?s?a?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ki=si?s?a?"MSPointerMove":"pointermove":"touchmove":"mousemove",di=si?s?a?"MSPointerUp":"pointerup":"touchend":"mouseup",ri=si?s?"mouseleave":null:"mouseleave",ci=s?a?"MSPointerCancel":"pointercancel":"touchcancel",at=0,vt=null,yt=null,lt=0,gt=0,ni=0,pt=1,bt=0,kt=0,li=null,ot=n(ft),st="start",ct=0,ht={},gi=0,ai=0,vi=0,nr=0,ti=0,fi=null,ei=null;try{ot.bind(hi,tr);ot.bind(ci,ui)}catch(ff){n.error("events not supported "+hi+","+ci+" on jQuery.swipe")}this.enable=function(){return ot.bind(hi,tr),ot.bind(ci,ui),ot};this.disable=function(){return lr(),ot};this.destroy=function(){lr();ot.data(h,null);ot=null};this.option=function(t,i){if(typeof t=="object")et=n.extend(et,t);else if(et[t]!==undefined){if(i===undefined)return et[t];et[t]=i}else if(t)n.error("Option "+t+" does not exist on jQuery.swipe.options");else return et;return null};function tr(t){if(!pu()&&!(n(t.target).closest(et.excludedElements,ot).length>0)){var r=t.originalEvent?t.originalEvent:t,f,u=r.touches,e=u?u[0]:r;return(st=rt,u?ct=u.length:et.preventDefaultEvents!==!1&&t.preventDefault(),at=0,vt=null,yt=null,kt=null,lt=0,gt=0,ni=0,pt=1,bt=0,li=ku(),dr(),wi(0,e),!u||ct===et.fingers||et.fingers===l||oi()?(gi=ii(),ct==2&&(wi(1,u[1]),gt=ni=cr(ht[0].start,ht[1].start)),(et.swipeStatus||et.pinchStatus)&&(f=wt(r,st))):f=!1,f===!1)?(st=i,wt(r,st),f):(et.hold&&(ei=setTimeout(n.proxy(function(){ot.trigger("hold",[r.target]);et.hold&&(f=et.hold.call(ot,r,r.target))},this),et.longTapThreshold)),pi(!0),null)}}function ir(n){var f=n.originalEvent?n.originalEvent:n;if(st!==t&&st!==i&&!yi()){var s,r=f.touches,h=r?r[0]:f,u=gr(h);if(ai=ii(),r&&(ct=r.length),et.hold&&clearTimeout(ei),st=o,ct==2&&(gt==0?(wi(1,r[1]),gt=ni=cr(ht[0].start,ht[1].start)):(gr(r[1]),ni=cr(ht[0].end,ht[1].end),kt=gu(ht[0].end,ht[1].end)),pt=du(gt,ni),bt=Math.abs(gt-ni)),ct===et.fingers||et.fingers===l||!r||oi()){if(vt=iu(u.start,u.end),yt=iu(u.last,u.end),uu(n,yt),at=nf(u.start,u.end),lt=tu(),bu(vt,at),s=wt(f,st),!et.triggerOnTouchEnd||et.triggerOnTouchLeave){var e=!0;if(et.triggerOnTouchLeave){var c=rf(this);e=uf(u.end,c)}!et.triggerOnTouchEnd&&e?st=fr(o):et.triggerOnTouchLeave&&!e&&(st=fr(t));(st==i||st==t)&&wt(f,st)}}else st=i,wt(f,st);s===!1&&(st=i,wt(f,st))}}function rr(n){var r=n.originalEvent?n.originalEvent:n,u=r.touches;if(u){if(u.length&&!yi())return yu(r),!0;if(u.length&&yi())return!0}return yi()&&(ct=nr),ai=ii(),lt=tu(),or()||!er()?(st=i,wt(r,st)):et.triggerOnTouchEnd||et.triggerOnTouchEnd==!1&&st===o?(et.preventDefaultEvents!==!1&&n.preventDefault(),st=t,wt(r,st)):!et.triggerOnTouchEnd&&br()?(st=t,dt(r,st,k)):st===o&&(st=i,wt(r,st)),pi(!1),null}function ui(){ct=0;ai=0;gi=0;gt=0;ni=0;pt=1;dr();pi(!1)}function ur(n){var i=n.originalEvent?n.originalEvent:n;et.triggerOnTouchLeave&&(st=fr(t),wt(i,st))}function lr(){ot.unbind(hi,tr);ot.unbind(ci,ui);ot.unbind(ki,ir);ot.unbind(di,rr);ri&&ot.unbind(ri,ur);pi(!1)}function fr(n){var r=n,f=ar(),u=er(),e=or();return!f||e?r=i:u&&n==o&&(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)?r=t:!u&&n==t&&et.triggerOnTouchLeave&&(r=i),r}function wt(n,r){var u,f=n.touches;return(eu()||sr())&&(u=dt(n,r,w)),(fu()||oi())&&u!==!1&&(u=dt(n,r,b)),au()&&u!==!1?u=dt(n,r,tt):vu()&&u!==!1?u=dt(n,r,it):lu()&&u!==!1&&(u=dt(n,r,k)),r===i&&(sr()&&(u=dt(n,r,w)),oi()&&(u=dt(n,r,b)),ui(n)),r===t&&(f?f.length||ui(n):ui(n)),u}function dt(o,s,h){var c;if(h==w){if(ot.trigger("swipeStatus",[s,vt||null,at||0,lt||0,ct,ht,yt]),et.swipeStatus&&(c=et.swipeStatus.call(ot,o,s,vt||null,at||0,lt||0,ct,ht,yt),c===!1))return!1;if(s==t&&yr()){if(clearTimeout(fi),clearTimeout(ei),ot.trigger("swipe",[vt,at,lt,ct,ht,yt]),et.swipe&&(c=et.swipe.call(ot,o,vt,at,lt,ct,ht,yt),c===!1))return!1;switch(vt){case r:ot.trigger("swipeLeft",[vt,at,lt,ct,ht,yt]);et.swipeLeft&&(c=et.swipeLeft.call(ot,o,vt,at,lt,ct,ht,yt));break;case u:ot.trigger("swipeRight",[vt,at,lt,ct,ht,yt]);et.swipeRight&&(c=et.swipeRight.call(ot,o,vt,at,lt,ct,ht,yt));break;case f:ot.trigger("swipeUp",[vt,at,lt,ct,ht,yt]);et.swipeUp&&(c=et.swipeUp.call(ot,o,vt,at,lt,ct,ht,yt));break;case e:ot.trigger("swipeDown",[vt,at,lt,ct,ht,yt]);et.swipeDown&&(c=et.swipeDown.call(ot,o,vt,at,lt,ct,ht,yt))}}}if(h==b){if(ot.trigger("pinchStatus",[s,kt||null,bt||0,lt||0,ct,pt,ht]),et.pinchStatus&&(c=et.pinchStatus.call(ot,o,s,kt||null,bt||0,lt||0,ct,pt,ht),c===!1))return!1;if(s==t&&vr())switch(kt){case v:ot.trigger("pinchIn",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchIn&&(c=et.pinchIn.call(ot,o,kt||null,bt||0,lt||0,ct,pt,ht));break;case y:ot.trigger("pinchOut",[kt||null,bt||0,lt||0,ct,pt,ht]);et.pinchOut&&(c=et.pinchOut.call(ot,o,kt||null,bt||0,lt||0,ct,pt,ht))}}return h==k?(s===i||s===t)&&(clearTimeout(fi),clearTimeout(ei),hr()&&!su()?(ti=ii(),fi=setTimeout(n.proxy(function(){ti=null;ot.trigger("tap",[o.target]);et.tap&&(c=et.tap.call(ot,o,o.target))},this),et.doubleTapThreshold)):(ti=null,ot.trigger("tap",[o.target]),et.tap&&(c=et.tap.call(ot,o,o.target)))):h==tt?(s===i||s===t)&&(clearTimeout(fi),clearTimeout(ei),ti=null,ot.trigger("doubletap",[o.target]),et.doubleTap&&(c=et.doubleTap.call(ot,o,o.target))):h==it&&(s===i||s===t)&&(clearTimeout(fi),ti=null,ot.trigger("longtap",[o.target]),et.longTap&&(c=et.longTap.call(ot,o,o.target))),c}function er(){var n=!0;return et.threshold!==null&&(n=at>=et.threshold),n}function or(){var n=!1;return et.cancelThreshold!==null&&vt!==null&&(n=nu(vt)-at>=et.cancelThreshold),n}function ru(){return et.pinchThreshold!==null?bt>=et.pinchThreshold:!0}function ar(){return et.maxTimeThreshold?lt>=et.maxTimeThreshold?!1:!0:!0}function uu(n,t){if(et.preventDefaultEvents!==!1)if(et.allowPageScroll===p)n.preventDefault();else{var i=et.allowPageScroll===nt;switch(t){case r:(et.swipeLeft&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault();break;case u:(et.swipeRight&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault();break;case f:(et.swipeUp&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault();break;case e:(et.swipeDown&&i||!i&&et.allowPageScroll!=g)&&n.preventDefault()}}}function vr(){var n=pr(),t=wr(),i=ru();return n&&t&&i}function oi(){return!!(et.pinchStatus||et.pinchIn||et.pinchOut)}function fu(){return!!(vr()&&oi())}function yr(){var n=ar(),t=er(),i=pr(),r=wr(),u=or();return!u&&r&&i&&t&&n}function sr(){return!!(et.swipe||et.swipeStatus||et.swipeLeft||et.swipeRight||et.swipeUp||et.swipeDown)}function eu(){return!!(yr()&&sr())}function pr(){return ct===et.fingers||et.fingers===l||!c}function wr(){return ht[0].end.x!==0}function br(){return!!et.tap}function hr(){return!!et.doubleTap}function ou(){return!!et.longTap}function kr(){if(ti==null)return!1;var n=ii();return hr()&&n-ti<=et.doubleTapThreshold}function su(){return kr()}function hu(){return(ct===1||!c)&&(isNaN(at)||at<et.threshold)}function cu(){return lt>et.longTapThreshold&&at<ut}function lu(){return!!(hu()&&br())}function au(){return!!(kr()&&hr())}function vu(){return!!(cu()&&ou())}function yu(n){vi=ii();nr=n.touches.length+1}function dr(){vi=0;nr=0}function yi(){var n=!1;if(vi){var t=ii()-vi;t<=et.fingerReleaseThreshold&&(n=!0)}return n}function pu(){return!!(ot.data(h+"_intouch")===!0)}function pi(n){ot&&(n===!0?(ot.bind(ki,ir),ot.bind(di,rr),ri&&ot.bind(ri,ur)):(ot.unbind(ki,ir,!1),ot.unbind(di,rr,!1),ri&&ot.unbind(ri,ur,!1)),ot.data(h+"_intouch",n===!0))}function wi(n,t){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=t.pageX||t.clientX,i.start.y=i.last.y=i.end.y=t.pageY||t.clientY,ht[n]=i,i}function gr(n){var i=n.identifier!==undefined?n.identifier:0,t=wu(i);return t===null&&(t=wi(i,n)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function wu(n){return ht[n]||null}function bu(n,t){t=Math.max(t,nu(n));li[n].distance=t}function nu(n){return li[n]?li[n].distance:undefined}function ku(){var n={};return n[r]=bi(r),n[u]=bi(u),n[f]=bi(f),n[e]=bi(e),n}function bi(n){return{direction:n,distance:0}}function tu(){return ai-gi}function cr(n,t){var i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);return Math.round(Math.sqrt(i*i+r*r))}function du(n,t){var i=t/n*1;return i.toFixed(2)}function gu(){return pt<1?y:v}function nf(n,t){return Math.round(Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)))}function tf(n,t){var r=n.x-t.x,u=t.y-n.y,f=Math.atan2(u,r),i=Math.round(f*180/Math.PI);return i<0&&(i=360-Math.abs(i)),i}function iu(n,t){var i=tf(n,t);return i<=45&&i>=0?r:i<=360&&i>=315?r:i>=135&&i<=225?u:i>45&&i<135?e:f}function ii(){var n=new Date;return n.getTime()}function rf(t){t=n(t);var i=t.offset();return{left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()}}function uf(n,t){return n.x>t.left&&n.x<t.right&&n.y>t.top&&n.y<t.bottom}}});
2
+ /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
3
+ * Licensed under the MIT License (LICENSE.txt).
4
+ *
5
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
6
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
7
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
8
+ *
9
+ * Version: 3.0.6
10
+ *
11
+ * Requires: 1.2.2+
12
+ */
13
+ (function(n){var t=["DOMMouseScroll","mousewheel"];if(n.event.fixHooks)for(var r=t.length;r;)n.event.fixHooks[t[--r]]=n.event.mouseHooks;n.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var n=t.length;n;)this.addEventListener(t[--n],i,!1);else this.onmousewheel=i},teardown:function(){if(this.removeEventListener)for(var n=t.length;n;)this.removeEventListener(t[--n],i,!1);else this.onmousewheel=null}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}});function i(t){var i=t||window.event,e=[].slice.call(arguments,1),r=0,f=0,u=0;return t=n.event.fix(i),t.type="mousewheel",i.wheelDelta&&(r=i.wheelDelta/120),i.detail&&(r=-i.detail/3),u=r,i.axis!==undefined&&i.axis===i.HORIZONTAL_AXIS&&(u=0,f=-1*r),i.wheelDeltaY!==undefined&&(u=i.wheelDeltaY/120),i.wheelDeltaX!==undefined&&(f=-1*i.wheelDeltaX/120),e.unshift(t,r,f,u),(n.event.dispatch||n.event.handle).apply(this,e)}})(jQuery);jQuery.extend({highlight:function(n,t,i,r){if(n.nodeType===3){var e=n.data.match(t);if(e){var o=document.createElement(i||"span");o.className=r||"highlight";var u=n.splitText(e.index);u.splitText(e[0].length);var s=u.cloneNode(!0);return o.appendChild(s),u.parentNode.replaceChild(o,u),1}}else if(n.nodeType===1&&n.childNodes&&!/(script|style)/i.test(n.tagName)&&!(n.tagName===i.toUpperCase()&&n.className===r))for(var f=0;f<n.childNodes.length;f++)f+=jQuery.highlight(n.childNodes[f],t,i,r);return 0}});jQuery.fn.unhighlight=function(n){var t={className:"highlight",element:"span"};return jQuery.extend(t,n),this.find(t.element+"."+t.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()};jQuery.fn.highlight=function(n,t){var i={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(jQuery.extend(i,t),n.constructor===String&&(n=[n]),n=jQuery.grep(n,function(n){return n!=""}),n=jQuery.map(n,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),n.length==0)return this;var u=i.caseSensitive?"":"i",r="("+n.join("|")+")";i.wordsOnly&&(r="\\b"+r+"\\b");var f=new RegExp(r,u);return this.each(function(){jQuery.highlight(this,f,i.element,i.className)})},function(n){var i={init:function(t){var i={set_width:!1,set_height:!1,horizontalScroll:!1,scrollInertia:950,mouseWheel:!0,mouseWheelPixels:"auto",autoDraggerLength:!0,autoHideScrollbar:!1,snapAmount:null,snapOffset:0,scrollButtons:{enable:!1,scrollType:"continuous",scrollSpeed:"auto",scrollAmount:40},advanced:{updateOnBrowserResize:!0,updateOnContentResize:!1,autoExpandHorizontalScroll:!1,autoScrollOnFocus:!0,normalizeMouseWheelDelta:!1},contentTouchScroll:!0,callbacks:{onScrollStart:function(){},onScroll:function(){},onTotalScroll:function(){},onTotalScrollBack:function(){},onTotalScrollOffset:0,onTotalScrollBackOffset:0,whileScrolling:function(){}},theme:"light"},t=n.extend(!0,i,t);return this.each(function(){var i=n(this);if(t.set_width&&i.css("width",t.set_width),t.set_height&&i.css("height",t.set_height),n(document).data("mCustomScrollbar-index")){var y=parseInt(n(document).data("mCustomScrollbar-index"));n(document).data("mCustomScrollbar-index",y+1)}else n(document).data("mCustomScrollbar-index","1");i.wrapInner("<div class='mCustomScrollBox"+" mCS-"+t.theme+"' id='mCSB_"+n(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+n(document).data("mCustomScrollbar-index"));var r=i.children(".mCustomScrollBox");if(t.horizontalScroll){r.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");var c=r.children(".mCSB_h_wrapper");c.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({width:c.children().outerWidth(),position:"relative"}).unwrap()}else r.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");var u=r.children(".mCSB_container");n.support.touch&&u.addClass("mCS_touch");u.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'><\/div><\/div><div class='mCSB_draggerRail'><\/div><\/div><\/div>");var o=r.children(".mCSB_scrollTools"),p=o.children(".mCSB_draggerContainer"),f=p.children(".mCSB_dragger");if(t.horizontalScroll?f.data("minDraggerWidth",f.width()):f.data("minDraggerHeight",f.height()),t.scrollButtons.enable&&(t.horizontalScroll?o.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'><\/a>"):o.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'><\/a>")),r.bind("scroll",function(){i.is(".mCS_disabled")||r.scrollTop(0).scrollLeft(0)}),i.data({mCS_Init:!0,mCustomScrollbarIndex:n(document).data("mCustomScrollbar-index"),horizontalScroll:t.horizontalScroll,scrollInertia:t.scrollInertia,scrollEasing:"mcsEaseOut",mouseWheel:t.mouseWheel,mouseWheelPixels:t.mouseWheelPixels,autoDraggerLength:t.autoDraggerLength,autoHideScrollbar:t.autoHideScrollbar,snapAmount:t.snapAmount,snapOffset:t.snapOffset,scrollButtons_enable:t.scrollButtons.enable,scrollButtons_scrollType:t.scrollButtons.scrollType,scrollButtons_scrollSpeed:t.scrollButtons.scrollSpeed,scrollButtons_scrollAmount:t.scrollButtons.scrollAmount,autoExpandHorizontalScroll:t.advanced.autoExpandHorizontalScroll,autoScrollOnFocus:t.advanced.autoScrollOnFocus,normalizeMouseWheelDelta:t.advanced.normalizeMouseWheelDelta,contentTouchScroll:t.contentTouchScroll,onScrollStart_Callback:t.callbacks.onScrollStart,onScroll_Callback:t.callbacks.onScroll,onTotalScroll_Callback:t.callbacks.onTotalScroll,onTotalScrollBack_Callback:t.callbacks.onTotalScrollBack,onTotalScroll_Offset:t.callbacks.onTotalScrollOffset,onTotalScrollBack_Offset:t.callbacks.onTotalScrollBackOffset,whileScrolling_Callback:t.callbacks.whileScrolling,bindEvent_scrollbar_drag:!1,bindEvent_content_touch:!1,bindEvent_scrollbar_click:!1,bindEvent_mousewheel:!1,bindEvent_buttonsContinuous_y:!1,bindEvent_buttonsContinuous_x:!1,bindEvent_buttonsPixels_y:!1,bindEvent_buttonsPixels_x:!1,bindEvent_focusin:!1,bindEvent_autoHideScrollbar:!1,mCSB_buttonScrollRight:!1,mCSB_buttonScrollLeft:!1,mCSB_buttonScrollDown:!1,mCSB_buttonScrollUp:!1}),t.horizontalScroll)i.css("max-width")!=="none"&&(t.advanced.updateOnContentResize||(t.advanced.updateOnContentResize=!0));else if(i.css("max-height")!=="none"){var e=!1,s=parseInt(i.css("max-height"));i.css("max-height").indexOf("%")>=0&&(e=s,s=i.parent().height()*e/100);i.css("overflow","hidden");r.css("max-height",s)}if(i.mCustomScrollbar("update"),t.advanced.updateOnBrowserResize){var h,l=n(window).width(),a=n(window).height();n(window).bind("resize."+i.data("mCustomScrollbarIndex"),function(){h&&clearTimeout(h);h=setTimeout(function(){if(!i.is(".mCS_disabled")&&!i.is(".mCS_destroyed")){var t=n(window).width(),u=n(window).height();(l!==t||a!==u)&&(i.css("max-height")!=="none"&&e&&r.css("max-height",i.parent().height()*e/100),i.mCustomScrollbar("update"),l=t,a=u)}},150)})}if(t.advanced.updateOnContentResize){var w;if(t.horizontalScroll)var v=u.outerWidth();else var v=u.outerHeight();w=setInterval(function(){if(t.horizontalScroll){t.advanced.autoExpandHorizontalScroll&&u.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:u.outerWidth(),position:"relative"}).unwrap();var n=u.outerWidth()}else var n=u.outerHeight();n!=v&&(i.mCustomScrollbar("update"),v=n)},300)}})},update:function(){var i=n(this),u=i.children(".mCustomScrollBox"),r=u.children(".mCSB_container");r.removeClass("mCS_no_scrollbar");i.removeClass("mCS_disabled mCS_destroyed");u.scrollTop(0).scrollLeft(0);var f=u.children(".mCSB_scrollTools"),e=f.children(".mCSB_draggerContainer"),t=e.children(".mCSB_dragger");if(i.data("horizontalScroll")){var p=f.children(".mCSB_buttonLeft"),w=f.children(".mCSB_buttonRight"),h=u.width();i.data("autoExpandHorizontalScroll")&&r.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:r.outerWidth(),position:"relative"}).unwrap();var c=r.outerWidth()}else var b=f.children(".mCSB_buttonUp"),k=f.children(".mCSB_buttonDown"),l=u.height(),a=r.outerHeight();if(a>l&&!i.data("horizontalScroll")){f.css("display","block");var o=e.height();if(i.data("autoDraggerLength")){var v=Math.round(l/a*o),d=t.data("minDraggerHeight");if(v<=d)t.css({height:d});else if(v>=o-10){var it=o-10;t.css({height:it})}else t.css({height:v});t.children(".mCSB_dragger_bar").css({"line-height":t.height()+"px"})}var rt=t.height(),g=(a-l)/(o-rt);i.data("scrollAmount",g).mCustomScrollbar("scrolling",u,r,e,t,b,k,p,w);var nt=Math.abs(r.position().top);i.mCustomScrollbar("scrollTo",nt,{scrollInertia:0,trigger:"internal"})}else if(c>h&&i.data("horizontalScroll")){f.css("display","block");var s=e.width();if(i.data("autoDraggerLength")){var y=Math.round(h/c*s),tt=t.data("minDraggerWidth");if(y<=tt)t.css({width:tt});else if(y>=s-10){var ut=s-10;t.css({width:ut})}else t.css({width:y})}var ft=t.width(),g=(c-h)/(s-ft);i.data("scrollAmount",g).mCustomScrollbar("scrolling",u,r,e,t,b,k,p,w);var nt=Math.abs(r.position().left);i.mCustomScrollbar("scrollTo",nt,{scrollInertia:0,trigger:"internal"})}else u.unbind("mousewheel focusin"),i.data("horizontalScroll")?t.add(r).css("left",0):t.add(r).css("top",0),f.css("display","none"),r.addClass("mCS_no_scrollbar"),i.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1})},scrolling:function(i,r,u,f,e,o,s,h){var c=n(this);if(!c.data("bindEvent_scrollbar_drag")){var v,y;n.support.msPointer?(f.bind("MSPointerDown",function(t){t.preventDefault();c.data({on_drag:!0});f.addClass("mCSB_dragger_onDrag");var i=n(this),e=i.offset(),r=t.originalEvent.pageX-e.left,u=t.originalEvent.pageY-e.top;r<i.width()&&r>0&&u<i.height()&&u>0&&(v=u,y=r)}),n(document).bind("MSPointerMove."+c.data("mCustomScrollbarIndex"),function(n){if(n.preventDefault(),c.data("on_drag")){var i=f,t=i.offset(),r=n.originalEvent.pageX-t.left,u=n.originalEvent.pageY-t.top;g(v,y,u,r)}}).bind("MSPointerUp."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")})):(f.bind("mousedown touchstart",function(t){t.preventDefault();t.stopImmediatePropagation();var e=n(this),u=e.offset(),i,r;if(t.type==="touchstart"){var o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=o.pageX-u.left;r=o.pageY-u.top}else c.data({on_drag:!0}),f.addClass("mCSB_dragger_onDrag"),i=t.pageX-u.left,r=t.pageY-u.top;i<e.width()&&i>0&&r<e.height()&&r>0&&(v=r,y=i)}).bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],u=n(this),r=u.offset(),f=i.pageX-r.left,e=i.pageY-r.top;g(v,y,e,f)}),n(document).bind("mousemove."+c.data("mCustomScrollbarIndex"),function(n){if(c.data("on_drag")){var i=f,t=i.offset(),r=n.pageX-t.left,u=n.pageY-t.top;g(v,y,u,r)}}).bind("mouseup."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")}));c.data({bindEvent_scrollbar_drag:!0})}function g(n,t,i,r){c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",f.position().left-t+r,{moveDragger:!0,trigger:"internal"}):c.mCustomScrollbar("scrollTo",f.position().top-n+i,{moveDragger:!0,trigger:"internal"})}if(n.support.touch&&c.data("contentTouchScroll")&&!c.data("bindEvent_content_touch")){var l,p,a,w,b,it,rt;r.bind("touchstart",function(t){t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this);a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;it=w;rt=b});r.bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this).parent();a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",rt-b,{trigger:"internal"}):c.mCustomScrollbar("scrollTo",it-w,{trigger:"internal"})})}if(c.data("bindEvent_scrollbar_click")||(u.bind("click",function(t){var i=(t.pageY-u.offset().top)*c.data("scrollAmount"),r=n(t.target);c.data("horizontalScroll")&&(i=(t.pageX-u.offset().left)*c.data("scrollAmount"));(r.hasClass("mCSB_draggerContainer")||r.hasClass("mCSB_draggerRail"))&&c.mCustomScrollbar("scrollTo",i,{trigger:"internal",scrollEasing:"draggerRailEase"})}),c.data({bindEvent_scrollbar_click:!0})),c.data("mouseWheel")&&(c.data("bindEvent_mousewheel")||(i.bind("mousewheel",function(n,t){var o,i=c.data("mouseWheelPixels"),s=Math.abs(r.position().top),e=f.position().top,h=u.height()-f.height();c.data("normalizeMouseWheelDelta")&&(t=t<0?-1:1);i==="auto"&&(i=100+Math.round(c.data("scrollAmount")/2));c.data("horizontalScroll")&&(e=f.position().left,h=u.width()-f.width(),s=Math.abs(r.position().left));(t>0&&e!==0||t<0&&e!==h)&&(n.preventDefault(),n.stopImmediatePropagation());o=s-t*i;c.mCustomScrollbar("scrollTo",o,{trigger:"internal"})}),c.data({bindEvent_mousewheel:!0}))),c.data("scrollButtons_enable"))if(c.data("scrollButtons_scrollType")==="pixels"){c.data("horizontalScroll")?(h.add(s).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",nt,tt),c.data({bindEvent_buttonsContinuous_x:!1}),c.data("bindEvent_buttonsPixels_x")||(h.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)+c.data("scrollButtons_scrollAmount"))}),s.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_x:!0}))):(o.add(e).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",nt,tt),c.data({bindEvent_buttonsContinuous_y:!1}),c.data("bindEvent_buttonsPixels_y")||(o.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)+c.data("scrollButtons_scrollAmount"))}),e.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_y:!0})));function k(n){f.data("preventAction")||(f.data("preventAction",!0),c.mCustomScrollbar("scrollTo",n,{trigger:"internal"}))}}else{if(c.data("horizontalScroll")){if(h.add(s).unbind("click"),c.data({bindEvent_buttonsPixels_x:!1}),!c.data("bindEvent_buttonsContinuous_x")){h.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollRight:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var nt=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollRight"))};h.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",nt);s.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollLeft:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var tt=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollLeft"))};s.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",tt);c.data({bindEvent_buttonsContinuous_x:!0})}}else if(o.add(e).unbind("click"),c.data({bindEvent_buttonsPixels_y:!1}),!c.data("bindEvent_buttonsContinuous_y")){o.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollDown:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var ut=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollDown"))};o.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ut);e.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=d();c.data({mCSB_buttonScrollUp:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var ft=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollUp"))};e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ft);c.data({bindEvent_buttonsContinuous_y:!0})}function d(){var n=c.data("scrollButtons_scrollSpeed");return c.data("scrollButtons_scrollSpeed")==="auto"&&(n=Math.round((c.data("scrollInertia")+100)/40)),n}}c.data("autoScrollOnFocus")&&(c.data("bindEvent_focusin")||(i.bind("focusin",function(){i.scrollTop(0).scrollLeft(0);var t=n(document.activeElement);if(t.is("input,textarea,select,button,a[tabindex],area,object")){var f=r.position().top,u=t.position().top,e=i.height()-t.outerHeight();c.data("horizontalScroll")&&(f=r.position().left,u=t.position().left,e=i.width()-t.outerWidth());(f+u<0||f+u>e)&&c.mCustomScrollbar("scrollTo",u,{trigger:"internal"})}}),c.data({bindEvent_focusin:!0})));c.data("autoHideScrollbar")&&(c.data("bindEvent_autoHideScrollbar")||(i.bind("mouseenter",function(){i.addClass("mCS-mouse-over");t.showScrollbar.call(i.children(".mCSB_scrollTools"))}).bind("mouseleave touchend",function(n){i.removeClass("mCS-mouse-over");n.type==="mouseleave"&&t.hideScrollbar.call(i.children(".mCSB_scrollTools"))}),c.data({bindEvent_autoHideScrollbar:!0})))},scrollTo:function(i,r){var u=n(this),d={moveDragger:!1,trigger:"external",callbacks:!0,scrollInertia:u.data("scrollInertia"),scrollEasing:u.data("scrollEasing")},r=n.extend(d,r),e,o=u.children(".mCustomScrollBox"),f=o.children(".mCSB_container"),v=o.children(".mCSB_scrollTools"),y=v.children(".mCSB_draggerContainer"),s=y.children(".mCSB_dragger"),k=draggerSpeed=r.scrollInertia,w,c,b,l;if(!f.hasClass("mCS_no_scrollbar")&&(u.data({mCS_trigger:r.trigger}),u.data("mCS_Init")&&(r.callbacks=!1),i||i===0)){if(typeof i=="number")r.moveDragger?(e=i,i=u.data("horizontalScroll")?s.position().left*u.data("scrollAmount"):s.position().top*u.data("scrollAmount"),draggerSpeed=0):e=i/u.data("scrollAmount");else if(typeof i=="string"){var p;p=i==="top"?0:i!=="bottom"||u.data("horizontalScroll")?i==="left"?0:i==="right"&&u.data("horizontalScroll")?f.outerWidth()-o.width():i==="first"?u.find(".mCSB_container").find(":first"):i==="last"?u.find(".mCSB_container").find(":last"):u.find(i):f.outerHeight()-o.height();p.length===1?(i=u.data("horizontalScroll")?p.position().left:p.position().top,e=i/u.data("scrollAmount")):e=i=p}if(u.data("horizontalScroll")){u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset"));u.data("onTotalScroll_Offset")&&(l=o.width()-f.outerWidth()+u.data("onTotalScroll_Offset"));e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollLeft")),c||(w=!0)):e>=y.width()-s.width()?(e=y.width()-s.width(),i=o.width()-f.outerWidth(),clearInterval(u.data("mCSB_buttonScrollRight")),l||(b=!0)):i=-i;var a=u.data("snapAmount");a&&(i=Math.round(i/a)*a-u.data("snapOffset"));t.mTweenAxis.call(this,s[0],"left",Math.round(e),draggerSpeed,r.scrollEasing);t.mTweenAxis.call(this,f[0],"left",Math.round(i),k,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(v)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(w||c&&f.position().left>=c)&&h("onTotalScrollBack"),(b||l&&f.position().left<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(v))}})}else{u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset"));u.data("onTotalScroll_Offset")&&(l=o.height()-f.outerHeight()+u.data("onTotalScroll_Offset"));e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollUp")),c||(w=!0)):e>=y.height()-s.height()?(e=y.height()-s.height(),i=o.height()-f.outerHeight(),clearInterval(u.data("mCSB_buttonScrollDown")),l||(b=!0)):i=-i;var a=u.data("snapAmount");a&&(i=Math.round(i/a)*a-u.data("snapOffset"));t.mTweenAxis.call(this,s[0],"top",Math.round(e),draggerSpeed,r.scrollEasing);t.mTweenAxis.call(this,f[0],"top",Math.round(i),k,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(v)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(w||c&&f.position().top>=c)&&h("onTotalScrollBack"),(b||l&&f.position().top<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(v))}})}u.data("mCS_Init")&&u.data({mCS_Init:!1})}function h(n){this.mcs={top:f.position().top,left:f.position().left,draggerTop:s.position().top,draggerLeft:s.position().left,topPct:Math.round(100*Math.abs(f.position().top)/Math.abs(f.outerHeight()-o.height())),leftPct:Math.round(100*Math.abs(f.position().left)/Math.abs(f.outerWidth()-o.width()))};switch(n){case"onScrollStart":u.data("mCS_tweenRunning",!0).data("onScrollStart_Callback").call(u,this.mcs);break;case"whileScrolling":u.data("whileScrolling_Callback").call(u,this.mcs);break;case"onScroll":u.data("onScroll_Callback").call(u,this.mcs);break;case"onTotalScrollBack":u.data("onTotalScrollBack_Callback").call(u,this.mcs);break;case"onTotalScroll":u.data("onTotalScroll_Callback").call(u,this.mcs)}}},stop:function(){var i=n(this),r=i.children().children(".mCSB_container"),u=i.children().children().children().children(".mCSB_dragger");t.mTweenAxisStop.call(this,r[0]);t.mTweenAxisStop.call(this,u[0])},disable:function(t){var r=n(this),u=r.children(".mCustomScrollBox"),i=u.children(".mCSB_container"),f=u.children(".mCSB_scrollTools"),e=f.children().children(".mCSB_dragger");u.unbind("mousewheel focusin mouseenter mouseleave touchend");i.unbind("touchstart touchmove");t&&(r.data("horizontalScroll")?e.add(i).css("left",0):e.add(i).css("top",0));f.css("display","none");i.addClass("mCS_no_scrollbar");r.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1,bindEvent_content_touch:!1,bindEvent_autoHideScrollbar:!1}).addClass("mCS_disabled")},destroy:function(){var t=n(this);t.removeClass("mCustomScrollbar _mCS_"+t.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();n(document).unbind("mousemove."+t.data("mCustomScrollbarIndex")+" mouseup."+t.data("mCustomScrollbarIndex")+" MSPointerMove."+t.data("mCustomScrollbarIndex")+" MSPointerUp."+t.data("mCustomScrollbarIndex"));n(window).unbind("resize."+t.data("mCustomScrollbarIndex"))}},t={showScrollbar:function(){this.stop().animate({opacity:1},"fast")},hideScrollbar:function(){this.stop().animate({opacity:0},"fast")},mTweenAxis:function(n,t,i,r,u,f){var f=f||{},v=f.onStart||function(){},y=f.onUpdate||function(){},p=f.onComplete||function(){},w=c(),o,e=0,s=n.offsetTop,h=n.style;t==="left"&&(s=n.offsetLeft);var b=i-s;d();k();function c(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()}function l(){e||v.call();e=c()-w;a();e>=n._time&&(n._time=e>n._time?e+o-(e-n._time):e+o-1,n._time<e+1&&(n._time=e+1));n._time<r?n._id=_request(l):p.call()}function a(){r>0?(n.currVal=g(n._time,s,b,r,u),h[t]=Math.round(n.currVal)+"px"):h[t]=i+"px";y.call()}function k(){o=1e3/60;n._time=e+o;_request=window.requestAnimationFrame?window.requestAnimationFrame:function(n){return a(),setTimeout(n,.01)};n._id=_request(l)}function d(){n._id!=null&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)}function g(n,t,i,r,u){switch(u){case"linear":return i*n/r+t;case"easeOutQuad":return n/=r,-i*n*(n-2)+t;case"easeInOutQuad":return(n/=r/2,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeOutCubic":return n/=r,n--,i*(n*n*n+1)+t;case"easeOutQuart":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutQuint":return n/=r,n--,i*(n*n*n*n*n+1)+t;case"easeOutCirc":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeOutSine":return i*Math.sin(n/r*(Math.PI/2))+t;case"easeOutExpo":return i*(-Math.pow(2,-10*n/r)+1)+t;case"mcsEaseOut":var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n);case"draggerRailEase":return(n/=r/2,n<1)?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t)}}},mTweenAxisStop:function(n){n._id!=null&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)},rafPolyfill:function(){for(var n=["ms","moz","webkit","o"],t=n.length;--t>-1&&!window.requestAnimationFrame;)window.requestAnimationFrame=window[n[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[t]+"CancelAnimationFrame"]||window[n[t]+"CancelRequestAnimationFrame"]}};t.rafPolyfill.call();n.support.touch=!!("ontouchstart"in window);n.support.msPointer=window.navigator.msPointerEnabled;var r="https:"==document.location.protocol?"https:":"http:";n.event.special.mousewheel||document.write('<script src="'+r+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');n.fn.mCustomScrollbar=function(t){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return i.init.apply(this,arguments)}}(jQuery);
14
  /*! Ajax Search Lite 4.6 js */
15
+ (function(n){var i={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore a",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.firstClick=!0;r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),r.createVerticalScroll(),u()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),this},duplicateCheck:function(){var i=this,t={};n("div[id*=ajaxsearchlite]").each(function(){t.hasOwnProperty(this.id)?n(this).remove():t[this.id]="true"})},analytics:function(n){var t=this;t.o.analytics&&t.o.analyticsString!=""&&typeof ga=="function"&&ga("send","pageview",{page:"/"+t.o.analyticsString.replace("{asl_term}",n),title:"Ajax Search"})},createVerticalScroll:function(){var i=this;i.scroll=i.n.results.mCustomScrollbar({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSB_container",i.n.results).position().top),h=n(".mCSB_container .resdrg").children(),f=0,o=3e3,u=4e3,c=1e4,e=1e4,r=null;h.each(function(){u=Math.abs(Math.abs(s)-f);u<o&&(c=u,e=f,r=n(this));f+=n(this).outerHeight(!0);o=u});r.hasClass("group")&&(e=e+(r.outerHeight(!0)-r.outerHeight(!1)));i.scroll.mCustomScrollbar("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}})},createHorizontalScroll:function(){var n=this;n.scroll=n.n.results.mCustomScrollbar({horizontalScroll:!0,contentTouchScroll:!0,scrollButtons:{enable:!0,scrollType:"pixels",scrollSpeed:"auto",scrollAmount:100}})},initEvents:function(){var i=this;n(i.n.text.parent()).submit(function(n){n.preventDefault();i.n.text.keyup()});i.n.text.click(function(){i.firstClick&&(n(this).val(""),i.firstClick=!1)});i.n.resultsDiv.css({opacity:0});n(document).bind("click touchend",function(){(i.hideSettings(),i.opened!=!1&&i.o.closeOnDocClick==1)&&i.hideResults()});i.n.proclose.bind("click touchend",function(){i.opened!=!1&&(i.n.text.val(""),i.n.textAutocomplete.val(""),i.hideResults(),i.n.text.focus())});n(i.elem).bind("click touchend",function(n){n.stopImmediatePropagation()});i.n.resultsDiv.bind("click touchend",function(n){n.stopImmediatePropagation()});i.n.searchsettings.bind("click touchend",function(n){n.stopImmediatePropagation()});var r=!1;i.n.text.focus(function(){r=!0});var u="touchend";i.n.results.hasClass("mCustomScrollbar")&&(u="mousedown");i.n.resultsDiv.bind(u,function(n){if(t()&&r){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i.n.results.hasClass("mCustomScrollbar"))i.n.resultsDiv.one("click","a.asl_res_url",function(n){return n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1});return document.activeElement.blur(),r=!1,!1}});i.n.prosettings.on("click",function(){i.n.prosettings.data("opened")==0?i.showSettings():i.hideSettings()});var f;n(window).on("resize",function(){clearTimeout(f);f=setTimeout(function(){i.resize()},250)});var e;n(window).on("scroll",function(){clearTimeout(e);e=setTimeout(function(){i.scrolling(!1)},250)});i.initNavigationEvent();n(window).trigger("resize");n(window).trigger("scroll");i.initMagnifierEvent();i.initAutocompleteEvent();i.initFacetEvents()},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).keydown(function(i){if(window.event)var r=window.event.keyCode,u=window.event.type;else if(i)var r=i.which,u=i.type;n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"&&(r==40&&(i.stopPropagation(),i.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next().next(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),r==38&&(i.stopPropagation(),i.preventDefault(),t.n.text.blur(),t.post!=null&&t.post.abort(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev().prev(".item").addClass("hovered"),t.scroll.mCustomScrollbar("scrollTo",".resdrg .item.hovered",{scrollInertia:200,callbacks:!1})),r==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(i.stopPropagation(),i.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click()))})},initMagnifierEvent:function(){var t=this,i;t.n.promagnifier.add(t.n.text).bind("click keyup",function(u){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):u&&(t.keycode=u.which,t.ktype=u.type);var f=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}if(!f&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="results_page"||f&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo=="results_page"){var e="?s="+t.n.text.val();t.o.overridewpdefault?r(t.o.homeurl+e+"&asl_active=1","post",{p_asl_data:n("form",t.n.searchsettings).serialize()}):r(t.o.homeurl+e,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()});t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}t.keycode>=37&&t.keycode<=40||n(this).hasClass("orig")&&t.ktype=="click"||(t.o.triggeronclick!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="keyup")&&(t.post!=null&&t.post.abort(),clearTimeout(i),i=setTimeout(function(){t.search()},300))})},initFacetEvents:function(){var t=this;t.o.trigger_on_facet_change==1&&n("input",t.n.searchsettings).change(function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.search())})},destroy:function(){return this.each(function(){var t=n.extend({},this,i);n(window).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var i=this;i.o.autocomplete.enabled!=1||t()||i.n.text.keyup(function(t){window.event?(i.keycode=window.event.keyCode,i.ktype=window.event.type):t&&(i.keycode=t.which,i.ktype=t.type);var r=39;n("body").hasClass("rtl")&&(r=37);i.keycode==r&&i.n.textAutocomplete.val()!=""?(t.preventDefault(),i.n.text.val(i.n.textAutocomplete.val()),i.post!=null&&i.post.abort(),i.search()):(i.postAuto!=null&&i.postAuto.abort(),i.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});t.hideSettings();var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};t.analytics(t.n.text.val());t.post=n.post(ajaxsearchlite.ajaxurl,i,function(i){if(i=i.replace(/^\s*[\r\n]/gm,""),i=i.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1],t.n.resdrg.html(""),t.n.resdrg.html(i),n(".asl_keyword",t.n.resdrg).bind("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).keydown();n("form",t.n.container).trigger("submit","ajax");t.search()}),t.n.items=n(".item",t.n.resultsDiv),n(".asl_res_url",t.n.resultsDiv).length>0&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="results_page"||t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="results_page")return location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"),!1;t.showResults();t.scrollToResults();t.n.items.length==0?t.n.showmore!=null&&t.n.showmore.css("display","none"):t.n.showmore!=null&&(t.n.showmore.css("display","block"),t.n.showmore.attr("href",t.o.homeurl+"?s="+t.n.text.val()))},"text")}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.scrolling(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});t()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var u=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,e=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.scroll.mCustomScrollbar("update");t.resize();var i=0,r=0;t.n.items.each(function(){r+=n(this).outerHeight(!0);i++});i=i<1?1:i;r=r/i*u;t.n.results.css({height:r})}if(window.sscroll=t.scroll,t.scroll.mCustomScrollbar("disable",!0),t.scroll.mCustomScrollbar("update"),t.resize(),t.scroll.mCustomScrollbar("scrollTo",0),t.o.highlight==1){var f=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:f})}}if(t.resize(),t.n.items.length==0){var r=n(".nores",t.n.results).outerHeight(!0)>t.o.resultitemheight?t.o.resultitemheight:n(".nores",t.n.results).outerHeight(!0);t.n.results.css({height:11110});t.scroll.mCustomScrollbar("update");t.n.results.css({height:"auto"})}t.addAnimation();t.scrolling(!0);t.searching=!1},hideVerticalResults:function(){var t=this;t.disableMobileScroll=!1;t.n.resultsDiv.animate({opacity:0,height:0},{duration:120,complete:function(){n(this).css({visibility:"hidden",display:"none"})}})},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.scrolling(!0);t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustomScrollbar({contentTouchScroll:!0}));t.n.prosettings.data("opened",1)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},resize:function(){var t=this,i=0;if(n("body").css("position")!="static"&&(i=n("body").offset().top),u()&&0&&(t.n.proinput.css({width:t.n.probox.width()-8-(t.n.proinput.outerWidth(!1)-t.n.proinput.width())-t.n.proloading.outerWidth(!0)-t.n.prosettings.outerWidth(!0)-t.n.promagnifier.outerWidth(!0)-10}),t.n.text.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),position:"absolute",zIndex:2}),t.n.textAutocomplete.css({width:t.n.proinput.width()-2+t.n.proloading.outerWidth(!0),opacity:.25,zIndex:1})),t.n.prosettings.attr("opened")!=0&&(t.o.settingsimagepos=="left"?t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left}):t.n.searchsettings.css({display:"block",top:t.n.prosettings.offset().top+t.n.prosettings.height()-2-i,left:t.n.prosettings.offset().left+t.n.prosettings.width()-t.n.searchsettings.width()})),t.n.resultsDiv.css("visibility")!="hidden"&&t.o.resultsposition!="block"){var r=t.n.container.width()-(t.n.resultsDiv.outerWidth(!0)-t.n.resultsDiv.width()),f=r<240?240:r;t.n.resultsDiv.css({width:f,top:t.n.container.offset().top+t.n.container.outerHeight(!0)+10-i,left:t.n.container.offset().left+(r-f)})}},scrolling:function(t){var i=this,r=0;if(n("body").css("position")!="static"&&(r=n("body").offset().top),(t==!0||i.n.searchsettings.css("visibility")=="visible")&&(i.o.settingsimagepos=="left"?i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left}):i.n.searchsettings.css({display:"block",top:i.n.prosettings.offset().top+i.n.prosettings.height()-2-r,left:i.n.prosettings.offset().left+i.n.prosettings.width()-i.n.searchsettings.width()})),t==!0||i.n.resultsDiv.css("visibility")=="visible"){var u=i.n.container.width()-(i.n.resultsDiv.outerWidth(!0)-i.n.resultsDiv.width()),f=u<240?240:u;(i.o.resultsposition!="hover"&&i.n.resultsAppend.length>0||i.n.container.hasClass("hiddend"))&&(f="auto");i.n.resultsDiv.css({width:f,top:i.n.container.offset().top+i.n.container.outerHeight(!0)+10-r,left:i.n.container.offset().left+(u-f)})}}};function t(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function r(t,i,r){"use strict";var u;u=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(u)});u.appendTo("body").submit()}function u(){var n=window.navigator.userAgent,t=n.indexOf("MSIE "),i=n.indexOf("Trident/");return t>0||i>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",i)})(jQuery);window.ASL=window.ASL||{};window.ASL.getScope=function(){return typeof jQuery!="undefined"?jQuery:typeof window[ASL.js_scope]!="undefined"?window[ASL.js_scope]:eval(ASL.js_scope)};window.ASL.initialize=function(n){var t=window.ASL.getScope(),i=".asl_init_data";typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(i="div[id*=asl_init_id_"+n+"]"),t(i).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).html();if(typeof n=="undefined")return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).ajaxsearchlite(r)}))};window.ASL.ready=function(){var n=this,t=n.getScope(),i=null;t(document).ready(function(){n.initialize()});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&t("body").bind("DOMSubtreeModified",function(){clearTimeout(i);i=setTimeout(function(){n.initialize()},500)})};window._ASL=ASL;window._ASL.ready();
js/nomin-scoped/asl_wrapper.js CHANGED
@@ -20,8 +20,6 @@ window.ASL.getScope = function() {
20
  return eval(ASL.js_scope);
21
  };
22
 
23
- window.ASL.initialized = false;
24
-
25
  // Call this function if you need to initialize an instance that is printed after an AJAX call
26
  // Calling without an argument initializes all instances found.
27
  window.ASL.initialize = function(id) {
@@ -44,70 +42,6 @@ window.ASL.initialize = function(id) {
44
  if (typeof id !== 'undefined')
45
  selector = "div[id*=asl_init_id_" + id + "]";
46
 
47
- function b64_utf8_decode(utftext) {
48
- var string = "";
49
- var i = 0;
50
- var c = c1 = c2 = 0;
51
-
52
- while ( i < utftext.length ) {
53
-
54
- c = utftext.charCodeAt(i);
55
-
56
- if (c < 128) {
57
- string += String.fromCharCode(c);
58
- i++;
59
- }
60
- else if((c > 191) && (c < 224)) {
61
- c2 = utftext.charCodeAt(i+1);
62
- string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
63
- i += 2;
64
- }
65
- else {
66
- c2 = utftext.charCodeAt(i+1);
67
- c3 = utftext.charCodeAt(i+2);
68
- string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
69
- i += 3;
70
- }
71
-
72
- }
73
-
74
- return string;
75
- }
76
-
77
- function b64_decode(input) {
78
- var output = "";
79
- var chr1, chr2, chr3;
80
- var enc1, enc2, enc3, enc4;
81
- var i = 0;
82
- var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
83
-
84
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
85
-
86
- while (i < input.length) {
87
-
88
- enc1 = _keyStr.indexOf(input.charAt(i++));
89
- enc2 = _keyStr.indexOf(input.charAt(i++));
90
- enc3 = _keyStr.indexOf(input.charAt(i++));
91
- enc4 = _keyStr.indexOf(input.charAt(i++));
92
-
93
- chr1 = (enc1 << 2) | (enc2 >> 4);
94
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
95
- chr3 = ((enc3 & 3) << 6) | enc4;
96
-
97
- output = output + String.fromCharCode(chr1);
98
-
99
- if (enc3 != 64) {
100
- output = output + String.fromCharCode(chr2);
101
- }
102
- if (enc4 != 64) {
103
- output = output + String.fromCharCode(chr3);
104
- }
105
-
106
- }
107
- output = b64_utf8_decode(output);
108
- return output;
109
- }
110
-
111
  /**
112
  * Getting around inline script declarations with this solution.
113
  * So these new, invisible divs contains a JSON object with the parameters.
@@ -115,20 +49,13 @@ window.ASL.initialize = function(id) {
115
  */
116
  scope(selector).each(function (index, value) {
117
  var rid = scope(this).attr('id').match(/^asl_init_id_(.*)/)[1];
118
-
119
- var jsonData = scope(this).data("asldata");
120
  if (typeof jsonData === "undefined") return false;
121
-
122
- jsonData = b64_decode(jsonData);
123
- if (typeof jsonData === "undefined" || jsonData == "") return false;
124
-
125
  var args = JSON.parse(jsonData);
126
 
127
  return scope("#ajaxsearchlite" + rid).ajaxsearchlite(args);
128
  });
129
  }
130
-
131
- window.ASL.initialized = true;
132
  };
133
 
134
  window.ASL.ready = function() {
@@ -140,15 +67,6 @@ window.ASL.ready = function() {
140
  _this.initialize();
141
  });
142
 
143
- // Redundancy for safety
144
- scope(window).load(function () {
145
- // It should be initialized at this point, but you never know..
146
- if ( !window.ASL.initialized ) {
147
- _this.initialize();
148
- console.log("ASL initialized via window.load");
149
- }
150
- });
151
-
152
  // DOM tree modification detection to re-initialize automatically if enabled
153
  if (typeof(ASL.detect_ajax) != "undefined" && ASL.detect_ajax == 1) {
154
  scope("body").bind("DOMSubtreeModified", function() {
20
  return eval(ASL.js_scope);
21
  };
22
 
 
 
23
  // Call this function if you need to initialize an instance that is printed after an AJAX call
24
  // Calling without an argument initializes all instances found.
25
  window.ASL.initialize = function(id) {
42
  if (typeof id !== 'undefined')
43
  selector = "div[id*=asl_init_id_" + id + "]";
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  /**
46
  * Getting around inline script declarations with this solution.
47
  * So these new, invisible divs contains a JSON object with the parameters.
49
  */
50
  scope(selector).each(function (index, value) {
51
  var rid = scope(this).attr('id').match(/^asl_init_id_(.*)/)[1];
52
+ var jsonData = scope(this).html();
 
53
  if (typeof jsonData === "undefined") return false;
 
 
 
 
54
  var args = JSON.parse(jsonData);
55
 
56
  return scope("#ajaxsearchlite" + rid).ajaxsearchlite(args);
57
  });
58
  }
 
 
59
  };
60
 
61
  window.ASL.ready = function() {
67
  _this.initialize();
68
  });
69
 
 
 
 
 
 
 
 
 
 
70
  // DOM tree modification detection to re-initialize automatically if enabled
71
  if (typeof(ASL.detect_ajax) != "undefined" && ASL.detect_ajax == 1) {
72
  scope("body").bind("DOMSubtreeModified", function() {
js/nomin-scoped/jquery.ajaxsearchlite.js CHANGED
@@ -92,10 +92,6 @@
92
  $this.n.resultsDiv.detach().appendTo($this.n.resultsAppend);
93
  }
94
 
95
- $('fieldset' ,$this.n.searchsettings).each(function(){
96
- $('.asl_option:not(.hiddend)', this).last().addClass("asl-o-last");
97
- });
98
-
99
  $this.createVerticalScroll();
100
 
101
  if (detectIE())
@@ -545,7 +541,7 @@
545
  $this.n.proclose.css({
546
  display: "none"
547
  });
548
- //$this.hideSettings();
549
  //$this.hideResults();
550
  var data = {
551
  action: 'ajaxsearchlite_search',
@@ -556,7 +552,7 @@
556
  $this.analytics($this.n.text.val());
557
 
558
  // New method without JSON
559
- $this.post = $.post(ASL.ajaxurl, data, function (response) {
560
  response = response.replace(/^\s*[\r\n]/gm, "");
561
  response = response.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];
562
 
92
  $this.n.resultsDiv.detach().appendTo($this.n.resultsAppend);
93
  }
94
 
 
 
 
 
95
  $this.createVerticalScroll();
96
 
97
  if (detectIE())
541
  $this.n.proclose.css({
542
  display: "none"
543
  });
544
+ $this.hideSettings();
545
  //$this.hideResults();
546
  var data = {
547
  action: 'ajaxsearchlite_search',
552
  $this.analytics($this.n.text.val());
553
 
554
  // New method without JSON
555
+ $this.post = $.post(ajaxsearchlite.ajaxurl, data, function (response) {
556
  response = response.replace(/^\s*[\r\n]/gm, "");
557
  response = response.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];
558
 
js/nomin-scoped/jquery.mCustomScrollbar.js CHANGED
@@ -1,9 +1,948 @@
1
  (function(jQuery, $, window){
2
- /* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
3
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
4
- /* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
5
- if (typeof jQuery.fn.mCustomScrollbar == "undefined") {
6
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
7
- return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});} else {console.log("ASP: scrollbar detected, skipping loading")};
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  })(asljQuery, asljQuery, window);
1
  (function(jQuery, $, window){
2
+ /*
3
+ == malihu jquery custom scrollbars plugin ==
4
+ version: 2.8.2
5
+ author: malihu (http://manos.malihu.gr)
6
+ plugin home: http://manos.malihu.gr/jquery-custom-content-scroller
7
+ */
8
 
9
+ /*
10
+ Copyright 2010-2013 Manos Malihutsakis
11
+
12
+ This program is free software: you can redistribute it and/or modify
13
+ it under the terms of the GNU Lesser General Public License as published by
14
+ the Free Software Foundation, either version 3 of the License, or
15
+ any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU Lesser General Public License for more details.
21
+
22
+ You should have received a copy of the GNU Lesser General Public License
23
+ along with this program. If not, see http://www.gnu.org/licenses/lgpl.html.
24
+ */
25
+ (function($){
26
+ /*plugin script*/
27
+ var methods={
28
+ init:function(options){
29
+ var defaults={
30
+ set_width:false, /*optional element width: boolean, pixels, percentage*/
31
+ set_height:false, /*optional element height: boolean, pixels, percentage*/
32
+ horizontalScroll:false, /*scroll horizontally: boolean*/
33
+ scrollInertia:950, /*scrolling inertia: integer (milliseconds)*/
34
+ mouseWheel:true, /*mousewheel support: boolean*/
35
+ mouseWheelPixels:"auto", /*mousewheel pixels amount: integer, "auto"*/
36
+ autoDraggerLength:true, /*auto-adjust scrollbar dragger length: boolean*/
37
+ autoHideScrollbar:false, /*auto-hide scrollbar when idle*/
38
+ snapAmount:null, /* optional element always snaps to a multiple of this number in pixels */
39
+ snapOffset:0, /* when snapping, snap with this number in pixels as an offset */
40
+ scrollButtons:{ /*scroll buttons*/
41
+ enable:false, /*scroll buttons support: boolean*/
42
+ scrollType:"continuous", /*scroll buttons scrolling type: "continuous", "pixels"*/
43
+ scrollSpeed:"auto", /*scroll buttons continuous scrolling speed: integer, "auto"*/
44
+ scrollAmount:40 /*scroll buttons pixels scroll amount: integer (pixels)*/
45
+ },
46
+ advanced:{
47
+ updateOnBrowserResize:true, /*update scrollbars on browser resize (for layouts based on percentages): boolean*/
48
+ updateOnContentResize:false, /*auto-update scrollbars on content resize (for dynamic content): boolean*/
49
+ autoExpandHorizontalScroll:false, /*auto-expand width for horizontal scrolling: boolean*/
50
+ autoScrollOnFocus:true, /*auto-scroll on focused elements: boolean*/
51
+ normalizeMouseWheelDelta:false /*normalize mouse-wheel delta (-1/1)*/
52
+ },
53
+ contentTouchScroll:true, /*scrolling by touch-swipe content: boolean*/
54
+ callbacks:{
55
+ onScrollStart:function(){}, /*user custom callback function on scroll start event*/
56
+ onScroll:function(){}, /*user custom callback function on scroll event*/
57
+ onTotalScroll:function(){}, /*user custom callback function on scroll end reached event*/
58
+ onTotalScrollBack:function(){}, /*user custom callback function on scroll begin reached event*/
59
+ onTotalScrollOffset:0, /*scroll end reached offset: integer (pixels)*/
60
+ onTotalScrollBackOffset:0, /*scroll begin reached offset: integer (pixels)*/
61
+ whileScrolling:function(){} /*user custom callback function on scrolling event*/
62
+ },
63
+ theme:"light" /*"light", "dark", "light-2", "dark-2", "light-thick", "dark-thick", "light-thin", "dark-thin"*/
64
+ },
65
+ options=$.extend(true,defaults,options);
66
+ return this.each(function(){
67
+ var $this=$(this);
68
+ /*set element width/height, create markup for custom scrollbars, add classes*/
69
+ if(options.set_width){
70
+ $this.css("width",options.set_width);
71
+ }
72
+ if(options.set_height){
73
+ $this.css("height",options.set_height);
74
+ }
75
+ if(!$(document).data("mCustomScrollbar-index")){
76
+ $(document).data("mCustomScrollbar-index","1");
77
+ }else{
78
+ var mCustomScrollbarIndex=parseInt($(document).data("mCustomScrollbar-index"));
79
+ $(document).data("mCustomScrollbar-index",mCustomScrollbarIndex+1);
80
+ }
81
+ $this.wrapInner("<div class='mCustomScrollBox"+" mCS-"+options.theme+"' id='mCSB_"+$(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+$(document).data("mCustomScrollbar-index"));
82
+ var mCustomScrollBox=$this.children(".mCustomScrollBox");
83
+ if(options.horizontalScroll){
84
+ mCustomScrollBox.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");
85
+ var mCSB_h_wrapper=mCustomScrollBox.children(".mCSB_h_wrapper");
86
+ mCSB_h_wrapper.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({"width":mCSB_h_wrapper.children().outerWidth(),"position":"relative"}).unwrap();
87
+ }else{
88
+ mCustomScrollBox.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");
89
+ }
90
+ var mCSB_container=mCustomScrollBox.children(".mCSB_container");
91
+ if($.support.touch){
92
+ mCSB_container.addClass("mCS_touch");
93
+ }
94
+ mCSB_container.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>");
95
+ var mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
96
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
97
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger");
98
+ if(options.horizontalScroll){
99
+ mCSB_dragger.data("minDraggerWidth",mCSB_dragger.width());
100
+ }else{
101
+ mCSB_dragger.data("minDraggerHeight",mCSB_dragger.height());
102
+ }
103
+ if(options.scrollButtons.enable){
104
+ if(options.horizontalScroll){
105
+ mCSB_scrollTools.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'></a>");
106
+ }else{
107
+ mCSB_scrollTools.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'></a>");
108
+ }
109
+ }
110
+ /*mCustomScrollBox scrollTop and scrollLeft is always 0 to prevent browser focus scrolling*/
111
+ mCustomScrollBox.bind("scroll",function(){
112
+ if(!$this.is(".mCS_disabled")){ /*native focus scrolling for disabled scrollbars*/
113
+ mCustomScrollBox.scrollTop(0).scrollLeft(0);
114
+ }
115
+ });
116
+ /*store options, global vars/states, intervals*/
117
+ $this.data({
118
+ /*init state*/
119
+ "mCS_Init":true,
120
+ /*instance index*/
121
+ "mCustomScrollbarIndex":$(document).data("mCustomScrollbar-index"),
122
+ /*option parameters*/
123
+ "horizontalScroll":options.horizontalScroll,
124
+ "scrollInertia":options.scrollInertia,
125
+ "scrollEasing":"mcsEaseOut",
126
+ "mouseWheel":options.mouseWheel,
127
+ "mouseWheelPixels":options.mouseWheelPixels,
128
+ "autoDraggerLength":options.autoDraggerLength,
129
+ "autoHideScrollbar":options.autoHideScrollbar,
130
+ "snapAmount":options.snapAmount,
131
+ "snapOffset":options.snapOffset,
132
+ "scrollButtons_enable":options.scrollButtons.enable,
133
+ "scrollButtons_scrollType":options.scrollButtons.scrollType,
134
+ "scrollButtons_scrollSpeed":options.scrollButtons.scrollSpeed,
135
+ "scrollButtons_scrollAmount":options.scrollButtons.scrollAmount,
136
+ "autoExpandHorizontalScroll":options.advanced.autoExpandHorizontalScroll,
137
+ "autoScrollOnFocus":options.advanced.autoScrollOnFocus,
138
+ "normalizeMouseWheelDelta":options.advanced.normalizeMouseWheelDelta,
139
+ "contentTouchScroll":options.contentTouchScroll,
140
+ "onScrollStart_Callback":options.callbacks.onScrollStart,
141
+ "onScroll_Callback":options.callbacks.onScroll,
142
+ "onTotalScroll_Callback":options.callbacks.onTotalScroll,
143
+ "onTotalScrollBack_Callback":options.callbacks.onTotalScrollBack,
144
+ "onTotalScroll_Offset":options.callbacks.onTotalScrollOffset,
145
+ "onTotalScrollBack_Offset":options.callbacks.onTotalScrollBackOffset,
146
+ "whileScrolling_Callback":options.callbacks.whileScrolling,
147
+ /*events binding state*/
148
+ "bindEvent_scrollbar_drag":false,
149
+ "bindEvent_content_touch":false,
150
+ "bindEvent_scrollbar_click":false,
151
+ "bindEvent_mousewheel":false,
152
+ "bindEvent_buttonsContinuous_y":false,
153
+ "bindEvent_buttonsContinuous_x":false,
154
+ "bindEvent_buttonsPixels_y":false,
155
+ "bindEvent_buttonsPixels_x":false,
156
+ "bindEvent_focusin":false,
157
+ "bindEvent_autoHideScrollbar":false,
158
+ /*buttons intervals*/
159
+ "mCSB_buttonScrollRight":false,
160
+ "mCSB_buttonScrollLeft":false,
161
+ "mCSB_buttonScrollDown":false,
162
+ "mCSB_buttonScrollUp":false
163
+ });
164
+ /*max-width/max-height*/
165
+ if(options.horizontalScroll){
166
+ if($this.css("max-width")!=="none"){
167
+ if(!options.advanced.updateOnContentResize){ /*needs updateOnContentResize*/
168
+ options.advanced.updateOnContentResize=true;
169
+ }
170
+ }
171
+ }else{
172
+ if($this.css("max-height")!=="none"){
173
+ var percentage=false,maxHeight=parseInt($this.css("max-height"));
174
+ if($this.css("max-height").indexOf("%")>=0){
175
+ percentage=maxHeight,
176
+ maxHeight=$this.parent().height()*percentage/100;
177
+ }
178
+ $this.css("overflow","hidden");
179
+ mCustomScrollBox.css("max-height",maxHeight);
180
+ }
181
+ }
182
+ $this.mCustomScrollbar("update");
183
+ /*window resize fn (for layouts based on percentages)*/
184
+ if(options.advanced.updateOnBrowserResize){
185
+ var mCSB_resizeTimeout,currWinWidth=$(window).width(),currWinHeight=$(window).height();
186
+ $(window).bind("resize."+$this.data("mCustomScrollbarIndex"),function(){
187
+ if(mCSB_resizeTimeout){
188
+ clearTimeout(mCSB_resizeTimeout);
189
+ }
190
+ mCSB_resizeTimeout=setTimeout(function(){
191
+ if(!$this.is(".mCS_disabled") && !$this.is(".mCS_destroyed")){
192
+ var winWidth=$(window).width(),winHeight=$(window).height();
193
+ if(currWinWidth!==winWidth || currWinHeight!==winHeight){ /*ie8 fix*/
194
+ if($this.css("max-height")!=="none" && percentage){
195
+ mCustomScrollBox.css("max-height",$this.parent().height()*percentage/100);
196
+ }
197
+ $this.mCustomScrollbar("update");
198
+ currWinWidth=winWidth; currWinHeight=winHeight;
199
+ }
200
+ }
201
+ },150);
202
+ });
203
+ }
204
+ /*content resize fn (for dynamically generated content)*/
205
+ if(options.advanced.updateOnContentResize){
206
+ var mCSB_onContentResize;
207
+ if(options.horizontalScroll){
208
+ var mCSB_containerOldSize=mCSB_container.outerWidth();
209
+ }else{
210
+ var mCSB_containerOldSize=mCSB_container.outerHeight();
211
+ }
212
+ mCSB_onContentResize=setInterval(function(){
213
+ if(options.horizontalScroll){
214
+ if(options.advanced.autoExpandHorizontalScroll){
215
+ mCSB_container.css({"position":"absolute","width":"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":mCSB_container.outerWidth(),"position":"relative"}).unwrap();
216
+ }
217
+ var mCSB_containerNewSize=mCSB_container.outerWidth();
218
+ }else{
219
+ var mCSB_containerNewSize=mCSB_container.outerHeight();
220
+ }
221
+ if(mCSB_containerNewSize!=mCSB_containerOldSize){
222
+ $this.mCustomScrollbar("update");
223
+ mCSB_containerOldSize=mCSB_containerNewSize;
224
+ }
225
+ },300);
226
+ }
227
+ });
228
+ },
229
+ update:function(){
230
+ var $this=$(this),
231
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
232
+ mCSB_container=mCustomScrollBox.children(".mCSB_container");
233
+ mCSB_container.removeClass("mCS_no_scrollbar");
234
+ $this.removeClass("mCS_disabled mCS_destroyed");
235
+ mCustomScrollBox.scrollTop(0).scrollLeft(0); /*reset scrollTop/scrollLeft to prevent browser focus scrolling*/
236
+ var mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
237
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
238
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger");
239
+ if($this.data("horizontalScroll")){
240
+ var mCSB_buttonLeft=mCSB_scrollTools.children(".mCSB_buttonLeft"),
241
+ mCSB_buttonRight=mCSB_scrollTools.children(".mCSB_buttonRight"),
242
+ mCustomScrollBoxW=mCustomScrollBox.width();
243
+ if($this.data("autoExpandHorizontalScroll")){
244
+ mCSB_container.css({"position":"absolute","width":"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":mCSB_container.outerWidth(),"position":"relative"}).unwrap();
245
+ }
246
+ var mCSB_containerW=mCSB_container.outerWidth();
247
+ }else{
248
+ var mCSB_buttonUp=mCSB_scrollTools.children(".mCSB_buttonUp"),
249
+ mCSB_buttonDown=mCSB_scrollTools.children(".mCSB_buttonDown"),
250
+ mCustomScrollBoxH=mCustomScrollBox.height(),
251
+ mCSB_containerH=mCSB_container.outerHeight();
252
+ }
253
+ if(mCSB_containerH>mCustomScrollBoxH && !$this.data("horizontalScroll")){ /*content needs vertical scrolling*/
254
+ mCSB_scrollTools.css("display","block");
255
+ var mCSB_draggerContainerH=mCSB_draggerContainer.height();
256
+ /*auto adjust scrollbar dragger length analogous to content*/
257
+ if($this.data("autoDraggerLength")){
258
+ var draggerH=Math.round(mCustomScrollBoxH/mCSB_containerH*mCSB_draggerContainerH),
259
+ minDraggerH=mCSB_dragger.data("minDraggerHeight");
260
+ if(draggerH<=minDraggerH){ /*min dragger height*/
261
+ mCSB_dragger.css({"height":minDraggerH});
262
+ }else if(draggerH>=mCSB_draggerContainerH-10){ /*max dragger height*/
263
+ var mCSB_draggerContainerMaxH=mCSB_draggerContainerH-10;
264
+ mCSB_dragger.css({"height":mCSB_draggerContainerMaxH});
265
+ }else{
266
+ mCSB_dragger.css({"height":draggerH});
267
+ }
268
+ mCSB_dragger.children(".mCSB_dragger_bar").css({"line-height":mCSB_dragger.height()+"px"});
269
+ }
270
+ var mCSB_draggerH=mCSB_dragger.height(),
271
+ /*calculate and store scroll amount, add scrolling*/
272
+ scrollAmount=(mCSB_containerH-mCustomScrollBoxH)/(mCSB_draggerContainerH-mCSB_draggerH);
273
+ $this.data("scrollAmount",scrollAmount).mCustomScrollbar("scrolling",mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight);
274
+ /*scroll*/
275
+ var mCSB_containerP=Math.abs(mCSB_container.position().top);
276
+ $this.mCustomScrollbar("scrollTo",mCSB_containerP,{scrollInertia:0,trigger:"internal"});
277
+ }else if(mCSB_containerW>mCustomScrollBoxW && $this.data("horizontalScroll")){ /*content needs horizontal scrolling*/
278
+ mCSB_scrollTools.css("display","block");
279
+ var mCSB_draggerContainerW=mCSB_draggerContainer.width();
280
+ /*auto adjust scrollbar dragger length analogous to content*/
281
+ if($this.data("autoDraggerLength")){
282
+ var draggerW=Math.round(mCustomScrollBoxW/mCSB_containerW*mCSB_draggerContainerW),
283
+ minDraggerW=mCSB_dragger.data("minDraggerWidth");
284
+ if(draggerW<=minDraggerW){ /*min dragger height*/
285
+ mCSB_dragger.css({"width":minDraggerW});
286
+ }else if(draggerW>=mCSB_draggerContainerW-10){ /*max dragger height*/
287
+ var mCSB_draggerContainerMaxW=mCSB_draggerContainerW-10;
288
+ mCSB_dragger.css({"width":mCSB_draggerContainerMaxW});
289
+ }else{
290
+ mCSB_dragger.css({"width":draggerW});
291
+ }
292
+ }
293
+ var mCSB_draggerW=mCSB_dragger.width(),
294
+ /*calculate and store scroll amount, add scrolling*/
295
+ scrollAmount=(mCSB_containerW-mCustomScrollBoxW)/(mCSB_draggerContainerW-mCSB_draggerW);
296
+ $this.data("scrollAmount",scrollAmount).mCustomScrollbar("scrolling",mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight);
297
+ /*scroll*/
298
+ var mCSB_containerP=Math.abs(mCSB_container.position().left);
299
+ $this.mCustomScrollbar("scrollTo",mCSB_containerP,{scrollInertia:0,trigger:"internal"});
300
+ }else{ /*content does not need scrolling*/
301
+ /*unbind events, reset content position, hide scrollbars, remove classes*/
302
+ mCustomScrollBox.unbind("mousewheel focusin");
303
+ if($this.data("horizontalScroll")){
304
+ mCSB_dragger.add(mCSB_container).css("left",0);
305
+ }else{
306
+ mCSB_dragger.add(mCSB_container).css("top",0);
307
+ }
308
+ mCSB_scrollTools.css("display","none");
309
+ mCSB_container.addClass("mCS_no_scrollbar");
310
+ $this.data({"bindEvent_mousewheel":false,"bindEvent_focusin":false});
311
+ }
312
+ },
313
+ scrolling:function(mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight){
314
+ var $this=$(this);
315
+ /*scrollbar drag scrolling*/
316
+ if(!$this.data("bindEvent_scrollbar_drag")){
317
+ var mCSB_draggerDragY,mCSB_draggerDragX;
318
+ if($.support.msPointer){ /*MSPointer*/
319
+ mCSB_dragger.bind("MSPointerDown",function(e){
320
+ e.preventDefault();
321
+ $this.data({"on_drag":true}); mCSB_dragger.addClass("mCSB_dragger_onDrag");
322
+ var elem=$(this),
323
+ elemOffset=elem.offset(),
324
+ x=e.originalEvent.pageX-elemOffset.left,
325
+ y=e.originalEvent.pageY-elemOffset.top;
326
+ if(x<elem.width() && x>0 && y<elem.height() && y>0){
327
+ mCSB_draggerDragY=y;
328
+ mCSB_draggerDragX=x;
329
+ }
330
+ });
331
+ $(document).bind("MSPointerMove."+$this.data("mCustomScrollbarIndex"),function(e){
332
+ e.preventDefault();
333
+ if($this.data("on_drag")){
334
+ var elem=mCSB_dragger,
335
+ elemOffset=elem.offset(),
336
+ x=e.originalEvent.pageX-elemOffset.left,
337
+ y=e.originalEvent.pageY-elemOffset.top;
338
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
339
+ }
340
+ }).bind("MSPointerUp."+$this.data("mCustomScrollbarIndex"),function(e){
341
+ $this.data({"on_drag":false}); mCSB_dragger.removeClass("mCSB_dragger_onDrag");
342
+ });
343
+ }else{ /*mouse/touch*/
344
+ mCSB_dragger.bind("mousedown touchstart",function(e){
345
+ e.preventDefault(); e.stopImmediatePropagation();
346
+ var elem=$(this),elemOffset=elem.offset(),x,y;
347
+ if(e.type==="touchstart"){
348
+ var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
349
+ x=touch.pageX-elemOffset.left; y=touch.pageY-elemOffset.top;
350
+ }else{
351
+ $this.data({"on_drag":true}); mCSB_dragger.addClass("mCSB_dragger_onDrag");
352
+ x=e.pageX-elemOffset.left; y=e.pageY-elemOffset.top;
353
+ }
354
+ if(x<elem.width() && x>0 && y<elem.height() && y>0){
355
+ mCSB_draggerDragY=y; mCSB_draggerDragX=x;
356
+ }
357
+ }).bind("touchmove",function(e){
358
+ e.preventDefault(); e.stopImmediatePropagation();
359
+ var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0],
360
+ elem=$(this),
361
+ elemOffset=elem.offset(),
362
+ x=touch.pageX-elemOffset.left,
363
+ y=touch.pageY-elemOffset.top;
364
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
365
+ });
366
+ $(document).bind("mousemove."+$this.data("mCustomScrollbarIndex"),function(e){
367
+ if($this.data("on_drag")){
368
+ var elem=mCSB_dragger,
369
+ elemOffset=elem.offset(),
370
+ x=e.pageX-elemOffset.left,
371
+ y=e.pageY-elemOffset.top;
372
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
373
+ }
374
+ }).bind("mouseup."+$this.data("mCustomScrollbarIndex"),function(e){
375
+ $this.data({"on_drag":false}); mCSB_dragger.removeClass("mCSB_dragger_onDrag");
376
+ });
377
+ }
378
+ $this.data({"bindEvent_scrollbar_drag":true});
379
+ }
380
+ function scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x){
381
+ if($this.data("horizontalScroll")){
382
+ $this.mCustomScrollbar("scrollTo",(mCSB_dragger.position().left-(mCSB_draggerDragX))+x,{moveDragger:true,trigger:"internal"});
383
+ }else{
384
+ $this.mCustomScrollbar("scrollTo",(mCSB_dragger.position().top-(mCSB_draggerDragY))+y,{moveDragger:true,trigger:"internal"});
385
+ }
386
+ }
387
+ /*content touch-drag*/
388
+ if($.support.touch && $this.data("contentTouchScroll")){
389
+ if(!$this.data("bindEvent_content_touch")){
390
+ var touch,
391
+ elem,elemOffset,y,x,mCSB_containerTouchY,mCSB_containerTouchX;
392
+ mCSB_container.bind("touchstart",function(e){
393
+ e.stopImmediatePropagation();
394
+ touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
395
+ elem=$(this);
396
+ elemOffset=elem.offset();
397
+ x=touch.pageX-elemOffset.left;
398
+ y=touch.pageY-elemOffset.top;
399
+ mCSB_containerTouchY=y;
400
+ mCSB_containerTouchX=x;
401
+ });
402
+ mCSB_container.bind("touchmove",function(e){
403
+ e.preventDefault(); e.stopImmediatePropagation();
404
+ touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
405
+ elem=$(this).parent();
406
+ elemOffset=elem.offset();
407
+ x=touch.pageX-elemOffset.left;
408
+ y=touch.pageY-elemOffset.top;
409
+ if($this.data("horizontalScroll")){
410
+ $this.mCustomScrollbar("scrollTo",mCSB_containerTouchX-x,{trigger:"internal"});
411
+ }else{
412
+ $this.mCustomScrollbar("scrollTo",mCSB_containerTouchY-y,{trigger:"internal"});
413
+ }
414
+ });
415
+ }
416
+ }
417
+ /*dragger rail click scrolling*/
418
+ if(!$this.data("bindEvent_scrollbar_click")){
419
+ mCSB_draggerContainer.bind("click",function(e){
420
+ var scrollToPos=(e.pageY-mCSB_draggerContainer.offset().top)*$this.data("scrollAmount"),target=$(e.target);
421
+ if($this.data("horizontalScroll")){
422
+ scrollToPos=(e.pageX-mCSB_draggerContainer.offset().left)*$this.data("scrollAmount");
423
+ }
424
+ if(target.hasClass("mCSB_draggerContainer") || target.hasClass("mCSB_draggerRail")){
425
+ $this.mCustomScrollbar("scrollTo",scrollToPos,{trigger:"internal",scrollEasing:"draggerRailEase"});
426
+ }
427
+ });
428
+ $this.data({"bindEvent_scrollbar_click":true});
429
+ }
430
+ /*mousewheel scrolling*/
431
+ if($this.data("mouseWheel")){
432
+ if(!$this.data("bindEvent_mousewheel")){
433
+ mCustomScrollBox.bind("mousewheel",function(e,delta){
434
+ var scrollTo,mouseWheelPixels=$this.data("mouseWheelPixels"),absPos=Math.abs(mCSB_container.position().top),
435
+ draggerPos=mCSB_dragger.position().top,limit=mCSB_draggerContainer.height()-mCSB_dragger.height();
436
+ if($this.data("normalizeMouseWheelDelta")){
437
+ if(delta<0){delta=-1;}else{delta=1;}
438
+ }
439
+ if(mouseWheelPixels==="auto"){
440
+ mouseWheelPixels=100+Math.round($this.data("scrollAmount")/2);
441
+ }
442
+ if($this.data("horizontalScroll")){
443
+ draggerPos=mCSB_dragger.position().left;
444
+ limit=mCSB_draggerContainer.width()-mCSB_dragger.width();
445
+ absPos=Math.abs(mCSB_container.position().left);
446
+ }
447
+ if((delta>0 && draggerPos!==0) || (delta<0 && draggerPos!==limit)){e.preventDefault(); e.stopImmediatePropagation();}
448
+ scrollTo=absPos-(delta*mouseWheelPixels);
449
+ $this.mCustomScrollbar("scrollTo",scrollTo,{trigger:"internal"});
450
+ });
451
+ $this.data({"bindEvent_mousewheel":true});
452
+ }
453
+ }
454
+ /*buttons scrolling*/
455
+ if($this.data("scrollButtons_enable")){
456
+ if($this.data("scrollButtons_scrollType")==="pixels"){ /*scroll by pixels*/
457
+ if($this.data("horizontalScroll")){
458
+ mCSB_buttonRight.add(mCSB_buttonLeft).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",mCSB_buttonRight_stop,mCSB_buttonLeft_stop);
459
+ $this.data({"bindEvent_buttonsContinuous_x":false});
460
+ if(!$this.data("bindEvent_buttonsPixels_x")){
461
+ /*scroll right*/
462
+ mCSB_buttonRight.bind("click",function(e){
463
+ e.preventDefault();
464
+ PixelsScrollTo(Math.abs(mCSB_container.position().left)+$this.data("scrollButtons_scrollAmount"));
465
+ });
466
+ /*scroll left*/
467
+ mCSB_buttonLeft.bind("click",function(e){
468
+ e.preventDefault();
469
+ PixelsScrollTo(Math.abs(mCSB_container.position().left)-$this.data("scrollButtons_scrollAmount"));
470
+ });
471
+ $this.data({"bindEvent_buttonsPixels_x":true});
472
+ }
473
+ }else{
474
+ mCSB_buttonDown.add(mCSB_buttonUp).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",mCSB_buttonRight_stop,mCSB_buttonLeft_stop);
475
+ $this.data({"bindEvent_buttonsContinuous_y":false});
476
+ if(!$this.data("bindEvent_buttonsPixels_y")){
477
+ /*scroll down*/
478
+ mCSB_buttonDown.bind("click",function(e){
479
+ e.preventDefault();
480
+ PixelsScrollTo(Math.abs(mCSB_container.position().top)+$this.data("scrollButtons_scrollAmount"));
481
+ });
482
+ /*scroll up*/
483
+ mCSB_buttonUp.bind("click",function(e){
484
+ e.preventDefault();
485
+ PixelsScrollTo(Math.abs(mCSB_container.position().top)-$this.data("scrollButtons_scrollAmount"));
486
+ });
487
+ $this.data({"bindEvent_buttonsPixels_y":true});
488
+ }
489
+ }
490
+ function PixelsScrollTo(to){
491
+ if(!mCSB_dragger.data("preventAction")){
492
+ mCSB_dragger.data("preventAction",true);
493
+ $this.mCustomScrollbar("scrollTo",to,{trigger:"internal"});
494
+ }
495
+ }
496
+ }else{ /*continuous scrolling*/
497
+ if($this.data("horizontalScroll")){
498
+ mCSB_buttonRight.add(mCSB_buttonLeft).unbind("click");
499
+ $this.data({"bindEvent_buttonsPixels_x":false});
500
+ if(!$this.data("bindEvent_buttonsContinuous_x")){
501
+ /*scroll right*/
502
+ mCSB_buttonRight.bind("mousedown touchstart MSPointerDown",function(e){
503
+ e.preventDefault();
504
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
505
+ $this.data({"mCSB_buttonScrollRight":setInterval(function(){
506
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().left)+scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
507
+ },17)});
508
+ });
509
+ var mCSB_buttonRight_stop=function(e){
510
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollRight"));
511
+ }
512
+ mCSB_buttonRight.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonRight_stop);
513
+ /*scroll left*/
514
+ mCSB_buttonLeft.bind("mousedown touchstart MSPointerDown",function(e){
515
+ e.preventDefault();
516
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
517
+ $this.data({"mCSB_buttonScrollLeft":setInterval(function(){
518
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().left)-scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
519
+ },17)});
520
+ });
521
+ var mCSB_buttonLeft_stop=function(e){
522
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollLeft"));
523
+ }
524
+ mCSB_buttonLeft.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonLeft_stop);
525
+ $this.data({"bindEvent_buttonsContinuous_x":true});
526
+ }
527
+ }else{
528
+ mCSB_buttonDown.add(mCSB_buttonUp).unbind("click");
529
+ $this.data({"bindEvent_buttonsPixels_y":false});
530
+ if(!$this.data("bindEvent_buttonsContinuous_y")){
531
+ /*scroll down*/
532
+ mCSB_buttonDown.bind("mousedown touchstart MSPointerDown",function(e){
533
+ e.preventDefault();
534
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
535
+ $this.data({"mCSB_buttonScrollDown":setInterval(function(){
536
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().top)+scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
537
+ },17)});
538
+ });
539
+ var mCSB_buttonDown_stop=function(e){
540
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollDown"));
541
+ }
542
+ mCSB_buttonDown.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonDown_stop);
543
+ /*scroll up*/
544
+ mCSB_buttonUp.bind("mousedown touchstart MSPointerDown",function(e){
545
+ e.preventDefault();
546
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
547
+ $this.data({"mCSB_buttonScrollUp":setInterval(function(){
548
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().top)-scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
549
+ },17)});
550
+ });
551
+ var mCSB_buttonUp_stop=function(e){
552
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollUp"));
553
+ }
554
+ mCSB_buttonUp.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonUp_stop);
555
+ $this.data({"bindEvent_buttonsContinuous_y":true});
556
+ }
557
+ }
558
+ function ScrollButtonsSpeed(){
559
+ var speed=$this.data("scrollButtons_scrollSpeed");
560
+ if($this.data("scrollButtons_scrollSpeed")==="auto"){
561
+ speed=Math.round(($this.data("scrollInertia")+100)/40);
562
+ }
563
+ return speed;
564
+ }
565
+ }
566
+ }
567
+ /*scrolling on element focus (e.g. via TAB key)*/
568
+ if($this.data("autoScrollOnFocus")){
569
+ if(!$this.data("bindEvent_focusin")){
570
+ mCustomScrollBox.bind("focusin",function(){
571
+ mCustomScrollBox.scrollTop(0).scrollLeft(0);
572
+ var focusedElem=$(document.activeElement);
573
+ if(focusedElem.is("input,textarea,select,button,a[tabindex],area,object")){
574
+ var mCSB_containerPos=mCSB_container.position().top,
575
+ focusedElemPos=focusedElem.position().top,
576
+ visibleLimit=mCustomScrollBox.height()-focusedElem.outerHeight();
577
+ if($this.data("horizontalScroll")){
578
+ mCSB_containerPos=mCSB_container.position().left;
579
+ focusedElemPos=focusedElem.position().left;
580
+ visibleLimit=mCustomScrollBox.width()-focusedElem.outerWidth();
581
+ }
582
+ if(mCSB_containerPos+focusedElemPos<0 || mCSB_containerPos+focusedElemPos>visibleLimit){
583
+ $this.mCustomScrollbar("scrollTo",focusedElemPos,{trigger:"internal"});
584
+ }
585
+ }
586
+ });
587
+ $this.data({"bindEvent_focusin":true});
588
+ }
589
+ }
590
+ /*auto-hide scrollbar*/
591
+ if($this.data("autoHideScrollbar")){
592
+ if(!$this.data("bindEvent_autoHideScrollbar")){
593
+ mCustomScrollBox.bind("mouseenter",function(e){
594
+ mCustomScrollBox.addClass("mCS-mouse-over");
595
+ functions.showScrollbar.call(mCustomScrollBox.children(".mCSB_scrollTools"));
596
+ }).bind("mouseleave touchend",function(e){
597
+ mCustomScrollBox.removeClass("mCS-mouse-over");
598
+ if(e.type==="mouseleave"){functions.hideScrollbar.call(mCustomScrollBox.children(".mCSB_scrollTools"));}
599
+ });
600
+ $this.data({"bindEvent_autoHideScrollbar":true});
601
+ }
602
+ }
603
+ },
604
+ scrollTo:function(scrollTo,options){
605
+ var $this=$(this),
606
+ defaults={
607
+ moveDragger:false,
608
+ trigger:"external",
609
+ callbacks:true,
610
+ scrollInertia:$this.data("scrollInertia"),
611
+ scrollEasing:$this.data("scrollEasing")
612
+ },
613
+ options=$.extend(defaults,options),
614
+ draggerScrollTo,
615
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
616
+ mCSB_container=mCustomScrollBox.children(".mCSB_container"),
617
+ mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
618
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
619
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger"),
620
+ contentSpeed=draggerSpeed=options.scrollInertia,
621
+ scrollBeginning,scrollBeginningOffset,totalScroll,totalScrollOffset;
622
+ if(!mCSB_container.hasClass("mCS_no_scrollbar")){
623
+ $this.data({"mCS_trigger":options.trigger});
624
+ if($this.data("mCS_Init")){options.callbacks=false;}
625
+ if(scrollTo || scrollTo===0){
626
+ if(typeof(scrollTo)==="number"){ /*if integer, scroll by number of pixels*/
627
+ if(options.moveDragger){ /*scroll dragger*/
628
+ draggerScrollTo=scrollTo;
629
+ if($this.data("horizontalScroll")){
630
+ scrollTo=mCSB_dragger.position().left*$this.data("scrollAmount");
631
+ }else{
632
+ scrollTo=mCSB_dragger.position().top*$this.data("scrollAmount");
633
+ }
634
+ draggerSpeed=0;
635
+ }else{ /*scroll content by default*/
636
+ draggerScrollTo=scrollTo/$this.data("scrollAmount");
637
+ }
638
+ }else if(typeof(scrollTo)==="string"){ /*if string, scroll by element position*/
639
+ var target;
640
+ if(scrollTo==="top"){ /*scroll to top*/
641
+ target=0;
642
+ }else if(scrollTo==="bottom" && !$this.data("horizontalScroll")){ /*scroll to bottom*/
643
+ target=mCSB_container.outerHeight()-mCustomScrollBox.height();
644
+ }else if(scrollTo==="left"){ /*scroll to left*/
645
+ target=0;
646
+ }else if(scrollTo==="right" && $this.data("horizontalScroll")){ /*scroll to right*/
647
+ target=mCSB_container.outerWidth()-mCustomScrollBox.width();
648
+ }else if(scrollTo==="first"){ /*scroll to first element position*/
649
+ target=$this.find(".mCSB_container").find(":first");
650
+ }else if(scrollTo==="last"){ /*scroll to last element position*/
651
+ target=$this.find(".mCSB_container").find(":last");
652
+ }else{ /*scroll to element position*/
653
+ target=$this.find(scrollTo);
654
+ }
655
+ if(target.length===1){ /*if such unique element exists, scroll to it*/
656
+ if($this.data("horizontalScroll")){
657
+ scrollTo=target.position().left;
658
+ }else{
659
+ scrollTo=target.position().top;
660
+ }
661
+ draggerScrollTo=scrollTo/$this.data("scrollAmount");
662
+ }else{
663
+ draggerScrollTo=scrollTo=target;
664
+ }
665
+ }
666
+ /*scroll to*/
667
+ if($this.data("horizontalScroll")){
668
+ if($this.data("onTotalScrollBack_Offset")){ /*scroll beginning offset*/
669
+ scrollBeginningOffset=-$this.data("onTotalScrollBack_Offset");
670
+ }
671
+ if($this.data("onTotalScroll_Offset")){ /*total scroll offset*/
672
+ totalScrollOffset=mCustomScrollBox.width()-mCSB_container.outerWidth()+$this.data("onTotalScroll_Offset");
673
+ }
674
+ if(draggerScrollTo<0){ /*scroll start position*/
675
+ draggerScrollTo=scrollTo=0; clearInterval($this.data("mCSB_buttonScrollLeft"));
676
+ if(!scrollBeginningOffset){scrollBeginning=true;}
677
+ }else if(draggerScrollTo>=mCSB_draggerContainer.width()-mCSB_dragger.width()){ /*scroll end position*/
678
+ draggerScrollTo=mCSB_draggerContainer.width()-mCSB_dragger.width();
679
+ scrollTo=mCustomScrollBox.width()-mCSB_container.outerWidth(); clearInterval($this.data("mCSB_buttonScrollRight"));
680
+ if(!totalScrollOffset){totalScroll=true;}
681
+ }else{scrollTo=-scrollTo;}
682
+ var snapAmount = $this.data("snapAmount");
683
+ if (snapAmount) {
684
+ scrollTo = Math.round(scrollTo / snapAmount) * snapAmount - $this.data("snapOffset");
685
+ }
686
+ /*scrolling animation*/
687
+ functions.mTweenAxis.call(this,mCSB_dragger[0],"left",Math.round(draggerScrollTo),draggerSpeed,options.scrollEasing);
688
+ functions.mTweenAxis.call(this,mCSB_container[0],"left",Math.round(scrollTo),contentSpeed,options.scrollEasing,{
689
+ onStart:function(){
690
+ if(options.callbacks && !$this.data("mCS_tweenRunning")){callbacks("onScrollStart");}
691
+ if($this.data("autoHideScrollbar")){functions.showScrollbar.call(mCSB_scrollTools);}
692
+ },
693
+ onUpdate:function(){
694
+ if(options.callbacks){callbacks("whileScrolling");}
695
+ },
696
+ onComplete:function(){
697
+ if(options.callbacks){
698
+ callbacks("onScroll");
699
+ if(scrollBeginning || (scrollBeginningOffset && mCSB_container.position().left>=scrollBeginningOffset)){callbacks("onTotalScrollBack");}
700
+ if(totalScroll || (totalScrollOffset && mCSB_container.position().left<=totalScrollOffset)){callbacks("onTotalScroll");}
701
+ }
702
+ mCSB_dragger.data("preventAction",false); $this.data("mCS_tweenRunning",false);
703
+ if($this.data("autoHideScrollbar")){if(!mCustomScrollBox.hasClass("mCS-mouse-over")){functions.hideScrollbar.call(mCSB_scrollTools);}}
704
+ }
705
+ });
706
+ }else{
707
+ if($this.data("onTotalScrollBack_Offset")){ /*scroll beginning offset*/
708
+ scrollBeginningOffset=-$this.data("onTotalScrollBack_Offset");
709
+ }
710
+ if($this.data("onTotalScroll_Offset")){ /*total scroll offset*/
711
+ totalScrollOffset=mCustomScrollBox.height()-mCSB_container.outerHeight()+$this.data("onTotalScroll_Offset");
712
+ }
713
+ if(draggerScrollTo<0){ /*scroll start position*/
714
+ draggerScrollTo=scrollTo=0; clearInterval($this.data("mCSB_buttonScrollUp"));
715
+ if(!scrollBeginningOffset){scrollBeginning=true;}
716
+ }else if(draggerScrollTo>=mCSB_draggerContainer.height()-mCSB_dragger.height()){ /*scroll end position*/
717
+ draggerScrollTo=mCSB_draggerContainer.height()-mCSB_dragger.height();
718
+ scrollTo=mCustomScrollBox.height()-mCSB_container.outerHeight(); clearInterval($this.data("mCSB_buttonScrollDown"));
719
+ if(!totalScrollOffset){totalScroll=true;}
720
+ }else{scrollTo=-scrollTo;}
721
+ var snapAmount = $this.data("snapAmount");
722
+ if (snapAmount) {
723
+ scrollTo = Math.round(scrollTo / snapAmount) * snapAmount - $this.data("snapOffset");
724
+ }
725
+ /*scrolling animation*/
726
+ functions.mTweenAxis.call(this,mCSB_dragger[0],"top",Math.round(draggerScrollTo),draggerSpeed,options.scrollEasing);
727
+ functions.mTweenAxis.call(this,mCSB_container[0],"top",Math.round(scrollTo),contentSpeed,options.scrollEasing,{
728
+ onStart:function(){
729
+ if(options.callbacks && !$this.data("mCS_tweenRunning")){callbacks("onScrollStart");}
730
+ if($this.data("autoHideScrollbar")){functions.showScrollbar.call(mCSB_scrollTools);}
731
+ },
732
+ onUpdate:function(){
733
+ if(options.callbacks){callbacks("whileScrolling");}
734
+ },
735
+ onComplete:function(){
736
+ if(options.callbacks){
737
+ callbacks("onScroll");
738
+ if(scrollBeginning || (scrollBeginningOffset && mCSB_container.position().top>=scrollBeginningOffset)){callbacks("onTotalScrollBack");}
739
+ if(totalScroll || (totalScrollOffset && mCSB_container.position().top<=totalScrollOffset)){callbacks("onTotalScroll");}
740
+ }
741
+ mCSB_dragger.data("preventAction",false); $this.data("mCS_tweenRunning",false);
742
+ if($this.data("autoHideScrollbar")){if(!mCustomScrollBox.hasClass("mCS-mouse-over")){functions.hideScrollbar.call(mCSB_scrollTools);}}
743
+ }
744
+ });
745
+ }
746
+ if($this.data("mCS_Init")){$this.data({"mCS_Init":false});}
747
+ }
748
+ }
749
+ /*callbacks*/
750
+ function callbacks(cb){
751
+ this.mcs={
752
+ top:mCSB_container.position().top,left:mCSB_container.position().left,
753
+ draggerTop:mCSB_dragger.position().top,draggerLeft:mCSB_dragger.position().left,
754
+ topPct:Math.round((100*Math.abs(mCSB_container.position().top))/Math.abs(mCSB_container.outerHeight()-mCustomScrollBox.height())),
755
+ leftPct:Math.round((100*Math.abs(mCSB_container.position().left))/Math.abs(mCSB_container.outerWidth()-mCustomScrollBox.width()))
756
+ };
757
+ switch(cb){
758
+ /*start scrolling callback*/
759
+ case "onScrollStart":
760
+ $this.data("mCS_tweenRunning",true).data("onScrollStart_Callback").call($this,this.mcs);
761
+ break;
762
+ case "whileScrolling":
763
+ $this.data("whileScrolling_Callback").call($this,this.mcs);
764
+ break;
765
+ case "onScroll":
766
+ $this.data("onScroll_Callback").call($this,this.mcs);
767
+ break;
768
+ case "onTotalScrollBack":
769
+ $this.data("onTotalScrollBack_Callback").call($this,this.mcs);
770
+ break;
771
+ case "onTotalScroll":
772
+ $this.data("onTotalScroll_Callback").call($this,this.mcs);
773
+ break;
774
+ }
775
+ }
776
+ },
777
+ stop:function(){
778
+ var $this=$(this),
779
+ mCSB_container=$this.children().children(".mCSB_container"),
780
+ mCSB_dragger=$this.children().children().children().children(".mCSB_dragger");
781
+ functions.mTweenAxisStop.call(this,mCSB_container[0]);
782
+ functions.mTweenAxisStop.call(this,mCSB_dragger[0]);
783
+ },
784
+ disable:function(resetScroll){
785
+ var $this=$(this),
786
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
787
+ mCSB_container=mCustomScrollBox.children(".mCSB_container"),
788
+ mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
789
+ mCSB_dragger=mCSB_scrollTools.children().children(".mCSB_dragger");
790
+ mCustomScrollBox.unbind("mousewheel focusin mouseenter mouseleave touchend");
791
+ mCSB_container.unbind("touchstart touchmove")
792
+ if(resetScroll){
793
+ if($this.data("horizontalScroll")){
794
+ mCSB_dragger.add(mCSB_container).css("left",0);
795
+ }else{
796
+ mCSB_dragger.add(mCSB_container).css("top",0);
797
+ }
798
+ }
799
+ mCSB_scrollTools.css("display","none");
800
+ mCSB_container.addClass("mCS_no_scrollbar");
801
+ $this.data({"bindEvent_mousewheel":false,"bindEvent_focusin":false,"bindEvent_content_touch":false,"bindEvent_autoHideScrollbar":false}).addClass("mCS_disabled");
802
+ },
803
+ destroy:function(){
804
+ var $this=$(this);
805
+ $this.removeClass("mCustomScrollbar _mCS_"+$this.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();
806
+ $(document).unbind("mousemove."+$this.data("mCustomScrollbarIndex")+" mouseup."+$this.data("mCustomScrollbarIndex")+" MSPointerMove."+$this.data("mCustomScrollbarIndex")+" MSPointerUp."+$this.data("mCustomScrollbarIndex"));
807
+ $(window).unbind("resize."+$this.data("mCustomScrollbarIndex"));
808
+ }
809
+ },
810
+ functions={
811
+ /*hide/show scrollbar*/
812
+ showScrollbar:function(){
813
+ this.stop().animate({opacity:1},"fast");
814
+ },
815
+ hideScrollbar:function(){
816
+ this.stop().animate({opacity:0},"fast");
817
+ },
818
+ /*js animation tween*/
819
+ mTweenAxis:function(el,prop,to,duration,easing,callbacks){
820
+ var callbacks=callbacks || {},
821
+ onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){};
822
+ var startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style;
823
+ if(prop==="left"){from=el.offsetLeft;}
824
+ var diff=to-from;
825
+ _cancelTween();
826
+ _startTween();
827
+ function _getTime(){
828
+ if(window.performance && window.performance.now){
829
+ return window.performance.now();
830
+ }else{
831
+ if(window.performance && window.performance.webkitNow){
832
+ return window.performance.webkitNow();
833
+ }else{
834
+ if(Date.now){return Date.now();}else{return new Date().getTime();}
835
+ }
836
+ }
837
+ }
838
+ function _step(){
839
+ if(!progress){onStart.call();}
840
+ progress=_getTime()-startTime;
841
+ _tween();
842
+ if(progress>=el._time){
843
+ el._time=(progress>el._time) ? progress+_delay-(progress- el._time) : progress+_delay-1;
844
+ if(el._time<progress+1){el._time=progress+1;}
845
+ }
846
+ if(el._time<duration){el._id=_request(_step);}else{onComplete.call();}
847
+ }
848
+ function _tween(){
849
+ if(duration>0){
850
+ el.currVal=_ease(el._time,from,diff,duration,easing);
851
+ elStyle[prop]=Math.round(el.currVal)+"px";
852
+ }else{
853
+ elStyle[prop]=to+"px";
854
+ }
855
+ onUpdate.call();
856
+ }
857
+ function _startTween(){
858
+ _delay=1000/60;
859
+ el._time=progress+_delay;
860
+ _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame;
861
+ el._id=_request(_step);
862
+ }
863
+ function _cancelTween(){
864
+ if(el._id==null){return;}
865
+ if(!window.requestAnimationFrame){clearTimeout(el._id);
866
+ }else{window.cancelAnimationFrame(el._id);}
867
+ el._id=null;
868
+ }
869
+ function _ease(t,b,c,d,type){
870
+ switch(type){
871
+ case "linear":
872
+ return c*t/d + b;
873
+ break;
874
+ case "easeOutQuad":
875
+ t /= d; return -c * t*(t-2) + b;
876
+ break;
877
+ case "easeInOutQuad":
878
+ t /= d/2;
879
+ if (t < 1) return c/2*t*t + b;
880
+ t--;
881
+ return -c/2 * (t*(t-2) - 1) + b;
882
+ break;
883
+ case "easeOutCubic":
884
+ t /= d; t--; return c*(t*t*t + 1) + b;
885
+ break;
886
+ case "easeOutQuart":
887
+ t /= d; t--; return -c * (t*t*t*t - 1) + b;
888
+ break;
889
+ case "easeOutQuint":
890
+ t /= d; t--; return c*(t*t*t*t*t + 1) + b;
891
+ break;
892
+ case "easeOutCirc":
893
+ t /= d; t--; return c * Math.sqrt(1 - t*t) + b;
894
+ break;
895
+ case "easeOutSine":
896
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
897
+ break;
898
+ case "easeOutExpo":
899
+ return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b;
900
+ break;
901
+ case "mcsEaseOut":
902
+ var ts=(t/=d)*t,tc=ts*t;
903
+ return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t);
904
+ break;
905
+ case "draggerRailEase":
906
+ t /= d/2;
907
+ if (t < 1) return c/2*t*t*t + b;
908
+ t -= 2;
909
+ return c/2*(t*t*t + 2) + b;
910
+ break;
911
+ }
912
+ }
913
+ },
914
+ /*stop js animation tweens*/
915
+ mTweenAxisStop:function(el){
916
+ if(el._id==null){return;}
917
+ if(!window.requestAnimationFrame){clearTimeout(el._id);
918
+ }else{window.cancelAnimationFrame(el._id);}
919
+ el._id=null;
920
+ },
921
+ /*detect requestAnimationFrame and polyfill*/
922
+ rafPolyfill:function(){
923
+ var pfx=["ms","moz","webkit","o"],i=pfx.length;
924
+ while(--i > -1 && !window.requestAnimationFrame){
925
+ window.requestAnimationFrame=window[pfx[i]+"RequestAnimationFrame"];
926
+ window.cancelAnimationFrame=window[pfx[i]+"CancelAnimationFrame"] || window[pfx[i]+"CancelRequestAnimationFrame"];
927
+ }
928
+ }
929
+ }
930
+ /*detect features*/
931
+ functions.rafPolyfill.call(); /*requestAnimationFrame*/
932
+ $.support.touch=!!('ontouchstart' in window); /*touch*/
933
+ $.support.msPointer=window.navigator.msPointerEnabled; /*MSPointer support*/
934
+ /*plugin dependencies*/
935
+ var _dlp=("https:"==document.location.protocol) ? "https:" : "http:";
936
+ $.event.special.mousewheel || document.write('<script src="'+_dlp+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');
937
+ /*plugin fn*/
938
+ $.fn.mCustomScrollbar=function(method){
939
+ if(methods[method]){
940
+ return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
941
+ }else if(typeof method==="object" || !method){
942
+ return methods.init.apply(this,arguments);
943
+ }else{
944
+ $.error("Method "+method+" does not exist");
945
+ }
946
+ };
947
+ })(jQuery);
948
  })(asljQuery, asljQuery, window);
js/nomin-scoped/jquery.mousewheel.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(jQuery, $, window){
2
+ /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
3
+ * Licensed under the MIT License (LICENSE.txt).
4
+ *
5
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
6
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
7
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
8
+ *
9
+ * Version: 3.0.6
10
+ *
11
+ * Requires: 1.2.2+
12
+ */
13
+
14
+ (function($) {
15
+
16
+ var types = ['DOMMouseScroll', 'mousewheel'];
17
+
18
+ if ($.event.fixHooks) {
19
+ for ( var i=types.length; i; ) {
20
+ $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
21
+ }
22
+ }
23
+
24
+ $.event.special.mousewheel = {
25
+ setup: function() {
26
+ if ( this.addEventListener ) {
27
+ for ( var i=types.length; i; ) {
28
+ this.addEventListener( types[--i], handler, false );
29
+ }
30
+ } else {
31
+ this.onmousewheel = handler;
32
+ }
33
+ },
34
+
35
+ teardown: function() {
36
+ if ( this.removeEventListener ) {
37
+ for ( var i=types.length; i; ) {
38
+ this.removeEventListener( types[--i], handler, false );
39
+ }
40
+ } else {
41
+ this.onmousewheel = null;
42
+ }
43
+ }
44
+ };
45
+
46
+ $.fn.extend({
47
+ mousewheel: function(fn) {
48
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
49
+ },
50
+
51
+ unmousewheel: function(fn) {
52
+ return this.unbind("mousewheel", fn);
53
+ }
54
+ });
55
+
56
+
57
+ function handler(event) {
58
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
59
+ event = $.event.fix(orgEvent);
60
+ event.type = "mousewheel";
61
+
62
+ // Old school scrollwheel delta
63
+ if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
64
+ if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
65
+
66
+ // New school multidimensional scroll (touchpads) deltas
67
+ deltaY = delta;
68
+
69
+ // Gecko
70
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
71
+ deltaY = 0;
72
+ deltaX = -1*delta;
73
+ }
74
+
75
+ // Webkit
76
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
77
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
78
+
79
+ // Add event and delta to the front of the arguments
80
+ args.unshift(event, delta, deltaX, deltaY);
81
+
82
+ return ($.event.dispatch || $.event.handle).apply(this, args);
83
+ }
84
+
85
+ })(jQuery);
86
+ })(asljQuery, asljQuery, window);
js/nomin/asl_wrapper.js CHANGED
@@ -19,8 +19,6 @@ window.ASL.getScope = function() {
19
  return eval(ASL.js_scope);
20
  };
21
 
22
- window.ASL.initialized = false;
23
-
24
  // Call this function if you need to initialize an instance that is printed after an AJAX call
25
  // Calling without an argument initializes all instances found.
26
  window.ASL.initialize = function(id) {
@@ -43,70 +41,6 @@ window.ASL.initialize = function(id) {
43
  if (typeof id !== 'undefined')
44
  selector = "div[id*=asl_init_id_" + id + "]";
45
 
46
- function b64_utf8_decode(utftext) {
47
- var string = "";
48
- var i = 0;
49
- var c = c1 = c2 = 0;
50
-
51
- while ( i < utftext.length ) {
52
-
53
- c = utftext.charCodeAt(i);
54
-
55
- if (c < 128) {
56
- string += String.fromCharCode(c);
57
- i++;
58
- }
59
- else if((c > 191) && (c < 224)) {
60
- c2 = utftext.charCodeAt(i+1);
61
- string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
62
- i += 2;
63
- }
64
- else {
65
- c2 = utftext.charCodeAt(i+1);
66
- c3 = utftext.charCodeAt(i+2);
67
- string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
68
- i += 3;
69
- }
70
-
71
- }
72
-
73
- return string;
74
- }
75
-
76
- function b64_decode(input) {
77
- var output = "";
78
- var chr1, chr2, chr3;
79
- var enc1, enc2, enc3, enc4;
80
- var i = 0;
81
- var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
82
-
83
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
84
-
85
- while (i < input.length) {
86
-
87
- enc1 = _keyStr.indexOf(input.charAt(i++));
88
- enc2 = _keyStr.indexOf(input.charAt(i++));
89
- enc3 = _keyStr.indexOf(input.charAt(i++));
90
- enc4 = _keyStr.indexOf(input.charAt(i++));
91
-
92
- chr1 = (enc1 << 2) | (enc2 >> 4);
93
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
94
- chr3 = ((enc3 & 3) << 6) | enc4;
95
-
96
- output = output + String.fromCharCode(chr1);
97
-
98
- if (enc3 != 64) {
99
- output = output + String.fromCharCode(chr2);
100
- }
101
- if (enc4 != 64) {
102
- output = output + String.fromCharCode(chr3);
103
- }
104
-
105
- }
106
- output = b64_utf8_decode(output);
107
- return output;
108
- }
109
-
110
  /**
111
  * Getting around inline script declarations with this solution.
112
  * So these new, invisible divs contains a JSON object with the parameters.
@@ -114,20 +48,13 @@ window.ASL.initialize = function(id) {
114
  */
115
  scope(selector).each(function (index, value) {
116
  var rid = scope(this).attr('id').match(/^asl_init_id_(.*)/)[1];
117
-
118
- var jsonData = scope(this).data("asldata");
119
  if (typeof jsonData === "undefined") return false;
120
-
121
- jsonData = b64_decode(jsonData);
122
- if (typeof jsonData === "undefined" || jsonData == "") return false;
123
-
124
  var args = JSON.parse(jsonData);
125
 
126
  return scope("#ajaxsearchlite" + rid).ajaxsearchlite(args);
127
  });
128
  }
129
-
130
- window.ASL.initialized = true;
131
  };
132
 
133
  window.ASL.ready = function() {
@@ -139,15 +66,6 @@ window.ASL.ready = function() {
139
  _this.initialize();
140
  });
141
 
142
- // Redundancy for safety
143
- scope(window).load(function () {
144
- // It should be initialized at this point, but you never know..
145
- if ( !window.ASL.initialized ) {
146
- _this.initialize();
147
- console.log("ASL initialized via window.load");
148
- }
149
- });
150
-
151
  // DOM tree modification detection to re-initialize automatically if enabled
152
  if (typeof(ASL.detect_ajax) != "undefined" && ASL.detect_ajax == 1) {
153
  scope("body").bind("DOMSubtreeModified", function() {
19
  return eval(ASL.js_scope);
20
  };
21
 
 
 
22
  // Call this function if you need to initialize an instance that is printed after an AJAX call
23
  // Calling without an argument initializes all instances found.
24
  window.ASL.initialize = function(id) {
41
  if (typeof id !== 'undefined')
42
  selector = "div[id*=asl_init_id_" + id + "]";
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Getting around inline script declarations with this solution.
46
  * So these new, invisible divs contains a JSON object with the parameters.
48
  */
49
  scope(selector).each(function (index, value) {
50
  var rid = scope(this).attr('id').match(/^asl_init_id_(.*)/)[1];
51
+ var jsonData = scope(this).html();
 
52
  if (typeof jsonData === "undefined") return false;
 
 
 
 
53
  var args = JSON.parse(jsonData);
54
 
55
  return scope("#ajaxsearchlite" + rid).ajaxsearchlite(args);
56
  });
57
  }
 
 
58
  };
59
 
60
  window.ASL.ready = function() {
66
  _this.initialize();
67
  });
68
 
 
 
 
 
 
 
 
 
 
69
  // DOM tree modification detection to re-initialize automatically if enabled
70
  if (typeof(ASL.detect_ajax) != "undefined" && ASL.detect_ajax == 1) {
71
  scope("body").bind("DOMSubtreeModified", function() {
js/nomin/jquery.ajaxsearchlite.js CHANGED
@@ -91,10 +91,6 @@
91
  $this.n.resultsDiv.detach().appendTo($this.n.resultsAppend);
92
  }
93
 
94
- $('fieldset' ,$this.n.searchsettings).each(function(){
95
- $('.asl_option:not(.hiddend)', this).last().addClass("asl-o-last");
96
- });
97
-
98
  $this.createVerticalScroll();
99
 
100
  if (detectIE())
@@ -544,7 +540,7 @@
544
  $this.n.proclose.css({
545
  display: "none"
546
  });
547
- //$this.hideSettings();
548
  //$this.hideResults();
549
  var data = {
550
  action: 'ajaxsearchlite_search',
@@ -555,7 +551,7 @@
555
  $this.analytics($this.n.text.val());
556
 
557
  // New method without JSON
558
- $this.post = $.post(ASL.ajaxurl, data, function (response) {
559
  response = response.replace(/^\s*[\r\n]/gm, "");
560
  response = response.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];
561
 
91
  $this.n.resultsDiv.detach().appendTo($this.n.resultsAppend);
92
  }
93
 
 
 
 
 
94
  $this.createVerticalScroll();
95
 
96
  if (detectIE())
540
  $this.n.proclose.css({
541
  display: "none"
542
  });
543
+ $this.hideSettings();
544
  //$this.hideResults();
545
  var data = {
546
  action: 'ajaxsearchlite_search',
551
  $this.analytics($this.n.text.val());
552
 
553
  // New method without JSON
554
+ $this.post = $.post(ajaxsearchlite.ajaxurl, data, function (response) {
555
  response = response.replace(/^\s*[\r\n]/gm, "");
556
  response = response.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];
557
 
js/nomin/jquery.mCustomScrollbar.js CHANGED
@@ -1,6 +1,946 @@
1
- /* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
2
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
3
- /* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
4
- if (typeof jQuery.fn.mCustomScrollbar == "undefined") {
5
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
6
- return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});} else {console.log("ASP: scrollbar detected, skipping loading")};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ == malihu jquery custom scrollbars plugin ==
3
+ version: 2.8.2
4
+ author: malihu (http://manos.malihu.gr)
5
+ plugin home: http://manos.malihu.gr/jquery-custom-content-scroller
6
+ */
7
+
8
+ /*
9
+ Copyright 2010-2013 Manos Malihutsakis
10
+
11
+ This program is free software: you can redistribute it and/or modify
12
+ it under the terms of the GNU Lesser General Public License as published by
13
+ the Free Software Foundation, either version 3 of the License, or
14
+ any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU Lesser General Public License for more details.
20
+
21
+ You should have received a copy of the GNU Lesser General Public License
22
+ along with this program. If not, see http://www.gnu.org/licenses/lgpl.html.
23
+ */
24
+ (function($){
25
+ /*plugin script*/
26
+ var methods={
27
+ init:function(options){
28
+ var defaults={
29
+ set_width:false, /*optional element width: boolean, pixels, percentage*/
30
+ set_height:false, /*optional element height: boolean, pixels, percentage*/
31
+ horizontalScroll:false, /*scroll horizontally: boolean*/
32
+ scrollInertia:950, /*scrolling inertia: integer (milliseconds)*/
33
+ mouseWheel:true, /*mousewheel support: boolean*/
34
+ mouseWheelPixels:"auto", /*mousewheel pixels amount: integer, "auto"*/
35
+ autoDraggerLength:true, /*auto-adjust scrollbar dragger length: boolean*/
36
+ autoHideScrollbar:false, /*auto-hide scrollbar when idle*/
37
+ snapAmount:null, /* optional element always snaps to a multiple of this number in pixels */
38
+ snapOffset:0, /* when snapping, snap with this number in pixels as an offset */
39
+ scrollButtons:{ /*scroll buttons*/
40
+ enable:false, /*scroll buttons support: boolean*/
41
+ scrollType:"continuous", /*scroll buttons scrolling type: "continuous", "pixels"*/
42
+ scrollSpeed:"auto", /*scroll buttons continuous scrolling speed: integer, "auto"*/
43
+ scrollAmount:40 /*scroll buttons pixels scroll amount: integer (pixels)*/
44
+ },
45
+ advanced:{
46
+ updateOnBrowserResize:true, /*update scrollbars on browser resize (for layouts based on percentages): boolean*/
47
+ updateOnContentResize:false, /*auto-update scrollbars on content resize (for dynamic content): boolean*/
48
+ autoExpandHorizontalScroll:false, /*auto-expand width for horizontal scrolling: boolean*/
49
+ autoScrollOnFocus:true, /*auto-scroll on focused elements: boolean*/
50
+ normalizeMouseWheelDelta:false /*normalize mouse-wheel delta (-1/1)*/
51
+ },
52
+ contentTouchScroll:true, /*scrolling by touch-swipe content: boolean*/
53
+ callbacks:{
54
+ onScrollStart:function(){}, /*user custom callback function on scroll start event*/
55
+ onScroll:function(){}, /*user custom callback function on scroll event*/
56
+ onTotalScroll:function(){}, /*user custom callback function on scroll end reached event*/
57
+ onTotalScrollBack:function(){}, /*user custom callback function on scroll begin reached event*/
58
+ onTotalScrollOffset:0, /*scroll end reached offset: integer (pixels)*/
59
+ onTotalScrollBackOffset:0, /*scroll begin reached offset: integer (pixels)*/
60
+ whileScrolling:function(){} /*user custom callback function on scrolling event*/
61
+ },
62
+ theme:"light" /*"light", "dark", "light-2", "dark-2", "light-thick", "dark-thick", "light-thin", "dark-thin"*/
63
+ },
64
+ options=$.extend(true,defaults,options);
65
+ return this.each(function(){
66
+ var $this=$(this);
67
+ /*set element width/height, create markup for custom scrollbars, add classes*/
68
+ if(options.set_width){
69
+ $this.css("width",options.set_width);
70
+ }
71
+ if(options.set_height){
72
+ $this.css("height",options.set_height);
73
+ }
74
+ if(!$(document).data("mCustomScrollbar-index")){
75
+ $(document).data("mCustomScrollbar-index","1");
76
+ }else{
77
+ var mCustomScrollbarIndex=parseInt($(document).data("mCustomScrollbar-index"));
78
+ $(document).data("mCustomScrollbar-index",mCustomScrollbarIndex+1);
79
+ }
80
+ $this.wrapInner("<div class='mCustomScrollBox"+" mCS-"+options.theme+"' id='mCSB_"+$(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+$(document).data("mCustomScrollbar-index"));
81
+ var mCustomScrollBox=$this.children(".mCustomScrollBox");
82
+ if(options.horizontalScroll){
83
+ mCustomScrollBox.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");
84
+ var mCSB_h_wrapper=mCustomScrollBox.children(".mCSB_h_wrapper");
85
+ mCSB_h_wrapper.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({"width":mCSB_h_wrapper.children().outerWidth(),"position":"relative"}).unwrap();
86
+ }else{
87
+ mCustomScrollBox.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");
88
+ }
89
+ var mCSB_container=mCustomScrollBox.children(".mCSB_container");
90
+ if($.support.touch){
91
+ mCSB_container.addClass("mCS_touch");
92
+ }
93
+ mCSB_container.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>");
94
+ var mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
95
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
96
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger");
97
+ if(options.horizontalScroll){
98
+ mCSB_dragger.data("minDraggerWidth",mCSB_dragger.width());
99
+ }else{
100
+ mCSB_dragger.data("minDraggerHeight",mCSB_dragger.height());
101
+ }
102
+ if(options.scrollButtons.enable){
103
+ if(options.horizontalScroll){
104
+ mCSB_scrollTools.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'></a>");
105
+ }else{
106
+ mCSB_scrollTools.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'></a>");
107
+ }
108
+ }
109
+ /*mCustomScrollBox scrollTop and scrollLeft is always 0 to prevent browser focus scrolling*/
110
+ mCustomScrollBox.bind("scroll",function(){
111
+ if(!$this.is(".mCS_disabled")){ /*native focus scrolling for disabled scrollbars*/
112
+ mCustomScrollBox.scrollTop(0).scrollLeft(0);
113
+ }
114
+ });
115
+ /*store options, global vars/states, intervals*/
116
+ $this.data({
117
+ /*init state*/
118
+ "mCS_Init":true,
119
+ /*instance index*/
120
+ "mCustomScrollbarIndex":$(document).data("mCustomScrollbar-index"),
121
+ /*option parameters*/
122
+ "horizontalScroll":options.horizontalScroll,
123
+ "scrollInertia":options.scrollInertia,
124
+ "scrollEasing":"mcsEaseOut",
125
+ "mouseWheel":options.mouseWheel,
126
+ "mouseWheelPixels":options.mouseWheelPixels,
127
+ "autoDraggerLength":options.autoDraggerLength,
128
+ "autoHideScrollbar":options.autoHideScrollbar,
129
+ "snapAmount":options.snapAmount,
130
+ "snapOffset":options.snapOffset,
131
+ "scrollButtons_enable":options.scrollButtons.enable,
132
+ "scrollButtons_scrollType":options.scrollButtons.scrollType,
133
+ "scrollButtons_scrollSpeed":options.scrollButtons.scrollSpeed,
134
+ "scrollButtons_scrollAmount":options.scrollButtons.scrollAmount,
135
+ "autoExpandHorizontalScroll":options.advanced.autoExpandHorizontalScroll,
136
+ "autoScrollOnFocus":options.advanced.autoScrollOnFocus,
137
+ "normalizeMouseWheelDelta":options.advanced.normalizeMouseWheelDelta,
138
+ "contentTouchScroll":options.contentTouchScroll,
139
+ "onScrollStart_Callback":options.callbacks.onScrollStart,
140
+ "onScroll_Callback":options.callbacks.onScroll,
141
+ "onTotalScroll_Callback":options.callbacks.onTotalScroll,
142
+ "onTotalScrollBack_Callback":options.callbacks.onTotalScrollBack,
143
+ "onTotalScroll_Offset":options.callbacks.onTotalScrollOffset,
144
+ "onTotalScrollBack_Offset":options.callbacks.onTotalScrollBackOffset,
145
+ "whileScrolling_Callback":options.callbacks.whileScrolling,
146
+ /*events binding state*/
147
+ "bindEvent_scrollbar_drag":false,
148
+ "bindEvent_content_touch":false,
149
+ "bindEvent_scrollbar_click":false,
150
+ "bindEvent_mousewheel":false,
151
+ "bindEvent_buttonsContinuous_y":false,
152
+ "bindEvent_buttonsContinuous_x":false,
153
+ "bindEvent_buttonsPixels_y":false,
154
+ "bindEvent_buttonsPixels_x":false,
155
+ "bindEvent_focusin":false,
156
+ "bindEvent_autoHideScrollbar":false,
157
+ /*buttons intervals*/
158
+ "mCSB_buttonScrollRight":false,
159
+ "mCSB_buttonScrollLeft":false,
160
+ "mCSB_buttonScrollDown":false,
161
+ "mCSB_buttonScrollUp":false
162
+ });
163
+ /*max-width/max-height*/
164
+ if(options.horizontalScroll){
165
+ if($this.css("max-width")!=="none"){
166
+ if(!options.advanced.updateOnContentResize){ /*needs updateOnContentResize*/
167
+ options.advanced.updateOnContentResize=true;
168
+ }
169
+ }
170
+ }else{
171
+ if($this.css("max-height")!=="none"){
172
+ var percentage=false,maxHeight=parseInt($this.css("max-height"));
173
+ if($this.css("max-height").indexOf("%")>=0){
174
+ percentage=maxHeight,
175
+ maxHeight=$this.parent().height()*percentage/100;
176
+ }
177
+ $this.css("overflow","hidden");
178
+ mCustomScrollBox.css("max-height",maxHeight);
179
+ }
180
+ }
181
+ $this.mCustomScrollbar("update");
182
+ /*window resize fn (for layouts based on percentages)*/
183
+ if(options.advanced.updateOnBrowserResize){
184
+ var mCSB_resizeTimeout,currWinWidth=$(window).width(),currWinHeight=$(window).height();
185
+ $(window).bind("resize."+$this.data("mCustomScrollbarIndex"),function(){
186
+ if(mCSB_resizeTimeout){
187
+ clearTimeout(mCSB_resizeTimeout);
188
+ }
189
+ mCSB_resizeTimeout=setTimeout(function(){
190
+ if(!$this.is(".mCS_disabled") && !$this.is(".mCS_destroyed")){
191
+ var winWidth=$(window).width(),winHeight=$(window).height();
192
+ if(currWinWidth!==winWidth || currWinHeight!==winHeight){ /*ie8 fix*/
193
+ if($this.css("max-height")!=="none" && percentage){
194
+ mCustomScrollBox.css("max-height",$this.parent().height()*percentage/100);
195
+ }
196
+ $this.mCustomScrollbar("update");
197
+ currWinWidth=winWidth; currWinHeight=winHeight;
198
+ }
199
+ }
200
+ },150);
201
+ });
202
+ }
203
+ /*content resize fn (for dynamically generated content)*/
204
+ if(options.advanced.updateOnContentResize){
205
+ var mCSB_onContentResize;
206
+ if(options.horizontalScroll){
207
+ var mCSB_containerOldSize=mCSB_container.outerWidth();
208
+ }else{
209
+ var mCSB_containerOldSize=mCSB_container.outerHeight();
210
+ }
211
+ mCSB_onContentResize=setInterval(function(){
212
+ if(options.horizontalScroll){
213
+ if(options.advanced.autoExpandHorizontalScroll){
214
+ mCSB_container.css({"position":"absolute","width":"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":mCSB_container.outerWidth(),"position":"relative"}).unwrap();
215
+ }
216
+ var mCSB_containerNewSize=mCSB_container.outerWidth();
217
+ }else{
218
+ var mCSB_containerNewSize=mCSB_container.outerHeight();
219
+ }
220
+ if(mCSB_containerNewSize!=mCSB_containerOldSize){
221
+ $this.mCustomScrollbar("update");
222
+ mCSB_containerOldSize=mCSB_containerNewSize;
223
+ }
224
+ },300);
225
+ }
226
+ });
227
+ },
228
+ update:function(){
229
+ var $this=$(this),
230
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
231
+ mCSB_container=mCustomScrollBox.children(".mCSB_container");
232
+ mCSB_container.removeClass("mCS_no_scrollbar");
233
+ $this.removeClass("mCS_disabled mCS_destroyed");
234
+ mCustomScrollBox.scrollTop(0).scrollLeft(0); /*reset scrollTop/scrollLeft to prevent browser focus scrolling*/
235
+ var mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
236
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
237
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger");
238
+ if($this.data("horizontalScroll")){
239
+ var mCSB_buttonLeft=mCSB_scrollTools.children(".mCSB_buttonLeft"),
240
+ mCSB_buttonRight=mCSB_scrollTools.children(".mCSB_buttonRight"),
241
+ mCustomScrollBoxW=mCustomScrollBox.width();
242
+ if($this.data("autoExpandHorizontalScroll")){
243
+ mCSB_container.css({"position":"absolute","width":"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":mCSB_container.outerWidth(),"position":"relative"}).unwrap();
244
+ }
245
+ var mCSB_containerW=mCSB_container.outerWidth();
246
+ }else{
247
+ var mCSB_buttonUp=mCSB_scrollTools.children(".mCSB_buttonUp"),
248
+ mCSB_buttonDown=mCSB_scrollTools.children(".mCSB_buttonDown"),
249
+ mCustomScrollBoxH=mCustomScrollBox.height(),
250
+ mCSB_containerH=mCSB_container.outerHeight();
251
+ }
252
+ if(mCSB_containerH>mCustomScrollBoxH && !$this.data("horizontalScroll")){ /*content needs vertical scrolling*/
253
+ mCSB_scrollTools.css("display","block");
254
+ var mCSB_draggerContainerH=mCSB_draggerContainer.height();
255
+ /*auto adjust scrollbar dragger length analogous to content*/
256
+ if($this.data("autoDraggerLength")){
257
+ var draggerH=Math.round(mCustomScrollBoxH/mCSB_containerH*mCSB_draggerContainerH),
258
+ minDraggerH=mCSB_dragger.data("minDraggerHeight");
259
+ if(draggerH<=minDraggerH){ /*min dragger height*/
260
+ mCSB_dragger.css({"height":minDraggerH});
261
+ }else if(draggerH>=mCSB_draggerContainerH-10){ /*max dragger height*/
262
+ var mCSB_draggerContainerMaxH=mCSB_draggerContainerH-10;
263
+ mCSB_dragger.css({"height":mCSB_draggerContainerMaxH});
264
+ }else{
265
+ mCSB_dragger.css({"height":draggerH});
266
+ }
267
+ mCSB_dragger.children(".mCSB_dragger_bar").css({"line-height":mCSB_dragger.height()+"px"});
268
+ }
269
+ var mCSB_draggerH=mCSB_dragger.height(),
270
+ /*calculate and store scroll amount, add scrolling*/
271
+ scrollAmount=(mCSB_containerH-mCustomScrollBoxH)/(mCSB_draggerContainerH-mCSB_draggerH);
272
+ $this.data("scrollAmount",scrollAmount).mCustomScrollbar("scrolling",mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight);
273
+ /*scroll*/
274
+ var mCSB_containerP=Math.abs(mCSB_container.position().top);
275
+ $this.mCustomScrollbar("scrollTo",mCSB_containerP,{scrollInertia:0,trigger:"internal"});
276
+ }else if(mCSB_containerW>mCustomScrollBoxW && $this.data("horizontalScroll")){ /*content needs horizontal scrolling*/
277
+ mCSB_scrollTools.css("display","block");
278
+ var mCSB_draggerContainerW=mCSB_draggerContainer.width();
279
+ /*auto adjust scrollbar dragger length analogous to content*/
280
+ if($this.data("autoDraggerLength")){
281
+ var draggerW=Math.round(mCustomScrollBoxW/mCSB_containerW*mCSB_draggerContainerW),
282
+ minDraggerW=mCSB_dragger.data("minDraggerWidth");
283
+ if(draggerW<=minDraggerW){ /*min dragger height*/
284
+ mCSB_dragger.css({"width":minDraggerW});
285
+ }else if(draggerW>=mCSB_draggerContainerW-10){ /*max dragger height*/
286
+ var mCSB_draggerContainerMaxW=mCSB_draggerContainerW-10;
287
+ mCSB_dragger.css({"width":mCSB_draggerContainerMaxW});
288
+ }else{
289
+ mCSB_dragger.css({"width":draggerW});
290
+ }
291
+ }
292
+ var mCSB_draggerW=mCSB_dragger.width(),
293
+ /*calculate and store scroll amount, add scrolling*/
294
+ scrollAmount=(mCSB_containerW-mCustomScrollBoxW)/(mCSB_draggerContainerW-mCSB_draggerW);
295
+ $this.data("scrollAmount",scrollAmount).mCustomScrollbar("scrolling",mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight);
296
+ /*scroll*/
297
+ var mCSB_containerP=Math.abs(mCSB_container.position().left);
298
+ $this.mCustomScrollbar("scrollTo",mCSB_containerP,{scrollInertia:0,trigger:"internal"});
299
+ }else{ /*content does not need scrolling*/
300
+ /*unbind events, reset content position, hide scrollbars, remove classes*/
301
+ mCustomScrollBox.unbind("mousewheel focusin");
302
+ if($this.data("horizontalScroll")){
303
+ mCSB_dragger.add(mCSB_container).css("left",0);
304
+ }else{
305
+ mCSB_dragger.add(mCSB_container).css("top",0);
306
+ }
307
+ mCSB_scrollTools.css("display","none");
308
+ mCSB_container.addClass("mCS_no_scrollbar");
309
+ $this.data({"bindEvent_mousewheel":false,"bindEvent_focusin":false});
310
+ }
311
+ },
312
+ scrolling:function(mCustomScrollBox,mCSB_container,mCSB_draggerContainer,mCSB_dragger,mCSB_buttonUp,mCSB_buttonDown,mCSB_buttonLeft,mCSB_buttonRight){
313
+ var $this=$(this);
314
+ /*scrollbar drag scrolling*/
315
+ if(!$this.data("bindEvent_scrollbar_drag")){
316
+ var mCSB_draggerDragY,mCSB_draggerDragX;
317
+ if($.support.msPointer){ /*MSPointer*/
318
+ mCSB_dragger.bind("MSPointerDown",function(e){
319
+ e.preventDefault();
320
+ $this.data({"on_drag":true}); mCSB_dragger.addClass("mCSB_dragger_onDrag");
321
+ var elem=$(this),
322
+ elemOffset=elem.offset(),
323
+ x=e.originalEvent.pageX-elemOffset.left,
324
+ y=e.originalEvent.pageY-elemOffset.top;
325
+ if(x<elem.width() && x>0 && y<elem.height() && y>0){
326
+ mCSB_draggerDragY=y;
327
+ mCSB_draggerDragX=x;
328
+ }
329
+ });
330
+ $(document).bind("MSPointerMove."+$this.data("mCustomScrollbarIndex"),function(e){
331
+ e.preventDefault();
332
+ if($this.data("on_drag")){
333
+ var elem=mCSB_dragger,
334
+ elemOffset=elem.offset(),
335
+ x=e.originalEvent.pageX-elemOffset.left,
336
+ y=e.originalEvent.pageY-elemOffset.top;
337
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
338
+ }
339
+ }).bind("MSPointerUp."+$this.data("mCustomScrollbarIndex"),function(e){
340
+ $this.data({"on_drag":false}); mCSB_dragger.removeClass("mCSB_dragger_onDrag");
341
+ });
342
+ }else{ /*mouse/touch*/
343
+ mCSB_dragger.bind("mousedown touchstart",function(e){
344
+ e.preventDefault(); e.stopImmediatePropagation();
345
+ var elem=$(this),elemOffset=elem.offset(),x,y;
346
+ if(e.type==="touchstart"){
347
+ var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
348
+ x=touch.pageX-elemOffset.left; y=touch.pageY-elemOffset.top;
349
+ }else{
350
+ $this.data({"on_drag":true}); mCSB_dragger.addClass("mCSB_dragger_onDrag");
351
+ x=e.pageX-elemOffset.left; y=e.pageY-elemOffset.top;
352
+ }
353
+ if(x<elem.width() && x>0 && y<elem.height() && y>0){
354
+ mCSB_draggerDragY=y; mCSB_draggerDragX=x;
355
+ }
356
+ }).bind("touchmove",function(e){
357
+ e.preventDefault(); e.stopImmediatePropagation();
358
+ var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0],
359
+ elem=$(this),
360
+ elemOffset=elem.offset(),
361
+ x=touch.pageX-elemOffset.left,
362
+ y=touch.pageY-elemOffset.top;
363
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
364
+ });
365
+ $(document).bind("mousemove."+$this.data("mCustomScrollbarIndex"),function(e){
366
+ if($this.data("on_drag")){
367
+ var elem=mCSB_dragger,
368
+ elemOffset=elem.offset(),
369
+ x=e.pageX-elemOffset.left,
370
+ y=e.pageY-elemOffset.top;
371
+ scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x);
372
+ }
373
+ }).bind("mouseup."+$this.data("mCustomScrollbarIndex"),function(e){
374
+ $this.data({"on_drag":false}); mCSB_dragger.removeClass("mCSB_dragger_onDrag");
375
+ });
376
+ }
377
+ $this.data({"bindEvent_scrollbar_drag":true});
378
+ }
379
+ function scrollbarDrag(mCSB_draggerDragY,mCSB_draggerDragX,y,x){
380
+ if($this.data("horizontalScroll")){
381
+ $this.mCustomScrollbar("scrollTo",(mCSB_dragger.position().left-(mCSB_draggerDragX))+x,{moveDragger:true,trigger:"internal"});
382
+ }else{
383
+ $this.mCustomScrollbar("scrollTo",(mCSB_dragger.position().top-(mCSB_draggerDragY))+y,{moveDragger:true,trigger:"internal"});
384
+ }
385
+ }
386
+ /*content touch-drag*/
387
+ if($.support.touch && $this.data("contentTouchScroll")){
388
+ if(!$this.data("bindEvent_content_touch")){
389
+ var touch,
390
+ elem,elemOffset,y,x,mCSB_containerTouchY,mCSB_containerTouchX;
391
+ mCSB_container.bind("touchstart",function(e){
392
+ e.stopImmediatePropagation();
393
+ touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
394
+ elem=$(this);
395
+ elemOffset=elem.offset();
396
+ x=touch.pageX-elemOffset.left;
397
+ y=touch.pageY-elemOffset.top;
398
+ mCSB_containerTouchY=y;
399
+ mCSB_containerTouchX=x;
400
+ });
401
+ mCSB_container.bind("touchmove",function(e){
402
+ e.preventDefault(); e.stopImmediatePropagation();
403
+ touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
404
+ elem=$(this).parent();
405
+ elemOffset=elem.offset();
406
+ x=touch.pageX-elemOffset.left;
407
+ y=touch.pageY-elemOffset.top;
408
+ if($this.data("horizontalScroll")){
409
+ $this.mCustomScrollbar("scrollTo",mCSB_containerTouchX-x,{trigger:"internal"});
410
+ }else{
411
+ $this.mCustomScrollbar("scrollTo",mCSB_containerTouchY-y,{trigger:"internal"});
412
+ }
413
+ });
414
+ }
415
+ }
416
+ /*dragger rail click scrolling*/
417
+ if(!$this.data("bindEvent_scrollbar_click")){
418
+ mCSB_draggerContainer.bind("click",function(e){
419
+ var scrollToPos=(e.pageY-mCSB_draggerContainer.offset().top)*$this.data("scrollAmount"),target=$(e.target);
420
+ if($this.data("horizontalScroll")){
421
+ scrollToPos=(e.pageX-mCSB_draggerContainer.offset().left)*$this.data("scrollAmount");
422
+ }
423
+ if(target.hasClass("mCSB_draggerContainer") || target.hasClass("mCSB_draggerRail")){
424
+ $this.mCustomScrollbar("scrollTo",scrollToPos,{trigger:"internal",scrollEasing:"draggerRailEase"});
425
+ }
426
+ });
427
+ $this.data({"bindEvent_scrollbar_click":true});
428
+ }
429
+ /*mousewheel scrolling*/
430
+ if($this.data("mouseWheel")){
431
+ if(!$this.data("bindEvent_mousewheel")){
432
+ mCustomScrollBox.bind("mousewheel",function(e,delta){
433
+ var scrollTo,mouseWheelPixels=$this.data("mouseWheelPixels"),absPos=Math.abs(mCSB_container.position().top),
434
+ draggerPos=mCSB_dragger.position().top,limit=mCSB_draggerContainer.height()-mCSB_dragger.height();
435
+ if($this.data("normalizeMouseWheelDelta")){
436
+ if(delta<0){delta=-1;}else{delta=1;}
437
+ }
438
+ if(mouseWheelPixels==="auto"){
439
+ mouseWheelPixels=100+Math.round($this.data("scrollAmount")/2);
440
+ }
441
+ if($this.data("horizontalScroll")){
442
+ draggerPos=mCSB_dragger.position().left;
443
+ limit=mCSB_draggerContainer.width()-mCSB_dragger.width();
444
+ absPos=Math.abs(mCSB_container.position().left);
445
+ }
446
+ if((delta>0 && draggerPos!==0) || (delta<0 && draggerPos!==limit)){e.preventDefault(); e.stopImmediatePropagation();}
447
+ scrollTo=absPos-(delta*mouseWheelPixels);
448
+ $this.mCustomScrollbar("scrollTo",scrollTo,{trigger:"internal"});
449
+ });
450
+ $this.data({"bindEvent_mousewheel":true});
451
+ }
452
+ }
453
+ /*buttons scrolling*/
454
+ if($this.data("scrollButtons_enable")){
455
+ if($this.data("scrollButtons_scrollType")==="pixels"){ /*scroll by pixels*/
456
+ if($this.data("horizontalScroll")){
457
+ mCSB_buttonRight.add(mCSB_buttonLeft).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",mCSB_buttonRight_stop,mCSB_buttonLeft_stop);
458
+ $this.data({"bindEvent_buttonsContinuous_x":false});
459
+ if(!$this.data("bindEvent_buttonsPixels_x")){
460
+ /*scroll right*/
461
+ mCSB_buttonRight.bind("click",function(e){
462
+ e.preventDefault();
463
+ PixelsScrollTo(Math.abs(mCSB_container.position().left)+$this.data("scrollButtons_scrollAmount"));
464
+ });
465
+ /*scroll left*/
466
+ mCSB_buttonLeft.bind("click",function(e){
467
+ e.preventDefault();
468
+ PixelsScrollTo(Math.abs(mCSB_container.position().left)-$this.data("scrollButtons_scrollAmount"));
469
+ });
470
+ $this.data({"bindEvent_buttonsPixels_x":true});
471
+ }
472
+ }else{
473
+ mCSB_buttonDown.add(mCSB_buttonUp).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",mCSB_buttonRight_stop,mCSB_buttonLeft_stop);
474
+ $this.data({"bindEvent_buttonsContinuous_y":false});
475
+ if(!$this.data("bindEvent_buttonsPixels_y")){
476
+ /*scroll down*/
477
+ mCSB_buttonDown.bind("click",function(e){
478
+ e.preventDefault();
479
+ PixelsScrollTo(Math.abs(mCSB_container.position().top)+$this.data("scrollButtons_scrollAmount"));
480
+ });
481
+ /*scroll up*/
482
+ mCSB_buttonUp.bind("click",function(e){
483
+ e.preventDefault();
484
+ PixelsScrollTo(Math.abs(mCSB_container.position().top)-$this.data("scrollButtons_scrollAmount"));
485
+ });
486
+ $this.data({"bindEvent_buttonsPixels_y":true});
487
+ }
488
+ }
489
+ function PixelsScrollTo(to){
490
+ if(!mCSB_dragger.data("preventAction")){
491
+ mCSB_dragger.data("preventAction",true);
492
+ $this.mCustomScrollbar("scrollTo",to,{trigger:"internal"});
493
+ }
494
+ }
495
+ }else{ /*continuous scrolling*/
496
+ if($this.data("horizontalScroll")){
497
+ mCSB_buttonRight.add(mCSB_buttonLeft).unbind("click");
498
+ $this.data({"bindEvent_buttonsPixels_x":false});
499
+ if(!$this.data("bindEvent_buttonsContinuous_x")){
500
+ /*scroll right*/
501
+ mCSB_buttonRight.bind("mousedown touchstart MSPointerDown",function(e){
502
+ e.preventDefault();
503
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
504
+ $this.data({"mCSB_buttonScrollRight":setInterval(function(){
505
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().left)+scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
506
+ },17)});
507
+ });
508
+ var mCSB_buttonRight_stop=function(e){
509
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollRight"));
510
+ }
511
+ mCSB_buttonRight.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonRight_stop);
512
+ /*scroll left*/
513
+ mCSB_buttonLeft.bind("mousedown touchstart MSPointerDown",function(e){
514
+ e.preventDefault();
515
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
516
+ $this.data({"mCSB_buttonScrollLeft":setInterval(function(){
517
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().left)-scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
518
+ },17)});
519
+ });
520
+ var mCSB_buttonLeft_stop=function(e){
521
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollLeft"));
522
+ }
523
+ mCSB_buttonLeft.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonLeft_stop);
524
+ $this.data({"bindEvent_buttonsContinuous_x":true});
525
+ }
526
+ }else{
527
+ mCSB_buttonDown.add(mCSB_buttonUp).unbind("click");
528
+ $this.data({"bindEvent_buttonsPixels_y":false});
529
+ if(!$this.data("bindEvent_buttonsContinuous_y")){
530
+ /*scroll down*/
531
+ mCSB_buttonDown.bind("mousedown touchstart MSPointerDown",function(e){
532
+ e.preventDefault();
533
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
534
+ $this.data({"mCSB_buttonScrollDown":setInterval(function(){
535
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().top)+scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
536
+ },17)});
537
+ });
538
+ var mCSB_buttonDown_stop=function(e){
539
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollDown"));
540
+ }
541
+ mCSB_buttonDown.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonDown_stop);
542
+ /*scroll up*/
543
+ mCSB_buttonUp.bind("mousedown touchstart MSPointerDown",function(e){
544
+ e.preventDefault();
545
+ var scrollButtonsSpeed=ScrollButtonsSpeed();
546
+ $this.data({"mCSB_buttonScrollUp":setInterval(function(){
547
+ $this.mCustomScrollbar("scrollTo",Math.abs(mCSB_container.position().top)-scrollButtonsSpeed,{trigger:"internal",scrollEasing:"easeOutCirc"});
548
+ },17)});
549
+ });
550
+ var mCSB_buttonUp_stop=function(e){
551
+ e.preventDefault(); clearInterval($this.data("mCSB_buttonScrollUp"));
552
+ }
553
+ mCSB_buttonUp.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",mCSB_buttonUp_stop);
554
+ $this.data({"bindEvent_buttonsContinuous_y":true});
555
+ }
556
+ }
557
+ function ScrollButtonsSpeed(){
558
+ var speed=$this.data("scrollButtons_scrollSpeed");
559
+ if($this.data("scrollButtons_scrollSpeed")==="auto"){
560
+ speed=Math.round(($this.data("scrollInertia")+100)/40);
561
+ }
562
+ return speed;
563
+ }
564
+ }
565
+ }
566
+ /*scrolling on element focus (e.g. via TAB key)*/
567
+ if($this.data("autoScrollOnFocus")){
568
+ if(!$this.data("bindEvent_focusin")){
569
+ mCustomScrollBox.bind("focusin",function(){
570
+ mCustomScrollBox.scrollTop(0).scrollLeft(0);
571
+ var focusedElem=$(document.activeElement);
572
+ if(focusedElem.is("input,textarea,select,button,a[tabindex],area,object")){
573
+ var mCSB_containerPos=mCSB_container.position().top,
574
+ focusedElemPos=focusedElem.position().top,
575
+ visibleLimit=mCustomScrollBox.height()-focusedElem.outerHeight();
576
+ if($this.data("horizontalScroll")){
577
+ mCSB_containerPos=mCSB_container.position().left;
578
+ focusedElemPos=focusedElem.position().left;
579
+ visibleLimit=mCustomScrollBox.width()-focusedElem.outerWidth();
580
+ }
581
+ if(mCSB_containerPos+focusedElemPos<0 || mCSB_containerPos+focusedElemPos>visibleLimit){
582
+ $this.mCustomScrollbar("scrollTo",focusedElemPos,{trigger:"internal"});
583
+ }
584
+ }
585
+ });
586
+ $this.data({"bindEvent_focusin":true});
587
+ }
588
+ }
589
+ /*auto-hide scrollbar*/
590
+ if($this.data("autoHideScrollbar")){
591
+ if(!$this.data("bindEvent_autoHideScrollbar")){
592
+ mCustomScrollBox.bind("mouseenter",function(e){
593
+ mCustomScrollBox.addClass("mCS-mouse-over");
594
+ functions.showScrollbar.call(mCustomScrollBox.children(".mCSB_scrollTools"));
595
+ }).bind("mouseleave touchend",function(e){
596
+ mCustomScrollBox.removeClass("mCS-mouse-over");
597
+ if(e.type==="mouseleave"){functions.hideScrollbar.call(mCustomScrollBox.children(".mCSB_scrollTools"));}
598
+ });
599
+ $this.data({"bindEvent_autoHideScrollbar":true});
600
+ }
601
+ }
602
+ },
603
+ scrollTo:function(scrollTo,options){
604
+ var $this=$(this),
605
+ defaults={
606
+ moveDragger:false,
607
+ trigger:"external",
608
+ callbacks:true,
609
+ scrollInertia:$this.data("scrollInertia"),
610
+ scrollEasing:$this.data("scrollEasing")
611
+ },
612
+ options=$.extend(defaults,options),
613
+ draggerScrollTo,
614
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
615
+ mCSB_container=mCustomScrollBox.children(".mCSB_container"),
616
+ mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
617
+ mCSB_draggerContainer=mCSB_scrollTools.children(".mCSB_draggerContainer"),
618
+ mCSB_dragger=mCSB_draggerContainer.children(".mCSB_dragger"),
619
+ contentSpeed=draggerSpeed=options.scrollInertia,
620
+ scrollBeginning,scrollBeginningOffset,totalScroll,totalScrollOffset;
621
+ if(!mCSB_container.hasClass("mCS_no_scrollbar")){
622
+ $this.data({"mCS_trigger":options.trigger});
623
+ if($this.data("mCS_Init")){options.callbacks=false;}
624
+ if(scrollTo || scrollTo===0){
625
+ if(typeof(scrollTo)==="number"){ /*if integer, scroll by number of pixels*/
626
+ if(options.moveDragger){ /*scroll dragger*/
627
+ draggerScrollTo=scrollTo;
628
+ if($this.data("horizontalScroll")){
629
+ scrollTo=mCSB_dragger.position().left*$this.data("scrollAmount");
630
+ }else{
631
+ scrollTo=mCSB_dragger.position().top*$this.data("scrollAmount");
632
+ }
633
+ draggerSpeed=0;
634
+ }else{ /*scroll content by default*/
635
+ draggerScrollTo=scrollTo/$this.data("scrollAmount");
636
+ }
637
+ }else if(typeof(scrollTo)==="string"){ /*if string, scroll by element position*/
638
+ var target;
639
+ if(scrollTo==="top"){ /*scroll to top*/
640
+ target=0;
641
+ }else if(scrollTo==="bottom" && !$this.data("horizontalScroll")){ /*scroll to bottom*/
642
+ target=mCSB_container.outerHeight()-mCustomScrollBox.height();
643
+ }else if(scrollTo==="left"){ /*scroll to left*/
644
+ target=0;
645
+ }else if(scrollTo==="right" && $this.data("horizontalScroll")){ /*scroll to right*/
646
+ target=mCSB_container.outerWidth()-mCustomScrollBox.width();
647
+ }else if(scrollTo==="first"){ /*scroll to first element position*/
648
+ target=$this.find(".mCSB_container").find(":first");
649
+ }else if(scrollTo==="last"){ /*scroll to last element position*/
650
+ target=$this.find(".mCSB_container").find(":last");
651
+ }else{ /*scroll to element position*/
652
+ target=$this.find(scrollTo);
653
+ }
654
+ if(target.length===1){ /*if such unique element exists, scroll to it*/
655
+ if($this.data("horizontalScroll")){
656
+ scrollTo=target.position().left;
657
+ }else{
658
+ scrollTo=target.position().top;
659
+ }
660
+ draggerScrollTo=scrollTo/$this.data("scrollAmount");
661
+ }else{
662
+ draggerScrollTo=scrollTo=target;
663
+ }
664
+ }
665
+ /*scroll to*/
666
+ if($this.data("horizontalScroll")){
667
+ if($this.data("onTotalScrollBack_Offset")){ /*scroll beginning offset*/
668
+ scrollBeginningOffset=-$this.data("onTotalScrollBack_Offset");
669
+ }
670
+ if($this.data("onTotalScroll_Offset")){ /*total scroll offset*/
671
+ totalScrollOffset=mCustomScrollBox.width()-mCSB_container.outerWidth()+$this.data("onTotalScroll_Offset");
672
+ }
673
+ if(draggerScrollTo<0){ /*scroll start position*/
674
+ draggerScrollTo=scrollTo=0; clearInterval($this.data("mCSB_buttonScrollLeft"));
675
+ if(!scrollBeginningOffset){scrollBeginning=true;}
676
+ }else if(draggerScrollTo>=mCSB_draggerContainer.width()-mCSB_dragger.width()){ /*scroll end position*/
677
+ draggerScrollTo=mCSB_draggerContainer.width()-mCSB_dragger.width();
678
+ scrollTo=mCustomScrollBox.width()-mCSB_container.outerWidth(); clearInterval($this.data("mCSB_buttonScrollRight"));
679
+ if(!totalScrollOffset){totalScroll=true;}
680
+ }else{scrollTo=-scrollTo;}
681
+ var snapAmount = $this.data("snapAmount");
682
+ if (snapAmount) {
683
+ scrollTo = Math.round(scrollTo / snapAmount) * snapAmount - $this.data("snapOffset");
684
+ }
685
+ /*scrolling animation*/
686
+ functions.mTweenAxis.call(this,mCSB_dragger[0],"left",Math.round(draggerScrollTo),draggerSpeed,options.scrollEasing);
687
+ functions.mTweenAxis.call(this,mCSB_container[0],"left",Math.round(scrollTo),contentSpeed,options.scrollEasing,{
688
+ onStart:function(){
689
+ if(options.callbacks && !$this.data("mCS_tweenRunning")){callbacks("onScrollStart");}
690
+ if($this.data("autoHideScrollbar")){functions.showScrollbar.call(mCSB_scrollTools);}
691
+ },
692
+ onUpdate:function(){
693
+ if(options.callbacks){callbacks("whileScrolling");}
694
+ },
695
+ onComplete:function(){
696
+ if(options.callbacks){
697
+ callbacks("onScroll");
698
+ if(scrollBeginning || (scrollBeginningOffset && mCSB_container.position().left>=scrollBeginningOffset)){callbacks("onTotalScrollBack");}
699
+ if(totalScroll || (totalScrollOffset && mCSB_container.position().left<=totalScrollOffset)){callbacks("onTotalScroll");}
700
+ }
701
+ mCSB_dragger.data("preventAction",false); $this.data("mCS_tweenRunning",false);
702
+ if($this.data("autoHideScrollbar")){if(!mCustomScrollBox.hasClass("mCS-mouse-over")){functions.hideScrollbar.call(mCSB_scrollTools);}}
703
+ }
704
+ });
705
+ }else{
706
+ if($this.data("onTotalScrollBack_Offset")){ /*scroll beginning offset*/
707
+ scrollBeginningOffset=-$this.data("onTotalScrollBack_Offset");
708
+ }
709
+ if($this.data("onTotalScroll_Offset")){ /*total scroll offset*/
710
+ totalScrollOffset=mCustomScrollBox.height()-mCSB_container.outerHeight()+$this.data("onTotalScroll_Offset");
711
+ }
712
+ if(draggerScrollTo<0){ /*scroll start position*/
713
+ draggerScrollTo=scrollTo=0; clearInterval($this.data("mCSB_buttonScrollUp"));
714
+ if(!scrollBeginningOffset){scrollBeginning=true;}
715
+ }else if(draggerScrollTo>=mCSB_draggerContainer.height()-mCSB_dragger.height()){ /*scroll end position*/
716
+ draggerScrollTo=mCSB_draggerContainer.height()-mCSB_dragger.height();
717
+ scrollTo=mCustomScrollBox.height()-mCSB_container.outerHeight(); clearInterval($this.data("mCSB_buttonScrollDown"));
718
+ if(!totalScrollOffset){totalScroll=true;}
719
+ }else{scrollTo=-scrollTo;}
720
+ var snapAmount = $this.data("snapAmount");
721
+ if (snapAmount) {
722
+ scrollTo = Math.round(scrollTo / snapAmount) * snapAmount - $this.data("snapOffset");
723
+ }
724
+ /*scrolling animation*/
725
+ functions.mTweenAxis.call(this,mCSB_dragger[0],"top",Math.round(draggerScrollTo),draggerSpeed,options.scrollEasing);
726
+ functions.mTweenAxis.call(this,mCSB_container[0],"top",Math.round(scrollTo),contentSpeed,options.scrollEasing,{
727
+ onStart:function(){
728
+ if(options.callbacks && !$this.data("mCS_tweenRunning")){callbacks("onScrollStart");}
729
+ if($this.data("autoHideScrollbar")){functions.showScrollbar.call(mCSB_scrollTools);}
730
+ },
731
+ onUpdate:function(){
732
+ if(options.callbacks){callbacks("whileScrolling");}
733
+ },
734
+ onComplete:function(){
735
+ if(options.callbacks){
736
+ callbacks("onScroll");
737
+ if(scrollBeginning || (scrollBeginningOffset && mCSB_container.position().top>=scrollBeginningOffset)){callbacks("onTotalScrollBack");}
738
+ if(totalScroll || (totalScrollOffset && mCSB_container.position().top<=totalScrollOffset)){callbacks("onTotalScroll");}
739
+ }
740
+ mCSB_dragger.data("preventAction",false); $this.data("mCS_tweenRunning",false);
741
+ if($this.data("autoHideScrollbar")){if(!mCustomScrollBox.hasClass("mCS-mouse-over")){functions.hideScrollbar.call(mCSB_scrollTools);}}
742
+ }
743
+ });
744
+ }
745
+ if($this.data("mCS_Init")){$this.data({"mCS_Init":false});}
746
+ }
747
+ }
748
+ /*callbacks*/
749
+ function callbacks(cb){
750
+ this.mcs={
751
+ top:mCSB_container.position().top,left:mCSB_container.position().left,
752
+ draggerTop:mCSB_dragger.position().top,draggerLeft:mCSB_dragger.position().left,
753
+ topPct:Math.round((100*Math.abs(mCSB_container.position().top))/Math.abs(mCSB_container.outerHeight()-mCustomScrollBox.height())),
754
+ leftPct:Math.round((100*Math.abs(mCSB_container.position().left))/Math.abs(mCSB_container.outerWidth()-mCustomScrollBox.width()))
755
+ };
756
+ switch(cb){
757
+ /*start scrolling callback*/
758
+ case "onScrollStart":
759
+ $this.data("mCS_tweenRunning",true).data("onScrollStart_Callback").call($this,this.mcs);
760
+ break;
761
+ case "whileScrolling":
762
+ $this.data("whileScrolling_Callback").call($this,this.mcs);
763
+ break;
764
+ case "onScroll":
765
+ $this.data("onScroll_Callback").call($this,this.mcs);
766
+ break;
767
+ case "onTotalScrollBack":
768
+ $this.data("onTotalScrollBack_Callback").call($this,this.mcs);
769
+ break;
770
+ case "onTotalScroll":
771
+ $this.data("onTotalScroll_Callback").call($this,this.mcs);
772
+ break;
773
+ }
774
+ }
775
+ },
776
+ stop:function(){
777
+ var $this=$(this),
778
+ mCSB_container=$this.children().children(".mCSB_container"),
779
+ mCSB_dragger=$this.children().children().children().children(".mCSB_dragger");
780
+ functions.mTweenAxisStop.call(this,mCSB_container[0]);
781
+ functions.mTweenAxisStop.call(this,mCSB_dragger[0]);
782
+ },
783
+ disable:function(resetScroll){
784
+ var $this=$(this),
785
+ mCustomScrollBox=$this.children(".mCustomScrollBox"),
786
+ mCSB_container=mCustomScrollBox.children(".mCSB_container"),
787
+ mCSB_scrollTools=mCustomScrollBox.children(".mCSB_scrollTools"),
788
+ mCSB_dragger=mCSB_scrollTools.children().children(".mCSB_dragger");
789
+ mCustomScrollBox.unbind("mousewheel focusin mouseenter mouseleave touchend");
790
+ mCSB_container.unbind("touchstart touchmove")
791
+ if(resetScroll){
792
+ if($this.data("horizontalScroll")){
793
+ mCSB_dragger.add(mCSB_container).css("left",0);
794
+ }else{
795
+ mCSB_dragger.add(mCSB_container).css("top",0);
796
+ }
797
+ }
798
+ mCSB_scrollTools.css("display","none");
799
+ mCSB_container.addClass("mCS_no_scrollbar");
800
+ $this.data({"bindEvent_mousewheel":false,"bindEvent_focusin":false,"bindEvent_content_touch":false,"bindEvent_autoHideScrollbar":false}).addClass("mCS_disabled");
801
+ },
802
+ destroy:function(){
803
+ var $this=$(this);
804
+ $this.removeClass("mCustomScrollbar _mCS_"+$this.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();
805
+ $(document).unbind("mousemove."+$this.data("mCustomScrollbarIndex")+" mouseup."+$this.data("mCustomScrollbarIndex")+" MSPointerMove."+$this.data("mCustomScrollbarIndex")+" MSPointerUp."+$this.data("mCustomScrollbarIndex"));
806
+ $(window).unbind("resize."+$this.data("mCustomScrollbarIndex"));
807
+ }
808
+ },
809
+ functions={
810
+ /*hide/show scrollbar*/
811
+ showScrollbar:function(){
812
+ this.stop().animate({opacity:1},"fast");
813
+ },
814
+ hideScrollbar:function(){
815
+ this.stop().animate({opacity:0},"fast");
816
+ },
817
+ /*js animation tween*/
818
+ mTweenAxis:function(el,prop,to,duration,easing,callbacks){
819
+ var callbacks=callbacks || {},
820
+ onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){};
821
+ var startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style;
822
+ if(prop==="left"){from=el.offsetLeft;}
823
+ var diff=to-from;
824
+ _cancelTween();
825
+ _startTween();
826
+ function _getTime(){
827
+ if(window.performance && window.performance.now){
828
+ return window.performance.now();
829
+ }else{
830
+ if(window.performance && window.performance.webkitNow){
831
+ return window.performance.webkitNow();
832
+ }else{
833
+ if(Date.now){return Date.now();}else{return new Date().getTime();}
834
+ }
835
+ }
836
+ }
837
+ function _step(){
838
+ if(!progress){onStart.call();}
839
+ progress=_getTime()-startTime;
840
+ _tween();
841
+ if(progress>=el._time){
842
+ el._time=(progress>el._time) ? progress+_delay-(progress- el._time) : progress+_delay-1;
843
+ if(el._time<progress+1){el._time=progress+1;}
844
+ }
845
+ if(el._time<duration){el._id=_request(_step);}else{onComplete.call();}
846
+ }
847
+ function _tween(){
848
+ if(duration>0){
849
+ el.currVal=_ease(el._time,from,diff,duration,easing);
850
+ elStyle[prop]=Math.round(el.currVal)+"px";
851
+ }else{
852
+ elStyle[prop]=to+"px";
853
+ }
854
+ onUpdate.call();
855
+ }
856
+ function _startTween(){
857
+ _delay=1000/60;
858
+ el._time=progress+_delay;
859
+ _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame;
860
+ el._id=_request(_step);
861
+ }
862
+ function _cancelTween(){
863
+ if(el._id==null){return;}
864
+ if(!window.requestAnimationFrame){clearTimeout(el._id);
865
+ }else{window.cancelAnimationFrame(el._id);}
866
+ el._id=null;
867
+ }
868
+ function _ease(t,b,c,d,type){
869
+ switch(type){
870
+ case "linear":
871
+ return c*t/d + b;
872
+ break;
873
+ case "easeOutQuad":
874
+ t /= d; return -c * t*(t-2) + b;
875
+ break;
876
+ case "easeInOutQuad":
877
+ t /= d/2;
878
+ if (t < 1) return c/2*t*t + b;
879
+ t--;
880
+ return -c/2 * (t*(t-2) - 1) + b;
881
+ break;
882
+ case "easeOutCubic":
883
+ t /= d; t--; return c*(t*t*t + 1) + b;
884
+ break;
885
+ case "easeOutQuart":
886
+ t /= d; t--; return -c * (t*t*t*t - 1) + b;
887
+ break;
888
+ case "easeOutQuint":
889
+ t /= d; t--; return c*(t*t*t*t*t + 1) + b;
890
+ break;
891
+ case "easeOutCirc":
892
+ t /= d; t--; return c * Math.sqrt(1 - t*t) + b;
893
+ break;
894
+ case "easeOutSine":
895
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
896
+ break;
897
+ case "easeOutExpo":
898
+ return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b;
899
+ break;
900
+ case "mcsEaseOut":
901
+ var ts=(t/=d)*t,tc=ts*t;
902
+ return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t);
903
+ break;
904
+ case "draggerRailEase":
905
+ t /= d/2;
906
+ if (t < 1) return c/2*t*t*t + b;
907
+ t -= 2;
908
+ return c/2*(t*t*t + 2) + b;
909
+ break;
910
+ }
911
+ }
912
+ },
913
+ /*stop js animation tweens*/
914
+ mTweenAxisStop:function(el){
915
+ if(el._id==null){return;}
916
+ if(!window.requestAnimationFrame){clearTimeout(el._id);
917
+ }else{window.cancelAnimationFrame(el._id);}
918
+ el._id=null;
919
+ },
920
+ /*detect requestAnimationFrame and polyfill*/
921
+ rafPolyfill:function(){
922
+ var pfx=["ms","moz","webkit","o"],i=pfx.length;
923
+ while(--i > -1 && !window.requestAnimationFrame){
924
+ window.requestAnimationFrame=window[pfx[i]+"RequestAnimationFrame"];
925
+ window.cancelAnimationFrame=window[pfx[i]+"CancelAnimationFrame"] || window[pfx[i]+"CancelRequestAnimationFrame"];
926
+ }
927
+ }
928
+ }
929
+ /*detect features*/
930
+ functions.rafPolyfill.call(); /*requestAnimationFrame*/
931
+ $.support.touch=!!('ontouchstart' in window); /*touch*/
932
+ $.support.msPointer=window.navigator.msPointerEnabled; /*MSPointer support*/
933
+ /*plugin dependencies*/
934
+ var _dlp=("https:"==document.location.protocol) ? "https:" : "http:";
935
+ $.event.special.mousewheel || document.write('<script src="'+_dlp+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');
936
+ /*plugin fn*/
937
+ $.fn.mCustomScrollbar=function(method){
938
+ if(methods[method]){
939
+ return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
940
+ }else if(typeof method==="object" || !method){
941
+ return methods.init.apply(this,arguments);
942
+ }else{
943
+ $.error("Method "+method+" does not exist");
944
+ }
945
+ };
946
+ })(jQuery);
js/nomin/jquery.mousewheel.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
2
+ * Licensed under the MIT License (LICENSE.txt).
3
+ *
4
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
7
+ *
8
+ * Version: 3.0.6
9
+ *
10
+ * Requires: 1.2.2+
11
+ */
12
+
13
+ (function($) {
14
+
15
+ var types = ['DOMMouseScroll', 'mousewheel'];
16
+
17
+ if ($.event.fixHooks) {
18
+ for ( var i=types.length; i; ) {
19
+ $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
20
+ }
21
+ }
22
+
23
+ $.event.special.mousewheel = {
24
+ setup: function() {
25
+ if ( this.addEventListener ) {
26
+ for ( var i=types.length; i; ) {
27
+ this.addEventListener( types[--i], handler, false );
28
+ }
29
+ } else {
30
+ this.onmousewheel = handler;
31
+ }
32
+ },
33
+
34
+ teardown: function() {
35
+ if ( this.removeEventListener ) {
36
+ for ( var i=types.length; i; ) {
37
+ this.removeEventListener( types[--i], handler, false );
38
+ }
39
+ } else {
40
+ this.onmousewheel = null;
41
+ }
42
+ }
43
+ };
44
+
45
+ $.fn.extend({
46
+ mousewheel: function(fn) {
47
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
48
+ },
49
+
50
+ unmousewheel: function(fn) {
51
+ return this.unbind("mousewheel", fn);
52
+ }
53
+ });
54
+
55
+
56
+ function handler(event) {
57
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
58
+ event = $.event.fix(orgEvent);
59
+ event.type = "mousewheel";
60
+
61
+ // Old school scrollwheel delta
62
+ if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
63
+ if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
64
+
65
+ // New school multidimensional scroll (touchpads) deltas
66
+ deltaY = delta;
67
+
68
+ // Gecko
69
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
70
+ deltaY = 0;
71
+ deltaX = -1*delta;
72
+ }
73
+
74
+ // Webkit
75
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
76
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
77
+
78
+ // Add event and delta to the front of the arguments
79
+ args.unshift(event, delta, deltaX, deltaY);
80
+
81
+ return ($.event.dispatch || $.event.handle).apply(this, args);
82
+ }
83
+
84
+ })(jQuery);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Ajax Search Lite ===
2
  Contributors: wpdreams
3
  Donate link: http://wp-dreams.com
4
- Tags: search, better wordpress search, search plugin, relevance search, widget, Post, ajax search, search filter, wp ajax search, custom fields search, better search, ajax search plugin, wp search, wp search plugin, filter, relevant search plugin, wordpress search, Live Search, shortcode, google, autocomplete, suggest, woocommerce, woocommerce search, product, product search, custom search, ajax, suggest, autosuggest, search autocomplete, live, plugin, sidebar, product tag search, products, woocommerce tag search, WooCommerce Plugin, shop, search by sku, relevant search, highlight, term, image, custom search, ecommerce, Predictive Search, search product, shop, typehead, suggest, instant-search
5
  Requires at least: 3.5
6
- Tested up to: 4.6
7
- Stable tag: 4.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ A powerful ajax search engine for WordPress. Add a live search form to your site
14
 
15
  Ajax Search Lite - is a live search plugin for WordPress. This responsive live search engine, which will boost your user experience by providing a user friendly ajax powered search form - an ajax live search. You can filter the results with the category and post type filter boxes as well. Google autocomplete and keyword suggestions also included.
16
 
17
- Very smooth animations with mobile device support and regular updates. Use Ajax Search Lite as a replacement for the default WordPress search with a better looking, more efficient search engine.
18
  Fine-tune the user experience by providing a powerful ajax search plugin to your visitors. It will rock your site! Supports custom post types and custom fields and more. Boost your site search engine with this custom built live search engine.
19
 
20
  **Live Demo**
@@ -48,7 +48,7 @@ Homepage: [wp-dreams.com](http://wp-dreams.com)
48
 
49
  Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
50
 
51
- **Pro version fetures v4.9.4 (2016.08.04):**
52
 
53
  * Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
54
  * The search now can affect the default WordPress search results
@@ -78,15 +78,18 @@ Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_sea
78
 
79
  == Frequently asked questions ==
80
 
81
- = After an update, the plugin stopped working, why? =
82
-
83
- It's most likely a cache related issue. Make sure to clear all website cache, including page, minify, browser and CDN as well.
84
-
85
  = The images are not showing, what is wrong? =
86
 
87
  The search parses the first image from the post/page content. Most likely there
88
  is no image in post.
89
 
 
 
 
 
 
 
 
90
  = When I type in something, the search wheel is spinning, but nothing happens =
91
 
92
  It is most likely, that another plugin or the template is throwing errors while the
@@ -106,24 +109,6 @@ and will let you know what to do.
106
 
107
  == Changelog ==
108
 
109
- = 4.6.5 =
110
- * Category exclusions for objects without assigned terms fix
111
- * WooCommerce form override is now possible (if supported)
112
- * Additional init method for redundancy (window.load)
113
- * Init data moved to div attributes instead of content
114
- * Scrollbar updated to latest version
115
- * Font import removed, using wp_enqueue_style() instead
116
-
117
- = 4.6.4 =
118
- * Keyword logic option added (OR, AND)
119
- * Checkbox layout changed to flex
120
- * Allow search in all custom fields option
121
- * Settings no longer hide when search is triggered
122
-
123
- = 4.6.3 =
124
- * Session related fixes and optimizations
125
- * Bakc-end script fixes
126
-
127
  = 4.6.2 =
128
  * Keyword highlighting implemented
129
  * IE11 back-end fixes
1
+ === Ajax Search Lite ===
2
  Contributors: wpdreams
3
  Donate link: http://wp-dreams.com
4
+ Tags: search, better wordpress search, search plugin, relevance search, widget, Post, ajax search, search filter, wp ajax search, custom fields search, better search, ajax search plugin, wp search, wp search plugin, filter, relevant search plugin, wordpress search, live search, shortcode, google, autocomplete, suggest, woocommerce, woocommerce search, product, product search, custom search, ajax, suggest, autosuggest, autocomplete, search autocomplete, live, plugin, sidebar, product tag search, woocommerce tag search, WooCommerce Plugin, shop, search by sku, relevant search, highlight, term, image
5
  Requires at least: 3.5
6
+ Tested up to: 4.5
7
+ Stable tag: 4.6.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Ajax Search Lite - is a live search plugin for WordPress. This responsive live search engine, which will boost your user experience by providing a user friendly ajax powered search form - an ajax live search. You can filter the results with the category and post type filter boxes as well. Google autocomplete and keyword suggestions also included.
16
 
17
+ Very smooth animations with mobile device support and regular updates.
18
  Fine-tune the user experience by providing a powerful ajax search plugin to your visitors. It will rock your site! Supports custom post types and custom fields and more. Boost your site search engine with this custom built live search engine.
19
 
20
  **Live Demo**
48
 
49
  Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
50
 
51
+ **Pro version fetures v4.8.4 (2016.03.24):**
52
 
53
  * Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
54
  * The search now can affect the default WordPress search results
78
 
79
  == Frequently asked questions ==
80
 
 
 
 
 
81
  = The images are not showing, what is wrong? =
82
 
83
  The search parses the first image from the post/page content. Most likely there
84
  is no image in post.
85
 
86
+ = I added images to the post/page but I still cannot see them =
87
+
88
+ Try to chmod to 775 the wp-content/plugins/ajax-search-lite/cache/ directory! All
89
+ the image files will be stored there.
90
+ Also, make sure, that the "furl open wrapper" is enabled on your server! In some cases
91
+ this feature is disabled and you need to contact the server administrator to enable it for you.
92
+
93
  = When I type in something, the search wheel is spinning, but nothing happens =
94
 
95
  It is most likely, that another plugin or the template is throwing errors while the
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  = 4.6.2 =
113
  * Keyword highlighting implemented
114
  * IE11 back-end fixes