Addonline_Gls - Version 1.1.0

Version Notes

Download this release

Release Info

Developer Addonline
Extension Addonline_Gls
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.6 to 1.1.0

Files changed (31) hide show
  1. app/code/community/Addonline/Gls/Block/Export/Orders/Grid.php +3 -2
  2. app/code/community/Addonline/Gls/GLS_14_GuideInstallationModuleMagento_07.pdf +0 -0
  3. app/code/community/Addonline/Gls/Model/Carrier/Abstract.php +266 -234
  4. app/code/community/Addonline/Gls/Model/Cron.php +70 -0
  5. app/code/community/Addonline/Gls/Model/Export.php +15 -4
  6. app/code/community/Addonline/Gls/Model/Sales/Quote/Address.php +4 -0
  7. app/code/community/Addonline/Gls/Model/agencies.php +12 -0
  8. app/code/community/Addonline/Gls/changelog +6 -0
  9. app/code/community/Addonline/Gls/etc/adminhtml.xml +0 -3
  10. app/code/community/Addonline/Gls/etc/config.xml +245 -220
  11. app/code/community/Addonline/Gls/etc/system.xml +42 -1
  12. app/code/community/Addonline/Gls/owebia_includes/OwebiaShippingHelper_GLS.php +15 -6
  13. app/code/community/Addonline/Gls/sql/gls_setup/mysql4-upgrade-1.0.9-1.1.0.php +24 -0
  14. app/design/adminhtml/default/default/template/gls/configuration/form.phtml +56 -0
  15. app/design/adminhtml/default/default/template/gls/import/form.phtml +56 -0
  16. app/design/frontend/base/default/layout/gls.xml +113 -0
  17. app/design/frontend/base/default/template/gls/additional.phtml +88 -0
  18. app/design/frontend/base/default/template/gls/listrelais.phtml +73 -0
  19. app/design/frontend/base/default/template/gls/selector.phtml +53 -0
  20. js/jquery/jquery-1.7.1.min.js +0 -4
  21. js/jquery/jquery-2.1.3.min.js +4 -0
  22. js/jquery/jquery-migrate-1.2.1.min.js +0 -2
  23. js/jquery/jquery.popupoverlay.js +786 -0
  24. js/jquery/jquery.tools.min.js +0 -19
  25. package.xml +6 -6
  26. skin/frontend/base/default/css/gls.css +375 -1
  27. skin/frontend/base/default/images/gls/picto_express.png +0 -0
  28. skin/frontend/base/default/images/gls/picto_fds.png +0 -0
  29. skin/frontend/base/default/images/gls/picto_relay.png +0 -0
  30. skin/frontend/base/default/images/gls/picto_tohome.png +0 -0
  31. skin/frontend/base/default/js/gls.js +433 -441
app/code/community/Addonline/Gls/Block/Export/Orders/Grid.php CHANGED
@@ -54,7 +54,7 @@ class Addonline_Gls_Block_Export_Orders_Grid extends Mage_Adminhtml_Block_Widget
54
  array('shipping_method')
55
  );
56
  $collection->addAttributeToFilter(
57
- 'shipping_method',
58
  array('like' => 'gls_%')
59
  );
60
  } else {
@@ -192,7 +192,8 @@ class Addonline_Gls_Block_Export_Orders_Grid extends Mage_Adminhtml_Block_Widget
192
  'carrier',
193
  array(
194
  'header' => Mage::helper('sales')->__('Carrier'),
195
- 'index' => 'shipping_method'
 
196
  )
197
  );
198
 
54
  array('shipping_method')
55
  );
56
  $collection->addAttributeToFilter(
57
+ 'order.shipping_method',
58
  array('like' => 'gls_%')
59
  );
60
  } else {
192
  'carrier',
193
  array(
194
  'header' => Mage::helper('sales')->__('Carrier'),
195
+ 'index' => 'shipping_method',
196
+ 'filter_index' => 'order.shipping_method'
197
  )
198
  );
199
 
app/code/community/Addonline/Gls/GLS_14_GuideInstallationModuleMagento_07.pdf DELETED
Binary file
app/code/community/Addonline/Gls/Model/Carrier/Abstract.php CHANGED
@@ -17,246 +17,278 @@
17
  * @project Magento Owebia Shipping 2 module
18
  * @author Antoine Lemoine
19
  * @license http://www.opensource.org/licenses/MIT The MIT License (MIT)
20
- **/
21
-
22
  // if compilation
23
- if (file_exists(dirname(__FILE__).'/Addonline_Gls_Model_owebia_includes_OwebiaShippingHelper_GLS.php')) {
24
- include_once 'Addonline_Gls_Model_owebia_includes_OS2_AddressFilterParser_GLS.php';
25
- include_once 'Addonline_Gls_Model_owebia_includes_OwebiaShippingHelper_GLS.php';
26
  } else {
27
- include_once Mage::getBaseDir('code').'/community/Addonline/Gls/owebia_includes/OS2_AddressFilterParser_GLS.php';
28
- include_once Mage::getBaseDir('code').'/community/Addonline/Gls/owebia_includes/OwebiaShippingHelper_GLS.php';
29
  }
30
 
31
- abstract class Addonline_Gls_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract
32
- {
33
- protected $_config;
34
- protected $_helper;
35
- protected $_data_models = array();
36
-
37
- /**
38
- * Collect rates for this shipping method based on information in $request
39
- *
40
- * @param Mage_Shipping_Model_Rate_Request $data
41
- * @return Mage_Shipping_Model_Rate_Result
42
- */
43
- public function collectRates(Mage_Shipping_Model_Rate_Request $request)
44
- {
45
- //setlocale(LC_NUMERIC, 'fr_FR');
46
- if (!$this->__getConfigData('active')) return false; // skip if not enabled
47
- //$this->display($request->_data);
48
- $process = $this->__getProcess($request);
49
- return $this->getRates($process);
50
- }
51
-
52
- public function display($var)
53
- {
54
- $i = 0;
55
- foreach ($var as $name => $value) {
56
- //if ($i>20)
57
- echo "{$name} => {$value}<br/>";
58
- //$this->_helper->debug($name.' => '.$value.'<br/>');
59
- $i++;
60
- }
61
- }
62
-
63
- public function getRates($process)
64
- {
65
- $this->_process($process);
66
- return $process['result'];
67
- }
68
-
69
- public function getAllowedMethods()
70
- {
71
- $process = array();
72
- $config = $this->_getConfig();
73
- $allowed_methods = array();
74
- if (count($config)>0) {
75
- foreach ($config as $row) $allowed_methods[$row['*id']] = isset($row['label']) ? $row['label']['value'] : 'No label';
76
- }
77
- return $allowed_methods;
78
- }
79
-
80
- public function isTrackingAvailable()
81
- {
82
- return true;
83
- }
84
-
85
- public function getTrackingInfo($tracking_number)
86
- {
87
- $original_tracking_number = $tracking_number;
88
- $global_tracking_url = $this->__getConfigData('tracking_view_url');
89
- $tracking_url = $global_tracking_url;
90
- $parts = explode(':', $tracking_number);
91
- if (count($parts)>=2) {
92
- $tracking_number = $parts[1];
93
-
94
- $process = array();
95
- $config = $this->_getConfig();
96
-
97
- if (isset($config[$parts[0]]['tracking_url'])) {
98
- $row = $config[$parts[0]];
99
- $tmp_tracking_url = $this->_helper->getRowProperty($row, 'tracking_url');
100
- if (isset($tmp_tracking_url)) $tracking_url = $tmp_tracking_url;
101
- }
102
- }
103
-
104
- $tracking_status = Mage::getModel('shipping/tracking_result_status')
105
- ->setCarrier($this->_code)
106
- ->setCarrierTitle($this->__getConfigData('title'))
107
- ->setTracking($tracking_number)
108
- ->addData(
109
- array(
110
- 'status'=> $tracking_url ? '<a target="_blank" href="' . str_replace('{tracking_number}', $tracking_number, $tracking_url) . '">' . $this->__('track the package') . '</a>' : "suivi non disponible pour le colis {$tracking_number} (original_tracking_number='{$original_tracking_number}', global_tracking_url='{$global_tracking_url}'" . (isset($row) ? ", tmp_tracking_url='{$tmp_tracking_url}'" : '') . ")"
111
- )
112
- )
113
- ;
114
- $tracking_result = Mage::getModel('shipping/tracking_result')
115
- ->append($tracking_status)
116
- ;
117
-
118
- if ($trackings = $tracking_result->getAllTrackings()) return $trackings[0];
119
- return false;
120
- }
121
-
122
- /***************************************************************************************************************************/
123
-
124
- protected function _process(&$process)
125
- {
126
- $debug = (bool)(isset($_GET['debug']) ? $_GET['debug'] : $this->__getConfigData('debug'));
127
-
128
- if ($debug) $this->_helper->initDebug($this->_code, $process);
129
-
130
- $value_found = false;
131
- foreach ($process['config'] as $row) {
132
- $result = $this->_helper->processRow($process, $row);
133
- if ($result->success) {
134
- $value_found = true;
135
- $this->__appendMethod($process, $row, $result->result);
136
- if ($process['options']->stop_to_first_match) break;
137
- }
138
- }
139
-
140
- $http_request = Mage::app()->getFrontController()->getRequest();
141
- if ($debug && $this->__checkRequest($http_request, 'checkout/cart/index')) {
142
- Mage::getSingleton('core/session')
143
- ->addNotice('DEBUG'.$this->_helper->getDebug());
144
- }
145
- }
146
-
147
- protected function _getConfig()
148
- {
149
- if (!isset($this->_config)) {
150
- //ADDONLINE : regrouper les 3 configs GLS dans une seule variable :
151
- $allConfigurations = '';
152
- if($this->__getConfigData('livraisontohome')){
153
- $allConfigurations .= $this->__getConfigData('configtohome');
154
- }
155
- if($this->__getConfigData('livraisonfds')){
156
- $allConfigurations .= ($allConfigurations?',':'').$this->__getConfigData('configfds');
157
- }
158
- if($this->__getConfigData('livraisonrelay')){
159
- $allConfigurations .= ($allConfigurations?',':'').$this->__getConfigData('configrelay');
160
- }
161
- //Mage::log($allConfigurations, null, 'gls.log');
162
- $this->_helper = new OwebiaShippingHelper_GLS(
163
- $allConfigurations,
164
- true
165
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  // $this->_helper = new OwebiaShippingHelper(
167
  // $this->__getConfigData('config'),
168
  // (boolean)$this->__getConfigData('auto_correction')
169
  // );
170
- //FIN ADDONLINE
171
- $this->_config = $this->_helper->getConfig();
172
- }
173
- return $this->_config;
174
- }
175
-
176
- protected function _getMethodText($process, $row, $property)
177
- {
178
- if (!isset($row[$property])) return '';
179
-
180
- $output = '';
181
- $cart = $process['data']['cart'];
182
- return $output . ' ' . $this->_helper->evalInput($process, $row, $property, str_replace(
183
- array(
184
- '{cart.weight}',
185
- '{cart.price-tax+discount}',
186
- '{cart.price-tax-discount}',
187
- '{cart.price+tax+discount}',
188
- '{cart.price+tax-discount}',
189
- ),
190
- array(
191
- $cart->weight.$cart->weight_unit,
192
- $this->__formatPrice($cart->price_including_tax),
193
- $this->__formatPrice($cart->price_excluding_tax),
194
- $this->__formatPrice($cart->{'price-tax+discount'}),
195
- $this->__formatPrice($cart->{'price-tax-discount'}),
196
- $this->__formatPrice($cart->{'price+tax+discount'}),
197
- $this->__formatPrice($cart->{'price+tax-discount'}),
198
- ),
199
- $this->_helper->getRowProperty($row, $property)
200
- ));
201
- }
202
-
203
- /***************************************************************************************************************************/
204
-
205
- protected function __checkRequest($http_request, $path)
206
- {
207
- list($router, $controller, $action) = explode('/', $path);
208
- return $http_request->getRouteName()==$router && $http_request->getControllerName()==$controller && $http_request->getActionName()==$action;
209
- }
210
-
211
- protected function __getProcess($request)
212
- {
213
- $mage_config = Mage::getConfig();
214
- $os2_config = $this->_getConfig();
215
- $data = Mage::helper('gls')->getDataModelMap($this->_helper, $this->_code, $request);
216
- $process = array(
217
- 'data' => $data,
218
- 'cart.items' => array(),
219
- 'config' => $os2_config,
220
- 'result' => Mage::getModel('shipping/rate_result'),
221
- 'options' => (object)array(
222
- 'auto_escaping' => (boolean)$this->__getConfigData('auto_escaping'),
223
- 'auto_correction' => (boolean)$this->__getConfigData('auto_correction'),
224
- 'stop_to_first_match' => (boolean)$this->__getConfigData('stop_to_first_match'),
225
- ),
226
- );
227
- return $process;
228
- }
229
-
230
- public function addDataModel($name, $model)
231
- {
232
- $this->_data_models[$name] = $model;
233
- }
234
-
235
- protected function __getConfigData($key)
236
- {
237
- return $this->getConfigData($key);
238
- }
239
-
240
- protected function __appendMethod(&$process, $row, $fees)
241
- {
242
- $helper = Mage::helper('gls');
243
- $method = Mage::getModel('shipping/rate_result_method')
244
- ->setCarrier($this->_code)
245
- ->setCarrierTitle($this->__getConfigData('title'))
246
- ->setMethod($row['*id'])
247
- ->setMethodTitle($helper->getMethodText($this->_helper, $process, $row, 'label'))
248
- ->setMethodDescription($helper->getMethodText($this->_helper, $process, $row, 'description'))
249
- ->setPrice($fees)
250
- ->setCost($fees)
251
- ;
252
-
253
- $process['result']->append($method);
254
- }
255
-
256
- protected function __()
257
- {
258
- $args = func_get_args();
259
- return Mage::helper('gls')->__($args);
260
- }
261
- }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  * @project Magento Owebia Shipping 2 module
18
  * @author Antoine Lemoine
19
  * @license http://www.opensource.org/licenses/MIT The MIT License (MIT)
20
+ * */
 
21
  // if compilation
22
+ if (file_exists(dirname(__FILE__) . '/Addonline_Gls_Model_owebia_includes_OwebiaShippingHelper_GLS.php')) {
23
+ include_once 'Addonline_Gls_Model_owebia_includes_OS2_AddressFilterParser_GLS.php';
24
+ include_once 'Addonline_Gls_Model_owebia_includes_OwebiaShippingHelper_GLS.php';
25
  } else {
26
+ include_once Mage::getBaseDir('code') . '/community/Addonline/Gls/owebia_includes/OS2_AddressFilterParser_GLS.php';
27
+ include_once Mage::getBaseDir('code') . '/community/Addonline/Gls/owebia_includes/OwebiaShippingHelper_GLS.php';
28
  }
29
 
30
+ abstract class Addonline_Gls_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract {
31
+
32
+ protected $_config;
33
+ protected $_helper;
34
+ protected $_data_models = array();
35
+
36
+ /**
37
+ * Collect rates for this shipping method based on information in $request
38
+ *
39
+ * @param Mage_Shipping_Model_Rate_Request $data
40
+ * @return Mage_Shipping_Model_Rate_Result
41
+ */
42
+ public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
43
+ //setlocale(LC_NUMERIC, 'fr_FR');
44
+ if (!$this->__getConfigData('active'))
45
+ return false; // skip if not enabled
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ //$this->display($request->_data);
58
+ $process = $this->__getProcess($request);
59
+
60
+ return $this->getRates($process);
61
+ }
62
+
63
+ public function display($var) {
64
+ $i = 0;
65
+ foreach ($var as $name => $value) {
66
+ //if ($i>20)
67
+ echo "{$name} => {$value}<br/>";
68
+ //$this->_helper->debug($name.' => '.$value.'<br/>');
69
+ $i++;
70
+ }
71
+ }
72
+
73
+ public function getRates($process) {
74
+ $this->_process($process);
75
+ return $process['result'];
76
+ }
77
+
78
+ public function getAllowedMethods() {
79
+ $process = array();
80
+ $config = $this->_getConfig();
81
+ $allowed_methods = array();
82
+ if (count($config) > 0) {
83
+ foreach ($config as $row)
84
+ $allowed_methods[$row['*id']] = isset($row['label']) ? $row['label']['value'] : 'No label';
85
+ }
86
+
87
+ return $allowed_methods;
88
+ }
89
+
90
+ public function isTrackingAvailable() {
91
+ return true;
92
+ }
93
+
94
+ public function getTrackingInfo($tracking_number) {
95
+ $original_tracking_number = $tracking_number;
96
+ $global_tracking_url = $this->__getConfigData('tracking_view_url');
97
+ $tracking_url = $global_tracking_url;
98
+ $parts = explode(':', $tracking_number);
99
+ if (count($parts) >= 2) {
100
+ $tracking_number = $parts[1];
101
+
102
+ $process = array();
103
+ $config = $this->_getConfig();
104
+
105
+ if (isset($config[$parts[0]]['tracking_url'])) {
106
+ $row = $config[$parts[0]];
107
+ $tmp_tracking_url = $this->_helper->getRowProperty($row, 'tracking_url');
108
+ if (isset($tmp_tracking_url))
109
+ $tracking_url = $tmp_tracking_url;
110
+ }
111
+ }
112
+
113
+ $tracking_status = Mage::getModel('shipping/tracking_result_status')
114
+ ->setCarrier($this->_code)
115
+ ->setCarrierTitle($this->__getConfigData('title'))
116
+ ->setTracking($tracking_number)
117
+ ->addData(
118
+ array(
119
+ 'status' => $tracking_url ? '<a target="_blank" href="' . str_replace('{tracking_number}', $tracking_number, $tracking_url) . '">' . $this->__('track the package') . '</a>' : "suivi non disponible pour le colis {$tracking_number} (original_tracking_number='{$original_tracking_number}', global_tracking_url='{$global_tracking_url}'" . (isset($row) ? ", tmp_tracking_url='{$tmp_tracking_url}'" : '') . ")"
120
+ )
121
+ )
122
+ ;
123
+ $tracking_result = Mage::getModel('shipping/tracking_result')
124
+ ->append($tracking_status)
125
+ ;
126
+
127
+ if ($trackings = $tracking_result->getAllTrackings())
128
+ return $trackings[0];
129
+ return false;
130
+ }
131
+
132
+ /* * ************************************************************************************************************************ */
133
+
134
+ protected function _process(&$process) {
135
+ $debug = (bool) (isset($_GET['debug']) ? $_GET['debug'] : $this->__getConfigData('debug'));
136
+
137
+ if ($debug)
138
+ $this->_helper->initDebug($this->_code, $process);
139
+
140
+ $value_found = false;
141
+ foreach ($process['config'] as $row) {
142
+ $result = $this->_helper->processRow($process, $row);
143
+ if ($result->success) {
144
+ $value_found = true;
145
+ $this->__appendMethod($process, $row, $result->result);
146
+ if ($process['options']->stop_to_first_match)
147
+ break;
148
+ }
149
+ }
150
+
151
+ $http_request = Mage::app()->getFrontController()->getRequest();
152
+ if ($debug && $this->__checkRequest($http_request, 'checkout/cart/index')) {
153
+ Mage::getSingleton('core/session')
154
+ ->addNotice('DEBUG' . $this->_helper->getDebug());
155
+ }
156
+ }
157
+
158
+ protected function _getConfig() {
159
+ if (!isset($this->_config)) {
160
+ //ADDONLINE : regrouper les 3 configs GLS dans une seule variable :
161
+ $allConfigurations = '';
162
+ if ($this->__getConfigData('livraisontohome')) {
163
+ $allConfigurations .= $this->__getConfigData('configtohome');
164
+ }
165
+ if ($this->__getConfigData('livraisonfds')) {
166
+ $allConfigurations .= ($allConfigurations ? ',' : '') . $this->__getConfigData('configfds');
167
+ }
168
+ if ($this->__getConfigData('livraisonrelay')) {
169
+ $allConfigurations .= ($allConfigurations ? ',' : '') . $this->__getConfigData('configrelay');
170
+ }
171
+
172
+ /* If bad postcode : don't display address */
173
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
174
+ $address_id = $customer->getDefaultBilling();
175
+
176
+ if ((int) $address_id) {
177
+ $address = Mage::getModel('customer/address')->load($address_id);
178
+ $zipcode = $address->getPostcode();
179
+ }
180
+ $estimate = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getPostcode();
181
+ if (!empty($estimate)) {
182
+ $zipcode = $estimate;
183
+ }
184
+
185
+ if (!empty($zipcode)) {
186
+ $agencyCode = Mage::getStoreConfig('gls/general/agency_code');
187
+ $dbInstance = Mage::getSingleton('core/resource')->getConnection('core_read');
188
+ $checkZipcode = $dbInstance->select()
189
+ ->from(Mage::getSingleton('core/resource')->getTableName('gls_agencies_list'), array('id_agency_entry'))
190
+ ->where('agencycode=?', $agencyCode)
191
+ ->where('zipcode_start <= ?', $zipcode)
192
+ ->where('zipcode_end > ?', $zipcode);
193
+ $row = $dbInstance->fetchRow($checkZipcode);
194
+ $lastImportDate = $row['id_agency_entry'];
195
+ }
196
+
197
+ if (isset($lastImportDate) && !empty($lastImportDate) && $this->__getConfigData('livraisonexpress')) {
198
+ $allConfigurations .= ($allConfigurations ? ',' : '') . $this->__getConfigData('configexpress');
199
+ }
200
+
201
+
202
+ //Mage::log($allConfigurations, null, 'gls.log');
203
+ $this->_helper = new OwebiaShippingHelper_GLS(
204
+ $allConfigurations, true
205
+ );
206
  // $this->_helper = new OwebiaShippingHelper(
207
  // $this->__getConfigData('config'),
208
  // (boolean)$this->__getConfigData('auto_correction')
209
  // );
210
+ //FIN ADDONLINE
211
+ $this->_config = $this->_helper->getConfig();
212
+ }
213
+ return $this->_config;
214
+ }
215
+
216
+ protected function _getMethodText($process, $row, $property) {
217
+ if (!isset($row[$property]))
218
+ return '';
219
+
220
+ $output = '';
221
+ $cart = $process['data']['cart'];
222
+ return $output . ' ' . $this->_helper->evalInput($process, $row, $property, str_replace(
223
+ array(
224
+ '{cart.weight}',
225
+ '{cart.price-tax+discount}',
226
+ '{cart.price-tax-discount}',
227
+ '{cart.price+tax+discount}',
228
+ '{cart.price+tax-discount}',
229
+ ), array(
230
+ $cart->weight . $cart->weight_unit,
231
+ $this->__formatPrice($cart->price_including_tax),
232
+ $this->__formatPrice($cart->price_excluding_tax),
233
+ $this->__formatPrice($cart->{'price-tax+discount'}),
234
+ $this->__formatPrice($cart->{'price-tax-discount'}),
235
+ $this->__formatPrice($cart->{'price+tax+discount'}),
236
+ $this->__formatPrice($cart->{'price+tax-discount'}),
237
+ ), $this->_helper->getRowProperty($row, $property)
238
+ ));
239
+ }
240
+
241
+ /* * ************************************************************************************************************************ */
242
+
243
+ protected function __checkRequest($http_request, $path) {
244
+ list($router, $controller, $action) = explode('/', $path);
245
+ return $http_request->getRouteName() == $router && $http_request->getControllerName() == $controller && $http_request->getActionName() == $action;
246
+ }
247
+
248
+ protected function __getProcess($request) {
249
+ $mage_config = Mage::getConfig();
250
+ $os2_config = $this->_getConfig();
251
+ $data = Mage::helper('gls')->getDataModelMap($this->_helper, $this->_code, $request);
252
+ $process = array(
253
+ 'data' => $data,
254
+ 'cart.items' => array(),
255
+ 'config' => $os2_config,
256
+ 'result' => Mage::getModel('shipping/rate_result'),
257
+ 'options' => (object) array(
258
+ 'auto_escaping' => (boolean) $this->__getConfigData('auto_escaping'),
259
+ 'auto_correction' => (boolean) $this->__getConfigData('auto_correction'),
260
+ 'stop_to_first_match' => (boolean) $this->__getConfigData('stop_to_first_match'),
261
+ ),
262
+ );
263
+ return $process;
264
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
+ public function addDataModel($name, $model) {
267
+ $this->_data_models[$name] = $model;
268
+ }
269
+
270
+ protected function __getConfigData($key) {
271
+ return $this->getConfigData($key);
272
+ }
273
+
274
+ protected function __appendMethod(&$process, $row, $fees) {
275
+ $helper = Mage::helper('gls');
276
+ $method = Mage::getModel('shipping/rate_result_method')
277
+ ->setCarrier($this->_code)
278
+ ->setCarrierTitle($this->__getConfigData('title'))
279
+ ->setMethod($row['*id'])
280
+ ->setMethodTitle($helper->getMethodText($this->_helper, $process, $row, 'label'))
281
+ ->setMethodDescription($helper->getMethodText($this->_helper, $process, $row, 'description'))
282
+ ->setPrice($fees)
283
+ ->setCost($fees)
284
+ ;
285
+
286
+ $process['result']->append($method);
287
+ }
288
+
289
+ protected function __() {
290
+ $args = func_get_args();
291
+ return Mage::helper('gls')->__($args);
292
+ }
293
+
294
+ }
app/code/community/Addonline/Gls/Model/Cron.php CHANGED
@@ -42,6 +42,76 @@ class Addonline_Gls_Model_Cron extends Mage_Core_Model_Config_Data
42
  Mage::throwException(Mage::helper('adminhtml')->__('Unable to save the cron expression.'));
43
  }
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  public function import_export(){
47
 
42
  Mage::throwException(Mage::helper('adminhtml')->__('Unable to save the cron expression.'));
43
  }
44
  }
45
+
46
+ public function update_gls_agencies() {
47
+
48
+ $ftp = 'ftp.gls-france.com';
49
+ $user = 'addonline';
50
+ $password = '-mAfXmTqC';
51
+ $pattern = '/^tbzipdeltimes_(\d{8}).csv$/i';
52
+ $forceupdate = true;
53
+
54
+ /* Connects to FTP server */
55
+ $conn_id = ftp_connect($ftp);
56
+ $login_result = ftp_login($conn_id, $user, $password);
57
+
58
+ /* Use passive mode for downloads */
59
+ ftp_pasv($conn_id, true);
60
+
61
+ // Récupération du contenu d'un dossier
62
+ $contents = ftp_nlist($conn_id, ".");
63
+
64
+ // Récupération de la date du fichier distant
65
+ $remoteFileDate = 0;
66
+ foreach ($contents as $key => $filename) {
67
+ if (preg_match($pattern, $filename, $matches)) {
68
+ $local_file = $filename;
69
+ $remoteFileDate = ($matches[1]);
70
+ }
71
+ }
72
+
73
+ /* Get last import date */
74
+ $dbInstance = Mage::getSingleton('core/resource')->getConnection('core_read');
75
+ $lastImportQuery = $dbInstance->select()->from('gls_agencies_list', array('last_import_date'));
76
+ $row = $dbInstance->fetchRow($lastImportQuery);
77
+ $lastImportDate = $row['last_import_date'];
78
+
79
+ //Si on est en force update ou qu'on a un nouveau fichier disponible
80
+ if ($forceupdate || $remoteFileDate > $lastImportDate) {
81
+
82
+ ob_start();
83
+ $result = ftp_get($conn_id, "php://output", $local_file, FTP_BINARY);
84
+ $data = ob_get_contents();
85
+ $aAgencies = explode("\r\n", $data);
86
+ ob_end_clean();
87
+
88
+ if (count($aAgencies) > 1) {
89
+
90
+ //On vide la table
91
+ $dbInstance->query('TRUNCATE gls_agencies_list');
92
+
93
+ //On remplit la table avec le nouveau fichier
94
+ foreach ($aAgencies as $key => $agency) {
95
+
96
+ $aData = explode(';', $agency);
97
+
98
+ $dbInstance = Mage::getSingleton('core/resource')->getConnection('core_write');
99
+ $dbInstance->beginTransaction();
100
+ $fields = array();
101
+ $fields['agencycode'] = $aData[0];
102
+ $fields['zipcode_start'] = $aData[1];
103
+ $fields['zipcode_end'] = $aData[2];
104
+ $fields['validity_date_start'] = $aData[3];
105
+ $fields['validity_date_end'] = $aData[4];
106
+ $fields['last_import_date'] = $remoteFileDate;
107
+ $fields['last_check_date'] = date('Ymd');
108
+ $dbInstance->insert('gls_agencies_list', $fields);
109
+ $dbInstance->commit();
110
+ }
111
+ }
112
+ }
113
+
114
+ }
115
 
116
  public function import_export(){
117
 
app/code/community/Addonline/Gls/Model/Export.php CHANGED
@@ -42,7 +42,8 @@ class Addonline_Gls_Model_Export
42
  'ls_tohome_international' => 01,
43
  'ls_fds' => 18,
44
  'ls_fds_international' => 19,
45
- 'ls_relay' => 17
 
46
  );
47
 
48
  public function run ()
@@ -143,8 +144,12 @@ class Addonline_Gls_Model_Export
143
  }
144
  if (strpos($shippingMethod, 'ls_relay') > 0) {
145
  $aRow[] = $this->_aProductnoCorrespondance['ls_relay'];
146
- }
147
-
 
 
 
 
148
  // ORDERWEIGHTTOT
149
  $totalWeight = 0;
150
  $items = $order->getAllItems();
@@ -163,7 +168,13 @@ class Addonline_Gls_Model_Export
163
  'UTF-8'
164
  );
165
  }else{
166
- $aRow[] = '';
 
 
 
 
 
 
167
  }
168
 
169
  // CONTACTMAIL
42
  'ls_tohome_international' => 01,
43
  'ls_fds' => 18,
44
  'ls_fds_international' => 19,
45
+ 'ls_relay' => 17,
46
+ 'ls_express' => 16,
47
  );
48
 
49
  public function run ()
144
  }
145
  if (strpos($shippingMethod, 'ls_relay') > 0) {
146
  $aRow[] = $this->_aProductnoCorrespondance['ls_relay'];
147
+ }
148
+
149
+ if (strpos($shippingMethod, 'ls_express') > 0) {
150
+ $aRow[] = $this->_aProductnoCorrespondance['ls_express'];
151
+ }
152
+
153
  // ORDERWEIGHTTOT
154
  $totalWeight = 0;
155
  $items = $order->getAllItems();
168
  'UTF-8'
169
  );
170
  }else{
171
+ if (strpos($shippingMethod, 'ls_express') > 0) {
172
+ /* If Shipping method is express, CONTACT field is always FIRSTNAME - LASTNAME */
173
+ $aRow[] = mb_strtoupper($shippingAddress->getFirstname() . ' ' . $shippingAddress->getLastname(),
174
+ 'UTF-8');
175
+ } else {
176
+ $aRow[] = '';
177
+ }
178
  }
179
 
180
  // CONTACTMAIL
app/code/community/Addonline/Gls/Model/Sales/Quote/Address.php CHANGED
@@ -54,6 +54,7 @@ class Addonline_Gls_Model_Sales_Quote_Address extends Mage_Sales_Model_Quote_Add
54
  $aOrderRatesGLS['ordertohome'] = $carrier->getConfigData('ordertohome');
55
  $aOrderRatesGLS['orderfds'] = $carrier->getConfigData('orderfds');
56
  $aOrderRatesGLS['orderrelay'] = $carrier->getConfigData('orderrelay');
 
57
  }
58
 
59
  if (count($aOrderRatesGLS)) {
@@ -73,6 +74,9 @@ class Addonline_Gls_Model_Sales_Quote_Address extends Mage_Sales_Model_Quote_Add
73
  if (strpos($sCode, 'ls_tohome') > 0) {
74
  $rates['gls'][$aOrderRatesGLS['ordertohome']] = $orderedRate;
75
  }
 
 
 
76
  }
77
 
78
  unset($rates['gls'][0]);
54
  $aOrderRatesGLS['ordertohome'] = $carrier->getConfigData('ordertohome');
55
  $aOrderRatesGLS['orderfds'] = $carrier->getConfigData('orderfds');
56
  $aOrderRatesGLS['orderrelay'] = $carrier->getConfigData('orderrelay');
57
+ $aOrderRatesGLS['orderexpress'] = $carrier->getConfigData('orderexpress');
58
  }
59
 
60
  if (count($aOrderRatesGLS)) {
74
  if (strpos($sCode, 'ls_tohome') > 0) {
75
  $rates['gls'][$aOrderRatesGLS['ordertohome']] = $orderedRate;
76
  }
77
+ if (strpos($sCode, 'ls_express') > 0) {
78
+ $rates['gls'][$aOrderRatesGLS['orderexpress']] = $orderedRate;
79
+ }
80
  }
81
 
82
  unset($rates['gls'][0]);
app/code/community/Addonline/Gls/Model/agencies.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Pfay_Test_Model_Mysql4_Test extends Mage_Core_Model_Mysql4_Abstract
5
+ {
6
+ public function _construct()
7
+ {
8
+ $this->_init('test/test', 'id_pfay_test');
9
+ }
10
+ }
11
+
12
+
app/code/community/Addonline/Gls/changelog CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  [1.0.5 - 07 Janvier 2015]
2
  Mise en place du téléchargement des commandes
3
 
1
+ [1.0.7 - 30 Mars 2015]
2
+ Correction de la limitation à 30Kg sur la livraison à domicile
3
+
4
+ [1.0.6 - 20 Mars 2015]
5
+ Augmentation de la compatibilité avec le module BL_CustomGrid
6
+
7
  [1.0.5 - 07 Janvier 2015]
8
  Mise en place du téléchargement des commandes
9
 
app/code/community/Addonline/Gls/etc/adminhtml.xml CHANGED
@@ -44,9 +44,6 @@
44
  <action>gls/import</action>
45
  </import>
46
  </children>
47
- <depends>
48
- <config>carriers/gls/importexport</config>
49
- </depends>
50
  </gls>
51
  </menu>
52
  <acl>
44
  <action>gls/import</action>
45
  </import>
46
  </children>
 
 
 
47
  </gls>
48
  </menu>
49
  <acl>
app/code/community/Addonline/Gls/etc/config.xml CHANGED
@@ -19,208 +19,214 @@
19
  <config>
20
  <modules>
21
  <Addonline_Gls>
22
- <version>1.0.5</version>
23
  <depends>
24
  <Mage_Shipping />
25
  </depends>
26
  </Addonline_Gls>
27
  </modules>
28
 
29
- <global>
30
- <blocks>
31
- <gls>
32
- <class>Addonline_Gls_Block</class>
33
- </gls>
34
- <onestepcheckout>
35
  <rewrite>
36
  <checkout>Addonline_Gls_Block_OneStepCheckout_Checkout</checkout>
37
  </rewrite>
38
  </onestepcheckout>
39
- </blocks>
40
- <helpers>
41
- <gls>
42
- <class>Addonline_Gls_Helper</class>
43
- </gls>
44
- <onestepcheckout>
45
- <rewrite>
46
- <checkout>Addonline_Gls_Helper_OneStepCheckout_Checkout</checkout>
47
- </rewrite>
48
- </onestepcheckout>
49
- </helpers>
50
- <!-- <resources> <gls_setup> <setup> <module>Addonline_Gls</module> <class>Mage_Sales_Model_Mysql4_Setup</class>
51
- </setup> </gls_setup> </resources> -->
52
- <models>
53
- <gls>
54
- <class>Addonline_Gls_Model</class>
55
- </gls>
56
- <sales>
57
- <rewrite>
58
- <quote_address>Addonline_Gls_Model_Sales_Quote_Address</quote_address>
59
- </rewrite>
60
- </sales>
61
- </models>
62
- <resources>
63
- <gls_setup>
64
- <setup>
65
- <module>Addonline_Gls</module>
66
- <class>Mage_Sales_Model_Mysql4_Setup</class>
67
- </setup>
68
- </gls_setup>
69
- </resources>
70
- <events>
71
- <!-- <sales_quote_collect_totals_before> <observers> <Addonline_Gls_Model_Observer>
72
- <type>singleton</type> <class>gls/observer</class> <method>checkoutEventGlsdata</method>
73
- </Addonline_Gls_Model_Observer> </observers> </sales_quote_collect_totals_before> -->
74
- <sales_quote_collect_totals_before>
75
- <observers>
76
- <Addonline_Gls_Model_Observer>
77
- <type>singleton</type>
78
- <class>gls/observer</class>
79
- <method>setShippingRelayAddress</method>
80
- </Addonline_Gls_Model_Observer>
81
- </observers>
82
- </sales_quote_collect_totals_before>
83
- <checkout_type_onepage_save_order_after>
84
- <observers>
85
- <Addonline_Gls_Model_Observer>
86
- <type>singleton</type>
87
- <class>gls/observer</class>
88
- <method>addGlsInformationsToOrder</method>
89
- </Addonline_Gls_Model_Observer>
90
- </observers>
91
- </checkout_type_onepage_save_order_after>
92
- </events>
93
- </global>
94
- <frontend>
95
- <layout>
96
- <updates>
97
- <gls module="Addonline_Gls">
98
- <file>gls.xml</file>
99
- </gls>
100
- </updates>
101
- </layout>
102
- <secure_url>
103
- <gls>/gls/ajax/</gls>
104
- </secure_url>
105
- <translate>
106
- <modules>
107
- <Addonline_Gls>
108
- <files>
109
- <shipping>Mage_Shipping.csv</shipping>
110
- <default>Addonline_Gls.csv</default>
111
- </files>
112
- </Addonline_Gls>
113
- </modules>
114
- </translate>
115
- </frontend>
116
- <admin>
117
- <routers>
118
- <gls>
119
- <use>admin</use>
120
- <args>
121
- <module>Addonline_Gls</module>
122
- <frontName>gls</frontName>
123
- </args>
124
- </gls>
125
- </routers>
126
- </admin>
127
- <adminhtml>
128
- <!-- Magento lower than 1.4.0 -->
129
- <translate>
130
- <modules>
131
- <Addonline_Gls>
132
- <files>
133
- <shipping>Mage_Shipping.csv</shipping>
134
- <gls>Addonline_Gls.csv</gls>
135
- </files>
136
- </Addonline_Gls>
137
- </modules>
138
- </translate>
139
- <menu>
140
- <gls module="gls">
141
- <title>GLS Import/Export</title>
142
- <sort_order>99</sort_order>
143
- <children>
144
- <export translate="title" module="gls">
145
- <title>Export orders</title>
146
- <sort_order>0</sort_order>
147
- <action>gls/export</action>
148
- </export>
149
- <import translate="title" module="gls">
150
- <title>Import tracking</title>
151
- <sort_order>1</sort_order>
152
- <action>gls/import</action>
153
- </import>
154
- </children>
155
- <depends>
156
- <config>carriers/gls/importexport</config>
157
- </depends>
158
- </gls>
159
- </menu>
160
- <acl>
161
- <resources>
162
- <admin>
163
- <children>
164
- <system>
165
- <children>
166
- <config>
167
- <children>
168
- <gls>
169
- <title>GLS Section</title>
170
- <sort_order>100</sort_order>
171
- </gls>
172
- </children>
173
- </config>
174
- </children>
175
- </system>
176
- <gls translate="title" module="gls">
177
- <title>GLS Import/Export</title>
178
- <sort_order>200</sort_order>
179
- <children>
180
- <export translate="title">
181
- <title>Export orders</title>
182
- </export>
183
- <import translate="title">
184
- <title>Import tracking</title>
185
- </import>
186
- <configuration translate="title">
187
- <title>Configuration</title>
188
- </configuration>
189
- </children>
190
- </gls>
191
- </children>
192
- </admin>
193
- </resources>
194
- </acl>
195
- </adminhtml>
196
- <default>
197
- <gls>
198
- <general>
199
- <weight_unit>kg</weight_unit>
200
- </general>
201
- <import_export>
202
- <active>0</active>
203
- <export_folder>var/export/gls/</export_folder>
204
- <import_folder>var/import/gls/</import_folder>
205
- </import_export>
206
- <bundle_product>
207
- <process_children>0</process_children>
208
- <load_item_options_on_parent>1</load_item_options_on_parent>
209
- <load_item_data_on_parent>0</load_item_data_on_parent>
210
- <load_product_data_on_parent>0</load_product_data_on_parent>
211
- </bundle_product>
212
- <configurable_product>
213
- <load_item_options_on_parent>1</load_item_options_on_parent>
214
- <load_item_data_on_parent>1</load_item_data_on_parent>
215
- <load_product_data_on_parent>0</load_product_data_on_parent>
216
- </configurable_product>
217
- </gls>
218
- <carriers>
219
- <gls>
220
- <title>GLS</title>
221
- <active>0</active>
222
- <livraisontohome>1</livraisontohome>
223
- <configtohome><![CDATA[
 
 
 
 
 
 
224
  {
225
  "label": "Livraison à domicile en 24/48H",
226
  "code": "tohome_fr",
@@ -239,8 +245,8 @@
239
  "shipto": "{address_filter.AF},{address_filter.AS},{address_filter.NA},{address_filter.SA},{address_filter.OC},{address_filter.AN},{address_filter.DOM},{address_filter.COM}",
240
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
241
  }]]></configtohome>
242
- <ordertohome>1</ordertohome>
243
- <livraisonfds>0</livraisonfds>
244
  <configfds><![CDATA[
245
  {
246
  "label": "En cas d’absence, choisissez où et quand vous souhaitez être livré",
@@ -249,36 +255,55 @@
249
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
250
  }]]></configfds>
251
  <orderfds>2</orderfds>
252
- <livraisonrelay>1</livraisonrelay>
253
- <configrelay><![CDATA[
254
  {
255
  "label": "Retrait en Point Relais de votre choix",
256
  "code": "relay_fr",
257
  "shipto": "FR",
258
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
259
  }]]></configrelay>
260
- <orderrelay>2</orderrelay>
261
- <maxrelayweight>20</maxrelayweight>
262
- <maxxlrelayweight>30</maxxlrelayweight>
263
- <onlyxlrelay>0</onlyxlrelay>
264
- <model>Addonline_Gls_Model_Carrier_ShippingMethod</model>
265
- <tracking_view_url>https://gls-group.eu/EU/en/parcel-tracking?match={tracking_number}</tracking_view_url>
266
- <debug>0</debug>
267
- <auto_escaping>0</auto_escaping>
268
- <auto_correction>1</auto_correction>
269
- <stop_to_first_match>0</stop_to_first_match>
270
- <sort_order>1</sort_order>
271
- </gls>
272
- </carriers>
273
- </default>
274
- <crontab>
275
- <jobs>
276
- <gls>
277
- <schedule>
278
- <config_path>gls/import_export/cron_expression</config_path>
279
- </schedule>
280
- <run><model>addonline_gls/cron::import_export</model></run>
281
- </gls>
282
- </jobs>
283
- </crontab>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  </config>
19
  <config>
20
  <modules>
21
  <Addonline_Gls>
22
+ <version>1.1.0</version>
23
  <depends>
24
  <Mage_Shipping />
25
  </depends>
26
  </Addonline_Gls>
27
  </modules>
28
 
29
+ <global>
30
+ <blocks>
31
+ <gls>
32
+ <class>Addonline_Gls_Block</class>
33
+ </gls>
34
+ <onestepcheckout>
35
  <rewrite>
36
  <checkout>Addonline_Gls_Block_OneStepCheckout_Checkout</checkout>
37
  </rewrite>
38
  </onestepcheckout>
39
+ </blocks>
40
+ <helpers>
41
+ <gls>
42
+ <class>Addonline_Gls_Helper</class>
43
+ </gls>
44
+ <onestepcheckout>
45
+ <rewrite>
46
+ <checkout>Addonline_Gls_Helper_OneStepCheckout_Checkout</checkout>
47
+ </rewrite>
48
+ </onestepcheckout>
49
+ </helpers>
50
+ <!-- <resources> <gls_setup> <setup> <module>Addonline_Gls</module> <class>Mage_Sales_Model_Mysql4_Setup</class>
51
+ </setup> </gls_setup> </resources> -->
52
+ <models>
53
+ <gls>
54
+ <class>Addonline_Gls_Model</class>
55
+ <resourceModel>gls_agencies_list</resourceModel>
56
+ </gls>
57
+ <sales>
58
+ <rewrite>
59
+ <quote_address>Addonline_Gls_Model_Sales_Quote_Address</quote_address>
60
+ </rewrite>
61
+ </sales>
62
+ <gls_agencies_list>
63
+ <class>Addonline_Gls_Model_Agencies</class>
64
+ <entities>
65
+ <gls>
66
+ <table>atest4242</table>
67
+ </gls>
68
+ </entities>
69
+ </gls_agencies_list>
70
+ </models>
71
+ <resources>
72
+ <gls_setup>
73
+ <setup>
74
+ <module>Addonline_Gls</module>
75
+ <class>Mage_Sales_Model_Mysql4_Setup</class>
76
+ </setup>
77
+ </gls_setup>
78
+ </resources>
79
+ <events>
80
+ <!-- <sales_quote_collect_totals_before> <observers> <Addonline_Gls_Model_Observer>
81
+ <type>singleton</type> <class>gls/observer</class> <method>checkoutEventGlsdata</method>
82
+ </Addonline_Gls_Model_Observer> </observers> </sales_quote_collect_totals_before> -->
83
+ <sales_quote_collect_totals_before>
84
+ <observers>
85
+ <Addonline_Gls_Model_Observer>
86
+ <type>singleton</type>
87
+ <class>gls/observer</class>
88
+ <method>setShippingRelayAddress</method>
89
+ </Addonline_Gls_Model_Observer>
90
+ </observers>
91
+ </sales_quote_collect_totals_before>
92
+ <checkout_type_onepage_save_order_after>
93
+ <observers>
94
+ <Addonline_Gls_Model_Observer>
95
+ <type>singleton</type>
96
+ <class>gls/observer</class>
97
+ <method>addGlsInformationsToOrder</method>
98
+ </Addonline_Gls_Model_Observer>
99
+ </observers>
100
+ </checkout_type_onepage_save_order_after>
101
+ </events>
102
+ </global>
103
+ <frontend>
104
+ <layout>
105
+ <updates>
106
+ <gls module="Addonline_Gls">
107
+ <file>gls.xml</file>
108
+ </gls>
109
+ </updates>
110
+ </layout>
111
+ <secure_url>
112
+ <gls>/gls/ajax/</gls>
113
+ </secure_url>
114
+ <translate>
115
+ <modules>
116
+ <Addonline_Gls>
117
+ <files>
118
+ <shipping>Mage_Shipping.csv</shipping>
119
+ <default>Addonline_Gls.csv</default>
120
+ </files>
121
+ </Addonline_Gls>
122
+ </modules>
123
+ </translate>
124
+ </frontend>
125
+ <admin>
126
+ <routers>
127
+ <gls>
128
+ <use>admin</use>
129
+ <args>
130
+ <module>Addonline_Gls</module>
131
+ <frontName>gls</frontName>
132
+ </args>
133
+ </gls>
134
+ </routers>
135
+ </admin>
136
+ <adminhtml>
137
+ <!-- Magento lower than 1.4.0 -->
138
+ <translate>
139
+ <modules>
140
+ <Addonline_Gls>
141
+ <files>
142
+ <shipping>Mage_Shipping.csv</shipping>
143
+ <gls>Addonline_Gls.csv</gls>
144
+ </files>
145
+ </Addonline_Gls>
146
+ </modules>
147
+ </translate>
148
+ <menu>
149
+ <gls module="gls">
150
+ <title>GLS Import/Export</title>
151
+ <sort_order>99</sort_order>
152
+ <children>
153
+ <export translate="title" module="gls">
154
+ <title>Export orders</title>
155
+ <sort_order>0</sort_order>
156
+ <action>gls/export</action>
157
+ </export>
158
+ <import translate="title" module="gls">
159
+ <title>Import tracking</title>
160
+ <sort_order>1</sort_order>
161
+ <action>gls/import</action>
162
+ </import>
163
+ </children>
164
+ </gls>
165
+ </menu>
166
+ <acl>
167
+ <resources>
168
+ <admin>
169
+ <children>
170
+ <system>
171
+ <children>
172
+ <config>
173
+ <children>
174
+ <gls>
175
+ <title>GLS Section</title>
176
+ <sort_order>100</sort_order>
177
+ </gls>
178
+ </children>
179
+ </config>
180
+ </children>
181
+ </system>
182
+ <gls translate="title" module="gls">
183
+ <title>GLS Import/Export</title>
184
+ <sort_order>200</sort_order>
185
+ <children>
186
+ <export translate="title">
187
+ <title>Export orders</title>
188
+ </export>
189
+ <import translate="title">
190
+ <title>Import tracking</title>
191
+ </import>
192
+ <configuration translate="title">
193
+ <title>Configuration</title>
194
+ </configuration>
195
+ </children>
196
+ </gls>
197
+ </children>
198
+ </admin>
199
+ </resources>
200
+ </acl>
201
+ </adminhtml>
202
+ <default>
203
+ <gls>
204
+ <general>
205
+ <weight_unit>kg</weight_unit>
206
+ </general>
207
+ <import_export>
208
+ <active>0</active>
209
+ <export_folder>var/export/gls/</export_folder>
210
+ <import_folder>var/import/gls/</import_folder>
211
+ </import_export>
212
+ <bundle_product>
213
+ <process_children>0</process_children>
214
+ <load_item_options_on_parent>1</load_item_options_on_parent>
215
+ <load_item_data_on_parent>0</load_item_data_on_parent>
216
+ <load_product_data_on_parent>0</load_product_data_on_parent>
217
+ </bundle_product>
218
+ <configurable_product>
219
+ <load_item_options_on_parent>1</load_item_options_on_parent>
220
+ <load_item_data_on_parent>1</load_item_data_on_parent>
221
+ <load_product_data_on_parent>0</load_product_data_on_parent>
222
+ </configurable_product>
223
+ </gls>
224
+ <carriers>
225
+ <gls>
226
+ <title>GLS</title>
227
+ <active>0</active>
228
+ <livraisontohome>1</livraisontohome>
229
+ <configtohome><![CDATA[
230
  {
231
  "label": "Livraison à domicile en 24/48H",
232
  "code": "tohome_fr",
245
  "shipto": "{address_filter.AF},{address_filter.AS},{address_filter.NA},{address_filter.SA},{address_filter.OC},{address_filter.AN},{address_filter.DOM},{address_filter.COM}",
246
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
247
  }]]></configtohome>
248
+ <ordertohome>1</ordertohome>
249
+ <livraisonfds>0</livraisonfds>
250
  <configfds><![CDATA[
251
  {
252
  "label": "En cas d’absence, choisissez où et quand vous souhaitez être livré",
255
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
256
  }]]></configfds>
257
  <orderfds>2</orderfds>
258
+ <livraisonrelay>1</livraisonrelay>
259
+ <configrelay><![CDATA[
260
  {
261
  "label": "Retrait en Point Relais de votre choix",
262
  "code": "relay_fr",
263
  "shipto": "FR",
264
  "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
265
  }]]></configrelay>
266
+ <orderrelay>3</orderrelay>
267
+ <maxrelayweight>20</maxrelayweight>
268
+ <maxxlrelayweight>30</maxxlrelayweight>
269
+ <onlyxlrelay>0</onlyxlrelay>
270
+ <livraisonexpress>1</livraisonexpress>
271
+ <configexpress><![CDATA[
272
+ {
273
+ "label": "Retrait express",
274
+ "code": "express_fr",
275
+ "shipto": "FR",
276
+ "fees": "!{free_shipping}*{table {cart.price+tax+discount} in 150.00:5.00, 160.00:3.00, 100000.00:00.00}"
277
+ }]]></configexpress>
278
+ <orderexpress>4</orderexpress>
279
+ <model>Addonline_Gls_Model_Carrier_ShippingMethod</model>
280
+ <tracking_view_url>https://gls-group.eu/EU/en/parcel-tracking?match={tracking_number}</tracking_view_url>
281
+ <debug>0</debug>
282
+ <auto_escaping>0</auto_escaping>
283
+ <auto_correction>1</auto_correction>
284
+ <stop_to_first_match>0</stop_to_first_match>
285
+ <sort_order>1</sort_order>
286
+ </gls>
287
+ </carriers>
288
+ </default>
289
+ <crontab>
290
+ <jobs>
291
+ <gls>
292
+ <schedule>
293
+ <config_path>gls/import_export/cron_expression</config_path>
294
+ </schedule>
295
+ <run>
296
+ <model>gls/cron::import_export</model>
297
+ </run>
298
+ </gls>
299
+ <gls_agencies>
300
+ <schedule>
301
+ <cron_expr>*/5 * * * *</cron_expr>
302
+ </schedule>
303
+ <run>
304
+ <model>gls/cron::update_gls_agencies</model>
305
+ </run>
306
+ </gls_agencies>
307
+ </jobs>
308
+ </crontab>
309
  </config>
app/code/community/Addonline/Gls/etc/system.xml CHANGED
@@ -185,7 +185,40 @@
185
  <show_in_default>1</show_in_default>
186
  <show_in_website>1</show_in_website>
187
  <show_in_store>1</show_in_store>
188
- </tracking_view_url>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  <debug translate="label comment">
190
  <label>Debug</label>
191
  <comment>{debug_help}</comment>
@@ -250,6 +283,14 @@
250
  <show_in_website>1</show_in_website>
251
  <show_in_store>1</show_in_store>
252
  </weight_unit>
 
 
 
 
 
 
 
 
253
 
254
  </fields>
255
  </general>
185
  <show_in_default>1</show_in_default>
186
  <show_in_website>1</show_in_website>
187
  <show_in_store>1</show_in_store>
188
+ </tracking_view_url>
189
+
190
+ <livraisonexpress translate="label">
191
+ <label>Express Delivery</label>
192
+ <frontend_type>select</frontend_type>
193
+ <source_model>adminhtml/system_config_source_yesno</source_model>
194
+ <sort_order>17</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>1</show_in_store>
198
+ </livraisonexpress>
199
+ <configexpress translate="label">
200
+ <label>Express Delivery setup</label>
201
+ <frontend_model>gls/adminhtml_system_config_form_field_config</frontend_model>
202
+ <frontend_type>textarea</frontend_type>
203
+ <sort_order>18</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>1</show_in_website>
206
+ <show_in_store>1</show_in_store>
207
+ <depends>
208
+ <livraisonexpress>1</livraisonexpress>
209
+ </depends>
210
+ </configexpress>
211
+ <orderexpress translate="label">
212
+ <label>Express Delivery order</label>
213
+ <frontend_type>text</frontend_type>
214
+ <sort_order>19</sort_order>
215
+ <show_in_default>1</show_in_default>
216
+ <show_in_website>1</show_in_website>
217
+ <show_in_store>1</show_in_store>
218
+ <depends>
219
+ <livraisonexpress>1</livraisonexpress>
220
+ </depends>
221
+ </orderexpress>
222
  <debug translate="label comment">
223
  <label>Debug</label>
224
  <comment>{debug_help}</comment>
283
  <show_in_website>1</show_in_website>
284
  <show_in_store>1</show_in_store>
285
  </weight_unit>
286
+ <agency_code translate="label">
287
+ <label>Agency code</label>
288
+ <frontend_type>text</frontend_type>
289
+ <sort_order>5</sort_order>
290
+ <show_in_default>1</show_in_default>
291
+ <show_in_website>1</show_in_website>
292
+ <show_in_store>1</show_in_store>
293
+ </agency_code>
294
 
295
  </fields>
296
  </general>
app/code/community/Addonline/Gls/owebia_includes/OwebiaShippingHelper_GLS.php CHANGED
@@ -397,12 +397,21 @@ class OwebiaShippingHelper_GLS
397
  $conditions = $this->getRowProperty($row, 'conditions');
398
  //ADDONLINE : on exclu la livraison GLS si un article dépasse le point max XL (30kg)
399
  $code = $row['*id'];
400
- $conditionGLS = '({count items where product.weight > '.Mage::getStoreConfig('carriers/gls/maxxlrelayweight').'} == 0)';
401
- if (isset($conditions)) {
402
- $conditions .= ' && '.$conditionGLS;
403
- } else {
404
- $conditions .= $conditionGLS;
405
- }
 
 
 
 
 
 
 
 
 
406
  //FIN ADDONLINE
407
  if (isset($conditions)) {
408
  $result = $this->processFormula($process, $row, 'conditions', $conditions, $is_checking);
397
  $conditions = $this->getRowProperty($row, 'conditions');
398
  //ADDONLINE : on exclu la livraison GLS si un article dépasse le point max XL (30kg)
399
  $code = $row['*id'];
400
+ $conditionGLS = '';
401
+ //Si on est pas sur une livraison à domicile
402
+ if(substr($code,0,7) != 'tohome_'){
403
+ $conditionGLS = '({count items where product.weight > '.Mage::getStoreConfig('carriers/gls/maxxlrelayweight').'} == 0)';
404
+ }else{
405
+ $conditionGLS = '({count items where product.weight > 99999} == 0)';
406
+ }
407
+
408
+ //On ajout nos conditions GLS
409
+ if (isset($conditions)) {
410
+ $conditions .= ' && '.$conditionGLS;
411
+ } else {
412
+ $conditions .= $conditionGLS;
413
+ }
414
+
415
  //FIN ADDONLINE
416
  if (isset($conditions)) {
417
  $result = $this->processFormula($process, $row, 'conditions', $conditions, $is_checking);
app/code/community/Addonline/Gls/sql/gls_setup/mysql4-upgrade-1.0.9-1.1.0.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ $installer->run("
6
+ DROP TABLE IF EXISTS {$this->getTable('gls_agencies_list')} ;
7
+
8
+ CREATE TABLE IF NOT EXISTS {$this->getTable('gls_agencies_list')} (
9
+ `id_agency_entry` int(10) NOT NULL AUTO_INCREMENT,
10
+ `agencycode` varchar(255) DEFAULT NULL,
11
+ `zipcode_start` int(5) DEFAULT NULL,
12
+ `zipcode_end` int(5) DEFAULT NULL,
13
+ `validity_date_start` varchar(20) DEFAULT NULL,
14
+ `validity_date_end` varchar(20) DEFAULT NULL,
15
+ `last_import_date` varchar(20) DEFAULT NULL,
16
+ `last_check_date` varchar(20) DEFAULT NULL,
17
+ PRIMARY KEY (`id_agency_entry`)
18
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
19
+ ");
20
+
21
+ $installer->endSetup();
22
+
23
+
24
+
app/design/adminhtml/default/default/template/gls/configuration/form.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * GLS
4
+ *
5
+ * @category Addonline
6
+ * @package Addonline_GLS
7
+ * @copyright Copyright (c) 2013 GLS
8
+ * @author Addonline (http://www.addonline.fr)
9
+ */
10
+ -->
11
+ <div class="content-header">
12
+ <table cellspacing="0">
13
+ <tr>
14
+ <td><h3 class="icon-head head-tax-rate-importExport"><?php echo Mage::helper('gls')->__('Import orders') ?></h3></td>
15
+ </tr>
16
+ </table>
17
+ </div>
18
+ <div class="entry-edit">
19
+ <div class="box-left">
20
+ <form id="import_form" action="<?php echo $this->getUrl('*/*/import') ?>" method="post" enctype="multipart/form-data">
21
+ <?php echo $this->getBlockHtml('formkey')?>
22
+ <div class="entry-edit-head">
23
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('gls')->__('Import orders') ?></h4>
24
+ </div>
25
+
26
+ <fieldset>
27
+ <table class="form-list" cellspacing="0">
28
+ <colgroup class="label"/>
29
+ <colgroup class="value"/>
30
+ <tbody>
31
+ <tr>
32
+ <td>&nbsp;</td>
33
+ <td class="value">
34
+ <?php $button_label = Mage::helper('gls')->__('Import'); ?>
35
+ <?php echo $this->getButtonHtml($button_label, "this.form.submit();displayLoadingMask();") ?>
36
+ </td>
37
+ </tr>
38
+ </tbody>
39
+ </table>
40
+ </fieldset>
41
+
42
+ </form>
43
+ <script type="text/javascript">
44
+ var importForm = new varienForm('import_form');
45
+
46
+ function displayLoadingMask()
47
+ {
48
+ var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page
49
+ Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2});
50
+ toggleSelectsUnderBlock($('loading-mask'), false);
51
+ Element.show('loading-mask');
52
+ }
53
+ </script>
54
+ </div>
55
+ <div class="clear"></div>
56
+ </div>
app/design/adminhtml/default/default/template/gls/import/form.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * GLS
4
+ *
5
+ * @category Addonline
6
+ * @package Addonline_GLS
7
+ * @copyright Copyright (c) 2013 GLS
8
+ * @author Addonline (http://www.addonline.fr)
9
+ */
10
+ -->
11
+ <div class="content-header">
12
+ <table cellspacing="0">
13
+ <tr>
14
+ <td><h3 class="icon-head head-tax-rate-importExport"><?php echo Mage::helper('gls')->__('Import orders') ?></h3></td>
15
+ </tr>
16
+ </table>
17
+ </div>
18
+ <div class="entry-edit">
19
+ <div class="box-left">
20
+ <form id="import_form" action="<?php echo $this->getUrl('*/*/import') ?>" method="post" enctype="multipart/form-data">
21
+ <?php echo $this->getBlockHtml('formkey')?>
22
+ <div class="entry-edit-head">
23
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('gls')->__('Import orders') ?></h4>
24
+ </div>
25
+
26
+ <fieldset>
27
+ <table class="form-list" cellspacing="0">
28
+ <colgroup class="label"/>
29
+ <colgroup class="value"/>
30
+ <tbody>
31
+ <tr>
32
+ <td>&nbsp;</td>
33
+ <td class="value">
34
+ <?php $button_label = Mage::helper('gls')->__('Import'); ?>
35
+ <?php echo $this->getButtonHtml($button_label, "this.form.submit();displayLoadingMask();") ?>
36
+ </td>
37
+ </tr>
38
+ </tbody>
39
+ </table>
40
+ </fieldset>
41
+
42
+ </form>
43
+ <script type="text/javascript">
44
+ var importForm = new varienForm('import_form');
45
+
46
+ function displayLoadingMask()
47
+ {
48
+ var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page
49
+ Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2});
50
+ toggleSelectsUnderBlock($('loading-mask'), false);
51
+ Element.show('loading-mask');
52
+ }
53
+ </script>
54
+ </div>
55
+ <div class="clear"></div>
56
+ </div>
app/design/frontend/base/default/layout/gls.xml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * Copyright (c) 2014 GLS
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * It is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Addonline
13
+ * @package Addonline_Gls
14
+ * @copyright Copyright (c) 2014 GLS
15
+ * @author Addonline (http://www.addonline.fr)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <layout version="0.1.0">
20
+ <checkout_onepage_index>
21
+ <reference name="head">
22
+ <action method="addCss">
23
+ <stylesheet>css/gls.css</stylesheet>
24
+ </action>
25
+
26
+ <!-- <action method="addJs">
27
+ <script>jquery/jquery-2.1.3.min.js</script>
28
+ </action> -->
29
+ <action method="addJs">
30
+ <script>jquery/jquery.noconflict.js</script>
31
+ <params><![CDATA[data-group="gls_001"]]></params>
32
+ </action>
33
+ <action method="addJs">
34
+ <script>jquery/jquery.popupoverlay.js</script>
35
+ <params><![CDATA[data-group="gls_002"]]></params>
36
+ </action>
37
+ <action method="addItem">
38
+ <type>skin_js</type>
39
+ <script>js/gls.js</script>
40
+ </action>
41
+
42
+ <block type="core/text" name="map.js">
43
+ <action method="setText">
44
+ <text><![CDATA[<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&region=FR&v=3"></script>]]></text>
45
+ </action>
46
+ </block>
47
+
48
+ </reference>
49
+
50
+ <reference name="before_body_end">
51
+ <block type="core/template" name="gls_additional" after="-"
52
+ template="gls/additional.phtml" />
53
+ </reference>
54
+
55
+ </checkout_onepage_index>
56
+
57
+ <onestepcheckout_index_index>
58
+ <reference name="head">
59
+ <action method="addCss">
60
+ <stylesheet>css/gls.css</stylesheet>
61
+ </action>
62
+
63
+ <!-- <action method="addJs">
64
+ <script>jquery/jquery-2.1.3.min.js</script>
65
+ </action> -->
66
+ <action method="addJs">
67
+ <script>jquery/jquery.noconflict.js</script>
68
+ <params><![CDATA[data-group="gls_001"]]></params>
69
+ </action>
70
+ <!-- <action method="addJs">
71
+ <script>jquery/jquery.tools.min.js</script>
72
+ </action> -->
73
+
74
+ <action method="addJs">
75
+ <script>jquery/jquery.popupoverlay.js</script>
76
+ <params><![CDATA[data-group="gls_002"]]></params>
77
+ </action>
78
+
79
+ <action method="addItem">
80
+ <type>skin_js</type>
81
+ <script>js/gls.js</script>
82
+ </action>
83
+ <block type="core/text" name="map.js">
84
+ <action method="setText">
85
+ <text><![CDATA[<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&region=FR&v=3"></script>]]></text>
86
+ </action>
87
+ </block>
88
+ </reference>
89
+
90
+ <reference name="before_body_end">
91
+ <block type="core/template" name="gls_additional" after="-"
92
+ template="gls/additional.phtml" />
93
+ </reference>
94
+
95
+ </onestepcheckout_index_index>
96
+
97
+ <gls_ajax_selector>
98
+ <remove name="right" />
99
+ <remove name="left" />
100
+
101
+ <block type="gls/selector" name="root" output="toHtml"
102
+ template="gls/selector.phtml" />
103
+ </gls_ajax_selector>
104
+
105
+ <gls_ajax_listrelais>
106
+ <remove name="right" />
107
+ <remove name="left" />
108
+
109
+ <block type="gls/listrelais" name="root" output="toHtml"
110
+ template="gls/listrelais.phtml" />
111
+ </gls_ajax_listrelais>
112
+
113
+ </layout>
app/design/frontend/base/default/template/gls/additional.phtml ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 GLS
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Addonline
12
+ * @package Addonline_Gls
13
+ * @copyright Copyright (c) 2014 GLS
14
+ * @author Addonline (http://www.addonline.fr)
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ ?>
18
+ <span id="GLS_theme" style="display:none;">Desktop</span>
19
+ <div id="layer_gls" class="layer"></div>
20
+ <?php if ($shipping_data = Mage::getSingleton('checkout/session')->getData('gls_shipping_relay_data')) : ?>
21
+ <div id='gls_relais_choisi_init'>
22
+ <span><?php echo $shipping_data['name'] ?></span> <span
23
+ class='modifier_relay'><?php echo __("Change ParcelShop"); ?></span><br />
24
+ <?php echo $shipping_data['address'] ?><br />
25
+ <?php echo $shipping_data['zipcode'] ?> <?php echo $shipping_data['city'] ?></div>
26
+ <?php endif; ?>
27
+ <script type="text/javascript">
28
+ //<![CDATA[
29
+
30
+ Translator.add('Choose this ParcelShop','<?php echo __("Choose this ParcelShop"); ?>');
31
+ Translator.add('Change ParcelShop','<?php echo __("Change ParcelShop"); ?>');
32
+ Translator.add('Please provide a valide mobile phone number.','<?php echo __("Please provide a valide mobile phone number."); ?>');
33
+
34
+ var glsBaseUrl = '<?php echo $this->getUrl('gls/ajax/') ?>';
35
+
36
+ if (aoGoToShippingMethodHooks == undefined) {
37
+ var aoGoToShippingMethodHooks = new Array();
38
+ }
39
+ // initGlsLogos : fonction définie dans gls.js, appellée dans le hokk ci-dessous, pour charger les logos GLS
40
+ aoGoToShippingMethodHooks[aoGoToShippingMethodHooks.length] = initGlsLogos;
41
+ if ((typeof Checkout) != "undefined") {
42
+ <?php if (version_compare(Mage::getVersion(), '1.8', '>=')) : ?>
43
+ //On surchage la methode gotoSection de Checkout (voir opcheckout.js) : surcharge identique dans les modules addonline : socolissimo, GLS pour être compatible si on utilise les deux modules
44
+ Checkout.prototype.gotoSection = function (section, reloadProgressBlock)
45
+ {
46
+ if (reloadProgressBlock) {
47
+ this.reloadProgressBlock(this.currentStep);
48
+ }
49
+ //HOOK pour modules de livraison
50
+ if (section == 'shipping_method') {
51
+ for (i=0;i<aoGoToShippingMethodHooks.length;i++){
52
+ aoGoToShippingMethodHooks[i]();
53
+ }
54
+ }
55
+ //Après le choix du mode de livraison il faut aussi recharger l'adresse de livraison car on a pu choisir un relais
56
+ if (section == 'payment') {
57
+ this.reloadProgressBlock('shipping');
58
+ }
59
+ this.currentStep = section;
60
+ var sectionElement = $('opc-' + section);
61
+ sectionElement.addClassName('allow');
62
+ this.accordion.openSection('opc-' + section);
63
+ if(!reloadProgressBlock) {
64
+ this.resetPreviousSteps();
65
+ }
66
+ }
67
+ <?php else : ?>
68
+ Checkout.prototype.gotoSection = function (section)
69
+ {
70
+ //HOOK pour modules de livraison
71
+ if (section == 'shipping_method') {
72
+ for (i=0;i<aoGoToShippingMethodHooks.length;i++){
73
+ aoGoToShippingMethodHooks[i]();
74
+ }
75
+ }
76
+ //Après le choix du mode de livraison il faut aussi recharger l'adresse de livraison car on a pu choisir un relais
77
+ if (section == 'payment') {
78
+ this.reloadProgressBlock('shipping');
79
+ }
80
+ var sectionElement = $('opc-'+section);
81
+ sectionElement.addClassName('allow');
82
+ this.accordion.openSection('opc-'+section);
83
+ this.reloadProgressBlock(section);
84
+ }
85
+ <?php endif; ?>
86
+ }
87
+ //]]>
88
+ </script>
app/design/frontend/base/default/template/gls/listrelais.phtml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 GLS
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Addonline
12
+ * @package Addonline_Gls
13
+ * @copyright Copyright (c) 2014 GLS
14
+ * @author Addonline (http://www.addonline.fr)
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ if ($aListRelais = $this->getListRelay()) :
18
+ $i = 0;
19
+ if(isset($aListRelais['error'])): ?>
20
+ <span class="gls_ws_error"><?php echo $aListRelais['error']; ?></span>
21
+ <?php else:
22
+
23
+ foreach ($aListRelais as $relais) :
24
+ ?>
25
+ <div class="gls_point_relay" id="gls_point_relay_<?php echo $i; ?>">
26
+ <span class="GLS_relay_index"><?php echo $i; ?></span> <span
27
+ class="GLS_relay_id"><?php echo $relais['relayId']; ?></span> <span
28
+ class="GLS_relay_name"><?php echo $relais['relayName']; ?></span> <span
29
+ class="GLS_relay_address"><?php echo $relais['relayAddress']; ?></span>
30
+ <span class="GLS_relay_zipcode"><?php echo $relais['relayZipCode']; ?></span>
31
+ <span class="GLS_relay_city"><?php echo $relais['relayCity']; ?></span>
32
+ <span class="GLS_relay_latitude"><?php echo $relais['relayLatitude']; ?></span>
33
+ <span class="GLS_relay_longitude"><?php echo $relais['relayLongitude']; ?></span>
34
+ <div>
35
+ <span class="GLS_relay_horaires"><?php echo __("Opening hours")?></span>
36
+ <a href="#" class='choose-relay-point'
37
+ data-relayindex="<?php echo $i; ?>"><?php echo __("Choose this ParcelShop")?></a>
38
+ </div>
39
+ <span class="GLS_relay_hours">
40
+ <table cellpadding="0" cellspacing="0">
41
+ <?php
42
+ $aDays = array(
43
+ '0' => __("Monday"),
44
+ '1' => __("Tuesday"),
45
+ '2' => __("Wednesday"),
46
+ '3' => __("Thursday"),
47
+ '4' => __("Friday"),
48
+ '5' => __("Saturday"),
49
+ '6' => __("Sunday")
50
+ );
51
+ foreach ($relais['relayWorkingDays'] as $day => $openHours) {
52
+ echo '<tr>';
53
+ echo '<td class="day">' . $aDays[$day] . '</td>';
54
+ $hours = '';
55
+ if ($openHours['breaks']['from']) {
56
+ $hours = '<td>' . substr_replace(substr($openHours['hours']['from'], 0, 4), 'h' . $openHours['hours']['from'][2], 2, 1) . ' - ' . substr_replace(substr($openHours['breaks']['from'], 0, 4), 'h' . $openHours['breaks']['from'][2], 2, 1) . ' / ' . substr_replace(substr($openHours['breaks']['to'], 0, 4), 'h' . $openHours['breaks']['to'][2], 2, 1) . ' - ' . substr_replace(substr($openHours['hours']['to'], 0, 4), 'h' . $openHours['hours']['to'][2], 2, 1) . '</td>';
57
+ } else {
58
+ $hours = '<td>' . substr_replace(substr($openHours['hours']['from'], 0, 4), 'h' . $openHours['hours']['from'][2], 2, 1) . ' - ' . substr_replace(substr($openHours['hours']['to'], 0, 4), 'h' . $openHours['hours']['to'][2], 2, 1) . '</td>';
59
+ }
60
+ echo $hours;
61
+ echo '</tr>';
62
+ }
63
+ ?>
64
+ </table>
65
+ </span>
66
+ </div>
67
+ <?php
68
+ $i ++;
69
+ endforeach
70
+ ;
71
+ endif;
72
+
73
+ endif;?>
app/design/frontend/base/default/template/gls/selector.phtml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 GLS
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Addonline
12
+ * @package Addonline_Gls
13
+ * @copyright Copyright (c) 2014 GLS
14
+ * @author Addonline (http://www.addonline.fr)
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ ?>
18
+ <div id="layer_gls_wrapper">
19
+ <div>
20
+ <h3><?php echo __("Choose Mondial Relay ParcelShop")?></h3>
21
+ <a class="close layer_gls_close"></a>
22
+ <div class="contenu">
23
+ <div id="gls_headers">
24
+ <div class="left_gls">
25
+ <span><?php echo __("Your zipcode")?></span> <input type="text"
26
+ id="cp_recherche"
27
+ value="<?php echo $this->getShippingPostcode() ?>" />
28
+ <span><?php echo __("Your address")?></span> <input type="text"
29
+ id="adresse_recherche"
30
+ value="<?php echo $this->getShippingStreet() ?>" />
31
+ <span><?php echo __("Your city")?></span> <input type="text"
32
+ id="city_recherche"
33
+ value="<?php echo $this->getShippingCity() ?>" />
34
+ <button id="cp_recherche_bouton" onclick="geocodeGLSAdresse()"><?php echo $this->helper('gls')->__("Search")?></button>
35
+ </div>
36
+ <div class="right_gls">
37
+ <?php
38
+ $smsNotification = strpos($this->getTelephone(), "06") === 0 || strpos($this->getTelephone(), "07") === 0;
39
+ ?>
40
+ <label><input type="checkbox" id="sms_checkbox"
41
+ <?php if($smsNotification) {?> checked="checked" <?php }?> /> <?php echo __("To receive an sms when delivery is done")?></label>
42
+ <input type="text" id="num_telephone"
43
+ class="valid-telephone-portable" <?php if($smsNotification) {?>
44
+ value="<?php echo $this->getTelephone(); ?><?php }?>" />
45
+ </div>
46
+ </div>
47
+ <div id="col_gauche_gls">
48
+ <div id="map_gls"></div>
49
+ </div>
50
+ <div id="col_droite_gls"></div>
51
+ </div>
52
+ </div>
53
+ </div>
js/jquery/jquery-1.7.1.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.7.1 jquery.com | jquery.org/license */
2
- (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3
- f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
4
- {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
 
 
 
 
js/jquery/jquery-2.1.3.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
+ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
3
+ },removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.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",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
4
+ },removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});
js/jquery/jquery-migrate-1.2.1.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
2
- jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
 
 
js/jquery/jquery.popupoverlay.js ADDED
@@ -0,0 +1,786 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Popup Overlay
3
+ *
4
+ * @version 1.7.6
5
+ * @requires jQuery v1.7.1+
6
+ * @link http://vast-engineering.github.com/jquery-popup-overlay/
7
+ */
8
+ ;(function ($) {
9
+
10
+ var $window = $(window);
11
+ var options = {};
12
+ var zindexvalues = [];
13
+ var lastclicked = [];
14
+ var scrollbarwidth;
15
+ var bodymarginright = null;
16
+ var opensuffix = '_open';
17
+ var closesuffix = '_close';
18
+ var stack = [];
19
+ var transitionsupport = null;
20
+ var opentimer;
21
+ var iOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
22
+
23
+ var methods = {
24
+
25
+ _init: function (el) {
26
+ var $el = $(el);
27
+ var options = $el.data('popupoptions');
28
+ lastclicked[el.id] = false;
29
+ zindexvalues[el.id] = 0;
30
+
31
+ if (!$el.data('popup-initialized')) {
32
+ $el.attr('data-popup-initialized', 'true');
33
+ methods._initonce(el);
34
+ }
35
+
36
+ if (options.autoopen) {
37
+ setTimeout(function() {
38
+ methods.show(el, 0);
39
+ }, 0);
40
+ }
41
+ },
42
+
43
+ _initonce: function (el) {
44
+ var $el = $(el);
45
+ var $body = $('body');
46
+ var $wrapper;
47
+ var options = $el.data('popupoptions');
48
+ var css;
49
+
50
+ bodymarginright = parseInt($body.css('margin-right'), 10);
51
+ transitionsupport = document.body.style.webkitTransition !== undefined ||
52
+ document.body.style.MozTransition !== undefined ||
53
+ document.body.style.msTransition !== undefined ||
54
+ document.body.style.OTransition !== undefined ||
55
+ document.body.style.transition !== undefined;
56
+
57
+ if (options.type == 'tooltip') {
58
+ options.background = false;
59
+ options.scrolllock = false;
60
+ }
61
+
62
+ if (options.backgroundactive) {
63
+ options.background = false;
64
+ options.blur = false;
65
+ options.scrolllock = false;
66
+ }
67
+
68
+ if (options.scrolllock) {
69
+ // Calculate the browser's scrollbar width dynamically
70
+ var parent;
71
+ var child;
72
+ if (typeof scrollbarwidth === 'undefined') {
73
+ parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body');
74
+ child = parent.children();
75
+ scrollbarwidth = child.innerWidth() - child.height(99).innerWidth();
76
+ parent.remove();
77
+ }
78
+ }
79
+
80
+ if (!$el.attr('id')) {
81
+ $el.attr('id', 'j-popup-' + parseInt((Math.random() * 100000000), 10));
82
+ }
83
+
84
+ $el.addClass('popup_content');
85
+
86
+ $body.prepend(el);
87
+
88
+ $el.wrap('<div id="' + el.id + '_wrapper" class="popup_wrapper" />');
89
+
90
+ $wrapper = $('#' + el.id + '_wrapper');
91
+
92
+ $wrapper.css({
93
+ opacity: 0,
94
+ visibility: 'hidden',
95
+ position: 'absolute'
96
+ });
97
+
98
+ // Make div clickable in iOS
99
+ if (iOS) {
100
+ $wrapper.css('cursor', 'pointer');
101
+ }
102
+
103
+ if (options.type == 'overlay') {
104
+ $wrapper.css('overflow','auto');
105
+ }
106
+
107
+ $el.css({
108
+ opacity: 0,
109
+ visibility: 'hidden',
110
+ display: 'inline-block'
111
+ });
112
+
113
+ if (options.setzindex && !options.autozindex) {
114
+ $wrapper.css('z-index', '100001');
115
+ }
116
+
117
+ if (!options.outline) {
118
+ $el.css('outline', 'none');
119
+ }
120
+
121
+ if (options.transition) {
122
+ $el.css('transition', options.transition);
123
+ $wrapper.css('transition', options.transition);
124
+ }
125
+
126
+ // Hide popup content from screen readers initially
127
+ $el.attr('aria-hidden', true);
128
+
129
+ if ((options.background) && (!$('#' + el.id + '_background').length)) {
130
+
131
+ $body.prepend('<div id="' + el.id + '_background" class="popup_background"></div>');
132
+
133
+ var $background = $('#' + el.id + '_background');
134
+
135
+ $background.css({
136
+ opacity: 0,
137
+ visibility: 'hidden',
138
+ backgroundColor: options.color,
139
+ position: 'fixed',
140
+ top: 0,
141
+ right: 0,
142
+ bottom: 0,
143
+ left: 0
144
+ });
145
+
146
+ if (options.setzindex && !options.autozindex) {
147
+ $background.css('z-index', '100000');
148
+ }
149
+
150
+ if (options.transition) {
151
+ $background.css('transition', options.transition);
152
+ }
153
+ }
154
+
155
+ if (options.type == 'overlay') {
156
+ $el.css({
157
+ textAlign: 'left',
158
+ position: 'relative',
159
+ verticalAlign: 'middle'
160
+ });
161
+
162
+ css = {
163
+ position: 'fixed',
164
+ width: '100%',
165
+ height: '100%',
166
+ top: 0,
167
+ left: 0,
168
+ textAlign: 'center'
169
+ };
170
+
171
+ if(options.backgroundactive){
172
+ css.position = 'relative';
173
+ css.height = '0';
174
+ css.overflow = 'visible';
175
+ }
176
+
177
+ $wrapper.css(css);
178
+
179
+ // CSS vertical align helper
180
+ $wrapper.append('<div class="popup_align" />');
181
+
182
+ $('.popup_align').css({
183
+ display: 'inline-block',
184
+ verticalAlign: 'middle',
185
+ height: '100%'
186
+ });
187
+ }
188
+
189
+ // Add WAI ARIA role to announce dialog to screen readers
190
+ $el.attr('role', 'dialog');
191
+
192
+ var openelement = (options.openelement) ? options.openelement : ('.' + el.id + opensuffix);
193
+
194
+ $(openelement).each(function (i, item) {
195
+ $(item).attr('data-popup-ordinal', i);
196
+
197
+ if (!item.id) {
198
+ $(item).attr('id', 'open_' + parseInt((Math.random() * 100000000), 10));
199
+ }
200
+ });
201
+
202
+ // Set aria-labelledby (if aria-label or aria-labelledby is not set in html)
203
+ if (!($el.attr('aria-labelledby') || $el.attr('aria-label'))) {
204
+ $el.attr('aria-labelledby', $(openelement).attr('id'));
205
+ }
206
+
207
+ // Show and hide tooltips on hover
208
+ if(options.action == 'hover'){
209
+ options.keepfocus = false;
210
+
211
+ // Handler: mouseenter, focusin
212
+ $(openelement).on('mouseenter', function (event) {
213
+ methods.show(el, $(this).data('popup-ordinal'));
214
+ });
215
+
216
+ // Handler: mouseleave, focusout
217
+ $(openelement).on('mouseleave', function (event) {
218
+ methods.hide(el);
219
+ });
220
+
221
+ } else {
222
+
223
+ // Handler: Show popup when clicked on `open` element
224
+ $(document).on('click', openelement, function (event) {
225
+ event.preventDefault();
226
+
227
+ var ord = $(this).data('popup-ordinal');
228
+ setTimeout(function() { // setTimeout is to allow `close` method to finish (for issues with multiple tooltips)
229
+ methods.show(el, ord);
230
+ }, 0);
231
+ });
232
+ }
233
+
234
+ if (options.closebutton) {
235
+ methods.addclosebutton(el);
236
+ }
237
+
238
+ if (options.detach) {
239
+ $el.hide().detach();
240
+ } else {
241
+ $wrapper.hide();
242
+ }
243
+ },
244
+
245
+ /**
246
+ * Show method
247
+ *
248
+ * @param {object} el - popup instance DOM node
249
+ * @param {number} ordinal - order number of an `open` element
250
+ */
251
+ show: function (el, ordinal) {
252
+ var $el = $(el);
253
+
254
+ if ($el.data('popup-visible')) return;
255
+
256
+ // Initialize if not initialized. Required for: $('#popup').popup('show')
257
+ if (!$el.data('popup-initialized')) {
258
+ methods._init(el);
259
+ }
260
+ $el.attr('data-popup-initialized', 'true');
261
+
262
+ var $body = $('body');
263
+ var options = $el.data('popupoptions');
264
+ var $wrapper = $('#' + el.id + '_wrapper');
265
+ var $background = $('#' + el.id + '_background');
266
+
267
+ // `beforeopen` callback event
268
+ callback(el, ordinal, options.beforeopen);
269
+
270
+ // Remember last clicked place
271
+ lastclicked[el.id] = ordinal;
272
+
273
+ // Add popup id to popup stack
274
+ setTimeout(function() {
275
+ stack.push(el.id);
276
+ }, 0);
277
+
278
+ // Calculating maximum z-index
279
+ if (options.autozindex) {
280
+
281
+ var elements = document.getElementsByTagName('*');
282
+ var len = elements.length;
283
+ var maxzindex = 0;
284
+
285
+ for(var i=0; i<len; i++){
286
+
287
+ var elementzindex = $(elements[i]).css('z-index');
288
+
289
+ if(elementzindex !== 'auto'){
290
+
291
+ elementzindex = parseInt(elementzindex, 10);
292
+
293
+ if(maxzindex < elementzindex){
294
+ maxzindex = elementzindex;
295
+ }
296
+ }
297
+ }
298
+
299
+ zindexvalues[el.id] = maxzindex;
300
+
301
+ // Add z-index to the background
302
+ if (options.background) {
303
+ if (zindexvalues[el.id] > 0) {
304
+ $('#' + el.id + '_background').css({
305
+ zIndex: (zindexvalues[el.id] + 1)
306
+ });
307
+ }
308
+ }
309
+
310
+ // Add z-index to the wrapper
311
+ if (zindexvalues[el.id] > 0) {
312
+ $wrapper.css({
313
+ zIndex: (zindexvalues[el.id] + 2)
314
+ });
315
+ }
316
+ }
317
+
318
+ if (options.detach) {
319
+ $wrapper.prepend(el);
320
+ $el.show();
321
+ } else {
322
+ $wrapper.show();
323
+ }
324
+
325
+ opentimer = setTimeout(function() {
326
+ $wrapper.css({
327
+ visibility: 'visible',
328
+ opacity: 1
329
+ });
330
+
331
+ $('html').addClass('popup_visible').addClass('popup_visible_' + el.id);
332
+ $wrapper.addClass('popup_wrapper_visible');
333
+ }, 20); // 20ms required for opening animation to occur in FF
334
+
335
+ // Disable background layer scrolling when popup is opened
336
+ if (options.scrolllock) {
337
+ $body.css('overflow', 'hidden');
338
+ if ($body.height() > $window.height()) {
339
+ $body.css('margin-right', bodymarginright + scrollbarwidth);
340
+ }
341
+ }
342
+
343
+ if(options.backgroundactive){
344
+ //calculates the vertical align
345
+ $el.css({
346
+ top:(
347
+ $window.height() - (
348
+ $el.get(0).offsetHeight +
349
+ parseInt($el.css('margin-top'), 10) +
350
+ parseInt($el.css('margin-bottom'), 10)
351
+ )
352
+ )/2 +'px'
353
+ });
354
+ }
355
+
356
+ $el.css({
357
+ 'visibility': 'visible',
358
+ 'opacity': 1
359
+ });
360
+
361
+ // Show background
362
+ if (options.background) {
363
+ $background.css({
364
+ 'visibility': 'visible',
365
+ 'opacity': options.opacity
366
+ });
367
+
368
+ // Fix IE8 issue with background not appearing
369
+ setTimeout(function() {
370
+ $background.css({
371
+ 'opacity': options.opacity
372
+ });
373
+ }, 0);
374
+ }
375
+
376
+ $el.data('popup-visible', true);
377
+
378
+ // Position popup
379
+ methods.reposition(el, ordinal);
380
+
381
+ // Remember which element had focus before opening a popup
382
+ $el.data('focusedelementbeforepopup', document.activeElement);
383
+
384
+ // Handler: Keep focus inside dialog box
385
+ if (options.keepfocus) {
386
+ // Make holder div focusable
387
+ $el.attr('tabindex', -1);
388
+
389
+ // Focus popup or user specified element.
390
+ // Initial timeout of 50ms is set to give some time to popup to show after clicking on
391
+ // `open` element, and after animation is complete to prevent background scrolling.
392
+ setTimeout(function() {
393
+ if (options.focuselement === 'closebutton') {
394
+ $('#' + el.id + ' .' + el.id + closesuffix + ':first').focus();
395
+ } else if (options.focuselement) {
396
+ $(options.focuselement).focus();
397
+ } else {
398
+ $el.focus();
399
+ }
400
+ }, options.focusdelay);
401
+
402
+ }
403
+
404
+ // Hide main content from screen readers
405
+ $(options.pagecontainer).attr('aria-hidden', true);
406
+
407
+ // Reveal popup content to screen readers
408
+ $el.attr('aria-hidden', false);
409
+
410
+ callback(el, ordinal, options.onopen);
411
+
412
+ if (transitionsupport) {
413
+ $wrapper.one('transitionend', function() {
414
+ callback(el, ordinal, options.opentransitionend);
415
+ });
416
+ } else {
417
+ callback(el, ordinal, options.opentransitionend);
418
+ }
419
+ },
420
+
421
+ /**
422
+ * Hide method
423
+ *
424
+ * @param {object} el - popup instance DOM node
425
+ */
426
+ hide: function (el) {
427
+ if(opentimer) clearTimeout(opentimer);
428
+
429
+ var $body = $('body');
430
+ var $el = $(el);
431
+ var options = $el.data('popupoptions');
432
+ var $wrapper = $('#' + el.id + '_wrapper');
433
+ var $background = $('#' + el.id + '_background');
434
+
435
+ $el.data('popup-visible', false);
436
+
437
+
438
+ if (stack.length === 1) {
439
+ $('html').removeClass('popup_visible').removeClass('popup_visible_' + el.id);
440
+ } else {
441
+ if($('html').hasClass('popup_visible_' + el.id)) {
442
+ $('html').removeClass('popup_visible_' + el.id);
443
+ }
444
+ }
445
+
446
+ // Remove last opened popup from the stack
447
+ stack.pop();
448
+
449
+ if($wrapper.hasClass('popup_wrapper_visible')) {
450
+ $wrapper.removeClass('popup_wrapper_visible');
451
+ }
452
+
453
+ if (options.keepfocus) {
454
+ // Focus back on saved element
455
+ setTimeout(function() {
456
+ if ($($el.data('focusedelementbeforepopup')).is(':visible')) {
457
+ $el.data('focusedelementbeforepopup').focus();
458
+ }
459
+ }, 0);
460
+ }
461
+
462
+ // Hide popup
463
+ $wrapper.css({
464
+ 'visibility': 'hidden',
465
+ 'opacity': 0
466
+ });
467
+ $el.css({
468
+ 'visibility': 'hidden',
469
+ 'opacity': 0
470
+ });
471
+
472
+ // Hide background
473
+ if (options.background) {
474
+ $background.css({
475
+ 'visibility': 'hidden',
476
+ 'opacity': 0
477
+ });
478
+ }
479
+
480
+ // Reveal main content to screen readers
481
+ $(options.pagecontainer).attr('aria-hidden', false);
482
+
483
+ // Hide popup content from screen readers
484
+ $el.attr('aria-hidden', true);
485
+
486
+ // `onclose` callback event
487
+ callback(el, lastclicked[el.id], options.onclose);
488
+
489
+ if (transitionsupport && $el.css('transition-duration') !== '0s') {
490
+ $el.one('transitionend', function(e) {
491
+
492
+ if (!($el.data('popup-visible'))) {
493
+ if (options.detach) {
494
+ $el.hide().detach();
495
+ } else {
496
+ $wrapper.hide();
497
+ }
498
+ }
499
+
500
+ // Re-enable scrolling of background layer
501
+ if (options.scrolllock) {
502
+ setTimeout(function() {
503
+ $body.css({
504
+ overflow: 'visible',
505
+ 'margin-right': bodymarginright
506
+ });
507
+ }, 10); // 10ms added for CSS transition in Firefox which doesn't like overflow:auto
508
+ }
509
+
510
+ callback(el, lastclicked[el.id], options.closetransitionend);
511
+ });
512
+ } else {
513
+ if (options.detach) {
514
+ $el.hide().detach();
515
+ } else {
516
+ $wrapper.hide();
517
+ }
518
+
519
+ // Re-enable scrolling of background layer
520
+ if (options.scrolllock) {
521
+ setTimeout(function() {
522
+ $body.css({
523
+ overflow: 'visible',
524
+ 'margin-right': bodymarginright
525
+ });
526
+ }, 10); // 10ms added for CSS transition in Firefox which doesn't like overflow:auto
527
+ }
528
+
529
+ callback(el, lastclicked[el.id], options.closetransitionend);
530
+ }
531
+
532
+ },
533
+
534
+ /**
535
+ * Toggle method
536
+ *
537
+ * @param {object} el - popup instance DOM node
538
+ * @param {number} ordinal - order number of an `open` element
539
+ */
540
+ toggle: function (el, ordinal) {
541
+ if ($(el).data('popup-visible')) {
542
+ methods.hide(el);
543
+ } else {
544
+ setTimeout(function() {
545
+ methods.show(el, ordinal);
546
+ }, 0);
547
+ }
548
+ },
549
+
550
+ /**
551
+ * Reposition method
552
+ *
553
+ * @param {object} el - popup instance DOM node
554
+ * @param {number} ordinal - order number of an `open` element
555
+ */
556
+ reposition: function (el, ordinal) {
557
+ var $el = $(el);
558
+ var options = $el.data('popupoptions');
559
+ var $wrapper = $('#' + el.id + '_wrapper');
560
+ var $background = $('#' + el.id + '_background');
561
+
562
+ ordinal = ordinal || 0;
563
+
564
+ // Tooltip type
565
+ if (options.type == 'tooltip') {
566
+ $wrapper.css({
567
+ 'position': 'absolute'
568
+ });
569
+
570
+ var $tooltipanchor;
571
+ if (options.tooltipanchor) {
572
+ $tooltipanchor = $(options.tooltipanchor);
573
+ } else if (options.openelement) {
574
+ $tooltipanchor = $(options.openelement).filter('[data-popup-ordinal="' + ordinal + '"]');
575
+ } else {
576
+ $tooltipanchor = $('.' + el.id + opensuffix + '[data-popup-ordinal="' + ordinal + '"]');
577
+ }
578
+
579
+ var linkOffset = $tooltipanchor.offset();
580
+
581
+ // Horizontal position for tooltip
582
+ if (options.horizontal == 'right') {
583
+ $wrapper.css('left', linkOffset.left + $tooltipanchor.outerWidth() + options.offsetleft);
584
+ } else if (options.horizontal == 'leftedge') {
585
+ $wrapper.css('left', linkOffset.left + $tooltipanchor.outerWidth() - $tooltipanchor.outerWidth() + options.offsetleft);
586
+ } else if (options.horizontal == 'left') {
587
+ $wrapper.css('right', $window.width() - linkOffset.left - options.offsetleft);
588
+ } else if (options.horizontal == 'rightedge') {
589
+ $wrapper.css('right', $window.width() - linkOffset.left - $tooltipanchor.outerWidth() - options.offsetleft);
590
+ } else {
591
+ $wrapper.css('left', linkOffset.left + ($tooltipanchor.outerWidth() / 2) - ($el.outerWidth() / 2) - parseFloat($el.css('marginLeft')) + options.offsetleft);
592
+ }
593
+
594
+ // Vertical position for tooltip
595
+ if (options.vertical == 'bottom') {
596
+ $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() + options.offsettop);
597
+ } else if (options.vertical == 'bottomedge') {
598
+ $wrapper.css('top', linkOffset.top + $tooltipanchor.outerHeight() - $el.outerHeight() + options.offsettop);
599
+ } else if (options.vertical == 'top') {
600
+ $wrapper.css('bottom', $window.height() - linkOffset.top - options.offsettop);
601
+ } else if (options.vertical == 'topedge') {
602
+ $wrapper.css('bottom', $window.height() - linkOffset.top - $el.outerHeight() - options.offsettop);
603
+ } else {
604
+ $wrapper.css('top', linkOffset.top + ($tooltipanchor.outerHeight() / 2) - ($el.outerHeight() / 2) - parseFloat($el.css('marginTop')) + options.offsettop);
605
+ }
606
+
607
+ // Overlay type
608
+ } else if (options.type == 'overlay') {
609
+
610
+ // Horizontal position for overlay
611
+ if (options.horizontal) {
612
+ $wrapper.css('text-align', options.horizontal);
613
+ } else {
614
+ $wrapper.css('text-align', 'center');
615
+ }
616
+
617
+ // Vertical position for overlay
618
+ if (options.vertical) {
619
+ $el.css('vertical-align', options.vertical);
620
+ } else {
621
+ $el.css('vertical-align', 'middle');
622
+ }
623
+ }
624
+ },
625
+
626
+ /**
627
+ * Add-close-button method
628
+ *
629
+ * @param {object} el - popup instance DOM node
630
+ */
631
+ addclosebutton: function (el) {
632
+ var genericCloseButton;
633
+
634
+ if ($(el).data('popupoptions').closebuttonmarkup) {
635
+ genericCloseButton = $(options.closebuttonmarkup).addClass(el.id + '_close');
636
+ } else {
637
+ genericCloseButton = '<button class="popup_close ' + el.id + '_close" title="Close" aria-label="Close"><span aria-hidden="true">×</span></button>';
638
+ }
639
+
640
+ if ($el.data('popup-initialized')){
641
+ $el.append(genericCloseButton);
642
+ }
643
+
644
+ }
645
+
646
+ };
647
+
648
+ /**
649
+ * Callback event calls
650
+ *
651
+ * @param {object} el - popup instance DOM node
652
+ * @param {number} ordinal - order number of an `open` element
653
+ * @param {function} func - callback function
654
+ */
655
+ var callback = function (el, ordinal, func) {
656
+ var options = $(el).data('popupoptions');
657
+ var openelement = (options.openelement) ? options.openelement : ('.' + el.id + opensuffix);
658
+ var elementclicked = $(openelement + '[data-popup-ordinal="' + ordinal + '"]');
659
+ if (typeof func == 'function') {
660
+ func.call($(el), el, elementclicked);
661
+ }
662
+ };
663
+
664
+ // Hide popup if ESC key is pressed
665
+ $(document).on('keydown', function (event) {
666
+ if(stack.length) {
667
+ var elementId = stack[stack.length - 1];
668
+ var el = document.getElementById(elementId);
669
+
670
+ if ($(el).data('popupoptions').escape && event.keyCode == 27) {
671
+ methods.hide(el);
672
+ }
673
+ }
674
+ });
675
+
676
+ // Hide popup on click
677
+ $(document).on('click', function (event) {
678
+ if(stack.length) {
679
+ var elementId = stack[stack.length - 1];
680
+ var el = document.getElementById(elementId);
681
+ var closeButton = ($(el).data('popupoptions').closeelement) ? $(el).data('popupoptions').closeelement : ('.' + el.id + closesuffix);
682
+
683
+ // Click on Close button
684
+ if ($(event.target).closest(closeButton).length) {
685
+ event.preventDefault();
686
+ methods.hide(el);
687
+ }
688
+
689
+ // Click outside of popup
690
+ if ($(el).data('popupoptions').blur && !$(event.target).closest('#' + elementId).length && event.which !== 2 && $(event.target).is(':visible')) {
691
+ methods.hide(el);
692
+
693
+ if ($(el).data('popupoptions').type === 'overlay') {
694
+ event.preventDefault(); // iOS will trigger click on the links below the overlay when clicked on the overlay if we don't prevent default action
695
+ }
696
+ }
697
+ }
698
+ });
699
+
700
+ // Keep keyboard focus inside of popup
701
+ $(document).on('focusin', function(event) {
702
+ if(stack.length) {
703
+ var elementId = stack[stack.length - 1];
704
+ var el = document.getElementById(elementId);
705
+
706
+ if ($(el).data('popupoptions').keepfocus) {
707
+ if (!el.contains(event.target)) {
708
+ event.stopPropagation();
709
+ el.focus();
710
+ }
711
+ }
712
+ }
713
+ });
714
+
715
+ /**
716
+ * Plugin API
717
+ */
718
+ $.fn.popup = function (customoptions) {
719
+ return this.each(function () {
720
+
721
+ $el = $(this);
722
+
723
+ if (typeof customoptions === 'object') { // e.g. $('#popup').popup({'color':'blue'})
724
+ var opt = $.extend({}, $.fn.popup.defaults, customoptions);
725
+ $el.data('popupoptions', opt);
726
+ options = $el.data('popupoptions');
727
+
728
+ methods._init(this);
729
+
730
+ } else if (typeof customoptions === 'string') { // e.g. $('#popup').popup('hide')
731
+ if (!($el.data('popupoptions'))) {
732
+ $el.data('popupoptions', $.fn.popup.defaults);
733
+ options = $el.data('popupoptions');
734
+ }
735
+
736
+ methods[customoptions].call(this, this);
737
+
738
+ } else { // e.g. $('#popup').popup()
739
+ if (!($el.data('popupoptions'))) {
740
+ $el.data('popupoptions', $.fn.popup.defaults);
741
+ options = $el.data('popupoptions');
742
+ }
743
+
744
+ methods._init(this);
745
+
746
+ }
747
+
748
+ });
749
+ };
750
+
751
+ $.fn.popup.defaults = {
752
+ type: 'overlay',
753
+ autoopen: false,
754
+ background: true,
755
+ backgroundactive: false,
756
+ color: 'black',
757
+ opacity: '0.5',
758
+ horizontal: 'center',
759
+ vertical: 'middle',
760
+ offsettop: 0,
761
+ offsetleft: 0,
762
+ escape: true,
763
+ blur: true,
764
+ setzindex: true,
765
+ autozindex: false,
766
+ scrolllock: false,
767
+ closebutton: false,
768
+ closebuttonmarkup: null,
769
+ keepfocus: true,
770
+ focuselement: null,
771
+ focusdelay: 50,
772
+ outline: false,
773
+ pagecontainer: null,
774
+ detach: false,
775
+ openelement: null,
776
+ closeelement: null,
777
+ transition: null,
778
+ tooltipanchor: null,
779
+ beforeopen: null,
780
+ onclose: null,
781
+ onopen: null,
782
+ opentransitionend: null,
783
+ closetransitionend: null
784
+ };
785
+
786
+ })(jQuery);
js/jquery/jquery.tools.min.js DELETED
@@ -1,19 +0,0 @@
1
- /*!
2
- * jQuery Tools v1.2.7 - The missing UI library for the Web
3
- *
4
- * overlay/overlay.js
5
- * scrollable/scrollable.js
6
- * scrollable/scrollable.autoscroll.js
7
- * scrollable/scrollable.navigator.js
8
- * toolbox/toolbox.expose.js
9
- *
10
- * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
11
- *
12
- * http://flowplayer.org/tools/
13
- *
14
- */
15
- (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.overlay={addEffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addEffect("default",function(b,c){var d=this.getConf(),e=a(window);d.fixed||(b.top+=e.scrollTop(),b.left+=e.scrollLeft()),b.position=d.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=Math.random().toString().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"Could not find Overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventDefault()}),a.extend(f,{load:function(d){if(f.isOpened())return f;var i=c[e.effect];if(!i)throw"Overlay: cannot find effect : \""+e.effect+"\"";e.oneInstance&&a.each(b,function(){this.close(d)}),d=d||a.Event(),d.type="onBeforeLoad",g.trigger(d);if(d.isDefaultPrevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerWidth({margin:!0}),q=j.outerHeight({margin:!0});typeof n=="string"&&(n=n=="center"?Math.max((h.height()-q)/2,0):parseInt(n,10)/100*h.height()),o=="center"&&(o=Math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onLoad",g.trigger(d))}),l&&e.closeOnClick&&a.mask.getMask().one("click",f.close),e.closeOnClick&&a(document).on("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeOnEsc&&a(document).on("keydown."+m,function(a){a.keyCode==27&&f.close(a)});return f},close:function(b){if(!f.isOpened())return f;b=b||a.Event(),b.type="onBeforeClose",g.trigger(b);if(!b.isDefaultPrevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onClose",g.trigger(b)}),a(document).off("click."+m+" keydown."+m),l&&a.mask.close();return f}},getOverlay:function(){return j},getTrigger:function(){return d},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a("<a class=\"close\"></a>"),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isFunction(c)&&(c={onBeforeLoad:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jQuery);
16
- (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function b(a,b){var c=parseInt(a.css(b),10);if(c)return c;var d=a[0].currentStyle;return d&&d.width&&parseInt(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),e.size>1&&(e.circular=!1),a.extend(f,{getConf:function(){return e},getIndex:function(){return i},getSize:function(){return f.getItems().size()},getNaviButtons:function(){return n.add(o)},getRoot:function(){return b},getItemWrap:function(){return h},getItems:function(){return h.find(e.item).not("."+e.clonedClass)},move:function(a,b){return f.seekTo(i+a,b)},next:function(a){return f.move(e.size,a)},prev:function(a){return f.move(-e.size,a)},begin:function(a){return f.seekTo(0,a)},end:function(a){return f.seekTo(f.getSize()-1,a)},focus:function(){d=f;return f},addItem:function(b){b=a(b),e.circular?(h.children().last().before(b),h.children().first().replaceWith(b.clone().addClass(e.clonedClass))):(h.append(b),o.removeClass("disabled")),g.trigger("onAddItem",[b]);return f},seekTo:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getSize()||b<-1)return f;var l=b;b.jquery?b=f.getItems().index(b):l=f.getItems().eq(b);var m=a.Event("onBeforeSeek");if(!k){g.trigger(m,[b,c]);if(m.isDefaultPrevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onSeek",[b])});return f}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}});if(e.circular){var k=f.getItems().slice(-1).clone().prependTo(h),l=f.getItems().eq(1).clone().appendTo(h);k.add(l).addClass(e.clonedClass),f.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1){f.seekTo(k,c,function(){f.end(0)});return a.preventDefault()}b==f.getSize()&&f.seekTo(l,c,function(){f.begin(0)})}});var m=b.parents().add(b).filter(function(){if(a(this).css("display")==="none")return!0});m.length?(m.show(),f.seekTo(0,0,function(){}),m.hide()):f.seekTo(0,0,function(){})}var n=c(b,e.prev).click(function(a){a.stopPropagation(),f.prev()}),o=c(b,e.next).click(function(a){a.stopPropagation(),f.next()});e.circular||(f.onBeforeSeek(function(a,b){setTimeout(function(){a.isDefaultPrevented()||(n.toggleClass(e.disabledClass,b<=0),o.toggleClass(e.disabledClass,b>=f.getSize()-1))},1)}),e.initialIndex||n.addClass(e.disabledClass)),f.getSize()<2&&n.add(o).addClass(e.disabledClass),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelSpeed||50);return!1}});if(e.touch){var p={};h[0].ontouchstart=function(a){var b=a.touches[0];p.x=b.clientX,p.y=b.clientY},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=p.x-b.clientX,d=p.y-b.clientY;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventDefault()}}}e.keyboard&&a(document).on("keydown.scrollable",function(b){if(!(!e.keyboard||b.altKey||b.ctrlKey||b.metaKey||a(b.target).is(":input"))){if(e.keyboard!="static"&&d!=f)return;var c=b.keyCode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventDefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventDefault()}}}),e.initialIndex&&f.seekTo(e.initialIndex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jQuery);
17
- (function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable"),c=b.getRoot(),f,g=!1;function h(){f&&clearTimeout(f),f=setTimeout(function(){b.next()},d.interval)}b&&(e=b),b.play=function(){f||(g=!1,c.on("onSeek",h),h())},b.pause=function(){f=clearTimeout(f),c.off("onSeek",h)},b.resume=function(){g||b.play()},b.stop=function(){g=!0,b.pause()},d.autopause&&c.add(b.getNaviButtons()).hover(b.pause,b.resume),d.autoplay&&b.play()});return d.api?e:this}})(jQuery);
18
- (function(a){var b=a.tools.scrollable;b.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}a.fn.navigator=function(d){typeof d=="string"&&(d={navi:d}),d=a.extend({},b.navigator.conf,d);var e;this.each(function(){var b=a(this).data("scrollable"),f=d.navi.jquery?d.navi:c(b.getRoot(),d.navi),g=b.getNaviButtons(),h=d.activeClass,i=d.history&&history.pushState,j=b.getConf().size;b&&(e=b),b.getNaviButtons=function(){return g.add(f)},i&&(history.pushState({i:0},""),a(window).on("popstate",function(a){var c=a.originalEvent.state;c&&b.seekTo(c.i)}));function k(a,c,d){b.seekTo(c),d.preventDefault(),i&&history.pushState({i:c},"")}function l(){return f.find(d.naviItem||"> *")}function m(b){var c=a("<"+(d.naviItem||"a")+"/>").click(function(c){k(a(this),b,c)});b===0&&c.addClass(h),d.indexed&&c.text(b+1),d.idPrefix&&c.attr("id",d.idPrefix+b);return c.appendTo(f)}l().length?l().each(function(b){a(this).click(function(c){k(a(this),b,c)})}):a.each(b.getItems(),function(a){a%j==0&&m(a)}),b.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var c=b/j,d=l().eq(c);d.length&&l().removeClass(h).eq(c).addClass(h)}},1)}),b.onAddItem(function(a,c){var d=b.getItems().index(c);d%j==0&&m(d)})});return d.api?e:this}})(jQuery);
19
- (function(a){a.tools=a.tools||{version:"v1.2.7"};var b;b=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};function c(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function d(b){if(b)return b.call(a.mask)}var e,f,g,h,i;a.mask={load:function(j,k){if(g)return this;typeof j=="string"&&(j={color:j}),j=j||h,h=j=a.extend(a.extend({},b.conf),j),e=a("#"+j.maskId),e.length||(e=a("<div/>").attr("id",j.maskId),a("body").append(e));var l=c();e.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:j.startOpacity,zIndex:j.zIndex}),j.color&&e.css("backgroundColor",j.color);if(d(j.onBeforeLoad)===!1)return this;j.closeOnEsc&&a(document).on("keydown.mask",function(b){b.keyCode==27&&a.mask.close(b)}),j.closeOnClick&&e.on("click.mask",function(b){a.mask.close(b)}),a(window).on("resize.mask",function(){a.mask.fit()}),k&&k.length&&(i=k.eq(0).css("zIndex"),a.each(k,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),f=k.css({zIndex:Math.max(j.zIndex+1,i=="auto"?0:i)})),e.css({display:"block"}).fadeTo(j.loadSpeed,j.opacity,function(){a.mask.fit(),d(j.onLoad),g="full"}),g=!0;return this},close:function(){if(g){if(d(h.onBeforeClose)===!1)return this;e.fadeOut(h.closeSpeed,function(){d(h.onClose),f&&f.css({zIndex:i}),g=!1}),a(document).off("keydown.mask"),e.off("click.mask"),a(window).off("resize.mask")}return this},fit:function(){if(g){var a=c();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?g=="full":g},getConf:function(){return h},getExposed:function(){return f}},a.fn.mask=function(b){a.mask.load(b);return this},a.fn.expose=function(b){a.mask.load(b,this);return this}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Addonline_Gls</name>
4
- <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>GLS, you transporter partner for parcels shipped from France (official)</summary>
10
  <description>With this extension, you will be able to offer your customers all the GLS France delivery solutions</description>
11
- <notes>RAS</notes>
12
- <authors><author><name>Addonline</name><user>addonline</user><email>contact@addonline.fr</email></author></authors>
13
- <date>2015-02-26</date>
14
- <time>14:56:36</time>
15
- <contents><target name="magecommunity"><dir name="Addonline"><dir name="Gls"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Config.php" hash="958fc83f82dd4faa008bd92869e5cc49"/><file name="Informations.php" hash="b372c0fbb1b84cc012782bc1cb99685c"/></dir></dir></dir></dir></dir><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="20eea349b8a4544a31da5927adc326dd"/></dir><file name="Orders.php" hash="19b038fe15bd7ccc445dbded573ba417"/></dir><dir name="Import"><file name="Form.php" hash="5017a2fc58636214a7e361dbf76d6406"/></dir><file name="Listrelay.php" hash="cb0fc25e5bf89de25b797e8dec0227de"/><dir name="OneStepCheckout"><file name="Checkout.php" hash="e797538c0576937b6670bc6de7297942"/></dir><file name="Selector.php" hash="5e226804c12cf7b843d06b430d63ab7d"/></dir><file name="GLS_14_GuideInstallationModuleMagento_07.pdf" hash="fe30a61e9539b84a24fda681e335aff8"/><file name="GLS_15_GuideInstallationModuleMagento_01.pdf" hash="b6d9411e427784e7f24b4a3959e15404"/><dir name="Helper"><file name="Data.php" hash="47a404020ca1e50f3d3dbf6dd1af0584"/><dir name="OneStepCheckout"><file name="Checkout.php" hash="4e2adceed7bff56bae6f57d321b6856e"/></dir></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="80ae42bc9a9ba267c0e623c9d9e93df8"/><file name="ShippingMethod.php" hash="7b03a4f9a6d198bfbe7a80ab48343afc"/></dir><file name="Cron.php" hash="ad4806a646f4bbb996660ea5e4cdee40"/><file name="Export.php" hash="ab9bf23432b42a902a60d19e87625716"/><file name="Import.php" hash="8751781105f3de91617234df651c11fa"/><file name="Observer.php" hash="ee5c92a8f6f8e419907555a80c3bd3e3"/><dir name="Os2"><dir name="Data"><file name="Abstract.php" hash="cf7d7d51c0908e9b5cc08224ee399636"/><file name="AbstractWithAttributes.php" hash="1aa1eb14f97aa3add7a0b64ef73bfe3b"/><file name="Address.php" hash="7c890ba9f1c53124857afbe6ae2c9f15"/><file name="AddressFilter.php" hash="dd42df6d750b32fd7cd7ac76ce08e3e8"/><file name="AttributeSet.php" hash="5d9c06b56ee855da5489991342b1eca2"/><file name="Billto.php" hash="3244e2dd918527f68ea29433c1c02eaf"/><file name="Cart.php" hash="72c3d3c57a7f366d97a4b4957a34272e"/><file name="CartItem.php" hash="b2067067bbb396d3f7c311d2b023a975"/><file name="Category.php" hash="c140772d71740330fbe66f8f79c7a3a5"/><file name="Customer.php" hash="9a2185b18922472a235fc69f022f00b8"/><file name="CustomerGroup.php" hash="c713d2f93ebbe1208b7d94b0a433b45e"/><file name="Customvar.php" hash="badab1052f9156aef76d5c1a0919348e"/><file name="Date.php" hash="3f93564d011f3f2b7d0caba6a1eddf28"/><file name="Info.php" hash="f2a9302fa56e58c027e7df18e6666ffa"/><file name="Product.php" hash="a48c5d512cc87950c25194fc1fdb27a9"/><file name="Quote.php" hash="9804f0da7dd9255b21d240ff59beed0b"/><file name="Selection.php" hash="b61d47ae7048ee2e86b622f4fb473236"/><file name="StockItem.php" hash="02252936341dd9ed77fa6e7205d43c14"/><file name="Store.php" hash="3d9b4033ff9689d9ed07d5c5fa5b68ad"/></dir></dir><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="81042978ab6a68114980f1fdfaed964d"/></dir></dir><file name="Service.php" hash="a23744b76b3316dc7c162ca856d32e2b"/><dir name="System"><dir name="Config"><dir name="Source"><file name="LoadOnParent.php" hash="9dd7fc02abf059f724220b8dc4559110"/><file name="ProcessChildren.php" hash="5fb9c1cf8600e9ead938869f95016267"/></dir></dir></dir><dir name="Webservice"><file name="PointsRelaisWSService.php" hash="e5d9ee0793a35ef36b110ca07d9701aa"/></dir></dir><file name="changelog" hash="db1f88f281b5b0d5d06beefe7c375610"/><dir name="controllers"><file name="AjaxController.php" hash="90db54e728ba6ad5f090636a13fedfd7"/><file name="ExportController.php" hash="ead490d32a1d7ab670538d63d08b519e"/><file name="ImportController.php" hash="0f0eab8e544dc8cbb9c7428c8e7d11e1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a250aa03bbef4cb0e2016a23d8797eb5"/><file name="config.xml" hash="5f3ffac140eb91e2e1ead930a04e0985"/><file name="system.xml" hash="00dc429d8b5023c4d84e7b4274666758"/></dir><dir name="owebia_includes"><file name="OS2_AddressFilter.php" hash="9a436fe014d55491a416adb0d8478d7e"/><file name="OS2_AddressFilterParser_GLS.php" hash="8f53f491dee35100dccfb6769577317d"/><file name="OS2_CustomerGroup.php" hash="55a9f08487bdbb310d0123737e0a7e9c"/><file name="OwebiaShippingHelper_GLS.php" hash="c22a635f8ec74c27eff6736b0ebd4b2b"/><dir name="cache"><file name="countries" hash="6b1a5494b6dddcc65f2946dbf0226c29"/></dir></dir><dir name="sql"><dir name="gls_setup"><file name="mysql4-install-1.0.0.php" hash="f6fc56f69d25c888f2d43ab2cf325660"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="8b7ae6e17330b2ae74eeb2fa3d51bc3d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><file name="gls" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Addonline_Gls.xml" hash="db260e73c2dad1f28966032a661336bf"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Addonline_Gls.csv" hash="b3a9aa22a1613fd15ceddbc56a817da4"/></dir><dir name="en_US"><file name="Addonline_Gls.csv" hash="361277241710af3dde1502dfc13435e0"/></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><file name="jquery-1.7.1.min.js" hash="ddb84c1587287b2df08966081ef063bf"/><file name="jquery-migrate-1.2.1.min.js" hash="eb05d8d73b5b13d8d84308a4751ece96"/><file name="jquery.noconflict.js" hash="47bba3ca4c65f94846c39e145bed446f"/><file name="jquery.tools.min.js" hash="b0d4ed5c2edf5bcb74cd615ee46feb79"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="gls.css" hash="3c5ad409ef17a88a45ba60a1197b2f9b"/></dir><dir name="js"><file name="gls.js" hash="82f2752351d717b1389423ca0de08816"/></dir><dir name="images"><dir name="gls"><file name="btn_fermer.png" hash="58a433ef56074381c61a3bc416605b8b"/><file name="marker.png" hash="4c52822636e198d8e407b143af2eb4b3"/><file name="marker_current.png" hash="9aad92afa544f45be79dd49977c71c54"/><file name="picto-arrow.png" hash="e6c75a88103b56cde0c8f2f5db1abba2"/><file name="picto-layer.png" hash="929fe8d0ce49c03585c33624995849c5"/><file name="picto_fds.png" hash="bef73f993193aaa6b24b3e43dc893261"/><file name="picto_relay.png" hash="929fe8d0ce49c03585c33624995849c5"/><file name="picto_tohome.png" hash="d1cffa214082dc6d763488101a1bb256"/><file name="search-repeat.png" hash="ddf661a783afc11958972a86278c818b"/><file name="title-repeat.png" hash="ffc9c726e21a9dc862c29283500aa271"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Addonline_Gls</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>GLS, you transporter partner for parcels shipped from France (official)</summary>
10
  <description>With this extension, you will be able to offer your customers all the GLS France delivery solutions</description>
11
+ <notes></notes>
12
+ <authors><author><name>Addonline</name><user>addonline</user><email>contact@addonline.fr</email></author><author><name>Addonline</name><user>addonline</user><email>contact@addonline.fr</email></author></authors>
13
+ <date>2015-06-22</date>
14
+ <time>09:36:34</time>
15
+ <contents><target name="magecommunity"><dir name="Addonline"><dir name="Gls"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Config.php" hash="958fc83f82dd4faa008bd92869e5cc49"/><file name="Informations.php" hash="b372c0fbb1b84cc012782bc1cb99685c"/></dir></dir></dir></dir></dir><dir name="Export"><dir name="Orders"><file name="Grid.php" hash="e80cafec957bbff31969c3ffd4cf8a0d"/></dir><file name="Orders.php" hash="19b038fe15bd7ccc445dbded573ba417"/></dir><dir name="Import"><file name="Form.php" hash="5017a2fc58636214a7e361dbf76d6406"/></dir><file name="Listrelay.php" hash="cb0fc25e5bf89de25b797e8dec0227de"/><dir name="OneStepCheckout"><file name="Checkout.php" hash="e797538c0576937b6670bc6de7297942"/></dir><file name="Selector.php" hash="5e226804c12cf7b843d06b430d63ab7d"/></dir><file name="GLS_15_GuideInstallationModuleMagento_01.pdf" hash="b6d9411e427784e7f24b4a3959e15404"/><dir name="Helper"><file name="Data.php" hash="47a404020ca1e50f3d3dbf6dd1af0584"/><dir name="OneStepCheckout"><file name="Checkout.php" hash="4e2adceed7bff56bae6f57d321b6856e"/></dir></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="214665381e3b6c990546f923fab81dac"/><file name="ShippingMethod.php" hash="7b03a4f9a6d198bfbe7a80ab48343afc"/></dir><file name="Cron.php" hash="d41511d74c7d54d9b04ac7299b28bab5"/><file name="Export.php" hash="5c34f17471ad8d97e2f8439263f8104e"/><file name="Import.php" hash="8751781105f3de91617234df651c11fa"/><file name="Observer.php" hash="ee5c92a8f6f8e419907555a80c3bd3e3"/><dir name="Os2"><dir name="Data"><file name="Abstract.php" hash="cf7d7d51c0908e9b5cc08224ee399636"/><file name="AbstractWithAttributes.php" hash="1aa1eb14f97aa3add7a0b64ef73bfe3b"/><file name="Address.php" hash="7c890ba9f1c53124857afbe6ae2c9f15"/><file name="AddressFilter.php" hash="dd42df6d750b32fd7cd7ac76ce08e3e8"/><file name="AttributeSet.php" hash="5d9c06b56ee855da5489991342b1eca2"/><file name="Billto.php" hash="3244e2dd918527f68ea29433c1c02eaf"/><file name="Cart.php" hash="72c3d3c57a7f366d97a4b4957a34272e"/><file name="CartItem.php" hash="b2067067bbb396d3f7c311d2b023a975"/><file name="Category.php" hash="c140772d71740330fbe66f8f79c7a3a5"/><file name="Customer.php" hash="9a2185b18922472a235fc69f022f00b8"/><file name="CustomerGroup.php" hash="c713d2f93ebbe1208b7d94b0a433b45e"/><file name="Customvar.php" hash="badab1052f9156aef76d5c1a0919348e"/><file name="Date.php" hash="3f93564d011f3f2b7d0caba6a1eddf28"/><file name="Info.php" hash="f2a9302fa56e58c027e7df18e6666ffa"/><file name="Product.php" hash="a48c5d512cc87950c25194fc1fdb27a9"/><file name="Quote.php" hash="9804f0da7dd9255b21d240ff59beed0b"/><file name="Selection.php" hash="b61d47ae7048ee2e86b622f4fb473236"/><file name="StockItem.php" hash="02252936341dd9ed77fa6e7205d43c14"/><file name="Store.php" hash="3d9b4033ff9689d9ed07d5c5fa5b68ad"/></dir></dir><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="6d73e55c89ed399e3a9f6626cff8fa50"/></dir></dir><file name="Service.php" hash="a23744b76b3316dc7c162ca856d32e2b"/><dir name="System"><dir name="Config"><dir name="Source"><file name="LoadOnParent.php" hash="9dd7fc02abf059f724220b8dc4559110"/><file name="ProcessChildren.php" hash="5fb9c1cf8600e9ead938869f95016267"/></dir></dir></dir><dir name="Webservice"><file name="PointsRelaisWSService.php" hash="e5d9ee0793a35ef36b110ca07d9701aa"/></dir><file name="agencies.php" hash="df85a7951de65f6fad658b7b46f3f41c"/></dir><file name="changelog" hash="a498fa5ac793d8c591178f3e29303498"/><dir name="controllers"><file name="AjaxController.php" hash="90db54e728ba6ad5f090636a13fedfd7"/><file name="ExportController.php" hash="ead490d32a1d7ab670538d63d08b519e"/><file name="ImportController.php" hash="0f0eab8e544dc8cbb9c7428c8e7d11e1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8f8db77beabeb39794180669e2fd2ca7"/><file name="config.xml" hash="2b80efd1620c1a79bf2c925ddc422a21"/><file name="system.xml" hash="af651cab326d769c965c1ef5f0f4cb48"/></dir><dir name="owebia_includes"><file name="OS2_AddressFilter.php" hash="9a436fe014d55491a416adb0d8478d7e"/><file name="OS2_AddressFilterParser_GLS.php" hash="8f53f491dee35100dccfb6769577317d"/><file name="OS2_CustomerGroup.php" hash="55a9f08487bdbb310d0123737e0a7e9c"/><file name="OwebiaShippingHelper_GLS.php" hash="18340811da9062803e1aef8d347097c2"/><dir name="cache"><file name="countries" hash="6b1a5494b6dddcc65f2946dbf0226c29"/></dir></dir><dir name="sql"><dir name="gls_setup"><file name="mysql4-install-1.0.0.php" hash="f6fc56f69d25c888f2d43ab2cf325660"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="8b7ae6e17330b2ae74eeb2fa3d51bc3d"/><file name="mysql4-upgrade-1.0.9-1.1.0.php" hash="e011452a7a4ca65162692e70ca64882d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="gls"><dir name="configuration"><file name="form.phtml" hash="6881f6dfac3b32fcf2385d517fed80c1"/></dir><dir name="import"><file name="form.phtml" hash="6881f6dfac3b32fcf2385d517fed80c1"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="gls"><file name="additional.phtml" hash="b2635507a34abe0f65ef68a9c93b5ad4"/><file name="listrelais.phtml" hash="fad74f580a70d17856a06f3f12d41dc6"/><file name="selector.phtml" hash="59f7560e2298536046915df09ff246b5"/></dir></dir><dir name="layout"><file name="gls.xml" hash="8d9bc61ecfebfe6e648e93716aa117c5"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Addonline_Gls.xml" hash="db260e73c2dad1f28966032a661336bf"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Addonline_Gls.csv" hash="361277241710af3dde1502dfc13435e0"/></dir><dir name="fr_FR"><file name="Addonline_Gls.csv" hash="b3a9aa22a1613fd15ceddbc56a817da4"/></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><file name="jquery-2.1.3.min.js" hash="32015dd42e9582a80a84736f5d9a44d7"/><file name="jquery.noconflict.js" hash="47bba3ca4c65f94846c39e145bed446f"/><file name="jquery.popupoverlay.js" hash="56a150e5daf14aec20322e9385b00c5e"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="gls.css" hash="8359df6e0a2ad1ff5bc67c915fa5a38d"/></dir><dir name="images"><dir name="gls"><file name="btn_fermer.png" hash="58a433ef56074381c61a3bc416605b8b"/><file name="marker.png" hash="4c52822636e198d8e407b143af2eb4b3"/><file name="marker_current.png" hash="9aad92afa544f45be79dd49977c71c54"/><file name="picto-arrow.png" hash="e6c75a88103b56cde0c8f2f5db1abba2"/><file name="picto-layer.png" hash="929fe8d0ce49c03585c33624995849c5"/><file name="picto_express.png" hash="e58eb7cd0dbf87e13b2f3b731480e26e"/><file name="picto_fds.png" hash="717cc44d37205b3067f0d5243e61b6da"/><file name="picto_relay.png" hash="e5899f45368c214e517fd07a397a7ed3"/><file name="picto_tohome.png" hash="c121e6ef1e046c8dd8d0a93de7f2b770"/><file name="search-repeat.png" hash="ddf661a783afc11958972a86278c818b"/><file name="title-repeat.png" hash="ffc9c726e21a9dc862c29283500aa271"/></dir></dir><dir name="js"><file name="gls.js" hash="e8304e44d07f07b2db3fb4bb625184aa"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/css/gls.css CHANGED
@@ -1 +1,375 @@
1
- dd.s_method_gls li{position:relative;margin-bottom:30px}dd.s_method_gls li img{position:absolute;top:-8px;left:25px;height:40px;width:79px}dd.s_method_gls li input{margin-right:105px}dd.s_method_gls li span.price{color:#f18200}dd.s_method_gls #gls_relais_choisi{margin:20px 0 0 82px;border-left:1px solid #d4d4d4;padding:0 0 0 10px;position:relative;line-height:normal;color:#666666}dd.s_method_gls #gls_relais_choisi span{font-weight:bold}dd.s_method_gls #gls_relais_choisi .modifier_relay{color:#1e7ec8;font-weight:normal;text-decoration:underline;cursor:pointer}#layer_gls{position:relative;display:none;width:950px;background:#fff;z-index:1000;text-align:left;border-radius:10px}#layer_gls .close{position:absolute;top:15px;right:15px;cursor:pointer;width:22px;height:22px;background:url(../images/gls/btn_fermer.png)}#layer_gls h3{background:url(../images/gls/title-repeat.png);line-height:58px;margin:-15px -15px 0 -15px;border-radius:10px 10px 0 0;font-size:24px;font-weight:normal;color:#fff;padding-left:110px;position:relative}#layer_gls h3:before{content:"";width:85px;height:43px;position:absolute;top:9px;left:15px;background:url(../images/gls/picto-layer.png)}#layer_gls #gls_headers{background:url(../images/gls/search-repeat.png) repeat-x 0 100%;margin:0 -15px 15px;padding:0 15px 15px 15px;height:75px}#layer_gls #gls_headers .left_gls{margin-top:15px;clear:both !important}#layer_gls #gls_headers .left_gls span{font-size:14px;font-weight:bold;color:#06187c;margin-right:10px;vertical-align:middle;padding:0 5px}#layer_gls #gls_headers .left_gls input{padding:0 10px;width:40px;height:23px;border-radius:8px;background-color:#fff;box-shadow:inset 0 3px 3px rgba(214,214,214,0.75);border:solid 1px #d2d2d2;vertical-align:middle;box-sizing:content-box}#layer_gls #gls_headers .left_gls #adresse_recherche{width:270px;margin-right:10px}#layer_gls #gls_headers .left_gls #city_recherche{border-radius:8px 0 0 8px;width:90px}#layer_gls #gls_headers .left_gls #cp_rechercher{width:40px}#layer_gls #gls_headers .left_gls #num_telephone{width:70px}#layer_gls #gls_headers .left_gls button{background:none;border:none;margin:0 0 0 -10px;padding:0;cursor:pointer;font-size:12px;text-shadow:0 -1px #112282;color:#fff;width:92px;height:25px;border-radius:0 8px 8px 0;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#8b94c2', EndColorStr='#06187c');background-image:-webkit-linear-gradient(bottom, #06187c, #8b94c2);background-image:linear-gradient(to top, #06187c, #8b94c2);vertical-align:middle}#layer_gls #gls_headers .right_gls{margin-top:15px;float:right}#layer_gls #gls_headers .right_gls label{font-size:14px;color:#06187c;margin-right:10px;vertical-align:middle}#layer_gls #gls_headers .right_gls label input{vertical-align:middle}#layer_gls #gls_headers .right_gls #num_telephone{vertical-align:middle;padding:0 10px;width:130px;height:23px;border-radius:8px;background-color:#fff;box-shadow:inset 0 3px 3px rgba(214,214,214,0.75);border:solid 1px #d2d2d2}#layer_gls #col_gauche_gls{width:646px;height:353px;float:left;border:1px solid #d6d8e9}#layer_gls #col_gauche_gls #map_gls{height:100%}#layer_gls #col_gauche_gls #map_gls .info-window{width:415px;line-height:1.35;overflow:hidden;white-space:nowrap}#layer_gls #col_gauche_gls #map_gls .info-window .store-name{font-weight:bold;font-size:14px;color:#06187c;display:block}#layer_gls #col_gauche_gls #map_gls .info-window table{width:255px;margin-top:10px}#layer_gls #col_gauche_gls #map_gls .info-window table .day{width:80px}#layer_gls #col_gauche_gls #map_gls .info-window .choose-relay-point{padding:0 15px 0 25px;height:26px;border-radius:8px;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcd83b', EndColorStr='#e8b402');background-image:-webkit-linear-gradient(bottom, #e8b402, #fcd83b);background-image:linear-gradient(to top, #e8b402, #fcd83b);font-size:12px;color:#000;text-shadow:0 1px #f7e38b;text-decoration:none;line-height:26px;position:absolute;top:68px;right:0}#layer_gls #col_gauche_gls #map_gls .info-window .choose-relay-point:before{content:"";width:7px;height:10px;position:absolute;top:9px;left:12px;background:url(../images/gls/picto-arrow.png)}#layer_gls .gls_ws_error{position:absolute;top:50px;right:0;bottom:0;left:0;padding-left:463px;padding-top:65px;z-index:9;color:red;text-align:left;font-size:14px}#layer_gls #col_droite_gls{width:268px;height:353px;float:right;border:1px solid #d6d8e9;border-left:none;overflow:hidden;overflow-y:scroll;position:relative}#layer_gls #col_droite_gls .gls_point_relay{padding:15px;border-bottom:1px solid #d6d8e9;line-height:normal}#layer_gls #col_droite_gls .gls_point_relay.current{background:#eeeff7}#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_name{font-weight:bold;font-size:14px;color:#06187c;display:block}#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_address,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_zipcode,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_city{color:#6a6a6a}#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_address{display:block}#layer_gls #col_droite_gls .gls_point_relay div{margin-top:5px;overflow:hidden}#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_horaires{float:left;color:#06187c;text-decoration:underline;cursor:pointer;margin-top:5px}#layer_gls #col_droite_gls .gls_point_relay .choose-relay-point{border:none;background:none;cursor:pointer;float:right;padding:0 15px 0 25px;height:26px;border-radius:8px;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcd83b', EndColorStr='#e8b402');background-image:-webkit-linear-gradient(bottom, #e8b402, #fcd83b);background-image:linear-gradient(to top, #e8b402, #fcd83b);font-size:12px;color:#000;text-shadow:0 1px #f7e38b;text-decoration:none;line-height:26px;position:relative}#layer_gls #col_droite_gls .gls_point_relay .choose-relay-point:before{content:"";width:7px;height:10px;position:absolute;top:9px;left:12px;background:url(../images/gls/picto-arrow.png)}#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_latitude,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_longitude,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_hours,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_id,#layer_gls #col_droite_gls .gls_point_relay .GLS_relay_index{display:none}.layer>div>div{overflow:auto}#layer_gls>div>div{padding:15px}#layer_gls .loader-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;z-index:999}#layer_gls .loader{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000;background:#000;opacity:0.2}#layer_gls .loader-wheel{position:absolute;top:50%;left:50%;margin:-50px 0 0 -16px;width:100px;background:#fff;border:1px solid 000;border-radius:3px;text-align:center;z-index:1001;color:#878787;font-style:italic}#layer_gls .loader-wheel img{display:block;margin:auto}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2014 GLS
2
+ *
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * It is available through the world-wide-web at this URL:
7
+ * http://opensource.org/licenses/osl-3.0.php
8
+ *
9
+ * @category Addonline
10
+ * @package Addonline_Gls
11
+ * @copyright Copyright (c) 2014 GLS
12
+ * @author Addonline (http://www.addonline.fr)
13
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14
+ */
15
+ dd.s_method_gls li {
16
+ position: relative;
17
+ margin-bottom: 30px;
18
+ }
19
+ dd.s_method_gls li img {
20
+ position: absolute;
21
+ top: -8px;
22
+ left: 35px;
23
+ height: 40px;
24
+ width: 79px;
25
+ }
26
+ dd.s_method_gls li label {
27
+ padding-left: 120px !important;
28
+ }
29
+ dd.s_method_gls li input {
30
+ margin-right: 105px;
31
+ }
32
+ dd.s_method_gls li span.price {
33
+ color: #f18200;
34
+ }
35
+ dd.s_method_gls #gls_relais_choisi {
36
+ margin: 20px 0 0 82px;
37
+ border-left: 1px solid #d4d4d4;
38
+ padding: 0 0 0 10px;
39
+ position: relative;
40
+ line-height: normal;
41
+ color: #666666;
42
+ }
43
+ dd.s_method_gls #gls_relais_choisi span {
44
+ font-weight: bold;
45
+ }
46
+ dd.s_method_gls #gls_relais_choisi .modifier_relay {
47
+ color: #1e7ec8;
48
+ font-weight: normal;
49
+ text-decoration: underline;
50
+ cursor: pointer;
51
+ }
52
+ #layer_gls {
53
+ position: relative;
54
+ display: none;
55
+ width: 950px;
56
+ background: #fff;
57
+ z-index: 1000;
58
+ text-align: left;
59
+ border-radius: 10px;
60
+ }
61
+ #layer_gls .close {
62
+ position: absolute;
63
+ top: 15px;
64
+ right: 15px;
65
+ cursor: pointer;
66
+ width: 22px;
67
+ height: 22px;
68
+ background: url(../images/gls/btn_fermer.png);
69
+ }
70
+ #layer_gls h3 {
71
+ background: url(../images/gls/title-repeat.png);
72
+ line-height: 58px;
73
+ margin: -15px -15px 0 -15px;
74
+ border-radius: 10px 10px 0 0;
75
+ font-size: 24px;
76
+ font-weight: normal;
77
+ color: #fff;
78
+ padding-left: 110px;
79
+ position: relative;
80
+ }
81
+ #layer_gls h3:before {
82
+ content: "";
83
+ width: 85px;
84
+ height: 43px;
85
+ position: absolute;
86
+ top: 9px;
87
+ left: 15px;
88
+ background: url(../images/gls/picto-layer.png);
89
+ }
90
+ #layer_gls #gls_headers {
91
+ background: url(../images/gls/search-repeat.png) repeat-x 0 100%;
92
+ margin: 0 -15px 15px;
93
+ padding: 0 15px 15px 15px;
94
+ height: 75px;
95
+ }
96
+ #layer_gls #gls_headers .left_gls {
97
+ margin-top: 15px;
98
+ clear: both !important;
99
+ }
100
+ #layer_gls #gls_headers .left_gls span {
101
+ font-size: 14px;
102
+ font-weight: bold;
103
+ color: #06187c;
104
+ margin-right: 10px;
105
+ vertical-align: middle;
106
+ padding: 0 5px;
107
+ }
108
+ #layer_gls #gls_headers .left_gls input {
109
+ padding: 0 10px;
110
+ width: 40px;
111
+ height: 23px;
112
+ border-radius: 8px;
113
+ background-color: #fff;
114
+ -webkit-box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
115
+ -moz-box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
116
+ box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
117
+ border: solid 1px #d2d2d2;
118
+ vertical-align: middle;
119
+ box-sizing: content-box;
120
+ }
121
+ #layer_gls #gls_headers .left_gls #adresse_recherche {
122
+ width: 270px;
123
+ margin-right: 10px;
124
+ }
125
+ #layer_gls #gls_headers .left_gls #city_recherche {
126
+ border-radius: 8px 0 0 8px;
127
+ width: 90px;
128
+ }
129
+ #layer_gls #gls_headers .left_gls #cp_rechercher {
130
+ width: 40px;
131
+ }
132
+ #layer_gls #gls_headers .left_gls #num_telephone {
133
+ width: 70px;
134
+ }
135
+ #layer_gls #gls_headers .left_gls button {
136
+ background: none;
137
+ border: none;
138
+ margin: 0 0 0 -10px;
139
+ padding: 0;
140
+ cursor: pointer;
141
+ font-size: 12px;
142
+ text-shadow: 0 -1px #112282;
143
+ color: #fff;
144
+ width: 92px;
145
+ height: 25px;
146
+ -webkit-border-radius: 0 8px 8px 0;
147
+ -moz-border-radius: 0 8px 8px 0;
148
+ border-radius: 0 8px 8px 0;
149
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#8b94c2', EndColorStr='#06187c');
150
+ background-image: -webkit-linear-gradient(bottom, #06187c, #8b94c2);
151
+ background-image: -moz-linear-gradient(bottom, #06187c, #8b94c2);
152
+ background-image: -o-linear-gradient(bottom, #06187c, #8b94c2);
153
+ background-image: linear-gradient(to top, #06187c, #8b94c2);
154
+ vertical-align: middle;
155
+ }
156
+ #layer_gls #gls_headers .right_gls {
157
+ margin-top: 15px;
158
+ float: right;
159
+ }
160
+ #layer_gls #gls_headers .right_gls label {
161
+ font-size: 14px;
162
+ color: #06187c;
163
+ margin-right: 10px;
164
+ vertical-align: middle;
165
+ }
166
+ #layer_gls #gls_headers .right_gls label input {
167
+ vertical-align: middle;
168
+ }
169
+ #layer_gls #gls_headers .right_gls #num_telephone {
170
+ vertical-align: middle;
171
+ padding: 0 10px;
172
+ width: 130px;
173
+ height: 23px;
174
+ -webkit-border-radius: 8px;
175
+ -moz-border-radius: 8px;
176
+ border-radius: 8px;
177
+ background-color: #fff;
178
+ -webkit-box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
179
+ -moz-box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
180
+ box-shadow: inset 0 3px 3px rgba(214, 214, 214, 0.75);
181
+ border: solid 1px #d2d2d2;
182
+ }
183
+ #layer_gls #col_gauche_gls {
184
+ width: 646px;
185
+ height: 353px;
186
+ float: left;
187
+ border: 1px solid #d6d8e9;
188
+ }
189
+ #layer_gls #col_gauche_gls #map_gls {
190
+ height: 100%;
191
+ }
192
+ #layer_gls #col_gauche_gls #map_gls .info-window {
193
+ width: 415px;
194
+ line-height: 1.35;
195
+ overflow: hidden;
196
+ white-space: nowrap;
197
+ }
198
+ #layer_gls #col_gauche_gls #map_gls .info-window .store-name {
199
+ font-weight: bold;
200
+ font-size: 14px;
201
+ color: #06187c;
202
+ display: block;
203
+ }
204
+ #layer_gls #col_gauche_gls #map_gls .info-window table {
205
+ width: 255px;
206
+ margin-top: 10px;
207
+ }
208
+ #layer_gls #col_gauche_gls #map_gls .info-window table .day {
209
+ width: 80px;
210
+ }
211
+ #layer_gls #col_gauche_gls #map_gls .info-window .choose-relay-point {
212
+ padding: 0 15px 0 25px;
213
+ height: 26px;
214
+ -webkit-border-radius: 8px;
215
+ -moz-border-radius: 8px;
216
+ border-radius: 8px;
217
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcd83b', EndColorStr='#e8b402');
218
+ background-image: -webkit-linear-gradient(bottom, #e8b402, #fcd83b);
219
+ background-image: -moz-linear-gradient(bottom, #e8b402, #fcd83b);
220
+ background-image: -o-linear-gradient(bottom, #e8b402, #fcd83b);
221
+ background-image: linear-gradient(to top, #e8b402, #fcd83b);
222
+ font-size: 12px;
223
+ color: #000;
224
+ text-shadow: 0 1px #f7e38b;
225
+ text-decoration: none;
226
+ line-height: 26px;
227
+ position: absolute;
228
+ top: 68px;
229
+ right: 0;
230
+ }
231
+ #layer_gls #col_gauche_gls #map_gls .info-window .choose-relay-point:before {
232
+ content: "";
233
+ width: 7px;
234
+ height: 10px;
235
+ position: absolute;
236
+ top: 9px;
237
+ left: 12px;
238
+ background: url(../images/gls/picto-arrow.png);
239
+ }
240
+ #layer_gls .gls_ws_error {
241
+ position: absolute;
242
+ top: 50px;
243
+ right: 0;
244
+ bottom: 0;
245
+ left: 0;
246
+ padding-left: 463px;
247
+ padding-top: 65px;
248
+ z-index: 9;
249
+ color: red;
250
+ text-align: left;
251
+ font-size: 14px;
252
+ }
253
+ #layer_gls #col_droite_gls {
254
+ width: 268px;
255
+ height: 353px;
256
+ float: right;
257
+ border: 1px solid #d6d8e9;
258
+ border-left: none;
259
+ overflow: hidden;
260
+ overflow-y: scroll;
261
+ position: relative;
262
+ }
263
+ #layer_gls #col_droite_gls .gls_point_relay {
264
+ padding: 15px;
265
+ border-bottom: 1px solid #d6d8e9;
266
+ line-height: normal;
267
+ }
268
+ #layer_gls #col_droite_gls .gls_point_relay.current {
269
+ background: #eeeff7;
270
+ }
271
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_name {
272
+ font-weight: bold;
273
+ font-size: 14px;
274
+ color: #06187c;
275
+ display: block;
276
+ }
277
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_address,
278
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_zipcode,
279
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_city {
280
+ color: #6a6a6a;
281
+ }
282
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_address {
283
+ display: block;
284
+ }
285
+ #layer_gls #col_droite_gls .gls_point_relay div {
286
+ margin-top: 5px;
287
+ overflow: hidden;
288
+ }
289
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_horaires {
290
+ float: left;
291
+ color: #06187c;
292
+ text-decoration: underline;
293
+ cursor: pointer;
294
+ margin-top: 5px;
295
+ }
296
+ #layer_gls #col_droite_gls .gls_point_relay .choose-relay-point {
297
+ border: none;
298
+ background: none;
299
+ cursor: pointer;
300
+ float: right;
301
+ padding: 0 15px 0 25px;
302
+ height: 26px;
303
+ -webkit-border-radius: 8px;
304
+ -moz-border-radius: 8px;
305
+ border-radius: 8px;
306
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcd83b', EndColorStr='#e8b402');
307
+ background-image: -webkit-linear-gradient(bottom, #e8b402, #fcd83b);
308
+ background-image: -moz-linear-gradient(bottom, #e8b402, #fcd83b);
309
+ background-image: -o-linear-gradient(bottom, #e8b402, #fcd83b);
310
+ background-image: linear-gradient(to top, #e8b402, #fcd83b);
311
+ font-size: 12px;
312
+ color: #000;
313
+ text-shadow: 0 1px #f7e38b;
314
+ text-decoration: none;
315
+ line-height: 26px;
316
+ position: relative;
317
+ }
318
+ #layer_gls #col_droite_gls .gls_point_relay .choose-relay-point:before {
319
+ content: "";
320
+ width: 7px;
321
+ height: 10px;
322
+ position: absolute;
323
+ top: 9px;
324
+ left: 12px;
325
+ background: url(../images/gls/picto-arrow.png);
326
+ }
327
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_latitude,
328
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_longitude,
329
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_hours,
330
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_id,
331
+ #layer_gls #col_droite_gls .gls_point_relay .GLS_relay_index {
332
+ display: none;
333
+ }
334
+ .layer > div > div {
335
+ overflow: auto;
336
+ }
337
+ #layer_gls > div > div {
338
+ padding: 15px;
339
+ }
340
+ #layer_gls .loader-wrapper {
341
+ position: absolute;
342
+ top: 0;
343
+ left: 0;
344
+ width: 100%;
345
+ height: 100%;
346
+ z-index: 999;
347
+ }
348
+ #layer_gls .loader {
349
+ position: absolute;
350
+ top: 0;
351
+ left: 0;
352
+ width: 100%;
353
+ height: 100%;
354
+ z-index: 1000;
355
+ background: #000;
356
+ opacity: 0.2;
357
+ }
358
+ #layer_gls .loader-wheel {
359
+ position: absolute;
360
+ top: 50%;
361
+ left: 50%;
362
+ margin: -50px 0 0 -16px;
363
+ width: 100px;
364
+ background: #fff;
365
+ border: 1px solid 000;
366
+ border-radius: 3px;
367
+ text-align: center;
368
+ z-index: 1001;
369
+ color: #878787;
370
+ font-style: italic;
371
+ }
372
+ #layer_gls .loader-wheel img {
373
+ display: block;
374
+ margin: auto;
375
+ }
skin/frontend/base/default/images/gls/picto_express.png ADDED
Binary file
skin/frontend/base/default/images/gls/picto_fds.png CHANGED
Binary file
skin/frontend/base/default/images/gls/picto_relay.png CHANGED
Binary file
skin/frontend/base/default/images/gls/picto_tohome.png CHANGED
Binary file
skin/frontend/base/default/js/gls.js CHANGED
@@ -1,441 +1,433 @@
1
- /**
2
- * Copyright (c) 2014 GLS
3
- *
4
- * NOTICE OF LICENSE
5
- *
6
- * This source file is subject to the Open Software License (OSL 3.0)
7
- * It is available through the world-wide-web at this URL:
8
- * http://opensource.org/licenses/osl-3.0.php
9
- *
10
- * @category Addonline
11
- * @package Addonline_Gls
12
- * @copyright Copyright (c) 2014 GLS
13
- * @author Addonline (http://www.addonline.fr)
14
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
- */
16
-
17
- /**
18
- * Fonction startWith sur l'objet String de javascript
19
- */
20
- String.prototype.startWith = function(t, i) { if (i==false) { return
21
- (t == this.substring(0, t.length)); } else { return (t.toLowerCase()
22
- == this.substring(0, t.length).toLowerCase()); } }
23
-
24
- /**
25
- * Variables globales
26
- */
27
-
28
- var glsMyPosition;
29
- var glsListRelais=new Array();
30
- var glsRelayMap;
31
- var glsOpenedInfowindow;
32
- var glsRelaisChoisi;
33
-
34
- /* Liste des markers */
35
- var glsMarkersArray = [];
36
-
37
- /*
38
- * Suppression des markers
39
- */
40
- function clearMarkers() {
41
- for (var i = 0; i < glsMarkersArray.length; i++ ) {
42
- glsMarkersArray[i].setMap(null);
43
- }
44
- glsMarkersArray.length = 0;
45
- }
46
-
47
- /**
48
- * Initialisation au chargement de la page
49
- */
50
- jQuery(function($) {
51
-
52
-
53
- // Cas du onestep checkout, si on change l'adresse de livraison après avoir
54
- // choisi gls
55
- jQuery('.onestepcheckout-index-index .address-select').on("change", function() {
56
- if(jQuery('#gls-location').size() <= 0 ){
57
- $("#attentionGLS").remove();
58
- $("label[for=\"billing-address-select\"]").parent().before('<p id="attentionGLS" style="font-weight:bold;color:red;text-align:justify; padding-right:5px;">Suite à la modification de votre adresse et si votre mode de livraison est GLS, veuillez séléctionner votre point de retrait en cliquant sur le mode de livraison.</p>');
59
- }
60
- });
61
-
62
- jQuery('select[name="shipping_address_id"]').on("change",function(){
63
- unsetGLSShippingMethod();
64
- });
65
-
66
- jQuery('input[name="billing[use_for_shipping]"]').on("change",function(){
67
- unsetGLSShippingMethod();
68
- });
69
-
70
- /**
71
- * Sur l'événement change des radios boutons de choix de mode de livraison
72
- */
73
- $("input[id^=\"s_method_gls\"]").live("click", function() {
74
- shippingGLSRadioCheck(this);
75
- });
76
-
77
- /*
78
- * Evenement sur la modification du point relais
79
- */
80
- $(".modifier_relay").live("click", function() {
81
- $("input[id^=\"s_method_gls\"]").click();
82
- });
83
-
84
- /*
85
- * Sur l'évènement de choix de relay
86
- */
87
- $('.choose-relay-point').live("click",function(e){
88
- e.preventDefault();
89
- choisirRelaisGLS($(this).data('relayindex'));
90
- });
91
-
92
- /* Seules les saisies numériques sont autorisées dans les champs textes */
93
- $("#layer_gls_wrapper #cp_recherche").keypress(function(e) {
94
- var charCode = (e.which) ? e.which : e.keyCode;
95
- if (charCode > 31 && (charCode < 48 || charCode > 57)) {
96
- return false;
97
- }
98
- return true;
99
- });
100
-
101
- initGlsLogos();
102
-
103
- });
104
-
105
- /**
106
- * Initialise les logos, descriptions, style sur le radio bouttons gls ceci est
107
- * fait en javascript pour ne pas surcharger le template available.phtml et
108
- * ainsi éviter des conflits avec d'autres modules. (appelé au chargement du DOM
109
- * mais aussi au rechargement ajax (voir Checkout.prototype.setStepResponse dans
110
- * gls\additional.phtml)
111
- */
112
- function initGlsLogos() {
113
-
114
- var gls_theme = jQuery('#GLS_theme').text();
115
-
116
- jQuery("input[id^=\"s_method_gls\"]").each(function(index, element){
117
-
118
- if(!jQuery("body").hasClass("onestepcheckout-index-index")) {
119
- jQuery(element).parents("dd").addClass("s_method_gls");
120
- } else {
121
- jQuery("input[id^=\"s_method_gls\"]").parents("dt").addClass("s_method_gls");
122
- var dd = jQuery("input[id^=\"s_method_gls\"]").eq(0).parents("dt").prev().addClass("s_method_gls-title");
123
- }
124
-
125
- var typeGls = getTypeGlsFromRadio(jQuery(element), false);
126
- if (typeGls) {
127
- var radioParent = jQuery(element).parent();
128
- if (radioParent.children('img').size() == 0) {
129
- // if(gls_theme == 'Mobile'){
130
- // radioParent.prepend('<img src="/skin/frontend/default/iphone/images/gls/picto_'+typeGls+'.png" >');
131
- // }else{
132
- radioParent.prepend('<img src="/skin/frontend/base/default/images/gls/picto_'+typeGls+'.png" >');
133
- // }
134
- }
135
-
136
- if (typeGls=='relay') {
137
- // si le relais choisi est en session (voir additionnal.phtml),
138
- // on l'affiche sous le radio
139
- if (jQuery('#gls_relais_choisi_init').size()>0) {
140
- jQuery('#gls_relais_choisi_init').appendTo(radioParent).attr('id', 'gls_relais_choisi');
141
- } else {
142
- // sinon,et si aucun relais n'a été choisi, on décoche le
143
- // mode de livraison relais pour forcer à choisir un relais
144
- if (jQuery('#gls_relais_choisi').size()==0) {
145
- jQuery(element).prop("checked", "");
146
- }
147
- }
148
- }
149
-
150
- }
151
- });
152
-
153
- }
154
-
155
- function getTypeGlsFromRadio(radio, forDescription) {
156
- var shippingMethod = radio.attr("value");
157
- var typeGls = shippingMethod.replace("gls_","");
158
- if (typeGls.startWith("tohome")) {
159
- return 'tohome';
160
- } else if (typeGls.startWith("fds")) {
161
- return 'fds';
162
- } else if (typeGls.startWith("relay")){
163
- return 'relay';
164
- } else {
165
- // Sinon c'est un type de livraison inconnu
166
- alert("Mauvaise configuration du module GLS : dans le champ configuration le code doit commencer par tohome, fds ou relay");
167
- return false;
168
- }
169
- }
170
-
171
- function shippingGLSRadioCheck(element) {
172
- var glsRadio = jQuery(element);
173
- var typeGls = getTypeGlsFromRadio(glsRadio, false);
174
-
175
- if(typeGls == "relay"){
176
- // on affiche le picto de chargement étape suivante du opc
177
- jQuery("#shipping-method-please-wait").show();
178
- glsurl = glsBaseUrl + "selector/"
179
- jQuery.ajax({
180
- url: glsurl,
181
- success: function(data){
182
- jQuery("#layer_gls").html(data);
183
- jQuery('#gls_relais_choisi').remove();
184
- geocoder = new google.maps.Geocoder();
185
- geocodeGLSAdresse();
186
- }
187
- });
188
- }
189
- }
190
-
191
- function resetGLSShippingMethod() {
192
- if (jQuery('#gls_relais_choisi').size()==0) {
193
- jQuery("input[name='shipping_method']:checked").prop("checked","");
194
- }
195
- }
196
-
197
- function unsetGLSShippingMethod(){
198
- jQuery("input[name='shipping_method']:checked").prop("checked","");
199
- glsurl = glsBaseUrl + "clearSessionRelayInformations/";
200
-
201
- jQuery.ajax({
202
- url: glsurl,
203
- success: function(data){
204
- jQuery('#gls_relais_choisi').remove();
205
- }
206
- });
207
- }
208
-
209
- function geocodeGLSAdresse() {
210
-
211
- var searchAdress = jQuery('#adresse_recherche').val()+' '+jQuery('#cp_recherche').val();
212
- if ((typeof google) != "undefined") {
213
- var geocoder = new google.maps.Geocoder();
214
- geocoder.geocode({'address': searchAdress}, function(results, status) {
215
- if (status == google.maps.GeocoderStatus.OK) {
216
- glsMyPosition = results[0].geometry.location;
217
- // on met à jour la carte avec cette position
218
- loadMap();
219
- loadListePointRelais();
220
- } else {
221
- alert('Adresse invalide '+searchAdress);
222
- unsetGLSShippingMethod();
223
- }
224
- });
225
- } else {
226
- alert("Géolocalisation de l'adresse impossible, vérifiez votre connexion internet (Google inaccessible).");
227
- }
228
- }
229
-
230
- function changeMap() {
231
- if (glsMyPosition!=undefined) {
232
- loadListePointRelais();
233
- }
234
- }
235
-
236
- function loadListePointRelais() {
237
- if(jQuery("#cp_recherche").val()){
238
- glsurl = glsBaseUrl + "listPointsRelais"
239
- glsurl = glsurl + "/address/" + jQuery("#adresse_recherche").val() + "/zipcode/" + jQuery("#cp_recherche").val() + "/country/" + "FR"+ "/city/" + jQuery("#city_recherche").val() ;
240
- jQuery.ajax({
241
- url: glsurl,
242
- success: function(data){
243
- if(data.indexOf("gls_ws_error") <= 0){
244
- jQuery("#col_droite_gls").html(data);
245
- showGLSMap();
246
- }else{
247
- jQuery("#layer_gls_wrapper .contenu").append(data);
248
- }
249
- }
250
- });
251
- }
252
- }
253
-
254
- function loadMap(){
255
-
256
- mapOptions = {
257
- /* zoom: 10, */
258
- /* center: glsMyPosition, */
259
- mapTypeId: google.maps.MapTypeId.ROADMAP,
260
- disableDefaultUI: true,
261
- zoomControlOptions: {
262
- position: google.maps.ControlPosition.RIGHT_TOP
263
- }
264
- }
265
-
266
- if( jQuery("#layer_gls").data("overlay") == null ) {
267
- jQuery("#layer_gls").overlay({
268
- mask: {
269
- color: '#000',
270
- loadSpeed: 200,
271
- opacity: 0.5
272
- },
273
- load: true,
274
- onLoad: function(){ glsRelayMap = new google.maps.Map(document.getElementById('map_gls'), mapOptions); },
275
- closeOnClick: false,
276
- top: "center",
277
- fixed: false,
278
- onClose: function(){ jQuery("#layer_gls").html(''); jQuery("#layer_gls").data("overlay",null); resetGLSShippingMethod()}
279
- });
280
- } else {
281
- // glsRelayMap.setCenter(glsMyPosition);
282
- }
283
-
284
- jQuery("#shipping-method-please-wait").hide();
285
-
286
- }
287
-
288
- function showGLSMap() {
289
- if ((typeof google)!="undefined") {
290
- var init = false;
291
- // google.maps.event.addListener(glsRelayMap, 'tilesloaded', function ()
292
- // {
293
-
294
- // création de bornes vides...
295
- var bounds = new google.maps.LatLngBounds();
296
-
297
- if (!init){
298
-
299
- clearMarkers();
300
-
301
- jQuery('.gls_point_relay').each(function(index,element){
302
-
303
- var relayPosition = new google.maps.LatLng(jQuery(this).find('.GLS_relay_latitude').text(), jQuery(this).find('.GLS_relay_longitude').text());
304
- markerGLS = new google.maps.Marker({
305
- map: glsRelayMap,
306
- position: relayPosition,
307
- title : jQuery(this).find('.GLS_relay_name').text(),
308
- icon : (glsRelaisChoisi == jQuery(this).find('.GLS_relay_id').text())? '/skin/frontend/base/default/images/gls/marker_current.png' : '/skin/frontend/base/default/images/gls/marker.png'
309
- });
310
- infowindowGLS=infoGLSBulleGenerator(jQuery(this));
311
-
312
- if(glsRelaisChoisi == jQuery(this).find('.GLS_relay_id').text()) {
313
- jQuery("#layer_gls .gls_point_relay").removeClass("current").eq(index).addClass("current");
314
- jQuery("#col_droite_gls").scrollTop(0).scrollTop(jQuery(".gls_point_relay").eq(index).position().top);
315
- }
316
-
317
- // Ajout à la liste des markers
318
- glsMarkersArray.push(markerGLS);
319
-
320
- attachGLSClick(markerGLS,infowindowGLS, index);
321
-
322
- // ...étendues à chaque point...
323
- bounds.extend(relayPosition);
324
-
325
- });
326
-
327
- // ...pour voir tous les points
328
- glsRelayMap.fitBounds(bounds);
329
-
330
- }
331
- init=true;
332
- // });
333
- }
334
- }
335
-
336
- // générateur d'infobulle
337
- function infoGLSBulleGenerator(relay) {
338
-
339
- contentString = '<div class="info-window">'
340
-
341
- contentString += '<span class="store-name">' + relay.find('.GLS_relay_name').text() + '</span>';
342
-
343
- contentString += '' +
344
- relay.find('.GLS_relay_address').text() + '<br/>' +
345
- relay.find('.GLS_relay_zipcode').text() + ' ' + relay.find('.GLS_relay_city').text();
346
-
347
- contentString += relay.find('.GLS_relay_hours').html();
348
-
349
- contentString += "<div class='button-wrapper'><a href='#' class='choose-relay-point' data-relayindex="+relay.find('.GLS_relay_index').text()+" data-relayid="+relay.find('.GLS_relay_id').text()+">"+ Translator.translate("Choose this ParcelShop") +"</a></div>";
350
-
351
- contentString += "</div>";
352
-
353
- infowindow = new google.maps.InfoWindow({
354
- content: contentString
355
- });
356
-
357
- return infowindow;
358
- }
359
-
360
-
361
- function attachGLSClick(markerGLS,infowindowGLS, index){
362
- // Clic sur le relais dans la colonne de gauche
363
- jQuery("#gls_point_relay_"+index).live("click",function() {
364
- clickHandler(markerGLS,infowindowGLS, index);
365
- });
366
-
367
- // Clic sur le marqueur du relais dans la carte
368
- google.maps.event.addListener(markerGLS, 'click', function() {
369
- clickHandler(markerGLS,infowindowGLS, index);
370
- });
371
-
372
- }
373
-
374
- function clickHandler(markerGLS,infowindowGLS, index){
375
- // fermer la derniere infobulle ouverte
376
- if(glsOpenedInfowindow) {
377
- glsOpenedInfowindow.close();
378
- jQuery("#layer_gls .gls_point_relay").removeClass("current");
379
- }
380
- // ouvrir l'infobulle
381
- infowindowGLS.open(glsRelayMap,markerGLS);
382
- glsOpenedInfowindow=infowindowGLS;
383
-
384
- // Mise en évidence du relais dans la liste
385
- jQuery("#layer_gls .gls_point_relay").removeClass("current").eq(index).addClass("current");
386
- jQuery("#col_droite_gls").scrollTop(0).scrollTop(jQuery(".gls_point_relay").eq(index).position().top);
387
-
388
- }
389
-
390
- function choisirRelaisGLS(index) {
391
-
392
- // resetShippingMethod();
393
- jQuery("select[name='shipping_address_id']").prop('selectedIndex',0);
394
- jQuery("select[name='shipping_address_id'] option[value='']").prop('selectedIndex',0);
395
-
396
- // if(jQuery("#sms_checkbox").is(":checked")) {
397
- v= jQuery("#num_telephone").val();
398
- // if (!(/^0(6|7)\d{8}$/.test(v)) ||
399
- // (/^0(6|7)(0{8}|1{8}|2{8}|3{8}|4{8}|5{8}|6{8}|7{8}|8{8}|9{8}|12345678)$/.test(v))
400
- // ) {
401
- if(!v){
402
- alert( Translator.translate("Veuillez saisir un numéro de téléphone valide (portable de préférence).") );
403
- return;
404
- }
405
- // }
406
- var contenu_html = "<div id='gls_relais_choisi'><span>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_name').text()+"</span>" +" <span class='modifier_relay'>" + Translator.translate("Change ParcelShop") + "</span>" + "<br/>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_address').text()+"<br/>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_zipcode').text()+" "+jQuery('#gls_point_relay_'+index).find('.GLS_relay_city').text() + "</div>";
407
- jQuery("input[id^=\"s_method_gls_relay_\"]").each(function(index, element){
408
- jQuery(element).parent().append(contenu_html);
409
- });
410
- /* On stock en session les informations du relais */
411
-
412
- if(jQuery("#sms_checkbox").is(":checked") && jQuery("#num_telephone").val() != ""){
413
- var warnbyphone = 1;
414
- }else{
415
- var warnbyphone = 0;
416
- }
417
-
418
- glsRelaisChoisi = jQuery('#gls_point_relay_'+index).find('.GLS_relay_id').text();
419
-
420
- // On cache le layer
421
- jQuery("#layer_gls").data("overlay").close();
422
-
423
- glsurl = glsBaseUrl + "saveInSessionRelayInformations/"
424
- jQuery.ajax({
425
- url: glsurl,
426
- data: { // <-- just pass an object
427
- name: jQuery('#gls_point_relay_'+index).find('.GLS_relay_name').text(),
428
- address: jQuery('#gls_point_relay_'+index).find('.GLS_relay_address').text(),
429
- city : jQuery('#gls_point_relay_'+index).find('.GLS_relay_city').text(),
430
- zipcode : jQuery('#gls_point_relay_'+index).find('.GLS_relay_zipcode').text(),
431
- relayId : jQuery('#gls_point_relay_'+index).find('.GLS_relay_id').text(),
432
- phone : jQuery("#num_telephone").val(),
433
- warnbyphone : warnbyphone,
434
- },
435
- dataType: 'json',
436
- success: function(){
437
- // On fait la sauvegarde de la méthode de livraison
438
- shippingMethod.save();
439
- }
440
- });
441
- }
1
+ /**
2
+ * Copyright (c) 2014 GLS
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * It is available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ *
10
+ * @category Addonline
11
+ * @package Addonline_Gls
12
+ * @copyright Copyright (c) 2014 GLS
13
+ * @author Addonline (http://www.addonline.fr)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+
17
+ /**
18
+ * Fonction startWith sur l'objet String de javascript
19
+ */
20
+ String.prototype.startWith = function(t, i) { if (i==false) { return
21
+ (t == this.substring(0, t.length)); } else { return (t.toLowerCase()
22
+ == this.substring(0, t.length).toLowerCase()); } }
23
+
24
+ /**
25
+ * Variables globales
26
+ */
27
+
28
+ var glsMyPosition;
29
+ var glsListRelais=new Array();
30
+ var glsRelayMap;
31
+ var glsOpenedInfowindow;
32
+ var glsRelaisChoisi;
33
+
34
+ /* Liste des markers */
35
+ var glsMarkersArray = [];
36
+
37
+ /*
38
+ * Suppression des markers
39
+ */
40
+ function clearMarkers() {
41
+ for (var i = 0; i < glsMarkersArray.length; i++ ) {
42
+ glsMarkersArray[i].setMap(null);
43
+ }
44
+ glsMarkersArray.length = 0;
45
+ }
46
+
47
+ /**
48
+ * Initialisation au chargement de la page
49
+ */
50
+ jQuery(function($) {
51
+
52
+
53
+ // Cas du onestep checkout, si on change l'adresse de livraison après avoir
54
+ // choisi gls
55
+ jQuery('.onestepcheckout-index-index .address-select').on("change", function() {
56
+ if(jQuery('#gls-location').size() <= 0 ){
57
+ $("#attentionGLS").remove();
58
+ $("label[for=\"billing-address-select\"]").parent().before('<p id="attentionGLS" style="font-weight:bold;color:red;text-align:justify; padding-right:5px;">Suite à la modification de votre adresse et si votre mode de livraison est GLS, veuillez séléctionner votre point de retrait en cliquant sur le mode de livraison.</p>');
59
+ }
60
+ });
61
+
62
+ jQuery('select[name="shipping_address_id"]').on("change",function(){
63
+ unsetGLSShippingMethod();
64
+ });
65
+
66
+ jQuery('input[name="billing[use_for_shipping]"]').on("change",function(){
67
+ unsetGLSShippingMethod();
68
+ });
69
+
70
+ /**
71
+ * Sur l'événement change des radios boutons de choix de mode de livraison
72
+ */
73
+ $(document).on("click", "input[id^=\"s_method_gls\"]", function() {
74
+ shippingGLSRadioCheck(this);
75
+ });
76
+
77
+ /*
78
+ * Evenement sur la modification du point relais
79
+ */
80
+ $(document).on("click",".modifier_relay", function() {
81
+ $("input[id^=\"s_method_gls\"]").click();
82
+ });
83
+
84
+ /*
85
+ * Sur l'évènement de choix de relay
86
+ */
87
+ $(document).on("click",'.choose-relay-point',function(e){
88
+ e.preventDefault();
89
+ choisirRelaisGLS($(this).data('relayindex'));
90
+ });
91
+
92
+ /* Seules les saisies numériques sont autorisées dans les champs textes */
93
+ $("#layer_gls_wrapper #cp_recherche").keypress(function(e) {
94
+ var charCode = (e.which) ? e.which : e.keyCode;
95
+ if (charCode > 31 && (charCode < 48 || charCode > 57)) {
96
+ return false;
97
+ }
98
+ return true;
99
+ });
100
+
101
+ initGlsLogos();
102
+
103
+ });
104
+
105
+ /**
106
+ * Initialise les logos, descriptions, style sur le radio bouttons gls ceci est
107
+ * fait en javascript pour ne pas surcharger le template available.phtml et
108
+ * ainsi éviter des conflits avec d'autres modules. (appelé au chargement du DOM
109
+ * mais aussi au rechargement ajax (voir Checkout.prototype.setStepResponse dans
110
+ * gls\additional.phtml)
111
+ */
112
+ function initGlsLogos() {
113
+
114
+ var gls_theme = jQuery('#GLS_theme').text();
115
+
116
+ jQuery("input[id^=\"s_method_gls\"]").each(function(index, element){
117
+
118
+ if(!jQuery("body").hasClass("onestepcheckout-index-index")) {
119
+ jQuery(element).parents("dd").addClass("s_method_gls");
120
+ } else {
121
+ jQuery("input[id^=\"s_method_gls\"]").parents("dt").addClass("s_method_gls");
122
+ var dd = jQuery("input[id^=\"s_method_gls\"]").eq(0).parents("dt").prev().addClass("s_method_gls-title");
123
+ }
124
+
125
+ var typeGls = getTypeGlsFromRadio(jQuery(element), false);
126
+ if (typeGls) {
127
+ var radioParent = jQuery(element).parent();
128
+ if (radioParent.children('img').size() == 0) {
129
+ // if(gls_theme == 'Mobile'){
130
+ // radioParent.prepend('<img src="/skin/frontend/default/iphone/images/gls/picto_'+typeGls+'.png" >');
131
+ // }else{
132
+ radioParent.prepend('<img src="/skin/frontend/base/default/images/gls/picto_'+typeGls+'.png" >');
133
+ // }
134
+ }
135
+
136
+ if (typeGls=='relay') {
137
+ // si le relais choisi est en session (voir additionnal.phtml),
138
+ // on l'affiche sous le radio
139
+ if (jQuery('#gls_relais_choisi_init').size()>0) {
140
+ jQuery('#gls_relais_choisi_init').appendTo(radioParent).attr('id', 'gls_relais_choisi');
141
+ } else {
142
+ // sinon,et si aucun relais n'a été choisi, on décoche le
143
+ // mode de livraison relais pour forcer à choisir un relais
144
+ if (jQuery('#gls_relais_choisi').size()==0) {
145
+ jQuery(element).prop("checked", "");
146
+ }
147
+ }
148
+ }
149
+
150
+ }
151
+ });
152
+
153
+ }
154
+
155
+ function getTypeGlsFromRadio(radio, forDescription) {
156
+ var shippingMethod = radio.attr("value");
157
+ var typeGls = shippingMethod.replace("gls_","");
158
+ if (typeGls.startWith("tohome")) {
159
+ return 'tohome';
160
+ } else if (typeGls.startWith("fds")) {
161
+ return 'fds';
162
+ } else if (typeGls.startWith("relay")){
163
+ return 'relay';
164
+ } else if (typeGls.startWith("express")){
165
+ return 'express';
166
+ } else {
167
+ // Sinon c'est un type de livraison inconnu
168
+ alert("Mauvaise configuration du module GLS : dans le champ configuration le code doit commencer par tohome, fds ou relay");
169
+ return false;
170
+ }
171
+ }
172
+
173
+ function shippingGLSRadioCheck(element) {
174
+ var glsRadio = jQuery(element);
175
+ var typeGls = getTypeGlsFromRadio(glsRadio, false);
176
+
177
+ if(typeGls == "relay"){
178
+ // on affiche le picto de chargement étape suivante du opc
179
+ jQuery("#shipping-method-please-wait").show();
180
+ glsurl = glsBaseUrl + "selector/"
181
+ jQuery.ajax({
182
+ url: glsurl,
183
+ success: function(data){
184
+ jQuery("#layer_gls").html(data);
185
+ jQuery('#gls_relais_choisi').remove();
186
+ geocoder = new google.maps.Geocoder();
187
+ geocodeGLSAdresse();
188
+ }
189
+ });
190
+ }
191
+ }
192
+
193
+ function resetGLSShippingMethod() {
194
+ if (jQuery('#gls_relais_choisi').size()==0) {
195
+ jQuery("input[name='shipping_method']:checked").prop("checked","");
196
+ }
197
+ }
198
+
199
+ function unsetGLSShippingMethod(){
200
+ jQuery("input[name='shipping_method']:checked").prop("checked","");
201
+ glsurl = glsBaseUrl + "clearSessionRelayInformations/";
202
+
203
+ jQuery.ajax({
204
+ url: glsurl,
205
+ success: function(data){
206
+ jQuery('#gls_relais_choisi').remove();
207
+ }
208
+ });
209
+ }
210
+
211
+ function geocodeGLSAdresse() {
212
+
213
+ var searchAdress = jQuery('#adresse_recherche').val()+' '+jQuery('#cp_recherche').val();
214
+ if ((typeof google) != "undefined") {
215
+ var geocoder = new google.maps.Geocoder();
216
+ geocoder.geocode({'address': searchAdress}, function(results, status) {
217
+ if (status == google.maps.GeocoderStatus.OK) {
218
+ glsMyPosition = results[0].geometry.location;
219
+ // on met à jour la carte avec cette position
220
+ loadMap();
221
+ loadListePointRelais();
222
+ } else {
223
+ alert('Adresse invalide '+searchAdress);
224
+ unsetGLSShippingMethod();
225
+ }
226
+ });
227
+ } else {
228
+ alert("Géolocalisation de l'adresse impossible, vérifiez votre connexion internet (Google inaccessible).");
229
+ }
230
+ }
231
+
232
+ function changeMap() {
233
+ if (glsMyPosition!=undefined) {
234
+ loadListePointRelais();
235
+ }
236
+ }
237
+
238
+ function loadListePointRelais() {
239
+ if(jQuery("#cp_recherche").val()){
240
+ glsurl = glsBaseUrl + "listPointsRelais"
241
+ glsurl = glsurl + "/address/" + jQuery("#adresse_recherche").val() + "/zipcode/" + jQuery("#cp_recherche").val() + "/country/" + "FR"+ "/city/" + jQuery("#city_recherche").val() ;
242
+ jQuery.ajax({
243
+ url: glsurl,
244
+ success: function(data){
245
+ if(data.indexOf("gls_ws_error") <= 0){
246
+ jQuery("#col_droite_gls").html(data);
247
+ showGLSMap();
248
+ }else{
249
+ jQuery("#layer_gls_wrapper .contenu").append(data);
250
+ }
251
+ }
252
+ });
253
+ }
254
+ }
255
+
256
+ function loadMap(){
257
+
258
+ mapOptions = {
259
+ /* zoom: 10, */
260
+ /* center: glsMyPosition, */
261
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
262
+ disableDefaultUI: true,
263
+ zoomControlOptions: {
264
+ position: google.maps.ControlPosition.RIGHT_TOP
265
+ }
266
+ }
267
+
268
+ jQuery("#layer_gls").popup({
269
+ beforeopen: function(){ glsRelayMap = new google.maps.Map(document.getElementById('map_gls'), mapOptions); },
270
+ onclose: function(){ jQuery("#layer_gls").html(''); resetGLSShippingMethod() },
271
+ transition: 'all 0.3s',
272
+ });
273
+
274
+ jQuery("#layer_gls").popup('show');
275
+ jQuery("#shipping-method-please-wait").hide();
276
+
277
+ }
278
+
279
+ function showGLSMap() {
280
+ if ((typeof google)!="undefined") {
281
+ var init = false;
282
+ // google.maps.event.addListener(glsRelayMap, 'tilesloaded', function ()
283
+ // {
284
+
285
+ // création de bornes vides...
286
+ var bounds = new google.maps.LatLngBounds();
287
+
288
+ if (!init){
289
+
290
+ clearMarkers();
291
+
292
+ jQuery('.gls_point_relay').each(function(index,element){
293
+
294
+ var relayPosition = new google.maps.LatLng(jQuery(this).find('.GLS_relay_latitude').text(), jQuery(this).find('.GLS_relay_longitude').text());
295
+ markerGLS = new google.maps.Marker({
296
+ map: glsRelayMap,
297
+ position: relayPosition,
298
+ title : jQuery(this).find('.GLS_relay_name').text(),
299
+ icon : (glsRelaisChoisi == jQuery(this).find('.GLS_relay_id').text())? '/skin/frontend/base/default/images/gls/marker_current.png' : '/skin/frontend/base/default/images/gls/marker.png'
300
+ });
301
+ infowindowGLS=infoGLSBulleGenerator(jQuery(this));
302
+
303
+ if(glsRelaisChoisi == jQuery(this).find('.GLS_relay_id').text()) {
304
+ jQuery("#layer_gls .gls_point_relay").removeClass("current").eq(index).addClass("current");
305
+ jQuery("#col_droite_gls").scrollTop(0).scrollTop(jQuery(".gls_point_relay").eq(index).position().top);
306
+ }
307
+
308
+ // Ajout à la liste des markers
309
+ glsMarkersArray.push(markerGLS);
310
+
311
+ attachGLSClick(markerGLS,infowindowGLS, index);
312
+
313
+ // ...étendues à chaque point...
314
+ bounds.extend(relayPosition);
315
+
316
+ });
317
+
318
+ // ...pour voir tous les points
319
+ glsRelayMap.fitBounds(bounds);
320
+
321
+ }
322
+ init=true;
323
+ // });
324
+ }
325
+ }
326
+
327
+ // générateur d'infobulle
328
+ function infoGLSBulleGenerator(relay) {
329
+
330
+ contentString = '<div class="info-window">'
331
+
332
+ contentString += '<span class="store-name">' + relay.find('.GLS_relay_name').text() + '</span>';
333
+
334
+ contentString += '' +
335
+ relay.find('.GLS_relay_address').text() + '<br/>' +
336
+ relay.find('.GLS_relay_zipcode').text() + ' ' + relay.find('.GLS_relay_city').text();
337
+
338
+ contentString += relay.find('.GLS_relay_hours').html();
339
+
340
+ contentString += "<div class='button-wrapper'><a href='#' class='choose-relay-point' data-relayindex="+relay.find('.GLS_relay_index').text()+" data-relayid="+relay.find('.GLS_relay_id').text()+">"+ Translator.translate("Choose this ParcelShop") +"</a></div>";
341
+
342
+ contentString += "</div>";
343
+
344
+ infowindow = new google.maps.InfoWindow({
345
+ content: contentString
346
+ });
347
+
348
+ return infowindow;
349
+ }
350
+
351
+
352
+ function attachGLSClick(markerGLS,infowindowGLS, index){
353
+ // Clic sur le relais dans la colonne de gauche
354
+ jQuery(document).on("click","#gls_point_relay_"+index,function() {
355
+ clickHandler(markerGLS,infowindowGLS, index);
356
+ });
357
+
358
+ // Clic sur le marqueur du relais dans la carte
359
+ google.maps.event.addListener(markerGLS, 'click', function() {
360
+ clickHandler(markerGLS,infowindowGLS, index);
361
+ });
362
+
363
+ }
364
+
365
+ function clickHandler(markerGLS,infowindowGLS, index){
366
+ // fermer la derniere infobulle ouverte
367
+ if(glsOpenedInfowindow) {
368
+ glsOpenedInfowindow.close();
369
+ jQuery("#layer_gls .gls_point_relay").removeClass("current");
370
+ }
371
+ // ouvrir l'infobulle
372
+ infowindowGLS.open(glsRelayMap,markerGLS);
373
+ glsOpenedInfowindow=infowindowGLS;
374
+
375
+ // Mise en évidence du relais dans la liste
376
+ jQuery("#layer_gls .gls_point_relay").removeClass("current").eq(index).addClass("current");
377
+ jQuery("#col_droite_gls").scrollTop(0).scrollTop(jQuery(".gls_point_relay").eq(index).position().top);
378
+
379
+ }
380
+
381
+ function choisirRelaisGLS(index) {
382
+
383
+ // resetShippingMethod();
384
+ jQuery("select[name='shipping_address_id']").prop('selectedIndex',0);
385
+ jQuery("select[name='shipping_address_id'] option[value='']").prop('selectedIndex',0);
386
+
387
+ // if(jQuery("#sms_checkbox").is(":checked")) {
388
+ v= jQuery("#num_telephone").val();
389
+ // if (!(/^0(6|7)\d{8}$/.test(v)) ||
390
+ // (/^0(6|7)(0{8}|1{8}|2{8}|3{8}|4{8}|5{8}|6{8}|7{8}|8{8}|9{8}|12345678)$/.test(v))
391
+ // ) {
392
+ if(!v){
393
+ alert( Translator.translate("Veuillez saisir un numéro de téléphone valide (portable de préférence).") );
394
+ return;
395
+ }
396
+ // }
397
+
398
+ glsurl = glsBaseUrl + "saveInSessionRelayInformations/";
399
+ jQuery.ajax({
400
+ url: glsurl,
401
+ data: { // <-- just pass an object
402
+ name: jQuery('#gls_point_relay_'+index).find('.GLS_relay_name').text(),
403
+ address: jQuery('#gls_point_relay_'+index).find('.GLS_relay_address').text(),
404
+ city : jQuery('#gls_point_relay_'+index).find('.GLS_relay_city').text(),
405
+ zipcode : jQuery('#gls_point_relay_'+index).find('.GLS_relay_zipcode').text(),
406
+ relayId : jQuery('#gls_point_relay_'+index).find('.GLS_relay_id').text(),
407
+ phone : jQuery("#num_telephone").val(),
408
+ warnbyphone : warnbyphone,
409
+ },
410
+ dataType: 'json',
411
+ success: function(){
412
+ // On fait la sauvegarde de la méthode de livraison
413
+ shippingMethod.save();
414
+ }
415
+ });
416
+
417
+ var contenu_html = "<div id='gls_relais_choisi'><span>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_name').text()+"</span>" +" <span class='modifier_relay'>" + Translator.translate("Change ParcelShop") + "</span>" + "<br/>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_address').text()+"<br/>"+jQuery('#gls_point_relay_'+index).find('.GLS_relay_zipcode').text()+" "+jQuery('#gls_point_relay_'+index).find('.GLS_relay_city').text() + "</div>";
418
+ jQuery("input[id^=\"s_method_gls_relay_\"]").each(function(index, element){
419
+ jQuery(element).parent().append(contenu_html);
420
+ });
421
+ /* On stock en session les informations du relais */
422
+
423
+ if(jQuery("#sms_checkbox").is(":checked") && jQuery("#num_telephone").val() != ""){
424
+ var warnbyphone = 1;
425
+ }else{
426
+ var warnbyphone = 0;
427
+ }
428
+
429
+ glsRelaisChoisi = jQuery('#gls_point_relay_'+index).find('.GLS_relay_id').text();
430
+
431
+ // On cache le layer
432
+ jQuery("#layer_gls").popup('hide');
433
+ }