Ajax Search Lite - Version 4.7.0

Version Description

  • FROM action tag removed
  • qtranslateX comppatibility functions
  • Override bugfix, where it was enabled even if disabled
  • asl_results execution fix, where it was executed two times, instead of one
  • more results link override fix, where it redirected only, without override
  • New redirection options for Magnifier and Enter events
  • Custom redirection URI scheme option
  • Polylang string translations support
  • asl_custom_fonts filter to access font inclusions
  • asl_layout_in_form action to access form
  • GET method is now the default for override
  • Session is removed, using COOKIES instead, yumm
  • asl_active query variable removed for POST requests
Download this release

Release Info

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

Code changes from version 4.6.6 to 4.7.0

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.6
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
@@ -21,8 +21,8 @@ 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', 4660);
25
- define('ASL_CURR_VER_STRING', "4.6.6");
26
  define('ASL_DEBUG', 0);
27
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
28
 
@@ -39,7 +39,6 @@ require_once(ASL_CLASSES_PATH . "core/core.inc.php");
39
  * wd_asl()->instances => array of search instances and data
40
  * wd_asl()->init => initialization object
41
  * wd_asl()->manager => main manager object
42
- * wd_asl()->session => the WP_Session object (shared)
43
  */
44
  $wd_asl = new WD_ASL_Globals();
45
 
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.7.0
7
  Author: Ernest Marcinko
8
  Author URI: http://wp-dreams.com
9
  Text Domain: ajax-search-lite
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', 4700);
25
+ define('ASL_CURR_VER_STRING', "4.7.0");
26
  define('ASL_DEBUG', 0);
27
  define('ASL_DEMO', get_option('wd_asl_demo', 0) );
28
 
39
  * wd_asl()->instances => array of search instances and data
40
  * wd_asl()->init => initialization object
41
  * wd_asl()->manager => main manager object
 
42
  */
43
  $wd_asl = new WD_ASL_Globals();
44
 
backend/settings.php CHANGED
@@ -28,7 +28,7 @@ $_dk = 'asl_defaults';
28
  <?php endif; ?>
29
 
30
  <div class="wpdreams-box" style='vertical-align: middle;'>
31
- <a class='gopro' href='http://bit.ly/ajaxsearchpro' target='_blank'>Get the pro version!</a>
32
  or leave a like :)
33
  <div style='display: inline-block;' class="fb-like" data-href="https://www.facebook.com/pages/WPDreams/383702515034741" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
34
  or you can follow me
28
  <?php endif; ?>
29
 
30
  <div class="wpdreams-box" style='vertical-align: middle;'>
31
+ <a class='gopro' href='https://wp-dreams.com/go/?to=asp_demo_gopro' target='_blank'>Get the pro version!</a>
32
  or leave a like :)
33
  <div style='display: inline-block;' class="fb-like" data-href="https://www.facebook.com/pages/WPDreams/383702515034741" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
34
  or you can follow me
backend/settings/assets/search_instance.js CHANGED
@@ -7,23 +7,23 @@ jQuery(function ($) {
7
  $('.tabs a[tabid=401]').click();
8
  });
9
 
10
- $('.tabs a').on('click', function(){
11
  $('#sett_tabid').val($(this).attr('tabid'));
12
  location.hash = $(this).attr('tabid');
13
  });
14
 
15
  // Remove the # from the hash, as different browsers may or may not include it
16
- var hash = location.hash.replace('#','');
17
 
18
- if(hash != ''){
19
  hash = parseInt(hash);
20
- $('.tabs a[tabid=' + Math.floor( hash / 100 ) + ']').click();
21
  $('.tabs a[tabid=' + hash + ']').click();
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
@@ -31,26 +31,48 @@ jQuery(function ($) {
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
  });
7
  $('.tabs a[tabid=401]').click();
8
  });
9
 
10
+ $('.tabs a').on('click', function () {
11
  $('#sett_tabid').val($(this).attr('tabid'));
12
  location.hash = $(this).attr('tabid');
13
  });
14
 
15
  // Remove the # from the hash, as different browsers may or may not include it
16
+ var hash = location.hash.replace('#', '');
17
 
18
+ if (hash != '') {
19
  hash = parseInt(hash);
20
+ $('.tabs a[tabid=' + Math.floor(hash / 100) + ']').click();
21
  $('.tabs a[tabid=' + hash + ']').click();
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
31
  });
32
  $('input[name="search_all_cf"]').change();
33
 
34
+ function check_redirect_url() {
35
+ if (
36
+ ( $('input[name="redirectonclick"]').val() == 1 && $('select[name="redirect_click_to"]').val() == 'custom_url' ) ||
37
+ ( $('input[name="redirect_on_enter"]').val() == 1 && $('select[name="redirect_enter_to"]').val() == 'custom_url' )
38
+ ) {
39
+ $('input[name="custom_redirect_url"]').parent().removeClass('disabled');
40
+ } else {
41
+ $('input[name="custom_redirect_url"]').parent().addClass('disabled');
42
+ }
43
+ }
44
+
45
+ $('select[name="redirect_click_to"]').change(check_redirect_url);
46
+ $('select[name="redirect_enter_to"]').change(check_redirect_url);
47
+
48
+ $('input[name="redirectonclick"] + .wpdreamsYesNoInner').click(function () {
49
+ if ($(this).prev().val() == 0) {
50
  $('select[name="redirect_click_to"]').parent().addClass('disabled');
51
+ } else {
52
  $('select[name="redirect_click_to"]').parent().removeClass('disabled');
53
+ }
54
+ check_redirect_url();
55
  });
56
+ $('input[name="redirect_on_enter"] + .wpdreamsYesNoInner').click(function () {
57
+ if ($(this).prev().val() == 0) {
58
  $('select[name="redirect_enter_to"]').parent().addClass('disabled');
59
+ } else {
60
  $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
61
+ }
62
+ check_redirect_url();
63
  });
64
 
65
+ if ( $('input[name="redirectonclick"]').val() == 0 ) {
66
  $('select[name="redirect_click_to"]').parent().addClass('disabled');
67
+ } else {
68
  $('select[name="redirect_click_to"]').parent().removeClass('disabled');
69
+ }
70
 
71
+ if ( $('input[name="redirect_on_enter"]').val() == 0 ) {
72
  $('select[name="redirect_enter_to"]').parent().addClass('disabled');
73
+ } else {
74
  $('select[name="redirect_enter_to"]').parent().removeClass('disabled');
75
+ }
76
+
77
+ check_redirect_url();
78
  });
backend/settings/default_options.php CHANGED
@@ -49,6 +49,7 @@ function asl_do_init_options() {
49
  'redirect_click_to' => 'results_page',
50
  'redirect_on_enter' => 0,
51
  'redirect_enter_to' => 'results_page',
 
52
  'triggerontype' => 1,
53
  'searchinposts' => 1,
54
  'searchinpages' => 1,
@@ -60,6 +61,7 @@ function asl_do_init_options() {
60
  'search_all_cf' => 0,
61
  'customfields' => "",
62
  'override_default_results' => 0,
 
63
 
64
  'exactonly' => 0,
65
  'searchinterms' => 0,
49
  'redirect_click_to' => 'results_page',
50
  'redirect_on_enter' => 0,
51
  'redirect_enter_to' => 'results_page',
52
+ 'custom_redirect_url' => '?s={phrase}',
53
  'triggerontype' => 1,
54
  'searchinposts' => 1,
55
  'searchinpages' => 1,
61
  'search_all_cf' => 0,
62
  'customfields' => "",
63
  'override_default_results' => 0,
64
+ 'override_method' => 'get',
65
 
66
  'exactonly' => 0,
67
  'searchinterms' => 0,
backend/tabs/instance/general/behavior.php CHANGED
@@ -26,13 +26,6 @@
26
  ?>
27
  <p class="descMsg"><?php echo __("Will trigger a search when the user clicks on a checkbox on the front-end.", "ajax-search-lite"); ?></p>
28
  </div>
29
- <div class="item">
30
- <?php
31
- $o = new wpdreamsYesNo("redirectonclick", __("Redirect to search results page when clicking on search icon?", "ajax-search-lite"),
32
- $sd['redirectonclick']);
33
- $params[$o->getName()] = $o->getData();
34
- ?>
35
- </div>
36
  <div class="item">
37
  <?php
38
  $o = new wpdreamsYesNo("triggerontype", __("Trigger search when typing?", "ajax-search-lite"),
@@ -77,7 +70,9 @@
77
  array(
78
  'selects' => array(
79
  array("option" => __("Results page", "ajax-search-lite"), "value" => "results_page"),
80
- array("option" => __("First matching result", "ajax-search-lite"), "value" => "first_result")
 
 
81
  ),
82
  'value' => $sd['redirect_click_to']
83
  ));
@@ -95,7 +90,9 @@
95
  array(
96
  'selects' => array(
97
  array("option" => __("Results page", "ajax-search-lite"), "value" => "results_page"),
98
- array("option" => __("First matching result", "ajax-search-lite"), "value" => "first_result")
 
 
99
  ),
100
  'value' => $sd['redirect_enter_to']
101
  ));
@@ -103,10 +100,27 @@
103
  ?>
104
  </div>
105
  <div class="item">
 
 
 
 
 
 
 
106
  <?php
107
  $o = new wpdreamsYesNo("override_default_results", __("Override the default WordPress search results?", "ajax-search-lite"),
108
  $sd['override_default_results']);
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>
26
  ?>
27
  <p class="descMsg"><?php echo __("Will trigger a search when the user clicks on a checkbox on the front-end.", "ajax-search-lite"); ?></p>
28
  </div>
 
 
 
 
 
 
 
29
  <div class="item">
30
  <?php
31
  $o = new wpdreamsYesNo("triggerontype", __("Trigger search when typing?", "ajax-search-lite"),
70
  array(
71
  'selects' => array(
72
  array("option" => __("Results page", "ajax-search-lite"), "value" => "results_page"),
73
+ array("option" => __("Woocommerce results page", "ajax-search-lite"), "value" => "woo_results_page"),
74
+ array("option" => __("First matching result", "ajax-search-lite"), "value" => "first_result"),
75
+ array("option" => __("Custom URL", "ajax-search-lite"), "value" => "custom_url")
76
  ),
77
  'value' => $sd['redirect_click_to']
78
  ));
90
  array(
91
  'selects' => array(
92
  array("option" => __("Results page", "ajax-search-lite"), "value" => "results_page"),
93
+ array("option" => __("Woocommerce results page", "ajax-search-lite"), "value" => "woo_results_page"),
94
+ array("option" => __("First matching result", "ajax-search-lite"), "value" => "first_result"),
95
+ array("option" => __("Custom URL", "ajax-search-lite"), "value" => "custom_url")
96
  ),
97
  'value' => $sd['redirect_enter_to']
98
  ));
100
  ?>
101
  </div>
102
  <div class="item">
103
+ <?php
104
+ $o = new wpdreamsText("custom_redirect_url", __("Custom redirect URL", "ajax-search-lite"), $sd['custom_redirect_url']);
105
+ $params[$o->getName()] = $o->getData();
106
+ ?>
107
+ <p class="descMsg">You can use the <string>asl_redirect_url</string> filter to add more variables.</p>
108
+ </div>
109
+ <div class="item item-flex-nogrow" style="flex-wrap: wrap;">
110
  <?php
111
  $o = new wpdreamsYesNo("override_default_results", __("Override the default WordPress search results?", "ajax-search-lite"),
112
  $sd['override_default_results']);
113
  $params[$o->getName()] = $o->getData();
114
  ?>
115
+ <?php
116
+ $o = new wpdreamsCustomSelect("override_method", " method ", array(
117
+ "selects" =>array(
118
+ array("option" => "Post", "value" => "post"),
119
+ array("option" => "Get", "value" => "get")
120
+ ),
121
+ "value" => $sd['override_method']
122
+ ));
123
+ $params[$o->getName()] = $o->getData();
124
+ ?>
125
+ <div class="descMsg" style="min-width: 100%;flex-wrap: wrap;flex-basis: auto;flex-grow: 1;box-sizing: border-box;"><?php echo __("Might not work with some Themes.", "ajax-search-lite"); ?></p>
126
  </div>
css/style.basic.css CHANGED
@@ -528,6 +528,7 @@ div[id*="ajaxsearchliteres"] p.showmore {
528
  background-color: white;
529
  /* border: 2px solid #E1635C; */
530
  margin-top: 3px;
 
531
  }
532
 
533
  div[id*="ajaxsearchliteres"] p.showmore a {
@@ -539,6 +540,7 @@ div[id*="ajaxsearchliteres"] p.showmore a {
539
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
540
  display: block;
541
  text-align: center;
 
542
  }
543
 
544
 
528
  background-color: white;
529
  /* border: 2px solid #E1635C; */
530
  margin-top: 3px;
531
+ cursor: pointer;
532
  }
533
 
534
  div[id*="ajaxsearchliteres"] p.showmore a {
540
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
541
  display: block;
542
  text-align: center;
543
+ cursor: pointer;
544
  }
545
 
546
 
includes/classes/actions/actions.inc.php CHANGED
@@ -3,5 +3,6 @@ if (!defined('ABSPATH')) die('-1');
3
 
4
  require_once(ASL_CLASSES_PATH . "actions/class-asl-abstract.php");
5
  require_once(ASL_CLASSES_PATH . "actions/class-asl-admin-notices.php");
 
6
  require_once(ASL_CLASSES_PATH . "actions/class-asl-stylesheets.php");
7
  require_once(ASL_CLASSES_PATH . "actions/class-asl-customfonts.php");
3
 
4
  require_once(ASL_CLASSES_PATH . "actions/class-asl-abstract.php");
5
  require_once(ASL_CLASSES_PATH . "actions/class-asl-admin-notices.php");
6
+ require_once(ASL_CLASSES_PATH . "actions/class-asl-cookies.php");
7
  require_once(ASL_CLASSES_PATH . "actions/class-asl-stylesheets.php");
8
  require_once(ASL_CLASSES_PATH . "actions/class-asl-customfonts.php");
includes/classes/actions/class-asl-cookies.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) die('-1');
3
+
4
+ if (!class_exists("WD_ASL_Cookies_Action")) {
5
+ /**
6
+ * Class WD_ASL_Cookies_Action
7
+ *
8
+ * Cookie related stuff
9
+ *
10
+ * @class WD_ASL_Cookies_Action
11
+ * @version 1.0
12
+ * @package AjaxSearchLite/Classes/Actions
13
+ * @category Class
14
+ * @author Ernest Marcinko
15
+ */
16
+ class WD_ASL_Cookies_Action extends WD_ASL_Action_Abstract {
17
+
18
+ public function handle() {
19
+ // Forcefully unset the cookies, if requested
20
+ if ( isset($_GET['asp_unset_cookies']) ) {
21
+ $parse = parse_url(get_bloginfo('url'));
22
+ $host = $parse['host'];
23
+ setcookie('asl_data', '', time() - 7200, '/', $host, is_ssl() );
24
+ setcookie('asl_phrase', '', time() - 7200, '/', $host, is_ssl() );
25
+ unset($_COOKIE['asl_data']);
26
+ unset($_COOKIE['asl_phrase']);
27
+ }
28
+
29
+ /**
30
+ * NOTES
31
+ * ---------------------------------------
32
+ * DO NOT DELETE THE COOKIES HERE, UNLESS A CERTAIN CRITERIA MET!!
33
+ * This filter is executed on ajax requests and redirects and during all
34
+ * kinds of background tasks. Unset only if the criteria is deterministic,
35
+ * and applies on a very specific case. (like the example above)
36
+ */
37
+
38
+ // Set cookie if this is search, and asl is active
39
+ if ( isset($_POST['asl_active']) && isset($_GET['s']) ) {
40
+ if (isset($_POST['p_asl_data']) || isset($_POST['np_asl_data'])) {
41
+ $parse = parse_url(get_bloginfo('url'));
42
+ $host = $parse['host'];
43
+
44
+ $_p_data = isset($_POST['p_asl_data']) ? $_POST['p_asl_data'] : $_POST['np_asl_data'];
45
+ setcookie('asl_data', $_p_data, time() + (30 * DAY_IN_SECONDS), '/', $host, is_ssl() );
46
+ setcookie('asl_phrase', $_GET['s'], time() + (30 * DAY_IN_SECONDS), '/', $host, is_ssl() );
47
+ $_COOKIE['asl_data'] = $_p_data;
48
+ $_COOKIE['asl_phrase'] = $_GET['s'];
49
+ }
50
+ }
51
+ }
52
+
53
+ // ------------------------------------------------------------
54
+ // ---------------- SINGLETON SPECIFIC --------------------
55
+ // ------------------------------------------------------------
56
+ public static function getInstance() {
57
+ if ( ! ( self::$_instance instanceof self ) ) {
58
+ self::$_instance = new self();
59
+ }
60
+
61
+ return self::$_instance;
62
+ }
63
+ }
64
+ }
includes/classes/actions/class-asl-stylesheets.php CHANGED
@@ -42,8 +42,6 @@ if (!class_exists("WD_ASL_StyleSheets_Action")) {
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 = "
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
  }
46
 
47
  self::$inline_css = "
includes/classes/ajax/class-asl-search.php CHANGED
@@ -48,8 +48,6 @@ if (!class_exists("WD_ASL_Search_Handler")) {
48
  if (count($results) <= 0 && $sd['kw_suggestions'])
49
  $results = $searchController->kwSuggestions();
50
 
51
- $results = apply_filters('asl_results', $results, $id);
52
-
53
  do_action('asl_after_search', $s, $results, $id);
54
 
55
  // Override from hooks
48
  if (count($results) <= 0 && $sd['kw_suggestions'])
49
  $results = $searchController->kwSuggestions();
50
 
 
 
51
  do_action('asl_after_search', $s, $results, $id);
52
 
53
  // Override from hooks
includes/classes/core/class-asl-actions.php CHANGED
@@ -23,6 +23,12 @@ if ( !class_exists("WD_ASL_Actions") ) {
23
  * @var array
24
  */
25
  private static $actions = array(
 
 
 
 
 
 
26
  array(
27
  "action" => "wp_enqueue_scripts",
28
  "handler" => "StyleSheets",
23
  * @var array
24
  */
25
  private static $actions = array(
26
+ array(
27
+ "action" => "init",
28
+ "handler" => "Cookies",
29
+ "priority" => 10,
30
+ "args" => 0
31
+ ),
32
  array(
33
  "action" => "wp_enqueue_scripts",
34
  "handler" => "StyleSheets",
includes/classes/core/class-asl-filters.php CHANGED
@@ -26,25 +26,25 @@ if ( !class_exists("WD_ASL_Filters") ) {
26
  array(
27
  "filter" => "posts_results",
28
  "handler" => array("SearchOverride", "override"),
29
- "priority" => 1,
30
  "args" => 2
31
  ),
32
  array(
33
  "filter" => "page_link",
34
  "handler" => array("SearchOverride", "fixUrls"),
35
- "priority" => 1,
36
  "args" => 3
37
  ),
38
  array(
39
  "filter" => "post_link",
40
  "handler" => array("SearchOverride", "fixUrls"),
41
- "priority" => 1,
42
  "args" => 3
43
  ),
44
  array(
45
  "filter" => "post_type_link",
46
  "handler" => array("SearchOverride", "fixUrls"),
47
- "priority" => 1,
48
  "args" => 3
49
  ),
50
  array(
@@ -62,7 +62,7 @@ if ( !class_exists("WD_ASL_Filters") ) {
62
  array(
63
  "filter" => "asp_result_after_prostproc",
64
  "handler" => array("EtcFixes", "plug_DownloadMonitorLink"),
65
- "priority" => 1,
66
  "args" => 2
67
  )
68
  );
26
  array(
27
  "filter" => "posts_results",
28
  "handler" => array("SearchOverride", "override"),
29
+ "priority" => 999999999,
30
  "args" => 2
31
  ),
32
  array(
33
  "filter" => "page_link",
34
  "handler" => array("SearchOverride", "fixUrls"),
35
+ "priority" => 999999999,
36
  "args" => 3
37
  ),
38
  array(
39
  "filter" => "post_link",
40
  "handler" => array("SearchOverride", "fixUrls"),
41
+ "priority" => 999999999,
42
  "args" => 3
43
  ),
44
  array(
45
  "filter" => "post_type_link",
46
  "handler" => array("SearchOverride", "fixUrls"),
47
+ "priority" => 999999999,
48
  "args" => 3
49
  ),
50
  array(
62
  array(
63
  "filter" => "asp_result_after_prostproc",
64
  "handler" => array("EtcFixes", "plug_DownloadMonitorLink"),
65
+ "priority" => 999999999,
66
  "args" => 2
67
  )
68
  );
includes/classes/core/class-asl-globals.php CHANGED
@@ -61,13 +61,6 @@ class WD_ASL_Globals {
61
  */
62
  public $tables;
63
 
64
- /**
65
- * Session information
66
- *
67
- * @var WP_Session()
68
- */
69
- public $wp_session;
70
-
71
  /**
72
  * Holds the correct table prefix for ASP tables
73
  *
61
  */
62
  public $tables;
63
 
 
 
 
 
 
 
 
64
  /**
65
  * Holds the correct table prefix for ASP tables
66
  *
includes/classes/core/class-asl-manager.php CHANGED
@@ -51,11 +51,6 @@ if (!class_exists("WD_ASL_Manager")) {
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:
@@ -102,22 +97,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
  */
51
  * Available after this point:
52
  * (WD_ASL_Init) wd_asl()->instances, (global) $wd_asl->instances
53
  */
 
 
 
 
 
54
  register_activation_hook(ASL_FILE, array($this, 'activationHook'));
55
  /**
56
  * Available after this point:
97
  wd_asl()->debug = new wdDebugData( 'asl_debug_data' );
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  /**
101
  * Gets the call context for further use
102
  */
includes/classes/filters/class-asl-searchoverride.php CHANGED
@@ -19,50 +19,29 @@ if (!class_exists("WD_ASL_SearchOverride_Filter")) {
19
 
20
  public function override($posts, $wp_query) {
21
 
22
- // Not working on paginated results, multisite
23
- /*if (!$wp_query->is_search())
24
- return $posts;*/
25
-
26
  // Is this a search query
27
- if (empty($wp_query->query_vars['s'])) {
28
  return $posts;
29
  }
30
 
31
- // Is this just a NEW regular search?
32
- if ( !isset($_GET['asl_active']) ) {
33
- // Then clear the override
34
- wd_asl()->wp_session['asl_override'] = false;
35
- }
36
-
37
- // Memorize the data across pagination for the form values..
38
- if (isset($_POST['p_asl_data']) || isset($_POST['np_asl_data'])) {
39
- $_p_data = isset($_POST['p_asl_data']) ? $_POST['p_asl_data'] : $_POST['np_asl_data'];
40
- wd_asl()->wp_session['asl_form_data'] = array("data" => $_p_data);
41
- } else if ( !empty(wd_asl()->wp_session['asl_form_data']) ) {
42
- // Get the memorized data if exists
43
- if ( is_object(wd_asl()->wp_session['asl_form_data']['data']) )
44
- $_POST['np_asl_data'] = wd_asl()->wp_session['asl_form_data']['data']->toArray();
45
- else
46
- $_POST['np_asl_data'] = wd_asl()->wp_session['asl_form_data']['data'];
47
- }
48
-
49
- if (isset($_POST['p_asl_data']) && $_POST['p_asl_data'] != '') {
50
- $_method = &$_POST;
51
- parse_str($_method['p_asl_data'], $s_data);
52
-
53
- // this is a new POST search, so set the session
54
- wd_asl()->wp_session['asl_override'] = array("asl_data" => $s_data);
55
  } else {
56
- // Is this a paginated search?
57
- if ( !empty(wd_asl()->wp_session['asl_override']) ) {
58
- // ->toArray() method needs to be invoked, if the session handler converts the recursive array
59
- if ( is_object(wd_asl()->wp_session['asl_override']['asl_data']) )
60
- $s_data = wd_asl()->wp_session['asl_override']['asl_data']->toArray();
61
- else
62
- $s_data = wd_asl()->wp_session['asl_override']['asl_data'];
63
- } else {
64
- return $posts;
65
- }
66
  }
67
 
68
  $_POST['options'] = $s_data;
@@ -73,8 +52,6 @@ if (!class_exists("WD_ASL_SearchOverride_Filter")) {
73
  $o = WD_ASL_Search_Handler::getInstance();
74
  $res = $o->handle( true );
75
 
76
- // The get_query_var() is malfunctioning in some cases!!! use $_GET['paged']
77
- //$paged = (get_query_var('paged') != 0) ? get_query_var('paged') : 1;
78
  if ( isset($_GET['paged']) ) {
79
  $paged = $_GET['paged'];
80
  } else if ( isset($wp_query->query_vars['paged']) ) {
19
 
20
  public function override($posts, $wp_query) {
21
 
 
 
 
 
22
  // Is this a search query
23
+ if (!$wp_query->is_main_query() || !isset($wp_query->query_vars['s']) || !isset($_GET['s'])) {
24
  return $posts;
25
  }
26
 
27
+ // If get method is used, then the cookies are not present
28
+ if (isset($_GET['p_asl_data']) || isset($_GET['np_asl_data'])) {
29
+ $_p_data = isset($_GET['p_asl_data']) ? $_GET['p_asl_data'] : $_GET['np_asl_data'];
30
+ parse_str(base64_decode($_p_data), $s_data);
31
+
32
+ /**
33
+ * At this point the asl_data cookie should hold the search data, if not, well then this
34
+ * is just a simple search query.
35
+ */
36
+ } else if (
37
+ isset($_COOKIE['asl_data'], $_COOKIE['asl_phrase']) &&
38
+ $_COOKIE['asl_phrase'] == $_GET['s']
39
+ ) {
40
+ parse_str($_COOKIE['asl_data'], $s_data);
41
+ $_POST['np_asl_data'] = $_COOKIE['asl_data'];
 
 
 
 
 
 
 
 
 
42
  } else {
43
+ // Something is not right
44
+ return $posts;
 
 
 
 
 
 
 
 
45
  }
46
 
47
  $_POST['options'] = $s_data;
52
  $o = WD_ASL_Search_Handler::getInstance();
53
  $res = $o->handle( true );
54
 
 
 
55
  if ( isset($_GET['paged']) ) {
56
  $paged = $_GET['paged'];
57
  } else if ( isset($wp_query->query_vars['paged']) ) {
includes/classes/search/search_content.class.php CHANGED
@@ -11,8 +11,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
11
 
12
  $options = $this->options;
13
  $comp_options = get_option( 'asl_compatibility' );
14
- $searchData = $this->searchData;
15
- $sd = &$searchData;
16
 
17
  $parts = array();
18
  $relevance_parts = array();
@@ -72,7 +71,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
72
  if (isset($options['non_ajax_search']))
73
  $this->remaining_limit = 500;
74
  else
75
- $this->remaining_limit = $searchData['maxresults'];
76
 
77
  $q_config['language'] = $options['qtranslate_lang'];
78
 
@@ -208,8 +207,8 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
208
  }
209
  $parts[] = "( " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%" . $_like . "%'$suf_like )";
210
  $postmeta_join = "LEFT JOIN $wpdb->postmeta ON $wpdb->postmeta.post_id = $wpdb->posts.ID";
211
- } else if ( isset( $searchData['selected-customfields'] ) ) {
212
- $selected_customfields = $searchData['selected-customfields'];
213
  if ( is_array( $selected_customfields ) && count( $selected_customfields ) > 0 ) {
214
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
215
 
@@ -228,53 +227,6 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
228
  /*---------------------------------------------------------------*/
229
 
230
 
231
- // ------------------------ Categories/taxonomies ----------------------
232
- /*if (
233
- w_isset_def($searchData['showsearchincategories'], 0) == 1 &&
234
- w_isset_def($searchData['show_frontend_search_settings'], 1) == 1
235
- ) {
236
- if (!isset($options['categoryset']) || $options['categoryset'] == "")
237
- $options['categoryset'] = array();
238
- if (!isset($options['termset']) || $options['termset'] == "")
239
- $options['termset'] = array();
240
-
241
- $exclude_categories = array();
242
- $searchData['selected-exsearchincategories'] = w_isset_def($searchData['selected-exsearchincategories'], array());
243
- $searchData['selected-excludecategories'] = w_isset_def($searchData['selected-excludecategories'], array());
244
- $_all_cat = get_all_category_ids();
245
- $_needed_cat = array_diff($_all_cat, $searchData['selected-exsearchincategories']);
246
- $_needed_cat = !is_array($_needed_cat)?array():$_needed_cat;
247
- $exclude_categories = array_diff(array_merge($_needed_cat, $searchData['selected-excludecategories']), $options['categoryset']);
248
-
249
- $exclude_terms = array();
250
- $exclude_showterms = array();
251
- $searchData['selected-showterms'] = w_isset_def($searchData['selected-showterms'], array());
252
- $searchData['selected-excludeterms'] = w_isset_def($searchData['selected-excludeterms'], array());
253
- foreach ($searchData['selected-excludeterms'] as $tax=>$terms) {
254
- $exclude_terms = array_merge($exclude_terms, $terms);
255
- }
256
- foreach ($searchData['selected-showterms'] as $tax=>$terms) {
257
- $exclude_showterms = array_merge($exclude_showterms, $terms);
258
- }
259
-
260
- $exclude_terms = array_diff(array_merge($exclude_terms, $exclude_showterms), $options['termset']);
261
-
262
- $all_terms = array();
263
- $all_terms = array_merge($exclude_categories, $exclude_terms);
264
- if (count($all_terms) > 0) {
265
- $words = '--'.implode('--|--', $all_terms).'--';
266
- $term_query = "HAVING (ttid NOT REGEXP '$words')";
267
- }
268
- } else {
269
- $ex_cat = w_isset_def($searchData['selected-excludecategories'], array());
270
- if (count($ex_cat) > 0) {
271
- $words = '--'.implode('--|--', $ex_cat).'--';
272
- $term_query = "HAVING (ttid NOT REGEXP '$words')";
273
- }
274
- }*/
275
- // ---------------------------------------------------------------------
276
-
277
-
278
  // ------------------------ Categories/taxonomies ----------------------
279
  if ( ! isset( $options['categoryset'] ) || $options['categoryset'] == "" ) {
280
  $options['categoryset'] = array();
@@ -286,52 +238,23 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
286
  $term_logic = 'and';
287
 
288
  $exclude_categories = array();
289
- $searchData['selected-exsearchincategories'] = w_isset_def( $searchData['selected-exsearchincategories'], array() );
290
- $searchData['selected-excludecategories'] = w_isset_def( $searchData['selected-excludecategories'], array() );
291
-
292
- /*
293
- * OLD SOLUTION, MIGHT BE BUGGY
294
- *
295
- if ( count( $searchData['selected-exsearchincategories'] ) > 0 ||
296
- count( $searchData['selected-excludecategories'] ) > 0 ||
297
- count( $options['categoryset'] ) > 0
298
- ) {
299
- // If the category settings are invisible, ignore the excluded frontend categories, reset to empty array
300
- if ( $searchData['showsearchincategories'] == 0 ) {
301
- $searchData['selected-exsearchincategories'] = array();
302
- }
303
-
304
- $_all_cat = get_terms( 'category', array( 'fields' => 'ids' ) );
305
- $_needed_cat = array_diff( $_all_cat, $searchData['selected-exsearchincategories'] );
306
- $_needed_cat = ! is_array( $_needed_cat ) ? array() : $_needed_cat;
307
-
308
- if ( $term_logic == 'and' ) {
309
- $exclude_categories = array_diff( array_merge( $_needed_cat, $searchData['selected-excludecategories'] ), $options['categoryset'] );
310
- } else {
311
- $exclude_categories = $options['categoryset'];
312
- }
313
-
314
- // If every category is selected, then we don't need to filter anything out.
315
- if ( count( $exclude_categories ) == count( $_all_cat ) ) {
316
- $exclude_categories = array();
317
- }
318
- }
319
- */
320
 
321
  // New solution
322
- if ( count( $searchData['selected-exsearchincategories'] ) > 0 ||
323
- count( $searchData['selected-excludecategories'] ) > 0 ||
324
  count( $options['categoryset'] ) > 0 ||
325
- $searchData['showsearchincategories'] == 1
326
  ) {
327
 
328
  // If the category settings are invisible, ignore the excluded frontend categories, reset to empty array
329
- if ( $searchData['showsearchincategories'] == 0 ) {
330
- $searchData['selected-exsearchincategories'] = array();
331
  }
332
 
333
  $_all_cat = get_terms( 'category', array( 'fields' => 'ids' ) );
334
- $_needed_cat = array_diff( $_all_cat, $searchData['selected-exsearchincategories'] );
335
  $_needed_cat = ! is_array( $_needed_cat ) ? array() : $_needed_cat;
336
 
337
  // I am pretty sure this is where the devil is born
@@ -340,12 +263,12 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
340
  OR -> Posts in an array of term ids
341
  */
342
 
343
- if ( $searchData['showsearchincategories'] == 1 ) // If the settings is visible, count for the options
344
  {
345
- $exclude_categories = array_diff( array_merge( $_needed_cat, $searchData['selected-excludecategories'] ), $options['categoryset'] );
346
  } else // ..if the settings is not visible, then only the excluded categories count
347
  {
348
- $exclude_categories = $searchData['selected-excludecategories'];
349
  }
350
 
351
 
@@ -353,8 +276,8 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
353
 
354
  $exclude_terms = array();
355
 
356
- if (w_isset_def($searchData['exclude_term_ids'], "") != "") {
357
- $exclude_terms = explode( ",", str_replace( array("\r", "\n"), '', $searchData['exclude_term_ids'] ) );
358
  }
359
 
360
  $all_terms = array_unique( array_merge( $exclude_categories, $exclude_terms ) );
@@ -415,8 +338,8 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
415
 
416
 
417
  /*------------------------ Exclude id's -------------------------*/
418
- if ( isset( $searchData['excludeposts'] ) && $searchData['excludeposts'] != "" ) {
419
- $exclude_posts = "($wpdb->posts.ID NOT IN (" . $searchData['excludeposts'] . "))";
420
  } else {
421
  $exclude_posts = "($wpdb->posts.ID NOT IN (-55))";
422
  }
@@ -455,7 +378,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
455
  /*------------------------- WPML filter -------------------------*/
456
  $wpml_query = "(1)";
457
  if ( isset( $options['wpml_lang'] )
458
- && w_isset_def( $searchData['wpml_compatibility'], 1 ) == 1
459
  ) {
460
  global $sitepress;
461
  $site_lang_selected = false;
@@ -495,7 +418,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
495
  $polylang_query = "";
496
  if (isset( $options['polylang_lang'] ) &&
497
  $options['polylang_lang'] != "" &&
498
- $searchData['polylang_compatibility'] == 1
499
  ) {
500
  $languages = get_terms('language', array(
501
  'hide_empty' => false,
@@ -516,19 +439,18 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
516
 
517
  /*--------------------- Other Query stuff -----------------------*/
518
  // If the content is hidden, why select it..
519
- if ($searchData['showdescription'] == 0)
520
  $select_content = "''";
521
  else
522
  $select_content = $wpdb->posts. ".post_content";
523
 
524
  // Dont select excerpt if its not used at all
525
  $select_excerpt = (
526
- w_isset_def($searchData['titlefield'], 0) == 1 ||
527
- w_isset_def($searchData['descriptionfield'], 0) == 1
528
  ) ? $wpdb->posts. ".post_excerpt" : "''";
529
  /*---------------------------------------------------------------*/
530
 
531
- $orderby = ( ( isset( $searchData['selected-orderby'] ) && $searchData['selected-orderby'] != '' ) ? $searchData['selected-orderby'] : "post_date DESC" );
532
  $querystr = "
533
  SELECT
534
  $wpdb->posts.post_title as title,
@@ -585,7 +507,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
585
 
586
  $pageposts = is_array( $this->results ) ? $this->results : array();
587
  $options = $this->options;
588
- $searchData = $this->searchData;
589
  $s = $this->s;
590
  $_s = $this->_s;
591
 
@@ -626,7 +548,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
626
 
627
  $r->link = get_permalink( $v->id );
628
 
629
- $image_settings = $searchData['image_options'];
630
 
631
 
632
  if ( $image_settings['show_images'] != 0 ) {
@@ -654,17 +576,17 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
654
  }
655
 
656
 
657
- if ( ! isset( $searchData['titlefield'] ) || $searchData['titlefield'] == "0" || is_array( $searchData['titlefield'] ) ) {
658
  $r->title = get_the_title( $r->id );
659
  } else {
660
- if ( $searchData['titlefield'] == "1" ) {
661
  if ( strlen( $r->excerpt ) >= 200 ) {
662
  $r->title = wd_substr_at_word( $r->excerpt, 200 );
663
  } else {
664
  $r->title = $r->excerpt;
665
  }
666
  } else {
667
- $mykey_values = get_post_custom_values( $searchData['titlefield'], $r->id );
668
  if ( isset( $mykey_values[0] ) ) {
669
  $r->title = $mykey_values[0];
670
  } else {
@@ -673,22 +595,22 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
673
  }
674
  }
675
 
676
- if ( ! isset( $searchData['striptagsexclude'] ) ) {
677
- $searchData['striptagsexclude'] = "<a><span>";
678
  }
679
 
680
- if ( ! isset( $searchData['descriptionfield'] ) || $searchData['descriptionfield'] == "0" || is_array( $searchData['descriptionfield'] ) ) {
681
  if ( function_exists( 'qtrans_getLanguage' ) ) {
682
  $r->content = apply_filters( 'the_content', $r->content );
683
  }
684
  $_content = strip_tags($r->content);
685
  } else {
686
- if ( $searchData['descriptionfield'] == "1" ) {
687
  $_content = strip_tags( $r->excerpt );
688
- } else if ( $searchData['descriptionfield'] == "2" ) {
689
  $_content = strip_tags( get_the_title( $r->id ) );
690
  } else {
691
- $mykey_values = get_post_custom_values( $searchData['descriptionfield'], $r->id );
692
  if ( isset( $mykey_values[0] ) ) {
693
  $_content = strip_tags( $mykey_values[0] );
694
  } else {
@@ -701,7 +623,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
701
  }
702
 
703
  // Deal with the shortcodes here, for more accuracy
704
- if ( $searchData['shortcode_op'] == "remove" ) {
705
  if ( $_content != "" ) {
706
  // Remove shortcodes, keep the content, really fast and effective method
707
  $_content = preg_replace("~(?:\[/?)[^\]]+/?\]~su", '', $_content);
@@ -721,10 +643,10 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
721
  $_content = strip_tags( $_content );
722
 
723
  // Get the words from around the search phrase, or just the description
724
- if ( w_isset_def($searchData['description_context'], 1) == 1 && count( $_s ) > 0 )
725
- $_content = $this->context_find( $_content, $_s[0], floor($searchData['descriptionlength'] / 6), $searchData['descriptionlength'] );
726
- else if ( $_content != '' && ( strlen( $_content ) > $searchData['descriptionlength'] ) )
727
- $_content = wd_substr_at_word( $_content, $searchData['descriptionlength'] ) . "...";
728
 
729
  $_content = wd_closetags( $_content );
730
  $r->content = $_content;
@@ -763,7 +685,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
763
  * Fetches an image for BFI class
764
  */
765
  function getBFIimage( $post ) {
766
- $searchData = $this->searchData;
767
 
768
  if ( ! isset( $post->image ) || $post->image == null ) {
769
  $home_url = network_home_url();
@@ -783,7 +705,7 @@ if ( ! class_exists( 'wpdreams_searchContent' ) ) {
783
  }
784
  break;
785
  case "content":
786
- if ($searchData['showdescription'] == 0)
787
  $content = get_post_field('post_content', $post->id);
788
  else
789
  $content = $post->content;
11
 
12
  $options = $this->options;
13
  $comp_options = get_option( 'asl_compatibility' );
14
+ $sd = $this->searchData;
 
15
 
16
  $parts = array();
17
  $relevance_parts = array();
71
  if (isset($options['non_ajax_search']))
72
  $this->remaining_limit = 500;
73
  else
74
+ $this->remaining_limit = $sd['maxresults'];
75
 
76
  $q_config['language'] = $options['qtranslate_lang'];
77
 
207
  }
208
  $parts[] = "( " . $pre_field . $wpdb->postmeta . ".meta_value" . $suf_field . " LIKE $pre_like'%" . $_like . "%'$suf_like )";
209
  $postmeta_join = "LEFT JOIN $wpdb->postmeta ON $wpdb->postmeta.post_id = $wpdb->posts.ID";
210
+ } else if ( isset( $sd['selected-customfields'] ) ) {
211
+ $selected_customfields = $sd['selected-customfields'];
212
  if ( is_array( $selected_customfields ) && count( $selected_customfields ) > 0 ) {
213
  $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;
214
 
227
  /*---------------------------------------------------------------*/
228
 
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  // ------------------------ Categories/taxonomies ----------------------
231
  if ( ! isset( $options['categoryset'] ) || $options['categoryset'] == "" ) {
232
  $options['categoryset'] = array();
238
  $term_logic = 'and';
239
 
240
  $exclude_categories = array();
241
+ $sd['selected-exsearchincategories'] = w_isset_def( $sd['selected-exsearchincategories'], array() );
242
+ $sd['selected-excludecategories'] = w_isset_def( $sd['selected-excludecategories'], array() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
 
244
  // New solution
245
+ if ( count( $sd['selected-exsearchincategories'] ) > 0 ||
246
+ count( $sd['selected-excludecategories'] ) > 0 ||
247
  count( $options['categoryset'] ) > 0 ||
248
+ $sd['showsearchincategories'] == 1
249
  ) {
250
 
251
  // If the category settings are invisible, ignore the excluded frontend categories, reset to empty array
252
+ if ( $sd['showsearchincategories'] == 0 ) {
253
+ $sd['selected-exsearchincategories'] = array();
254
  }
255
 
256
  $_all_cat = get_terms( 'category', array( 'fields' => 'ids' ) );
257
+ $_needed_cat = array_diff( $_all_cat, $sd['selected-exsearchincategories'] );
258
  $_needed_cat = ! is_array( $_needed_cat ) ? array() : $_needed_cat;
259
 
260
  // I am pretty sure this is where the devil is born
263
  OR -> Posts in an array of term ids
264
  */
265
 
266
+ if ( $sd['showsearchincategories'] == 1 ) // If the settings is visible, count for the options
267
  {
268
+ $exclude_categories = array_diff( array_merge( $_needed_cat, $sd['selected-excludecategories'] ), $options['categoryset'] );
269
  } else // ..if the settings is not visible, then only the excluded categories count
270
  {
271
+ $exclude_categories = $sd['selected-excludecategories'];
272
  }
273
 
274
 
276
 
277
  $exclude_terms = array();
278
 
279
+ if (w_isset_def($sd['exclude_term_ids'], "") != "") {
280
+ $exclude_terms = explode( ",", str_replace( array("\r", "\n"), '', $sd['exclude_term_ids'] ) );
281
  }
282
 
283
  $all_terms = array_unique( array_merge( $exclude_categories, $exclude_terms ) );
338
 
339
 
340
  /*------------------------ Exclude id's -------------------------*/
341
+ if ( isset( $sd['excludeposts'] ) && $sd['excludeposts'] != "" ) {
342
+ $exclude_posts = "($wpdb->posts.ID NOT IN (" . $sd['excludeposts'] . "))";
343
  } else {
344
  $exclude_posts = "($wpdb->posts.ID NOT IN (-55))";
345
  }
378
  /*------------------------- WPML filter -------------------------*/
379
  $wpml_query = "(1)";
380
  if ( isset( $options['wpml_lang'] )
381
+ && w_isset_def( $sd['wpml_compatibility'], 1 ) == 1
382
  ) {
383
  global $sitepress;
384
  $site_lang_selected = false;
418
  $polylang_query = "";
419
  if (isset( $options['polylang_lang'] ) &&
420
  $options['polylang_lang'] != "" &&
421
+ $sd['polylang_compatibility'] == 1
422
  ) {
423
  $languages = get_terms('language', array(
424
  'hide_empty' => false,
439
 
440
  /*--------------------- Other Query stuff -----------------------*/
441
  // If the content is hidden, why select it..
442
+ if ($sd['showdescription'] == 0)
443
  $select_content = "''";
444
  else
445
  $select_content = $wpdb->posts. ".post_content";
446
 
447
  // Dont select excerpt if its not used at all
448
  $select_excerpt = (
449
+ w_isset_def($sd['titlefield'], 0) == 1 ||
450
+ w_isset_def($sd['descriptionfield'], 0) == 1
451
  ) ? $wpdb->posts. ".post_excerpt" : "''";
452
  /*---------------------------------------------------------------*/
453
 
 
454
  $querystr = "
455
  SELECT
456
  $wpdb->posts.post_title as title,
507
 
508
  $pageposts = is_array( $this->results ) ? $this->results : array();
509
  $options = $this->options;
510
+ $sd = $this->searchData;
511
  $s = $this->s;
512
  $_s = $this->_s;
513
 
548
 
549
  $r->link = get_permalink( $v->id );
550
 
551
+ $image_settings = $sd['image_options'];
552
 
553
 
554
  if ( $image_settings['show_images'] != 0 ) {
576
  }
577
 
578
 
579
+ if ( ! isset( $sd['titlefield'] ) || $sd['titlefield'] == "0" || is_array( $sd['titlefield'] ) ) {
580
  $r->title = get_the_title( $r->id );
581
  } else {
582
+ if ( $sd['titlefield'] == "1" ) {
583
  if ( strlen( $r->excerpt ) >= 200 ) {
584
  $r->title = wd_substr_at_word( $r->excerpt, 200 );
585
  } else {
586
  $r->title = $r->excerpt;
587
  }
588
  } else {
589
+ $mykey_values = get_post_custom_values( $sd['titlefield'], $r->id );
590
  if ( isset( $mykey_values[0] ) ) {
591
  $r->title = $mykey_values[0];
592
  } else {
595
  }
596
  }
597
 
598
+ if ( ! isset( $sd['striptagsexclude'] ) ) {
599
+ $sd['striptagsexclude'] = "<a><span>";
600
  }
601
 
602
+ if ( ! isset( $sd['descriptionfield'] ) || $sd['descriptionfield'] == "0" || is_array( $sd['descriptionfield'] ) ) {
603
  if ( function_exists( 'qtrans_getLanguage' ) ) {
604
  $r->content = apply_filters( 'the_content', $r->content );
605
  }
606
  $_content = strip_tags($r->content);
607
  } else {
608
+ if ( $sd['descriptionfield'] == "1" ) {
609
  $_content = strip_tags( $r->excerpt );
610
+ } else if ( $sd['descriptionfield'] == "2" ) {
611
  $_content = strip_tags( get_the_title( $r->id ) );
612
  } else {
613
+ $mykey_values = get_post_custom_values( $sd['descriptionfield'], $r->id );
614
  if ( isset( $mykey_values[0] ) ) {
615
  $_content = strip_tags( $mykey_values[0] );
616
  } else {
623
  }
624
 
625
  // Deal with the shortcodes here, for more accuracy
626
+ if ( $sd['shortcode_op'] == "remove" ) {
627
  if ( $_content != "" ) {
628
  // Remove shortcodes, keep the content, really fast and effective method
629
  $_content = preg_replace("~(?:\[/?)[^\]]+/?\]~su", '', $_content);
643
  $_content = strip_tags( $_content );
644
 
645
  // Get the words from around the search phrase, or just the description
646
+ if ( w_isset_def($sd['description_context'], 1) == 1 && count( $_s ) > 0 )
647
+ $_content = $this->context_find( $_content, $_s[0], floor($sd['descriptionlength'] / 6), $sd['descriptionlength'] );
648
+ else if ( $_content != '' && ( strlen( $_content ) > $sd['descriptionlength'] ) )
649
+ $_content = wd_substr_at_word( $_content, $sd['descriptionlength'] ) . "...";
650
 
651
  $_content = wd_closetags( $_content );
652
  $r->content = $_content;
685
  * Fetches an image for BFI class
686
  */
687
  function getBFIimage( $post ) {
688
+ $sd = $this->searchData;
689
 
690
  if ( ! isset( $post->image ) || $post->image == null ) {
691
  $home_url = network_home_url();
705
  }
706
  break;
707
  case "content":
708
+ if ($sd['showdescription'] == 0)
709
  $content = get_post_field('post_content', $post->id);
710
  else
711
  $content = $post->content;
includes/classes/session/includes/class-recursive-arrayaccess.php DELETED
@@ -1,213 +0,0 @@
1
- <?php
2
- /**
3
- * Multidimensional ArrayAccess
4
- *
5
- * Allows ArrayAccess-like functionality with multidimensional arrays. Fully supports
6
- * both sets and unsets.
7
- *
8
- * @package WordPress
9
- * @subpackage Session
10
- * @since 3.7.0
11
- */
12
-
13
- /**
14
- * Recursive array class to allow multidimensional array access.
15
- *
16
- * @package WordPress
17
- * @since 3.7.0
18
- */
19
- class Recursive_ArrayAccess implements ArrayAccess, Iterator, Countable {
20
- /**
21
- * Internal data collection.
22
- *
23
- * @var array
24
- */
25
- protected $container = array();
26
-
27
- /**
28
- * Flag whether or not the internal collection has been changed.
29
- *
30
- * @var bool
31
- */
32
- protected $dirty = false;
33
-
34
- /**
35
- * Default object constructor.
36
- *
37
- * @param array $data
38
- */
39
- protected function __construct( $data = array() ) {
40
- foreach ( $data as $key => $value ) {
41
- $this[ $key ] = $value;
42
- }
43
- }
44
-
45
- /**
46
- * Allow deep copies of objects
47
- */
48
- public function __clone() {
49
- foreach ( $this->container as $key => $value ) {
50
- if ( $value instanceof self ) {
51
- $this[ $key ] = clone $value;
52
- }
53
- }
54
- }
55
-
56
- /**
57
- * Output the data container as a multidimensional array.
58
- *
59
- * @return array
60
- */
61
- public function toArray() {
62
- $data = $this->container;
63
- foreach ( $data as $key => $value ) {
64
- if ( $value instanceof self ) {
65
- $data[ $key ] = $value->toArray();
66
- }
67
- }
68
- return $data;
69
- }
70
-
71
- /*****************************************************************/
72
- /* ArrayAccess Implementation */
73
- /*****************************************************************/
74
-
75
- /**
76
- * Whether a offset exists
77
- *
78
- * @link http://php.net/manual/en/arrayaccess.offsetexists.php
79
- *
80
- * @param mixed $offset An offset to check for.
81
- *
82
- * @return boolean true on success or false on failure.
83
- */
84
- public function offsetExists( $offset ) {
85
- return isset( $this->container[ $offset ]) ;
86
- }
87
-
88
- /**
89
- * Offset to retrieve
90
- *
91
- * @link http://php.net/manual/en/arrayaccess.offsetget.php
92
- *
93
- * @param mixed $offset The offset to retrieve.
94
- *
95
- * @return mixed Can return all value types.
96
- */
97
- public function offsetGet( $offset ) {
98
- return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null;
99
- }
100
-
101
- /**
102
- * Offset to set
103
- *
104
- * @link http://php.net/manual/en/arrayaccess.offsetset.php
105
- *
106
- * @param mixed $offset The offset to assign the value to.
107
- * @param mixed $value The value to set.
108
- *
109
- * @return void
110
- */
111
- public function offsetSet( $offset, $data ) {
112
- if ( is_array( $data ) ) {
113
- $data = new self( $data );
114
- }
115
- if ( $offset === null ) { // don't forget this!
116
- $this->container[] = $data;
117
- } else {
118
- $this->container[ $offset ] = $data;
119
- }
120
-
121
- $this->dirty = true;
122
- }
123
-
124
- /**
125
- * Offset to unset
126
- *
127
- * @link http://php.net/manual/en/arrayaccess.offsetunset.php
128
- *
129
- * @param mixed $offset The offset to unset.
130
- *
131
- * @return void
132
- */
133
- public function offsetUnset( $offset ) {
134
- unset( $this->container[ $offset ] );
135
-
136
- $this->dirty = true;
137
- }
138
-
139
-
140
- /*****************************************************************/
141
- /* Iterator Implementation */
142
- /*****************************************************************/
143
-
144
- /**
145
- * Current position of the array.
146
- *
147
- * @link http://php.net/manual/en/iterator.current.php
148
- *
149
- * @return mixed
150
- */
151
- public function current() {
152
- return current( $this->container );
153
- }
154
-
155
- /**
156
- * Key of the current element.
157
- *
158
- * @link http://php.net/manual/en/iterator.key.php
159
- *
160
- * @return mixed
161
- */
162
- public function key() {
163
- return key( $this->container );
164
- }
165
-
166
- /**
167
- * Move the internal point of the container array to the next item
168
- *
169
- * @link http://php.net/manual/en/iterator.next.php
170
- *
171
- * @return void
172
- */
173
- public function next() {
174
- next( $this->container );
175
- }
176
-
177
- /**
178
- * Rewind the internal point of the container array.
179
- *
180
- * @link http://php.net/manual/en/iterator.rewind.php
181
- *
182
- * @return void
183
- */
184
- public function rewind() {
185
- reset( $this->container );
186
- }
187
-
188
- /**
189
- * Is the current key valid?
190
- *
191
- * @link http://php.net/manual/en/iterator.rewind.php
192
- *
193
- * @return bool
194
- */
195
- public function valid() {
196
- return $this->offsetExists( $this->key() );
197
- }
198
-
199
- /*****************************************************************/
200
- /* Countable Implementation */
201
- /*****************************************************************/
202
-
203
- /**
204
- * Get the count of elements in the container array.
205
- *
206
- * @link http://php.net/manual/en/countable.count.php
207
- *
208
- * @return int
209
- */
210
- public function count() {
211
- return count( $this->container );
212
- }
213
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/session/includes/class-wp-session-utils.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Utility class for sesion utilities
5
- *
6
- * THIS CLASS SHOULD NEVER BE INSTANTIATED
7
- */
8
- class WP_Session_Utils {
9
- /**
10
- * Count the total sessions in the database.
11
- *
12
- * @global wpdb $wpdb
13
- *
14
- * @return int
15
- */
16
- public static function count_sessions() {
17
- global $wpdb;
18
-
19
- $query = "SELECT COUNT(*) FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'";
20
-
21
- /**
22
- * Filter the query in case tables are non-standard.
23
- *
24
- * @param string $query Database count query
25
- */
26
- $query = apply_filters( 'wp_session_count_query', $query );
27
-
28
- $sessions = $wpdb->get_var( $query );
29
-
30
- return absint( $sessions );
31
- }
32
-
33
- /**
34
- * Create a new, random session in the database.
35
- *
36
- * @param null|string $date
37
- */
38
- public static function create_dummy_session( $date = null ) {
39
- // Generate our date
40
- if ( null !== $date ) {
41
- $time = strtotime( $date );
42
-
43
- if ( false === $time ) {
44
- $date = null;
45
- } else {
46
- $expires = date( 'U', strtotime( $date ) );
47
- }
48
- }
49
-
50
- // If null was passed, or if the string parsing failed, fall back on a default
51
- if ( null === $date ) {
52
- /**
53
- * Filter the expiration of the session in the database
54
- *
55
- * @param int
56
- */
57
- $expires = time() + (int) apply_filters( 'wp_session_expiration', 30 * 60 );
58
- }
59
-
60
- $session_id = self::generate_id();
61
-
62
- // Store the session
63
- add_option( "_wp_session_{$session_id}", array(), '', 'no' );
64
- add_option( "_wp_session_expires_{$session_id}", $expires, '', 'no' );
65
- }
66
-
67
- /**
68
- * Delete old sessions from the database.
69
- *
70
- * @param int $limit Maximum number of sessions to delete.
71
- *
72
- * @global wpdb $wpdb
73
- *
74
- * @return int Sessions deleted.
75
- */
76
- public static function delete_old_sessions( $limit = 1000 ) {
77
- global $wpdb;
78
-
79
- $limit = absint( $limit );
80
- $keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%' ORDER BY option_value ASC LIMIT 0, {$limit}" );
81
-
82
- $now = time();
83
- $expired = array();
84
- $count = 0;
85
-
86
- foreach( $keys as $expiration ) {
87
- $key = $expiration->option_name;
88
- $expires = $expiration->option_value;
89
-
90
- if ( $now > $expires ) {
91
- $session_id = addslashes( substr( $key, 20 ) );
92
-
93
- $expired[] = $key;
94
- $expired[] = "_wp_session_{$session_id}";
95
-
96
- $count += 1;
97
- }
98
- }
99
-
100
- // Delete expired sessions
101
- if ( ! empty( $expired ) ) {
102
- $names = implode( "','", $expired );
103
- $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('{$names}')" );
104
- }
105
-
106
- return $count;
107
- }
108
-
109
- /**
110
- * Remove all sessions from the database, regardless of expiration.
111
- *
112
- * @global wpdb $wpdb
113
- *
114
- * @return int Sessions deleted
115
- */
116
- public static function delete_all_sessions() {
117
- global $wpdb;
118
-
119
- $count = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_wp_session_%'" );
120
-
121
- return (int) ( $count / 2 );
122
- }
123
-
124
- /**
125
- * Generate a new, random session ID.
126
- *
127
- * @return string
128
- */
129
- public static function generate_id() {
130
- require_once( ABSPATH . 'wp-includes/class-phpass.php' );
131
- $hash = new PasswordHash( 8, false );
132
-
133
- return md5( $hash->get_random_bytes( 32 ) );
134
- }
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/session/includes/class-wp-session.php DELETED
@@ -1,227 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress session managment.
4
- *
5
- * Standardizes WordPress session data using database-backed options for storage.
6
- * for storing user session information.
7
- *
8
- * @package WordPress
9
- * @subpackage Session
10
- * @since 3.7.0
11
- */
12
-
13
- /**
14
- * WordPress Session class for managing user session data.
15
- *
16
- * Leave all attributes and methods PUBLIC - some plugins use older versions, and it breaks compatibility
17
- *
18
- * @package WordPress
19
- * @since 3.7.0
20
- */
21
- class WP_Session extends Recursive_ArrayAccess {
22
- /**
23
- * ID of the current session.
24
- *
25
- * @var string
26
- */
27
- public $session_id;
28
-
29
- /**
30
- * Unix timestamp when session expires.
31
- *
32
- * @var int
33
- */
34
- public $expires;
35
-
36
- /**
37
- * Unix timestamp indicating when the expiration time needs to be reset.
38
- *
39
- * @var int
40
- */
41
- public $exp_variant;
42
-
43
- /**
44
- * Singleton instance.
45
- *
46
- * @var bool|WP_Session
47
- */
48
- private static $instance = false;
49
-
50
- /**
51
- * Retrieve the current session instance.
52
- *
53
- * @param bool $session_id Session ID from which to populate data.
54
- *
55
- * @return bool|WP_Session
56
- */
57
- public static function get_instance() {
58
- if ( ! self::$instance ) {
59
- self::$instance = new self();
60
- }
61
-
62
- return self::$instance;
63
- }
64
-
65
- /**
66
- * Default constructor.
67
- * Will rebuild the session collection from the given session ID if it exists. Otherwise, will
68
- * create a new session with that ID.
69
- *
70
- * @param $session_id
71
- * @uses apply_filters Calls `wp_session_expiration` to determine how long until sessions expire.
72
- */
73
- public function __construct() {
74
- if ( isset( $_COOKIE[WP_SESSION_COOKIE] ) ) {
75
- $cookie = stripslashes( $_COOKIE[WP_SESSION_COOKIE] );
76
- $cookie_crumbs = explode( '||', $cookie );
77
-
78
- $this->session_id = $cookie_crumbs[0];
79
- $this->expires = $cookie_crumbs[1];
80
- $this->exp_variant = $cookie_crumbs[2];
81
-
82
- // Update the session expiration if we're past the variant time
83
- if ( time() > $this->exp_variant ) {
84
- $this->set_expiration();
85
- delete_option( "_wp_session_expires_{$this->session_id}" );
86
- add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
87
- }
88
- } else {
89
- $this->session_id = WP_Session_Utils::generate_id();
90
- $this->set_expiration();
91
- }
92
-
93
- $this->read_data();
94
-
95
- $this->set_cookie();
96
-
97
- }
98
-
99
- /**
100
- * Set both the expiration time and the expiration variant.
101
- *
102
- * If the current time is below the variant, we don't update the session's expiration time. If it's
103
- * greater than the variant, then we update the expiration time in the database. This prevents
104
- * writing to the database on every page load for active sessions and only updates the expiration
105
- * time if we're nearing when the session actually expires.
106
- *
107
- * By default, the expiration time is set to 30 minutes.
108
- * By default, the expiration variant is set to 24 minutes.
109
- *
110
- * As a result, the session expiration time - at a maximum - will only be written to the database once
111
- * every 24 minutes. After 30 minutes, the session will have been expired. No cookie will be sent by
112
- * the browser, and the old session will be queued for deletion by the garbage collector.
113
- *
114
- * @uses apply_filters Calls `wp_session_expiration_variant` to get the max update window for session data.
115
- * @uses apply_filters Calls `wp_session_expiration` to get the standard expiration time for sessions.
116
- */
117
- public function set_expiration() {
118
- $this->exp_variant = time() + (int) apply_filters( 'wp_session_expiration_variant', 24 * 60 );
119
- $this->expires = time() + (int) apply_filters( 'wp_session_expiration', 30 * 60 );
120
- }
121
-
122
- /**
123
- * Set the session cookie
124
- * @uses apply_filters Calls `wp_session_cookie_secure` to set the $secure parameter of setcookie()
125
- * @uses apply_filters Calls `wp_session_cookie_httponly` to set the $httponly parameter of setcookie()
126
- */
127
- public function set_cookie() {
128
- $secure = apply_filters('wp_session_cookie_secure', false);
129
- $httponly = apply_filters('wp_session_cookie_httponly', false);
130
- setcookie( WP_SESSION_COOKIE, $this->session_id . '||' . $this->expires . '||' . $this->exp_variant , $this->expires, COOKIEPATH, COOKIE_DOMAIN, $secure, $httponly );
131
- }
132
-
133
- /**
134
- * Read data from a transient for the current session.
135
- *
136
- * Automatically resets the expiration time for the session transient to some time in the future.
137
- *
138
- * @return array
139
- */
140
- public function read_data() {
141
- $this->container = get_option( "_wp_session_{$this->session_id}", array() );
142
-
143
- return $this->container;
144
- }
145
-
146
- /**
147
- * Write the data from the current session to the data storage system.
148
- */
149
- public function write_data() {
150
- $option_key = "_wp_session_{$this->session_id}";
151
-
152
- if ( false === get_option( $option_key ) ) {
153
- add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
154
- add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
155
- } else {
156
- delete_option( "_wp_session_{$this->session_id}" );
157
- add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
158
- }
159
- }
160
-
161
- /**
162
- * Output the current container contents as a JSON-encoded string.
163
- *
164
- * @return string
165
- */
166
- public function json_out() {
167
- return json_encode( $this->container );
168
- }
169
-
170
- /**
171
- * Decodes a JSON string and, if the object is an array, overwrites the session container with its contents.
172
- *
173
- * @param string $data
174
- *
175
- * @return bool
176
- */
177
- public function json_in( $data ) {
178
- $array = json_decode( $data );
179
-
180
- if ( is_array( $array ) ) {
181
- $this->container = $array;
182
- return true;
183
- }
184
-
185
- return false;
186
- }
187
-
188
- /**
189
- * Regenerate the current session's ID.
190
- *
191
- * @param bool $delete_old Flag whether or not to delete the old session data from the server.
192
- */
193
- public function regenerate_id( $delete_old = false ) {
194
- if ( $delete_old ) {
195
- delete_option( "_wp_session_{$this->session_id}" );
196
- }
197
-
198
- $this->session_id = WP_Session_Utils::generate_id();
199
-
200
- $this->set_cookie();
201
- }
202
-
203
- /**
204
- * Check if a session has been initialized.
205
- *
206
- * @return bool
207
- */
208
- public function session_started() {
209
- return !!self::$instance;
210
- }
211
-
212
- /**
213
- * Return the read-only cache expiration value.
214
- *
215
- * @return int
216
- */
217
- public function cache_expiration() {
218
- return $this->expires;
219
- }
220
-
221
- /**
222
- * Flushes all session variables.
223
- */
224
- public function reset() {
225
- $this->container = array();
226
- }
227
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/session/includes/wp-cli.php DELETED
@@ -1,158 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * CLI commands for WP Session Manager
5
- *
6
- * @package WP_Session
7
- * @subpackage Commands
8
- */
9
- class WP_Session_Command extends \WP_CLI_Command {
10
-
11
- /**
12
- * Count the total number of sessions stored in the database.
13
- *
14
- *
15
- * ## EXAMPLES
16
- *
17
- * wp session count
18
- *
19
- * @global wpdb $wpdb
20
- *
21
- * @param array $args
22
- * @param array $assoc_args
23
- */
24
- public function count( $args, $assoc_args ) {
25
- $sessions = WP_Session_Utils::count_sessions();
26
-
27
- \WP_CLI::line( sprintf( '%d sessions currently exist.', absint( $sessions ) ) );
28
- }
29
-
30
- /**
31
- * Delete sessions from the database.
32
- *
33
- * ## OPTIONS
34
- *
35
- * [--all]
36
- * : Flag whether or not to purge all sessions from the database.
37
- *
38
- * [--batch=<batch>]
39
- * : Set the batch size for deleting old sessions
40
- *
41
- * [--limit=<limit>]
42
- * : Delete just this number of old sessions
43
- *
44
- * ## EXAMPLES
45
- *
46
- * wp session delete
47
- * wp session delete [--batch=<batch>]
48
- * wp session delete [--limit=<limit>]
49
- * wp session delete [--all]
50
- *
51
- * @synopsis [--all] [--batch=<batch>] [--limit=<limit>]
52
- *
53
- * @param array $args
54
- * @param array $assoc_args
55
- */
56
- public function delete( $args, $assoc_args ) {
57
- if ( isset( $assoc_args['limit'] ) ) {
58
- $limit = absint( $assoc_args['limit'] );
59
-
60
- $count = WP_Session_Utils::delete_old_sessions( $limit );
61
-
62
- if ( $count > 0 ) {
63
- \WP_CLI::line( sprintf( 'Deleted %d sessions.', $count ) );
64
- }
65
-
66
- // Clear memory
67
- self::free_up_memory();
68
- return;
69
- }
70
-
71
- // Determine if we're deleting all sessions or just a subset.
72
- $all = isset( $assoc_args['all'] );
73
-
74
- /**
75
- * Determine the size of each batch for deletion.
76
- *
77
- * @param int
78
- */
79
- $batch = isset( $assoc_args['batch'] ) ? absint( $assoc_args['batch'] ) : apply_filters( 'wp_session_delete_batch_size', 1000 );
80
-
81
- switch ( $all ) {
82
- case true:
83
- $count = WP_Session_Utils::delete_all_sessions();
84
-
85
- \WP_CLI::line( sprintf( 'Deleted all %d sessions.', $count ) );
86
- break;
87
- case false:
88
- do {
89
- $count = WP_Session_Utils::delete_old_sessions( $batch );
90
-
91
- if ( $count > 0 ) {
92
- \WP_CLI::line( sprintf( 'Deleted %d sessions.', $count ) );
93
- }
94
-
95
- // Clear memory
96
- self::free_up_memory();
97
- } while ( $count > 0 );
98
- break;
99
- }
100
- }
101
-
102
- /**
103
- * Generate a number of dummy sessions for testing purposes.
104
- *
105
- * ## OPTIONS
106
- *
107
- * <count>
108
- * : Number of sessions to create.
109
- *
110
- * [--expires=<date>]
111
- * : Optional expiration time tagged for each session. Will use WordPress' local time.
112
- *
113
- * ## EXAMPLES
114
- *
115
- * wp session generate 5000
116
- * wp session generate 5000 --expires="2014-11-09T08:00"
117
- *
118
- * @synopsis <count> [--expires=<date>]
119
- *
120
- * @param array $args
121
- * @param array $assoc_args
122
- */
123
- public function generate( $args, $assoc_args ) {
124
- $count = absint( $args[0] );
125
- $date = isset( $assoc_args['expires'] ) ? $assoc_args['expires'] : null;
126
-
127
- $notify = \WP_CLI\Utils\make_progress_bar( 'Generating sessions', $count );
128
-
129
- for ( $i = 0; $i < $count; $i ++ ) {
130
- WP_Session_Utils::create_dummy_session( $date );
131
- $notify->tick();
132
- }
133
-
134
- $notify->finish();
135
- }
136
-
137
- /**
138
- * Free up memory
139
- *
140
- * @global WP_Object_Cache $wp_object_cache
141
- * @global wpdb $wpdb
142
- */
143
- private function free_up_memory() {
144
- global $wp_object_cache, $wpdb;
145
- $wpdb->queries = array();
146
-
147
- if ( ! is_object( $wp_object_cache ) ) {
148
- return;
149
- }
150
-
151
- $wp_object_cache->group_ops = array();
152
- $wp_object_cache->stats = array();
153
- $wp_object_cache->memcache_debug = array();
154
- $wp_object_cache->cache = array();
155
- }
156
- }
157
-
158
- \WP_CLI::add_command( 'session', 'WP_Session_Command' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/session/includes/wp-session.php DELETED
@@ -1,159 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress session managment.
4
- *
5
- * Standardizes WordPress session data and uses either database transients or in-memory caching
6
- * for storing user session information.
7
- *
8
- * @package WordPress
9
- * @subpackage Session
10
- * @since 3.7.0
11
- */
12
-
13
- /**
14
- * Return the current cache expire setting.
15
- *
16
- * @return int
17
- */
18
- function wp_session_cache_expire() {
19
- $wp_session = WP_Session::get_instance();
20
-
21
- return $wp_session->cache_expiration();
22
- }
23
-
24
- /**
25
- * Alias of wp_session_write_close()
26
- */
27
- function wp_session_commit() {
28
- wp_session_write_close();
29
- }
30
-
31
- /**
32
- * Load a JSON-encoded string into the current session.
33
- *
34
- * @param string $data
35
- */
36
- function wp_session_decode( $data ) {
37
- $wp_session = WP_Session::get_instance();
38
-
39
- return $wp_session->json_in( $data );
40
- }
41
-
42
- /**
43
- * Encode the current session's data as a JSON string.
44
- *
45
- * @return string
46
- */
47
- function wp_session_encode() {
48
- $wp_session = WP_Session::get_instance();
49
-
50
- return $wp_session->json_out();
51
- }
52
-
53
- /**
54
- * Regenerate the session ID.
55
- *
56
- * @param bool $delete_old_session
57
- *
58
- * @return bool
59
- */
60
- function wp_session_regenerate_id( $delete_old_session = false ) {
61
- $wp_session = WP_Session::get_instance();
62
-
63
- $wp_session->regenerate_id( $delete_old_session );
64
-
65
- return true;
66
- }
67
-
68
- /**
69
- * Start new or resume existing session.
70
- *
71
- * Resumes an existing session based on a value sent by the _wp_session cookie.
72
- *
73
- * @return bool
74
- */
75
- function wp_session_start() {
76
- $wp_session = WP_Session::get_instance();
77
- do_action( 'wp_session_start' );
78
-
79
- return $wp_session->session_started();
80
- }
81
- if ( ! defined( 'WP_CLI' ) || false === WP_CLI ) {
82
- add_action( 'plugins_loaded', 'wp_session_start' );
83
- }
84
-
85
- /**
86
- * Return the current session status.
87
- *
88
- * @return int
89
- */
90
- function wp_session_status() {
91
- $wp_session = WP_Session::get_instance();
92
-
93
- if ( $wp_session->session_started() ) {
94
- return PHP_SESSION_ACTIVE;
95
- }
96
-
97
- return PHP_SESSION_NONE;
98
- }
99
-
100
- /**
101
- * Unset all session variables.
102
- */
103
- function wp_session_unset() {
104
- $wp_session = WP_Session::get_instance();
105
-
106
- $wp_session->reset();
107
- }
108
-
109
- /**
110
- * Write session data and end session
111
- */
112
- function wp_session_write_close() {
113
- $wp_session = WP_Session::get_instance();
114
-
115
- $wp_session->write_data();
116
- do_action( 'wp_session_commit' );
117
- }
118
- if ( ! defined( 'WP_CLI' ) || false === WP_CLI ) {
119
- add_action( 'shutdown', 'wp_session_write_close' );
120
- }
121
-
122
- /**
123
- * Clean up expired sessions by removing data and their expiration entries from
124
- * the WordPress options table.
125
- *
126
- * This method should never be called directly and should instead be triggered as part
127
- * of a scheduled task or cron job.
128
- */
129
- function wp_session_cleanup() {
130
- if ( defined( 'WP_SETUP_CONFIG' ) ) {
131
- return;
132
- }
133
-
134
- if ( ! defined( 'WP_INSTALLING' ) ) {
135
- /**
136
- * Determine the size of each batch for deletion.
137
- *
138
- * @param int
139
- */
140
- $batch_size = apply_filters( 'wp_session_delete_batch_size', 1000 );
141
-
142
- // Delete a batch of old sessions
143
- WP_Session_Utils::delete_old_sessions( $batch_size );
144
- }
145
-
146
- // Allow other plugins to hook in to the garbage collection process.
147
- do_action( 'wp_session_cleanup' );
148
- }
149
- add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' );
150
-
151
- /**
152
- * Register the garbage collector as a twice daily event.
153
- */
154
- function wp_session_register_garbage_collection() {
155
- if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) {
156
- wp_schedule_event( time(), 'hourly', 'wp_session_garbage_collection' );
157
- }
158
- }
159
- add_action( 'wp', 'wp_session_register_garbage_collection' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/session/wp-session.inc.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress session manager by Eric Mann - thank you man
4
- *
5
- * Taken from: http://jumping-duck.com/wordpress/plugins
6
- * Author: Eric Mann, http://eamann.com
7
- */
8
-
9
- // Safely include the needed files..
10
-
11
- // let users change the session cookie name
12
- if( ! defined( 'WP_SESSION_COOKIE' ) ) {
13
- define( 'WP_SESSION_COOKIE', '_wp_session' );
14
- }
15
-
16
- if ( ! class_exists( 'Recursive_ArrayAccess' ) ) {
17
- include ASL_CLASSES_PATH . 'session/includes/class-recursive-arrayaccess.php';
18
- }
19
-
20
- // Include utilities class
21
- if ( ! class_exists( 'WP_Session_Utils' ) ) {
22
- include ASL_CLASSES_PATH . 'session/includes/class-wp-session-utils.php';
23
- }
24
-
25
- // Include WP_CLI routines early
26
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
27
- include ASL_CLASSES_PATH . 'session/includes/wp-cli.php';
28
- }
29
-
30
- // Only include the functionality if it's not pre-defined.
31
- if ( ! class_exists( 'WP_Session' ) ) {
32
- include ASL_CLASSES_PATH . 'session/includes/class-wp-session.php';
33
- include ASL_CLASSES_PATH . 'session/includes/wp-session.php';
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/shortcodes/class-asl-search.php CHANGED
@@ -80,9 +80,18 @@ if (!class_exists("WD_ASL_Search_Shortcode")) {
80
  * Instead adding the links directly to the header is the best way to go.
81
  */
82
  public function fonts() {
83
- ?>
84
- <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
85
- <?php
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
  // ------------------------------------------------------------
80
  * Instead adding the links directly to the header is the best way to go.
81
  */
82
  public function fonts() {
83
+ $imports = array(
84
+ 'https://fonts.googleapis.com/css?family=Open+Sans'
85
+ );
86
+
87
+ $imports = apply_filters('asl_custom_fonts', $imports);
88
+
89
+ foreach ($imports as $import) {
90
+ $import = trim(str_replace(array("@import url(", ");", "https:", "http:"), "", $import));
91
+ ?>
92
+ <link href='<?php echo $import; ?>' rel='stylesheet' type='text/css'>
93
+ <?php
94
+ }
95
  }
96
 
97
  // ------------------------------------------------------------
includes/functions/functions.php CHANGED
@@ -390,12 +390,17 @@ if (!function_exists("asl_generate_html_results")) {
390
  }
391
 
392
  if (!function_exists('asl_icl_t')) {
393
- /* Ajax Search Lite wrapper for WPML print */
394
  function asl_icl_t($name, $value) {
395
- if (function_exists('icl_t')) {
396
- return stripslashes( esc_html( icl_t('ajax-search-lite', $name, $value)) );
 
397
  }
398
- return stripslashes( esc_html($value) );
 
 
 
 
399
  }
400
  }
401
 
@@ -770,6 +775,8 @@ if ( !function_exists("asl_results_to_wp_obj") ) {
770
  if (is_multisite())
771
  switch_to_blog($r->blogid);
772
 
 
 
773
  switch ($r->content_type) {
774
  case "pagepost":
775
  $res = get_post($r->id);
390
  }
391
 
392
  if (!function_exists('asl_icl_t')) {
393
+ /* Ajax Search Lite wrapper for WPML and Polylang print */
394
  function asl_icl_t($name, $value) {
395
+ if (function_exists('icl_register_string') && function_exists('icl_t')) {
396
+ icl_register_string('ajax-search-lite', $name, $value);
397
+ return stripslashes( icl_t('ajax-search-lite', $name, $value) );
398
  }
399
+ if (function_exists('pll_register_string') && function_exists('pll__')) {
400
+ pll_register_string($name, $value, 'ajax-search-lite');
401
+ return stripslashes( pll__($value) );
402
+ }
403
+ return stripslashes( $value );
404
  }
405
  }
406
 
775
  if (is_multisite())
776
  switch_to_blog($r->blogid);
777
 
778
+ if ( !isset($r->content_type) ) continue;
779
+
780
  switch ($r->content_type) {
781
  case "pagepost":
782
  $res = get_post($r->id);
includes/views/asl.shortcode.php CHANGED
@@ -41,7 +41,7 @@
41
  <?php do_action('asl_layout_before_input', $id); ?>
42
 
43
  <div class='proinput'>
44
- <form action='' autocomplete="off">
45
  <input type='search' class='orig' name='phrase' placeholder='<?php echo asl_icl_t( "Search bar placeholder text", w_isset_def($style['defaultsearchtext'], '') ); ?>' value='<?php echo get_search_query(); ?>' autocomplete="off"/>
46
  <input type='text' class='autocomplete' name='phrase' value='' autocomplete="off"/>
47
  <span class='loading'></span>
@@ -98,16 +98,26 @@ if ( isset($style['_fo']) ) {
98
  "set_inpages" => $style['searchinpages'] == 1 ? ' checked="checked"' : "",
99
  );
100
  }
 
 
 
 
 
 
 
 
101
  ?>
102
 
103
  <div id='ajaxsearchlitesettings<?php echo $id; ?>' class="searchsettings wpdreams_asl_settings">
104
- <form name='options'>
 
 
105
 
106
  <?php do_action('asl_layout_settings_before_first_item', $id); ?>
107
  <fieldset class="asl_sett_scroll">
108
  <div class="option hiddend">
109
  <input type='hidden' name='qtranslate_lang' id='qtranslate_lang'
110
- value='<?php echo(function_exists('qtranxf_getLanguage') ? qtranxf_getLanguage() : '0'); ?>'/>
111
  </div>
112
 
113
  <?php if (defined('ICL_LANGUAGE_CODE')
@@ -308,7 +318,7 @@ if ( isset($style['_fo']) ) {
308
  <?php if ($style['showmoreresults'] == 1): ?>
309
  <?php do_action('asl_layout_before_showmore', $id); ?>
310
  <p class='showmore'>
311
- <a href='<?php home_url('/'); ?>?s='><?php echo $style['showmoreresultstext']; ?></a>
312
  </p>
313
  <?php do_action('asl_layout_after_showmore', $id); ?>
314
  <?php endif; ?>
@@ -335,7 +345,7 @@ if ( isset($style['_fo']) ) {
335
  ?>
336
  <?php ob_start(); ?>
337
  {
338
- "homeurl": "<?php echo home_url('/'); ?>",
339
  "resultstype": "vertical",
340
  "resultsposition": "hover",
341
  "itemscount": <?php echo ((isset($style['itemscount']) && $style['itemscount']!="")?$style['itemscount']:"10"); ?>,
@@ -384,7 +394,9 @@ if ( isset($style['_fo']) ) {
384
  "redirectClickTo": "<?php echo $style['redirect_click_to']; ?>",
385
  "redirect_on_enter": <?php echo $style['redirect_on_enter']; ?>,
386
  "redirectEnterTo": "<?php echo $style['redirect_enter_to']; ?>",
387
- "overridewpdefault": "<?php echo $style['override_default_results']; ?>"
 
 
388
  }
389
  <?php $_asl_script_out = ob_get_clean(); ?>
390
  <?php if (wd_asl()->o['asl_compatibility']['js_init'] == "blocking"): ?>
41
  <?php do_action('asl_layout_before_input', $id); ?>
42
 
43
  <div class='proinput'>
44
+ <form autocomplete="off">
45
  <input type='search' class='orig' name='phrase' placeholder='<?php echo asl_icl_t( "Search bar placeholder text", w_isset_def($style['defaultsearchtext'], '') ); ?>' value='<?php echo get_search_query(); ?>' autocomplete="off"/>
46
  <input type='text' class='autocomplete' name='phrase' value='' autocomplete="off"/>
47
  <span class='loading'></span>
98
  "set_inpages" => $style['searchinpages'] == 1 ? ' checked="checked"' : "",
99
  );
100
  }
101
+
102
+ if ( function_exists('qtranxf_getLanguage') ) {
103
+ $qtr_lg = qtranxf_getLanguage();
104
+ } else if ( function_exists('qtrans_getLanguage') ) {
105
+ $qtr_lg = qtrans_getLanguage();
106
+ } else {
107
+ $qtr_lg = 0;
108
+ }
109
  ?>
110
 
111
  <div id='ajaxsearchlitesettings<?php echo $id; ?>' class="searchsettings wpdreams_asl_settings">
112
+ <form name='options' autocomplete='off'>
113
+
114
+ <?php do_action('asl_layout_in_form', $id); ?>
115
 
116
  <?php do_action('asl_layout_settings_before_first_item', $id); ?>
117
  <fieldset class="asl_sett_scroll">
118
  <div class="option hiddend">
119
  <input type='hidden' name='qtranslate_lang' id='qtranslate_lang'
120
+ value='<?php echo $qtr_lg; ?>'/>
121
  </div>
122
 
123
  <?php if (defined('ICL_LANGUAGE_CODE')
318
  <?php if ($style['showmoreresults'] == 1): ?>
319
  <?php do_action('asl_layout_before_showmore', $id); ?>
320
  <p class='showmore'>
321
+ <a><?php echo $style['showmoreresultstext']; ?></a>
322
  </p>
323
  <?php do_action('asl_layout_after_showmore', $id); ?>
324
  <?php endif; ?>
345
  ?>
346
  <?php ob_start(); ?>
347
  {
348
+ "homeurl": "<?php echo function_exists("pll_home_url") ? @pll_home_url() : home_url("/"); ?>",
349
  "resultstype": "vertical",
350
  "resultsposition": "hover",
351
  "itemscount": <?php echo ((isset($style['itemscount']) && $style['itemscount']!="")?$style['itemscount']:"10"); ?>,
394
  "redirectClickTo": "<?php echo $style['redirect_click_to']; ?>",
395
  "redirect_on_enter": <?php echo $style['redirect_on_enter']; ?>,
396
  "redirectEnterTo": "<?php echo $style['redirect_enter_to']; ?>",
397
+ "redirect_url": "<?php echo apply_filters( "asl_redirect_url", $style['custom_redirect_url']); ?>",
398
+ "overridewpdefault": <?php echo $style['override_default_results']; ?>,
399
+ "override_method": "<?php echo $style['override_method']; ?>"
400
  }
401
  <?php $_asl_script_out = ob_get_clean(); ?>
402
  <?php if (wd_asl()->o['asl_compatibility']['js_init'] == "blocking"): ?>
js/min-scoped/jquery.ajaxsearchlite.min.js CHANGED
@@ -1,4 +1,4 @@
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.mCustScr=="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="mCustScr",t="mCSap",rt=".mCustScr",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=["mCSBap_dragger_onDrag","mCSBap_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","mCSBap_draggerContainer","mCSBap_buttonUp","mCSBap_buttonDown","mCSBap_buttonLeft","mCSBap_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.mCustScr(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("#mCSBap_"+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("#mCSBap_"+e.idx+"_container"),a=n("#mCSBap_"+e.idx),c=[n("#mCSBap_"+e.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+u.idx),o=n("#mCSBap_"+u.idx+"_container"),h=n(".mCSBap_"+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='mCSBap_"+u.idx+"_scrollbar_vertical' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSBap_scrollTools_vertical"+h+"'><div class='"+r[12]+"'><div id='mCSBap_"+u.idx+"_dragger_vertical' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>","<div id='mCSBap_"+u.idx+"_scrollbar_horizontal' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSBap_scrollTools_horizontal"+h+"'><div class='"+r[12]+"'><div id='mCSBap_"+u.idx+"_dragger_horizontal' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>"],v="yx"===i.axis?"mCSBap_vertical_horizontal":"x"===i.axis?"mCSBap_horizontal":"mCSBap_vertical",c="yx"===i.axis?e[0]+e[1]:"x"===i.axis?e[1]:e[0],y="yx"===i.axis?"<div id='mCSBap_"+u.idx+"_container_wrapper' class='mCSBap_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='mCSBap_"+u.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+v+"'><div id='mCSBap_"+u.idx+"_container' class='mCSBap_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSBap_"+u.idx),s=n("#mCSBap_"+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("mCSBap_outside").after(c)):(a.addClass("mCSBap_inside").append(c),s.wrap(y));ni.call(this);var o=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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='mCSBap_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(".mCSBap_"+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(".mCSBap_scrollTools").prepend(e[2]).append(e[3])},ti=function(){var s=n(this),u=s.data(t),f=n("#mCSBap_"+u.idx),e=n("#mCSBap_"+u.idx+"_container"),r=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+i.idx),f=n("#mCSBap_"+i.idx+"_container"),r=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+r.idx),i=n("#mCSBap_"+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("#mCSBap_"+i.idx),e=n("#mCSBap_"+i.idx+"_container"),h=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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=".mCSBap_"+i.idx+"_scrollbar",e=n("#mCSBap_"+i.idx+",#mCSBap_"+i.idx+"_container,#mCSBap_"+i.idx+"_container_wrapper,"+s+" ."+r[12]+",#mCSBap_"+i.idx+"_dragger_vertical,#mCSBap_"+i.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSBap_"+u.idx+"_container"),e=[n("#mCSBap_"+u.idx+"_scrollbar_vertical"),n("#mCSBap_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSBap_dragger"),e[1].find(".mCSBap_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=["mCSBap_"+e.idx+"_dragger_vertical","mCSBap_"+e.idx+"_dragger_horizontal"],p=n("#mCSBap_"+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("#mCSBap_"+i.idx),w=n("#mCSBap_"+i.idx+"_container"),ft=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx),u=[n("#mCSBap_"+r.idx+"_dragger_vertical"),n("#mCSBap_"+r.idx+"_dragger_horizontal")],l=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container"),l=c.parent(),a=n(".mCSBap_"+u.idx+"_scrollbar ."+r[12]);a.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(t){o=!0;n(t.target).hasClass("mCSBap_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("mCSBap_draggerRail"))){s(h);var i=n(this),o=i.find(".mCSBap_dragger");if(i.parent(".mCSBap_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("#mCSBap_"+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("#mCSBap_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSBap_"+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=".mCSBap_"+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("#mCSBap_"+i.idx),u=n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+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("#mCSBap_"+f.idx),o=n("#mCSBap_"+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(".mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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(".mCSBap_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(".mCSBap_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(".mCSBap_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.is_scroll=typeof n.fn.mCustScr!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);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.is_scroll&&(i.scroll=i.n.results.mCustScr({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSBap_container",i.n.results).position().top),h=n(".mCSBap_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.mCustScr("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}}))},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("mCustScr")&&(f="mousedown");r.n.resultsDiv.bind(f,function(n){if(t()&&u){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),r.n.results.hasClass("mCustScr"))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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&(t.scroll.mCustScr("disable",!0),t.scroll.mCustScr("update")),t.resize(),t.is_scroll&&t.scroll.mCustScr("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.is_scroll?(t.n.results.css({height:11110}),t.scroll.mCustScr("update"),t.n.results.css({height:"auto"})):t.n.results.css({height:"auto"})}t.is_scroll||t.n.results.css({overflowY:"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.is_scroll&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustScr({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){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.mCustScr=="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="mCustScr",t="mCSap",rt=".mCustScr",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=["mCSBap_dragger_onDrag","mCSBap_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","mCSBap_draggerContainer","mCSBap_buttonUp","mCSBap_buttonDown","mCSBap_buttonLeft","mCSBap_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.mCustScr(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("#mCSBap_"+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("#mCSBap_"+e.idx+"_container"),a=n("#mCSBap_"+e.idx),c=[n("#mCSBap_"+e.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+u.idx),o=n("#mCSBap_"+u.idx+"_container"),h=n(".mCSBap_"+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='mCSBap_"+u.idx+"_scrollbar_vertical' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSBap_scrollTools_vertical"+h+"'><div class='"+r[12]+"'><div id='mCSBap_"+u.idx+"_dragger_vertical' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>","<div id='mCSBap_"+u.idx+"_scrollbar_horizontal' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+i.theme+" mCSBap_scrollTools_horizontal"+h+"'><div class='"+r[12]+"'><div id='mCSBap_"+u.idx+"_dragger_horizontal' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>"],v="yx"===i.axis?"mCSBap_vertical_horizontal":"x"===i.axis?"mCSBap_horizontal":"mCSBap_vertical",c="yx"===i.axis?e[0]+e[1]:"x"===i.axis?e[1]:e[0],y="yx"===i.axis?"<div id='mCSBap_"+u.idx+"_container_wrapper' class='mCSBap_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='mCSBap_"+u.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+v+"'><div id='mCSBap_"+u.idx+"_container' class='mCSBap_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSBap_"+u.idx),s=n("#mCSBap_"+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("mCSBap_outside").after(c)):(a.addClass("mCSBap_inside").append(c),s.wrap(y));ni.call(this);var o=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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='mCSBap_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(".mCSBap_"+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(".mCSBap_scrollTools").prepend(e[2]).append(e[3])},ti=function(){var s=n(this),u=s.data(t),f=n("#mCSBap_"+u.idx),e=n("#mCSBap_"+u.idx+"_container"),r=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+i.idx),f=n("#mCSBap_"+i.idx+"_container"),r=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+r.idx),i=n("#mCSBap_"+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("#mCSBap_"+i.idx),e=n("#mCSBap_"+i.idx+"_container"),h=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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=".mCSBap_"+i.idx+"_scrollbar",e=n("#mCSBap_"+i.idx+",#mCSBap_"+i.idx+"_container,#mCSBap_"+i.idx+"_container_wrapper,"+s+" ."+r[12]+",#mCSBap_"+i.idx+"_dragger_vertical,#mCSBap_"+i.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSBap_"+u.idx+"_container"),e=[n("#mCSBap_"+u.idx+"_scrollbar_vertical"),n("#mCSBap_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSBap_dragger"),e[1].find(".mCSBap_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=["mCSBap_"+e.idx+"_dragger_vertical","mCSBap_"+e.idx+"_dragger_horizontal"],p=n("#mCSBap_"+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("#mCSBap_"+i.idx),w=n("#mCSBap_"+i.idx+"_container"),ft=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx),u=[n("#mCSBap_"+r.idx+"_dragger_vertical"),n("#mCSBap_"+r.idx+"_dragger_horizontal")],l=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container"),l=c.parent(),a=n(".mCSBap_"+u.idx+"_scrollbar ."+r[12]);a.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(t){o=!0;n(t.target).hasClass("mCSBap_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("mCSBap_draggerRail"))){s(h);var i=n(this),o=i.find(".mCSBap_dragger");if(i.parent(".mCSBap_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("#mCSBap_"+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("#mCSBap_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSBap_"+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=".mCSBap_"+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("#mCSBap_"+i.idx),u=n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+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("#mCSBap_"+f.idx),o=n("#mCSBap_"+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(".mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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(".mCSBap_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(".mCSBap_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(".mCSBap_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 f={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",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.is_scroll=typeof n.fn.mCustScr!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);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(),e()&&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.is_scroll&&(i.scroll=i.n.results.mCustScr({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSBap_container",i.n.results).position().top),h=n(".mCSBap_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.mCustScr("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}}))},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("mCustScr")&&(f="mousedown");r.n.resultsDiv.bind(f,function(n){if(t()&&u){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),r.n.results.hasClass("mCustScr"))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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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,f;t.n.promagnifier.add(t.n.text).bind("click keyup",function(e){i.event?(t.keycode=i.event.keyCode,t.ktype=i.event.type):e&&(t.keycode=e.which,t.ktype=e.type);var s=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(f);return}if(!s&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="first_result"||s&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="first_result"){var h=t.ktype=="click"?t.o.redirectClickTo:t.o.redirectEnterTo;if(h=="results_page")var o="?s="+t.n.text.val();else if(h=="woo_results_page")var o="?post_type=product&s="+t.n.text.val();else var o=t.o.redirect_url.replace("{phrase}",t.n.text.val());t.o.overridewpdefault?t.o.override_method=="post"?r(t.o.homeurl+o,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+o+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data="+u.encode(n("form",t.n.searchsettings).serialize()):r(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(f);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(f),f=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,f);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;if(t.showResults(),t.scrollToResults(),t.n.items.length==0)t.n.showmore!=null&&t.n.showmore.css("display","none");else if(t.n.showmore!=null){t.n.showmore.css("display","block");n("a",t.n.showmore).off();n("a",t.n.showmore).on("click",function(){var f=t.o.redirectClickTo,i="?s="+t.n.text.val();i=f=="results_page"?"?s="+t.n.text.val():f=="woo_results_page"?"?post_type=product&s="+t.n.text.val():t.o.redirect_url.replace("{phrase}",t.n.text.val());t.o.overridewpdefault?t.o.override_method=="post"?r(t.o.homeurl+i,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+i+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data="+u.encode(n("form",t.n.searchsettings).serialize()):r(t.o.homeurl+i,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()})})}},"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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&(t.scroll.mCustScr("disable",!0),t.scroll.mCustScr("update")),t.resize(),t.is_scroll&&t.scroll.mCustScr("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.is_scroll?(t.n.results.css({height:11110}),t.scroll.mCustScr("update"),t.n.results.css({height:"auto"})):t.n.results.css({height:"auto"})}t.is_scroll||t.n.results.css({overflowY:"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.is_scroll&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustScr({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),e()&&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 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 e(){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",f);var u={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var e="",o,t,i,h,c,s,r,f=0;for(n=u._utf8_encode(n);f<n.length;)o=n.charCodeAt(f++),t=n.charCodeAt(f++),i=n.charCodeAt(f++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,r=i&63,isNaN(t)?s=r=64:isNaN(i)&&(r=64),e=e+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(r);return e},decode:function(n){var t="",o,s,h,c,f,r,e,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),e=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|f>>4,s=(f&15)<<4|r>>2,h=(r&3)<<6|e,t=t+String.fromCharCode(o),r!=64&&(t=t+String.fromCharCode(s)),e!=64&&(t=t+String.fromCharCode(h));return u._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(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}}})(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);
js/min/jquery.ajaxsearchlite.min.js CHANGED
@@ -1,3 +1,3 @@
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.mCustScr=="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="mCustScr",t="mCSap",it=".mCustScr",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=["mCSBap_dragger_onDrag","mCSBap_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","mCSBap_draggerContainer","mCSBap_buttonUp","mCSBap_buttonDown","mCSBap_buttonLeft","mCSBap_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.mCustScr(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("#mCSBap_"+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("#mCSBap_"+e.idx+"_container"),a=n("#mCSBap_"+e.idx),c=[n("#mCSBap_"+e.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+u.idx),o=n("#mCSBap_"+u.idx+"_container"),h=n(".mCSBap_"+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='mCSBap_"+u.idx+"_scrollbar_vertical' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSBap_scrollTools_vertical"+h+"'><div class='"+i[12]+"'><div id='mCSBap_"+u.idx+"_dragger_vertical' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>","<div id='mCSBap_"+u.idx+"_scrollbar_horizontal' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSBap_scrollTools_horizontal"+h+"'><div class='"+i[12]+"'><div id='mCSBap_"+u.idx+"_dragger_horizontal' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>"],v="yx"===r.axis?"mCSBap_vertical_horizontal":"x"===r.axis?"mCSBap_horizontal":"mCSBap_vertical",l="yx"===r.axis?e[0]+e[1]:"x"===r.axis?e[1]:e[0],y="yx"===r.axis?"<div id='mCSBap_"+u.idx+"_container_wrapper' class='mCSBap_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='mCSBap_"+u.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+v+"'><div id='mCSBap_"+u.idx+"_container' class='mCSBap_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSBap_"+u.idx),s=n("#mCSBap_"+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("mCSBap_outside").after(l)):(a.addClass("mCSBap_inside").append(l),s.wrap(y));gt.call(this);var o=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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='mCSBap_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(".mCSBap_"+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(".mCSBap_scrollTools").prepend(e[2]).append(e[3])},ni=function(){var s=n(this),u=s.data(t),f=n("#mCSBap_"+u.idx),e=n("#mCSBap_"+u.idx+"_container"),r=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+i.idx),f=n("#mCSBap_"+i.idx+"_container"),r=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+r.idx),i=n("#mCSBap_"+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("#mCSBap_"+i.idx),e=n("#mCSBap_"+i.idx+"_container"),h=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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=".mCSBap_"+r.idx+"_scrollbar",e=n("#mCSBap_"+r.idx+",#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,"+s+" ."+i[12]+",#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+r.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSBap_"+u.idx+"_container"),e=[n("#mCSBap_"+u.idx+"_scrollbar_vertical"),n("#mCSBap_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSBap_dragger"),e[1].find(".mCSBap_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=["mCSBap_"+s.idx+"_dragger_vertical","mCSBap_"+s.idx+"_dragger_horizontal"],w=n("#mCSBap_"+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("#mCSBap_"+i.idx),b=n("#mCSBap_"+i.idx+"_container"),ft=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx),f=[n("#mCSBap_"+r.idx+"_dragger_vertical"),n("#mCSBap_"+r.idx+"_dragger_horizontal")],a=n("#mCSBap_"+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("#mCSBap_"+f.idx+"_container"),l=c.parent(),a=n(".mCSBap_"+f.idx+"_scrollbar ."+i[12]);a.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){e=!0;n(t.target).hasClass("mCSBap_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("mCSBap_draggerRail"))){o(h);var r=n(this),e=r.find(".mCSBap_dragger");if(r.parent(".mCSBap_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("#mCSBap_"+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("#mCSBap_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSBap_"+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=".mCSBap_"+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("#mCSBap_"+i.idx),f=n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+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("#mCSBap_"+f.idx),o=n("#mCSBap_"+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(".mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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(".mCSBap_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(".mCSBap_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(".mCSBap_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.is_scroll=typeof n.fn.mCustScr!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);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.is_scroll&&(i.scroll=i.n.results.mCustScr({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSBap_container",i.n.results).position().top),h=n(".mCSBap_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.mCustScr("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}}))},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("mCustScr")&&(u="mousedown");i.n.resultsDiv.bind(u,function(n){if(t()&&r){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i.n.results.hasClass("mCustScr"))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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&(t.scroll.mCustScr("disable",!0),t.scroll.mCustScr("update")),t.resize(),t.is_scroll&&t.scroll.mCustScr("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.is_scroll?(t.n.results.css({height:11110}),t.scroll.mCustScr("update"),t.n.results.css({height:"auto"})):t.n.results.css({height:"auto"})}t.is_scroll||t.n.results.css({overflowY:"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.is_scroll&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustScr({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}}});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.mCustScr=="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="mCustScr",t="mCSap",it=".mCustScr",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=["mCSBap_dragger_onDrag","mCSBap_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","mCSBap_draggerContainer","mCSBap_buttonUp","mCSBap_buttonDown","mCSBap_buttonLeft","mCSBap_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.mCustScr(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("#mCSBap_"+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("#mCSBap_"+e.idx+"_container"),a=n("#mCSBap_"+e.idx),c=[n("#mCSBap_"+e.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+u.idx),o=n("#mCSBap_"+u.idx+"_container"),h=n(".mCSBap_"+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='mCSBap_"+u.idx+"_scrollbar_vertical' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSBap_scrollTools_vertical"+h+"'><div class='"+i[12]+"'><div id='mCSBap_"+u.idx+"_dragger_vertical' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>","<div id='mCSBap_"+u.idx+"_scrollbar_horizontal' class='mCSBap_scrollTools mCSBap_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSBap_scrollTools_horizontal"+h+"'><div class='"+i[12]+"'><div id='mCSBap_"+u.idx+"_dragger_horizontal' class='mCSBap_dragger' style='position:absolute;'><div class='mCSBap_dragger_bar' /><\/div><div class='mCSBap_draggerRail' /><\/div><\/div>"],v="yx"===r.axis?"mCSBap_vertical_horizontal":"x"===r.axis?"mCSBap_horizontal":"mCSBap_vertical",l="yx"===r.axis?e[0]+e[1]:"x"===r.axis?e[1]:e[0],y="yx"===r.axis?"<div id='mCSBap_"+u.idx+"_container_wrapper' class='mCSBap_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='mCSBap_"+u.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+v+"'><div id='mCSBap_"+u.idx+"_container' class='mCSBap_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+u.langDir+"' /><\/div>");var a=n("#mCSBap_"+u.idx),s=n("#mCSBap_"+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("mCSBap_outside").after(l)):(a.addClass("mCSBap_inside").append(l),s.wrap(y));gt.call(this);var o=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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='mCSBap_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(".mCSBap_"+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(".mCSBap_scrollTools").prepend(e[2]).append(e[3])},ni=function(){var s=n(this),u=s.data(t),f=n("#mCSBap_"+u.idx),e=n("#mCSBap_"+u.idx+"_container"),r=[n("#mCSBap_"+u.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+i.idx),f=n("#mCSBap_"+i.idx+"_container"),r=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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(".mCSBap_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("#mCSBap_"+r.idx),i=n("#mCSBap_"+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("#mCSBap_"+i.idx),e=n("#mCSBap_"+i.idx+"_container"),h=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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=".mCSBap_"+r.idx+"_scrollbar",e=n("#mCSBap_"+r.idx+",#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,"+s+" ."+i[12]+",#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+r.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSBap_"+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("#mCSBap_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSBap_"+u.idx+"_container"),e=[n("#mCSBap_"+u.idx+"_scrollbar_vertical"),n("#mCSBap_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSBap_dragger"),e[1].find(".mCSBap_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=["mCSBap_"+s.idx+"_dragger_vertical","mCSBap_"+s.idx+"_dragger_horizontal"],w=n("#mCSBap_"+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("#mCSBap_"+i.idx),b=n("#mCSBap_"+i.idx+"_container"),ft=[n("#mCSBap_"+i.idx+"_dragger_vertical"),n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx),f=[n("#mCSBap_"+r.idx+"_dragger_vertical"),n("#mCSBap_"+r.idx+"_dragger_horizontal")],a=n("#mCSBap_"+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("#mCSBap_"+f.idx+"_container"),l=c.parent(),a=n(".mCSBap_"+f.idx+"_scrollbar ."+i[12]);a.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){e=!0;n(t.target).hasClass("mCSBap_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("mCSBap_draggerRail"))){o(h);var r=n(this),e=r.find(".mCSBap_dragger");if(r.parent(".mCSBap_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("#mCSBap_"+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("#mCSBap_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSBap_"+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=".mCSBap_"+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("#mCSBap_"+i.idx),f=n("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+r.idx+"_container,#mCSBap_"+r.idx+"_container_wrapper,#mCSBap_"+r.idx+"_dragger_vertical,#mCSBap_"+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("#mCSBap_"+f.idx),o=n("#mCSBap_"+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(".mCSBap_"+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("#mCSBap_"+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("#mCSBap_"+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(".mCSBap_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(".mCSBap_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(".mCSBap_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 u={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",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.is_scroll=typeof n.fn.mCustScr!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);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.is_scroll&&(i.scroll=i.n.results.mCustScr({contentTouchScroll:!0,scrollButtons:{enable:!0},callbacks:{onScroll:function(){if(!t()){var s=parseInt(n(".mCSBap_container",i.n.results).position().top),h=n(".mCSBap_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.mCustScr("scrollTo",r,{scrollInertia:200,callbacks:!1})}}}}))},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("mCustScr")&&(u="mousedown");i.n.resultsDiv.bind(u,function(n){if(t()&&r){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),i.n.results.hasClass("mCustScr"))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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&t.scroll.mCustScr("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,u;t.n.promagnifier.add(t.n.text).bind("click keyup",function(f){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):f&&(t.keycode=f.which,t.ktype=f.type);var o=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(u);return}if(!o&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="first_result"||o&&t.o.redirect_on_enter==1&&t.ktype=="keyup"&&t.keycode==13&&t.o.redirectEnterTo!="first_result"){var s=t.ktype=="click"?t.o.redirectClickTo:t.o.redirectEnterTo;if(s=="results_page")var e="?s="+t.n.text.val();else if(s=="woo_results_page")var e="?post_type=product&s="+t.n.text.val();else var e=t.o.redirect_url.replace("{phrase}",t.n.text.val());t.o.overridewpdefault?t.o.override_method=="post"?i(t.o.homeurl+e,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+e+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data="+r.encode(n("form",t.n.searchsettings).serialize()):i(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(u);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(u),u=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,u);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 u={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,u,function(u){if(u=u.replace(/^\s*[\r\n]/gm,""),u=u.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1],t.n.resdrg.html(""),t.n.resdrg.html(u),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;if(t.showResults(),t.scrollToResults(),t.n.items.length==0)t.n.showmore!=null&&t.n.showmore.css("display","none");else if(t.n.showmore!=null){t.n.showmore.css("display","block");n("a",t.n.showmore).off();n("a",t.n.showmore).on("click",function(){var f=t.o.redirectClickTo,u="?s="+t.n.text.val();u=f=="results_page"?"?s="+t.n.text.val():f=="woo_results_page"?"?post_type=product&s="+t.n.text.val():t.o.redirect_url.replace("{phrase}",t.n.text.val());t.o.overridewpdefault?t.o.override_method=="post"?i(t.o.homeurl+u,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+u+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data="+r.encode(n("form",t.n.searchsettings).serialize()):i(t.o.homeurl+u,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()})})}},"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.is_scroll&&t.scroll.mCustScr("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.is_scroll&&(t.scroll.mCustScr("disable",!0),t.scroll.mCustScr("update")),t.resize(),t.is_scroll&&t.scroll.mCustScr("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.is_scroll?(t.n.results.css({height:11110}),t.scroll.mCustScr("update"),t.n.results.css({height:"auto"})):t.n.results.css({height:"auto"})}t.is_scroll||t.n.results.css({overflowY:"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.is_scroll&&(t.settScroll=n(".asl_sett_scroll",t.n.searchsettings).mCustScr({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 i(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=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",u);var r={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var e="",o,t,i,h,c,s,u,f=0;for(n=r._utf8_encode(n);f<n.length;)o=n.charCodeAt(f++),t=n.charCodeAt(f++),i=n.charCodeAt(f++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,u=i&63,isNaN(t)?s=u=64:isNaN(i)&&(u=64),e=e+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(u);return e},decode:function(n){var t="",o,s,h,c,f,u,e,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),u=this._keyStr.indexOf(n.charAt(i++)),e=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|f>>4,s=(f&15)<<4|u>>2,h=(u&3)<<6|e,t=t+String.fromCharCode(o),u!=64&&(t=t+String.fromCharCode(s)),e!=64&&(t=t+String.fromCharCode(h));return r._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(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}}})(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();
js/nomin-scoped/jquery.ajaxsearchlite.js CHANGED
@@ -32,7 +32,7 @@
32
 
33
  $this.resizeTimeout = null;
34
 
35
- $this.n.showmore = $('.showmore a', $this.n.resultsDiv);
36
  $this.n.items = $('.item', $this.n.resultsDiv);
37
  $this.n.results = $('.results', $this.n.resultsDiv);
38
  $this.n.resdrg = $('.resdrg', $this.n.resultsDiv);
@@ -400,16 +400,27 @@
400
 
401
  // If redirection is set to the results page, or custom URL
402
  if (
403
- (!isInput && $this.o.redirectonclick == 1 && $this.ktype == 'click' && $this.o.redirectClickTo == 'results_page' ) ||
404
- (isInput && $this.o.redirect_on_enter == 1 && $this.ktype == 'keyup' && $this.keycode == 13 && $this.o.redirectEnterTo == 'results_page' )
405
  ) {
406
- var plus = '';
407
- var url = '?s=' + $this.n.text.val();
 
 
 
 
 
 
408
 
409
- if ($this.o.overridewpdefault) {
410
- asp_submit_to_url($this.o.homeurl + url + "&asl_active=1", 'post', {
411
- p_asl_data: $('form', $this.n.searchsettings).serialize()
412
- });
 
 
 
 
 
413
  } else {
414
  asp_submit_to_url($this.o.homeurl + url, 'post', {
415
  np_asl_data: $('form', $this.n.searchsettings).serialize()
@@ -588,7 +599,35 @@
588
  } else {
589
  if ($this.n.showmore != null) {
590
  $this.n.showmore.css('display', 'block');
591
- $this.n.showmore.attr('href', $this.o.homeurl + '?s=' + $this.n.text.val());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  }
593
  }
594
 
@@ -1089,5 +1128,147 @@
1089
  };
1090
 
1091
  $.plugin('ajaxsearchlite', methods);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1092
  })(jQuery);
1093
  })(asljQuery, asljQuery, window);
32
 
33
  $this.resizeTimeout = null;
34
 
35
+ $this.n.showmore = $('.showmore', $this.n.resultsDiv);
36
  $this.n.items = $('.item', $this.n.resultsDiv);
37
  $this.n.results = $('.results', $this.n.resultsDiv);
38
  $this.n.resdrg = $('.resdrg', $this.n.resultsDiv);
400
 
401
  // If redirection is set to the results page, or custom URL
402
  if (
403
+ (!isInput && $this.o.redirectonclick == 1 && $this.ktype == 'click' && $this.o.redirectClickTo != 'first_result' ) ||
404
+ (isInput && $this.o.redirect_on_enter == 1 && $this.ktype == 'keyup' && $this.keycode == 13 && $this.o.redirectEnterTo != 'first_result' )
405
  ) {
406
+ var source = $this.ktype == 'click' ? $this.o.redirectClickTo : $this.o.redirectEnterTo;
407
+ if ( source == 'results_page' ) {
408
+ var url = '?s=' + $this.n.text.val();
409
+ } else if ( source == 'woo_results_page' ) {
410
+ var url = '?post_type=product&s=' + $this.n.text.val();
411
+ } else {
412
+ var url = $this.o.redirect_url.replace('{phrase}', $this.n.text.val());
413
+ }
414
 
415
+ if ( $this.o.overridewpdefault ) {
416
+ if ( $this.o.override_method == "post") {
417
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
418
+ asl_active: 1,
419
+ p_asl_data: $('form', $this.n.searchsettings).serialize()
420
+ });
421
+ } else {
422
+ location.href = $this.o.homeurl + url + "&asl_active=1&p_asid=" + $this.o.id + "&p_asl_data=" + Base64.encode($('form', $this.n.searchsettings).serialize());
423
+ }
424
  } else {
425
  asp_submit_to_url($this.o.homeurl + url, 'post', {
426
  np_asl_data: $('form', $this.n.searchsettings).serialize()
599
  } else {
600
  if ($this.n.showmore != null) {
601
  $this.n.showmore.css('display', 'block');
602
+
603
+ $('a', $this.n.showmore).off();
604
+ $('a', $this.n.showmore).on('click', function(e){
605
+ var source = $this.o.redirectClickTo;
606
+ var url = '?s=' + $this.n.text.val();
607
+
608
+ if ( source == 'results_page' ) {
609
+ url = '?s=' + $this.n.text.val();
610
+ } else if ( source == 'woo_results_page' ) {
611
+ url = '?post_type=product&s=' + $this.n.text.val();
612
+ } else {
613
+ url = $this.o.redirect_url.replace('{phrase}', $this.n.text.val());
614
+ }
615
+
616
+ if ( $this.o.overridewpdefault ) {
617
+ if ( $this.o.override_method == "post") {
618
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
619
+ asl_active: 1,
620
+ p_asl_data: $('form', $this.n.searchsettings).serialize()
621
+ });
622
+ } else {
623
+ location.href = $this.o.homeurl + url + "&asl_active=1&p_asid=" + $this.o.id + "&p_asl_data=" + Base64.encode($('form', $this.n.searchsettings).serialize());
624
+ }
625
+ } else {
626
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
627
+ np_asl_data: $('form', $this.n.searchsettings).serialize()
628
+ });
629
+ }
630
+ });
631
  }
632
  }
633
 
1128
  };
1129
 
1130
  $.plugin('ajaxsearchlite', methods);
1131
+
1132
+ /**
1133
+ *
1134
+ * Base64 encode / decode
1135
+ * http://www.webtoolkit.info/
1136
+ *
1137
+ **/
1138
+ var Base64 = {
1139
+
1140
+ // private property
1141
+ _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1142
+
1143
+ // public method for encoding
1144
+ encode : function (input) {
1145
+ var output = "";
1146
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
1147
+ var i = 0;
1148
+
1149
+ input = Base64._utf8_encode(input);
1150
+
1151
+ while (i < input.length) {
1152
+
1153
+ chr1 = input.charCodeAt(i++);
1154
+ chr2 = input.charCodeAt(i++);
1155
+ chr3 = input.charCodeAt(i++);
1156
+
1157
+ enc1 = chr1 >> 2;
1158
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
1159
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
1160
+ enc4 = chr3 & 63;
1161
+
1162
+ if (isNaN(chr2)) {
1163
+ enc3 = enc4 = 64;
1164
+ } else if (isNaN(chr3)) {
1165
+ enc4 = 64;
1166
+ }
1167
+
1168
+ output = output +
1169
+ this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
1170
+ this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
1171
+
1172
+ }
1173
+
1174
+ return output;
1175
+ },
1176
+
1177
+ // public method for decoding
1178
+ decode : function (input) {
1179
+ var output = "";
1180
+ var chr1, chr2, chr3;
1181
+ var enc1, enc2, enc3, enc4;
1182
+ var i = 0;
1183
+
1184
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
1185
+
1186
+ while (i < input.length) {
1187
+
1188
+ enc1 = this._keyStr.indexOf(input.charAt(i++));
1189
+ enc2 = this._keyStr.indexOf(input.charAt(i++));
1190
+ enc3 = this._keyStr.indexOf(input.charAt(i++));
1191
+ enc4 = this._keyStr.indexOf(input.charAt(i++));
1192
+
1193
+ chr1 = (enc1 << 2) | (enc2 >> 4);
1194
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
1195
+ chr3 = ((enc3 & 3) << 6) | enc4;
1196
+
1197
+ output = output + String.fromCharCode(chr1);
1198
+
1199
+ if (enc3 != 64) {
1200
+ output = output + String.fromCharCode(chr2);
1201
+ }
1202
+ if (enc4 != 64) {
1203
+ output = output + String.fromCharCode(chr3);
1204
+ }
1205
+
1206
+ }
1207
+
1208
+ output = Base64._utf8_decode(output);
1209
+
1210
+ return output;
1211
+
1212
+ },
1213
+
1214
+ // private method for UTF-8 encoding
1215
+ _utf8_encode : function (string) {
1216
+ string = string.replace(/\r\n/g,"\n");
1217
+ var utftext = "";
1218
+
1219
+ for (var n = 0; n < string.length; n++) {
1220
+
1221
+ var c = string.charCodeAt(n);
1222
+
1223
+ if (c < 128) {
1224
+ utftext += String.fromCharCode(c);
1225
+ }
1226
+ else if((c > 127) && (c < 2048)) {
1227
+ utftext += String.fromCharCode((c >> 6) | 192);
1228
+ utftext += String.fromCharCode((c & 63) | 128);
1229
+ }
1230
+ else {
1231
+ utftext += String.fromCharCode((c >> 12) | 224);
1232
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
1233
+ utftext += String.fromCharCode((c & 63) | 128);
1234
+ }
1235
+
1236
+ }
1237
+
1238
+ return utftext;
1239
+ },
1240
+
1241
+ // private method for UTF-8 decoding
1242
+ _utf8_decode : function (utftext) {
1243
+ var string = "";
1244
+ var i = 0;
1245
+ var c = c1 = c2 = 0;
1246
+
1247
+ while ( i < utftext.length ) {
1248
+
1249
+ c = utftext.charCodeAt(i);
1250
+
1251
+ if (c < 128) {
1252
+ string += String.fromCharCode(c);
1253
+ i++;
1254
+ }
1255
+ else if((c > 191) && (c < 224)) {
1256
+ c2 = utftext.charCodeAt(i+1);
1257
+ string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
1258
+ i += 2;
1259
+ }
1260
+ else {
1261
+ c2 = utftext.charCodeAt(i+1);
1262
+ c3 = utftext.charCodeAt(i+2);
1263
+ string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
1264
+ i += 3;
1265
+ }
1266
+
1267
+ }
1268
+
1269
+ return string;
1270
+ }
1271
+
1272
+ }
1273
  })(jQuery);
1274
  })(asljQuery, asljQuery, window);
js/nomin/jquery.ajaxsearchlite.js CHANGED
@@ -31,7 +31,7 @@
31
 
32
  $this.resizeTimeout = null;
33
 
34
- $this.n.showmore = $('.showmore a', $this.n.resultsDiv);
35
  $this.n.items = $('.item', $this.n.resultsDiv);
36
  $this.n.results = $('.results', $this.n.resultsDiv);
37
  $this.n.resdrg = $('.resdrg', $this.n.resultsDiv);
@@ -399,16 +399,27 @@
399
 
400
  // If redirection is set to the results page, or custom URL
401
  if (
402
- (!isInput && $this.o.redirectonclick == 1 && $this.ktype == 'click' && $this.o.redirectClickTo == 'results_page' ) ||
403
- (isInput && $this.o.redirect_on_enter == 1 && $this.ktype == 'keyup' && $this.keycode == 13 && $this.o.redirectEnterTo == 'results_page' )
404
  ) {
405
- var plus = '';
406
- var url = '?s=' + $this.n.text.val();
 
 
 
 
 
 
407
 
408
- if ($this.o.overridewpdefault) {
409
- asp_submit_to_url($this.o.homeurl + url + "&asl_active=1", 'post', {
410
- p_asl_data: $('form', $this.n.searchsettings).serialize()
411
- });
 
 
 
 
 
412
  } else {
413
  asp_submit_to_url($this.o.homeurl + url, 'post', {
414
  np_asl_data: $('form', $this.n.searchsettings).serialize()
@@ -587,7 +598,35 @@
587
  } else {
588
  if ($this.n.showmore != null) {
589
  $this.n.showmore.css('display', 'block');
590
- $this.n.showmore.attr('href', $this.o.homeurl + '?s=' + $this.n.text.val());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  }
592
  }
593
 
@@ -1088,4 +1127,146 @@
1088
  };
1089
 
1090
  $.plugin('ajaxsearchlite', methods);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1091
  })(jQuery);
31
 
32
  $this.resizeTimeout = null;
33
 
34
+ $this.n.showmore = $('.showmore', $this.n.resultsDiv);
35
  $this.n.items = $('.item', $this.n.resultsDiv);
36
  $this.n.results = $('.results', $this.n.resultsDiv);
37
  $this.n.resdrg = $('.resdrg', $this.n.resultsDiv);
399
 
400
  // If redirection is set to the results page, or custom URL
401
  if (
402
+ (!isInput && $this.o.redirectonclick == 1 && $this.ktype == 'click' && $this.o.redirectClickTo != 'first_result' ) ||
403
+ (isInput && $this.o.redirect_on_enter == 1 && $this.ktype == 'keyup' && $this.keycode == 13 && $this.o.redirectEnterTo != 'first_result' )
404
  ) {
405
+ var source = $this.ktype == 'click' ? $this.o.redirectClickTo : $this.o.redirectEnterTo;
406
+ if ( source == 'results_page' ) {
407
+ var url = '?s=' + $this.n.text.val();
408
+ } else if ( source == 'woo_results_page' ) {
409
+ var url = '?post_type=product&s=' + $this.n.text.val();
410
+ } else {
411
+ var url = $this.o.redirect_url.replace('{phrase}', $this.n.text.val());
412
+ }
413
 
414
+ if ( $this.o.overridewpdefault ) {
415
+ if ( $this.o.override_method == "post") {
416
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
417
+ asl_active: 1,
418
+ p_asl_data: $('form', $this.n.searchsettings).serialize()
419
+ });
420
+ } else {
421
+ location.href = $this.o.homeurl + url + "&asl_active=1&p_asid=" + $this.o.id + "&p_asl_data=" + Base64.encode($('form', $this.n.searchsettings).serialize());
422
+ }
423
  } else {
424
  asp_submit_to_url($this.o.homeurl + url, 'post', {
425
  np_asl_data: $('form', $this.n.searchsettings).serialize()
598
  } else {
599
  if ($this.n.showmore != null) {
600
  $this.n.showmore.css('display', 'block');
601
+
602
+ $('a', $this.n.showmore).off();
603
+ $('a', $this.n.showmore).on('click', function(e){
604
+ var source = $this.o.redirectClickTo;
605
+ var url = '?s=' + $this.n.text.val();
606
+
607
+ if ( source == 'results_page' ) {
608
+ url = '?s=' + $this.n.text.val();
609
+ } else if ( source == 'woo_results_page' ) {
610
+ url = '?post_type=product&s=' + $this.n.text.val();
611
+ } else {
612
+ url = $this.o.redirect_url.replace('{phrase}', $this.n.text.val());
613
+ }
614
+
615
+ if ( $this.o.overridewpdefault ) {
616
+ if ( $this.o.override_method == "post") {
617
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
618
+ asl_active: 1,
619
+ p_asl_data: $('form', $this.n.searchsettings).serialize()
620
+ });
621
+ } else {
622
+ location.href = $this.o.homeurl + url + "&asl_active=1&p_asid=" + $this.o.id + "&p_asl_data=" + Base64.encode($('form', $this.n.searchsettings).serialize());
623
+ }
624
+ } else {
625
+ asp_submit_to_url($this.o.homeurl + url, 'post', {
626
+ np_asl_data: $('form', $this.n.searchsettings).serialize()
627
+ });
628
+ }
629
+ });
630
  }
631
  }
632
 
1127
  };
1128
 
1129
  $.plugin('ajaxsearchlite', methods);
1130
+
1131
+ /**
1132
+ *
1133
+ * Base64 encode / decode
1134
+ * http://www.webtoolkit.info/
1135
+ *
1136
+ **/
1137
+ var Base64 = {
1138
+
1139
+ // private property
1140
+ _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1141
+
1142
+ // public method for encoding
1143
+ encode : function (input) {
1144
+ var output = "";
1145
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
1146
+ var i = 0;
1147
+
1148
+ input = Base64._utf8_encode(input);
1149
+
1150
+ while (i < input.length) {
1151
+
1152
+ chr1 = input.charCodeAt(i++);
1153
+ chr2 = input.charCodeAt(i++);
1154
+ chr3 = input.charCodeAt(i++);
1155
+
1156
+ enc1 = chr1 >> 2;
1157
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
1158
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
1159
+ enc4 = chr3 & 63;
1160
+
1161
+ if (isNaN(chr2)) {
1162
+ enc3 = enc4 = 64;
1163
+ } else if (isNaN(chr3)) {
1164
+ enc4 = 64;
1165
+ }
1166
+
1167
+ output = output +
1168
+ this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
1169
+ this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
1170
+
1171
+ }
1172
+
1173
+ return output;
1174
+ },
1175
+
1176
+ // public method for decoding
1177
+ decode : function (input) {
1178
+ var output = "";
1179
+ var chr1, chr2, chr3;
1180
+ var enc1, enc2, enc3, enc4;
1181
+ var i = 0;
1182
+
1183
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
1184
+
1185
+ while (i < input.length) {
1186
+
1187
+ enc1 = this._keyStr.indexOf(input.charAt(i++));
1188
+ enc2 = this._keyStr.indexOf(input.charAt(i++));
1189
+ enc3 = this._keyStr.indexOf(input.charAt(i++));
1190
+ enc4 = this._keyStr.indexOf(input.charAt(i++));
1191
+
1192
+ chr1 = (enc1 << 2) | (enc2 >> 4);
1193
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
1194
+ chr3 = ((enc3 & 3) << 6) | enc4;
1195
+
1196
+ output = output + String.fromCharCode(chr1);
1197
+
1198
+ if (enc3 != 64) {
1199
+ output = output + String.fromCharCode(chr2);
1200
+ }
1201
+ if (enc4 != 64) {
1202
+ output = output + String.fromCharCode(chr3);
1203
+ }
1204
+
1205
+ }
1206
+
1207
+ output = Base64._utf8_decode(output);
1208
+
1209
+ return output;
1210
+
1211
+ },
1212
+
1213
+ // private method for UTF-8 encoding
1214
+ _utf8_encode : function (string) {
1215
+ string = string.replace(/\r\n/g,"\n");
1216
+ var utftext = "";
1217
+
1218
+ for (var n = 0; n < string.length; n++) {
1219
+
1220
+ var c = string.charCodeAt(n);
1221
+
1222
+ if (c < 128) {
1223
+ utftext += String.fromCharCode(c);
1224
+ }
1225
+ else if((c > 127) && (c < 2048)) {
1226
+ utftext += String.fromCharCode((c >> 6) | 192);
1227
+ utftext += String.fromCharCode((c & 63) | 128);
1228
+ }
1229
+ else {
1230
+ utftext += String.fromCharCode((c >> 12) | 224);
1231
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
1232
+ utftext += String.fromCharCode((c & 63) | 128);
1233
+ }
1234
+
1235
+ }
1236
+
1237
+ return utftext;
1238
+ },
1239
+
1240
+ // private method for UTF-8 decoding
1241
+ _utf8_decode : function (utftext) {
1242
+ var string = "";
1243
+ var i = 0;
1244
+ var c = c1 = c2 = 0;
1245
+
1246
+ while ( i < utftext.length ) {
1247
+
1248
+ c = utftext.charCodeAt(i);
1249
+
1250
+ if (c < 128) {
1251
+ string += String.fromCharCode(c);
1252
+ i++;
1253
+ }
1254
+ else if((c > 191) && (c < 224)) {
1255
+ c2 = utftext.charCodeAt(i+1);
1256
+ string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
1257
+ i += 2;
1258
+ }
1259
+ else {
1260
+ c2 = utftext.charCodeAt(i+1);
1261
+ c3 = utftext.charCodeAt(i+2);
1262
+ string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
1263
+ i += 3;
1264
+ }
1265
+
1266
+ }
1267
+
1268
+ return string;
1269
+ }
1270
+
1271
+ }
1272
  })(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.7
7
- Stable tag: 4.6.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -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
@@ -106,6 +106,21 @@ and will let you know what to do.
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  = 4.6.6 =
110
  * Scroll script is now possible to turn off
111
  * Better scroll script compatibility and namespace
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.7
7
+ Stable tag: 4.7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
 
49
  Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
50
 
51
+ **Pro version fetures v4.9.8 (2016.11.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
106
 
107
  == Changelog ==
108
 
109
+ = 4.7.0 =
110
+ * FROM action tag removed
111
+ * qtranslateX comppatibility functions
112
+ * Override bugfix, where it was enabled even if disabled
113
+ * asl_results execution fix, where it was executed two times, instead of one
114
+ * more results link override fix, where it redirected only, without override
115
+ * New redirection options for Magnifier and Enter events
116
+ * Custom redirection URI scheme option
117
+ * Polylang string translations support
118
+ * asl_custom_fonts filter to access font inclusions
119
+ * asl_layout_in_form action to access form
120
+ * GET method is now the default for override
121
+ * Session is removed, using COOKIES instead, yumm
122
+ * asl_active query variable removed for POST requests
123
+
124
  = 4.6.6 =
125
  * Scroll script is now possible to turn off
126
  * Better scroll script compatibility and namespace