Version Notes
Automatic load next page of current product list.
Support for Magento 1.4 up to 1.8
Download this release
Release Info
Developer | Gabriel Somoza |
Extension | Strategery_InfiniteScroll2 |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.9 to 3.0.0
- app/code/community/Strategery/Infinitescroll/Block/Init.php +76 -0
- app/code/community/Strategery/Infinitescroll/Helper/Data.php +100 -0
- app/code/community/Strategery/Infinitescroll/Model/Admin/Feed.php +52 -0
- app/code/community/Strategery/{Infinitescroll2/controllers/JsController.php → Infinitescroll/Model/Observer.php} +16 -13
- app/code/community/Strategery/Infinitescroll/etc/adminhtml.xml +23 -0
- app/code/community/Strategery/Infinitescroll/etc/config.xml +111 -0
- app/code/community/Strategery/{Infinitescroll2 → Infinitescroll}/etc/system.xml +102 -134
- app/code/community/Strategery/Infinitescroll2/Block/Config.php +0 -29
- app/code/community/Strategery/Infinitescroll2/Block/Flush.php +0 -40
- app/code/community/Strategery/Infinitescroll2/Helper/Data.php +0 -199
- app/code/community/Strategery/Infinitescroll2/Model/Catalog/Observer.php +0 -198
- app/code/community/Strategery/Infinitescroll2/controllers/CacheController.php +0 -34
- app/code/community/Strategery/Infinitescroll2/etc/config.xml +0 -161
- app/design/frontend/default/default/layout/strategery-infinitescroll.xml +68 -0
- app/design/frontend/default/default/layout/strategery-infinitescroll2.xml +0 -162
- app/design/frontend/default/default/template/strategery/infinitescroll/init.phtml +121 -0
- app/design/frontend/default/default/template/strategery/infinitescroll2/js.phtml +0 -36
- app/design/frontend/default/default/template/strategery/infinitescroll2/toolbar.phtml +0 -55
- app/etc/modules/{Strategery_Infinitescroll2.xml → Strategery_Infinitescroll.xml} +4 -4
- js/jquery/infinitescroll/jquery-ias.js +770 -0
- js/jquery/infinitescroll/jquery-ias.min.js +10 -0
- js/jquery/infinitescroll/jquery.easing-1.3.pack.js +72 -0
- js/jquery/infinitescroll/jquery.ui.totop.min.js +5 -0
- js/jquery/infinitescroll2/behaviors/infinitescroll-magento.js +0 -183
- js/jquery/infinitescroll2/https.js +0 -12
- js/jquery/infinitescroll2/jquery.infinitescroll.js +0 -747
- js/jquery/infinitescroll2/jquery.infinitescroll.min.js +0 -31
- js/jquery/jquery.latest.min.js +6 -19
- package.xml +28 -30
- skin/frontend/base/default/js/infinitescroll/ias_config.js +10 -0
app/code/community/Strategery/Infinitescroll/Block/Init.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Enrique Piatti
|
17 |
+
*/
|
18 |
+
class Strategery_Infinitescroll_Block_Init extends Mage_Core_Block_Template
|
19 |
+
{
|
20 |
+
|
21 |
+
public function getConfigData()
|
22 |
+
{
|
23 |
+
$helper = Mage::helper('infinitescroll');
|
24 |
+
$cache = Mage::getSingleton('core/cache');
|
25 |
+
$configData = $cache->load("infinitescroll_configData");
|
26 |
+
if ( ! $configData) {
|
27 |
+
$configData = $helper->getConfigData('selectors/content');
|
28 |
+
$cache->save($configData, "infinitescroll_configData", array("infinitescroll"));
|
29 |
+
}
|
30 |
+
return $configData;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function isEnabled()
|
34 |
+
{
|
35 |
+
return Mage::helper('infinitescroll')->isEnabledInCurrentPage();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function getLoaderImage()
|
39 |
+
{
|
40 |
+
$url = Mage::helper('infinitescroll')->getConfigData('design/loading_img');
|
41 |
+
return strpos($url, 'http') === 0 ? $url : $this->getSkinUrl($url);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getProductListMode()
|
45 |
+
{
|
46 |
+
// user mode
|
47 |
+
if ($currentMode = $this->getRequest()->getParam('mode')) {
|
48 |
+
switch($currentMode){
|
49 |
+
case 'grid':
|
50 |
+
$productListMode = 'grid';
|
51 |
+
break;
|
52 |
+
case 'list':
|
53 |
+
$productListMode = 'list';
|
54 |
+
break;
|
55 |
+
default:
|
56 |
+
$productListMode = 'grid';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
$defaultMode = Mage::getStoreConfig('catalog/frontend/list_mode');
|
61 |
+
switch($defaultMode){
|
62 |
+
case 'grid-list':
|
63 |
+
$productListMode = 'grid';
|
64 |
+
break;
|
65 |
+
case 'list-grid':
|
66 |
+
$productListMode = 'list';
|
67 |
+
break;
|
68 |
+
default:
|
69 |
+
$productListMode = 'grid';
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
return $productListMode;
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
app/code/community/Strategery/Infinitescroll/Helper/Data.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
+
* @link http://gabrielsomoza.com/
|
18 |
+
*
|
19 |
+
* Update 2.0.0
|
20 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
21 |
+
* @link http://www.dwdesigner.com/
|
22 |
+
*/
|
23 |
+
class Strategery_Infinitescroll_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
+
{
|
25 |
+
|
26 |
+
protected $_optionsMap;
|
27 |
+
|
28 |
+
|
29 |
+
public function getConfigData($node)
|
30 |
+
{
|
31 |
+
return Mage::getStoreConfig('infinitescroll/' . $node);
|
32 |
+
}
|
33 |
+
|
34 |
+
public function isMemoryActive()
|
35 |
+
{
|
36 |
+
return $this->getConfigData('memory/enabled');
|
37 |
+
}
|
38 |
+
|
39 |
+
// public function isScrollCall()
|
40 |
+
// {
|
41 |
+
// $result=false;
|
42 |
+
// if(Mage::app()->getRequest()->getParam('scrollCall')==1) {
|
43 |
+
// $result=true;
|
44 |
+
// }
|
45 |
+
// return $result;
|
46 |
+
// }
|
47 |
+
|
48 |
+
public function getNextPageNumber()
|
49 |
+
{
|
50 |
+
return Mage::app()->getRequest()->getParam('p');
|
51 |
+
}
|
52 |
+
|
53 |
+
public function getSession()
|
54 |
+
{
|
55 |
+
return Mage::getSingleton("core/session");
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
public function isEnabled()
|
61 |
+
{
|
62 |
+
return Mage::getStoreConfig('infinitescroll/general/enabled');
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
public function getCurrentPageType()
|
67 |
+
{
|
68 |
+
// TODO: we could do this with the full path to the request directly
|
69 |
+
$where = 'grid';
|
70 |
+
/** @var Mage_Catalog_Model_Category $currentCategory */
|
71 |
+
$currentCategory = Mage::registry('current_category');
|
72 |
+
if ($currentCategory) {
|
73 |
+
$where = "grid";
|
74 |
+
if($currentCategory->getIsAnchor()){
|
75 |
+
$where = "layer";
|
76 |
+
}
|
77 |
+
}
|
78 |
+
$controller = Mage::app()->getRequest()->getControllerName();
|
79 |
+
if ( $controller == "result"){ $where = "search"; }
|
80 |
+
else if ( $controller == "advanced") { $where = "advanced"; }
|
81 |
+
return $where;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* check general and instance enable
|
86 |
+
* @return bool
|
87 |
+
*/
|
88 |
+
public function isEnabledInCurrentPage()
|
89 |
+
{
|
90 |
+
$pageType = $this->getCurrentPageType();
|
91 |
+
return $this->isEnabled() && Mage::getStoreConfig('infinitescroll/instances/'.$pageType);
|
92 |
+
}
|
93 |
+
|
94 |
+
// public function getSizeLimitForCurrentPage()
|
95 |
+
// {
|
96 |
+
// $pageType = $this->getCurrentPageType();
|
97 |
+
// return Mage::getStoreConfig('infinitescroll/instances/size_'.$pageType.'');
|
98 |
+
// }
|
99 |
+
|
100 |
+
}
|
app/code/community/Strategery/Infinitescroll/Model/Admin/Feed.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* InfiniteScroll - Magento Integration
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
+
* available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
*
|
11 |
+
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll
|
13 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
+
* @link http://gabrielsomoza.com/
|
18 |
+
*
|
19 |
+
* Update 2.0.0
|
20 |
+
* @author Enrique Piatti (contacto@enriquepiatti.com)
|
21 |
+
* @link http://www.dwdesigner.com/
|
22 |
+
*/
|
23 |
+
class Strategery_Infinitescroll_Model_Admin_Feed extends Mage_AdminNotification_Model_Feed
|
24 |
+
{
|
25 |
+
|
26 |
+
const FEED_URL = 'usestrategery.com/infinite_scroll/feed/';
|
27 |
+
|
28 |
+
public function getFeedUrl()
|
29 |
+
{
|
30 |
+
if (is_null($this->_feedUrl)) {
|
31 |
+
// $this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
32 |
+
// . self::FEED_URL;
|
33 |
+
|
34 |
+
$this->_feedUrl = 'http://'.self::FEED_URL;
|
35 |
+
|
36 |
+
}
|
37 |
+
return $this->_feedUrl;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getLastUpdate()
|
41 |
+
{
|
42 |
+
return Mage::app()->loadCache('infinitescroll_notifications_lastcheck');
|
43 |
+
}
|
44 |
+
|
45 |
+
public function setLastUpdate()
|
46 |
+
{
|
47 |
+
Mage::app()->saveCache(time(), 'infinitescroll_notifications_lastcheck');
|
48 |
+
return $this;
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
}
|
app/code/community/Strategery/{Infinitescroll2/controllers/JsController.php → Infinitescroll/Model/Observer.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
@@ -9,21 +9,24 @@
|
|
9 |
* http://opensource.org/licenses/afl-3.0.php
|
10 |
*
|
11 |
* @category Strategery
|
12 |
-
* @package
|
13 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
* @link http://gabrielsomoza.com/
|
|
|
|
|
|
|
|
|
18 |
*/
|
19 |
-
class
|
20 |
-
|
21 |
-
|
22 |
-
public function indexAction()
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* InfiniteScroll - Magento Integration
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
*
|
9 |
* http://opensource.org/licenses/afl-3.0.php
|
10 |
*
|
11 |
* @category Strategery
|
12 |
+
* @package Strategery_Infinitescroll
|
13 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
+
*
|
16 |
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
* @link http://gabrielsomoza.com/
|
18 |
+
*
|
19 |
+
* Update 2.0.0
|
20 |
+
* @author Enrique Piatti (contacto@enriquepiatti.com)
|
21 |
+
* @link http://www.dwdesigner.com/
|
22 |
*/
|
23 |
+
class Strategery_Infinitescroll_Model_Observer {
|
24 |
+
|
25 |
+
public function controllerActionPredispatch($event)
|
|
|
26 |
{
|
27 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
28 |
+
$feedModel = Mage::getModel('infinitescroll/admin_feed');
|
29 |
+
$feedModel->checkUpdate();
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Strategery/Infinitescroll/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<infinitescroll translate="title" module="infinitescroll">
|
12 |
+
<title>Infinite Scroll</title>
|
13 |
+
<sort_order>50</sort_order>
|
14 |
+
</infinitescroll>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
app/code/community/Strategery/Infinitescroll/etc/config.xml
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<Strategery_Infinitescroll>
|
28 |
+
<version>3.0.0</version>
|
29 |
+
</Strategery_Infinitescroll>
|
30 |
+
</modules>
|
31 |
+
<global>
|
32 |
+
<helpers>
|
33 |
+
<infinitescroll>
|
34 |
+
<class>Strategery_Infinitescroll_Helper</class>
|
35 |
+
</infinitescroll>
|
36 |
+
</helpers>
|
37 |
+
<models>
|
38 |
+
<infinitescroll>
|
39 |
+
<class>Strategery_Infinitescroll_Model</class>
|
40 |
+
</infinitescroll>
|
41 |
+
</models>
|
42 |
+
<blocks>
|
43 |
+
<infinitescroll>
|
44 |
+
<class>Strategery_Infinitescroll_Block</class>
|
45 |
+
</infinitescroll>
|
46 |
+
</blocks>
|
47 |
+
</global>
|
48 |
+
<frontend>
|
49 |
+
<layout>
|
50 |
+
<updates>
|
51 |
+
<infinitescroll>
|
52 |
+
<file>strategery-infinitescroll.xml</file>
|
53 |
+
</infinitescroll>
|
54 |
+
</updates>
|
55 |
+
</layout>
|
56 |
+
</frontend>
|
57 |
+
<adminhtml>
|
58 |
+
<events>
|
59 |
+
<controller_action_predispatch>
|
60 |
+
<observers>
|
61 |
+
<tmcore>
|
62 |
+
<class>infinitescroll/observer</class>
|
63 |
+
<method>controllerActionPredispatch</method>
|
64 |
+
</tmcore>
|
65 |
+
</observers>
|
66 |
+
</controller_action_predispatch>
|
67 |
+
</events>
|
68 |
+
</adminhtml>
|
69 |
+
<default>
|
70 |
+
<infinitescroll>
|
71 |
+
<general>
|
72 |
+
<enabled>1</enabled>
|
73 |
+
<jquery>1</jquery>
|
74 |
+
</general>
|
75 |
+
<instances>
|
76 |
+
<grid>1</grid>
|
77 |
+
<layer>1</layer>
|
78 |
+
<search>1</search>
|
79 |
+
<advanced>1</advanced>
|
80 |
+
</instances>
|
81 |
+
<selectors>
|
82 |
+
<content>div.category-products</content>
|
83 |
+
<next>a.next</next>
|
84 |
+
<items_grid>ul.products-grid</items_grid>
|
85 |
+
<items_list>.products-list</items_list>
|
86 |
+
<loading>div.category-products</loading>
|
87 |
+
<toolbar>.toolbar</toolbar>
|
88 |
+
<pagination>.toolbar .pager</pagination>
|
89 |
+
</selectors>
|
90 |
+
<design>
|
91 |
+
<loading_img>http://www.infinite-scroll.com/loading.gif</loading_img>
|
92 |
+
<loading_text><![CDATA[<em>Loading the next set of posts...</em>]]></loading_text>
|
93 |
+
<done_text><![CDATA[<em>Congratulations, you've reached the end of the internet.</em>]]></done_text>
|
94 |
+
<hide_toolbar>0</hide_toolbar>
|
95 |
+
<hide_pagination>1</hide_pagination>
|
96 |
+
<animate>0</animate>
|
97 |
+
<local_mode>0</local_mode>
|
98 |
+
<extra_scroll_px>150</extra_scroll_px>
|
99 |
+
<buffer_px>150</buffer_px>
|
100 |
+
<load_more_text>Load more items</load_more_text>
|
101 |
+
<load_more_threshold>5</load_more_threshold>
|
102 |
+
</design>
|
103 |
+
<memory>
|
104 |
+
<enabled>1</enabled>
|
105 |
+
</memory>
|
106 |
+
<advanced>
|
107 |
+
<ias_config>js/infinitescroll/ias_config.js</ias_config>
|
108 |
+
</advanced>
|
109 |
+
</infinitescroll>
|
110 |
+
</default>
|
111 |
+
</config>
|
app/code/community/Strategery/{Infinitescroll2 → Infinitescroll}/etc/system.xml
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
@@ -10,7 +10,7 @@
|
|
10 |
* http://opensource.org/licenses/afl-3.0.php
|
11 |
*
|
12 |
* @category Strategery
|
13 |
-
* @package
|
14 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
*
|
@@ -24,14 +24,14 @@
|
|
24 |
-->
|
25 |
<config>
|
26 |
<tabs>
|
27 |
-
<strategery translate="label" module="
|
28 |
<label>Strategery Inc. Extensions</label>
|
29 |
<sort_order>201</sort_order>
|
30 |
</strategery>
|
31 |
</tabs>
|
32 |
<sections>
|
33 |
-
<
|
34 |
-
<label>Infinite Scroll
|
35 |
<tab>strategery</tab>
|
36 |
<frontend_type>text</frontend_type>
|
37 |
<sort_order>120</sort_order>
|
@@ -56,21 +56,31 @@
|
|
56 |
<show_in_website>1</show_in_website>
|
57 |
<show_in_store>1</show_in_store>
|
58 |
</enabled>
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
<frontend_type>select</frontend_type>
|
62 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
63 |
<sort_order>1</sort_order>
|
64 |
<show_in_default>1</show_in_default>
|
65 |
<show_in_website>1</show_in_website>
|
66 |
<show_in_store>1</show_in_store>
|
67 |
-
|
|
|
68 |
</fields>
|
69 |
</general>
|
70 |
<instances translate="label">
|
71 |
<label>Instances</label>
|
72 |
<frontend_type>text</frontend_type>
|
73 |
-
<sort_order>
|
74 |
<show_in_default>1</show_in_default>
|
75 |
<show_in_website>1</show_in_website>
|
76 |
<show_in_store>1</show_in_store>
|
@@ -84,15 +94,6 @@
|
|
84 |
<show_in_website>1</show_in_website>
|
85 |
<show_in_store>1</show_in_store>
|
86 |
</grid>
|
87 |
-
<size_grid>
|
88 |
-
<label>Page size (Grid/List)</label>
|
89 |
-
<frontend_type>text</frontend_type>
|
90 |
-
<sort_order>1</sort_order>
|
91 |
-
<show_in_default>1</show_in_default>
|
92 |
-
<show_in_website>1</show_in_website>
|
93 |
-
<show_in_store>1</show_in_store>
|
94 |
-
<comment>Default page size will be used if blank.</comment>
|
95 |
-
</size_grid>
|
96 |
<layer>
|
97 |
<label>Use in Layer mode</label>
|
98 |
<frontend_type>select</frontend_type>
|
@@ -102,15 +103,6 @@
|
|
102 |
<show_in_website>1</show_in_website>
|
103 |
<show_in_store>1</show_in_store>
|
104 |
</layer>
|
105 |
-
<size_layer>
|
106 |
-
<label>Page size (Layer)</label>
|
107 |
-
<frontend_type>text</frontend_type>
|
108 |
-
<sort_order>3</sort_order>
|
109 |
-
<show_in_default>1</show_in_default>
|
110 |
-
<show_in_website>1</show_in_website>
|
111 |
-
<show_in_store>1</show_in_store>
|
112 |
-
<comment>Default page size will be used if blank.</comment>
|
113 |
-
</size_layer>
|
114 |
<search>
|
115 |
<label>Use in Search</label>
|
116 |
<frontend_type>select</frontend_type>
|
@@ -120,15 +112,6 @@
|
|
120 |
<show_in_website>1</show_in_website>
|
121 |
<show_in_store>1</show_in_store>
|
122 |
</search>
|
123 |
-
<size_search>
|
124 |
-
<label>Page size (Search)</label>
|
125 |
-
<frontend_type>text</frontend_type>
|
126 |
-
<sort_order>5</sort_order>
|
127 |
-
<show_in_default>1</show_in_default>
|
128 |
-
<show_in_website>1</show_in_website>
|
129 |
-
<show_in_store>1</show_in_store>
|
130 |
-
<comment>Default page size will be used if blank.</comment>
|
131 |
-
</size_search>
|
132 |
<advanced>
|
133 |
<label>Use in Advanced Search</label>
|
134 |
<frontend_type>select</frontend_type>
|
@@ -138,47 +121,8 @@
|
|
138 |
<show_in_website>1</show_in_website>
|
139 |
<show_in_store>1</show_in_store>
|
140 |
</advanced>
|
141 |
-
<size_advanced>
|
142 |
-
<label>Page size (Advanced Search)</label>
|
143 |
-
<frontend_type>text</frontend_type>
|
144 |
-
<sort_order>7</sort_order>
|
145 |
-
<show_in_default>1</show_in_default>
|
146 |
-
<show_in_website>1</show_in_website>
|
147 |
-
<show_in_store>1</show_in_store>
|
148 |
-
<comment>Default page size will be used if blank.</comment>
|
149 |
-
</size_advanced>
|
150 |
</fields>
|
151 |
</instances>
|
152 |
-
<cache translate="label">
|
153 |
-
<label>Cache</label>
|
154 |
-
<frontend_type>text</frontend_type>
|
155 |
-
<sort_order>2</sort_order>
|
156 |
-
<show_in_default>1</show_in_default>
|
157 |
-
<show_in_website>1</show_in_website>
|
158 |
-
<show_in_store>1</show_in_store>
|
159 |
-
<fields>
|
160 |
-
<enabled>
|
161 |
-
<label>Enabled</label>
|
162 |
-
<frontend_type>select</frontend_type>
|
163 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
164 |
-
<sort_order>0</sort_order>
|
165 |
-
<show_in_default>1</show_in_default>
|
166 |
-
<show_in_website>1</show_in_website>
|
167 |
-
<show_in_store>1</show_in_store>
|
168 |
-
</enabled>
|
169 |
-
<flush>
|
170 |
-
<label>Full InfiniteScroll 2 Cache</label>
|
171 |
-
<frontend_type>button</frontend_type>
|
172 |
-
<frontend_model>infinitescroll2/flush</frontend_model>
|
173 |
-
<sort_order>1</sort_order>
|
174 |
-
<show_in_default>1</show_in_default>
|
175 |
-
<show_in_website>1</show_in_website>
|
176 |
-
<show_in_store>1</show_in_store>
|
177 |
-
<flush_tag>infinitescroll2</flush_tag>
|
178 |
-
<flush_url>infinitescroll2/cache/flush</flush_url>
|
179 |
-
</flush>
|
180 |
-
</fields>
|
181 |
-
</cache>
|
182 |
<selectors translate="label">
|
183 |
<label>Selectors</label>
|
184 |
<frontend_type>text</frontend_type>
|
@@ -195,14 +139,22 @@
|
|
195 |
<show_in_store>1</show_in_store>
|
196 |
<comment>Selector for the element that surrounds the items you will be loading more of.</comment>
|
197 |
</content>
|
198 |
-
<
|
199 |
-
<label>
|
200 |
<sort_order>2</sort_order>
|
201 |
<show_in_default>1</show_in_default>
|
202 |
<show_in_website>1</show_in_website>
|
203 |
<show_in_store>1</show_in_store>
|
204 |
-
<comment>Selector for the
|
205 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
<next>
|
207 |
<label>Next</label>
|
208 |
<sort_order>3</sort_order>
|
@@ -211,22 +163,21 @@
|
|
211 |
<show_in_store>1</show_in_store>
|
212 |
<comment>Selector for the link to the next page.</comment>
|
213 |
</next>
|
214 |
-
<
|
215 |
-
<label>Items</label>
|
216 |
<sort_order>4</sort_order>
|
217 |
<show_in_default>1</show_in_default>
|
218 |
<show_in_website>1</show_in_website>
|
219 |
<show_in_store>1</show_in_store>
|
220 |
<comment>Selector for all items you'll retrieve.</comment>
|
221 |
-
</
|
222 |
-
<
|
223 |
-
<label>
|
224 |
<sort_order>5</sort_order>
|
225 |
<show_in_default>1</show_in_default>
|
226 |
<show_in_website>1</show_in_website>
|
227 |
<show_in_store>1</show_in_store>
|
228 |
-
|
229 |
-
</loading>
|
230 |
</fields>
|
231 |
</selectors>
|
232 |
<design translate="label">
|
@@ -243,6 +194,7 @@
|
|
243 |
<show_in_default>1</show_in_default>
|
244 |
<show_in_website>1</show_in_website>
|
245 |
<show_in_store>1</show_in_store>
|
|
|
246 |
</loading_img>
|
247 |
<loading_text>
|
248 |
<label>Loading Text</label>
|
@@ -258,53 +210,86 @@
|
|
258 |
<show_in_website>1</show_in_website>
|
259 |
<show_in_store>1</show_in_store>
|
260 |
</done_text>
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
<show_in_default>1</show_in_default>
|
267 |
<show_in_website>1</show_in_website>
|
268 |
<show_in_store>1</show_in_store>
|
269 |
-
<comment>
|
270 |
-
|
|
|
|
|
|
|
271 |
<hide_toolbar>
|
272 |
<label>Hide Toolbar</label>
|
273 |
<frontend_type>select</frontend_type>
|
274 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
275 |
-
<sort_order>
|
276 |
<show_in_default>1</show_in_default>
|
277 |
<show_in_website>1</show_in_website>
|
278 |
<show_in_store>1</show_in_store>
|
|
|
279 |
</hide_toolbar>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
<local_mode>
|
281 |
<label>Local Mode</label>
|
282 |
<frontend_type>select</frontend_type>
|
283 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
284 |
-
<sort_order>
|
285 |
<show_in_default>1</show_in_default>
|
286 |
<show_in_website>1</show_in_website>
|
287 |
<show_in_store>1</show_in_store>
|
288 |
<comment>Instead of watching the entire window scrolling, watch only the element this plugin was called on (set in Selectors->Content).</comment>
|
289 |
</local_mode>
|
290 |
-
<extra_scroll_px>
|
291 |
-
<label>Extra Scroll (px)</label>
|
292 |
-
<validate>validate-digits</validate>
|
293 |
-
<sort_order>6</sort_order>
|
294 |
-
<show_in_default>1</show_in_default>
|
295 |
-
<show_in_website>1</show_in_website>
|
296 |
-
<show_in_store>1</show_in_store>
|
297 |
-
<comment>Number of pixels the page will scroll in addition to the height of the loaded DIV. Animate must be 'yes' in order for this to take effect.</comment>
|
298 |
-
</extra_scroll_px>
|
299 |
<buffer_px>
|
300 |
<label>Buffer (px)</label>
|
|
|
301 |
<validate>validate-digits</validate>
|
302 |
-
<sort_order>
|
303 |
<show_in_default>1</show_in_default>
|
304 |
<show_in_website>1</show_in_website>
|
305 |
<show_in_store>1</show_in_store>
|
306 |
<comment>Set an offset before page end from which the content will start to load. A high number will load the next page a long time before the user reaches the bottom of the screen.</comment>
|
307 |
</buffer_px>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
</fields>
|
309 |
</design>
|
310 |
<memory translate="label">
|
@@ -325,46 +310,29 @@
|
|
325 |
<show_in_website>1</show_in_website>
|
326 |
<show_in_store>1</show_in_store>
|
327 |
</enabled>
|
328 |
-
<each_page>
|
329 |
-
<label>Remember scroll for each product list?</label>
|
330 |
-
<frontend_type>select</frontend_type>
|
331 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
332 |
-
<sort_order>1</sort_order>
|
333 |
-
<show_in_default>1</show_in_default>
|
334 |
-
<show_in_website>1</show_in_website>
|
335 |
-
<show_in_store>1</show_in_store>
|
336 |
-
</each_page>
|
337 |
-
<limit>
|
338 |
-
<label>Limit number of pages to load</label>
|
339 |
-
<frontend_type>text</frontend_type>
|
340 |
-
<sort_order>2</sort_order>
|
341 |
-
<show_in_default>1</show_in_default>
|
342 |
-
<show_in_website>1</show_in_website>
|
343 |
-
<show_in_store>1</show_in_store>
|
344 |
-
</limit>
|
345 |
</fields>
|
346 |
</memory>
|
347 |
-
<
|
348 |
-
<label>
|
349 |
<frontend_type>text</frontend_type>
|
350 |
<sort_order>6</sort_order>
|
351 |
<show_in_default>1</show_in_default>
|
352 |
<show_in_website>1</show_in_website>
|
353 |
<show_in_store>1</show_in_store>
|
354 |
<fields>
|
355 |
-
<
|
356 |
-
<label>
|
357 |
-
<
|
358 |
-
<
|
359 |
-
<
|
360 |
<show_in_default>1</show_in_default>
|
361 |
<show_in_website>1</show_in_website>
|
362 |
<show_in_store>1</show_in_store>
|
363 |
-
<
|
364 |
-
</
|
365 |
</fields>
|
366 |
-
</
|
367 |
</groups>
|
368 |
-
</
|
369 |
</sections>
|
370 |
-
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
10 |
* http://opensource.org/licenses/afl-3.0.php
|
11 |
*
|
12 |
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll
|
14 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
*
|
24 |
-->
|
25 |
<config>
|
26 |
<tabs>
|
27 |
+
<strategery translate="label" module="infinitescroll">
|
28 |
<label>Strategery Inc. Extensions</label>
|
29 |
<sort_order>201</sort_order>
|
30 |
</strategery>
|
31 |
</tabs>
|
32 |
<sections>
|
33 |
+
<infinitescroll translate="label" module="infinitescroll">
|
34 |
+
<label>Infinite Scroll</label>
|
35 |
<tab>strategery</tab>
|
36 |
<frontend_type>text</frontend_type>
|
37 |
<sort_order>120</sort_order>
|
56 |
<show_in_website>1</show_in_website>
|
57 |
<show_in_store>1</show_in_store>
|
58 |
</enabled>
|
59 |
+
<!--<debug>-->
|
60 |
+
<!--<label>Debug Mode</label>-->
|
61 |
+
<!--<frontend_type>select</frontend_type>-->
|
62 |
+
<!--<source_model>adminhtml/system_config_source_yesno</source_model>-->
|
63 |
+
<!--<sort_order>1</sort_order>-->
|
64 |
+
<!--<show_in_default>1</show_in_default>-->
|
65 |
+
<!--<show_in_website>1</show_in_website>-->
|
66 |
+
<!--<show_in_store>1</show_in_store>-->
|
67 |
+
<!--</debug>-->
|
68 |
+
<jquery>
|
69 |
+
<label>Include jQuery</label>
|
70 |
<frontend_type>select</frontend_type>
|
71 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
72 |
<sort_order>1</sort_order>
|
73 |
<show_in_default>1</show_in_default>
|
74 |
<show_in_website>1</show_in_website>
|
75 |
<show_in_store>1</show_in_store>
|
76 |
+
<comment>Choose 'Yes' if you want us to load jQuery for you (e.g. if your theme doesn't include jQuery)</comment>
|
77 |
+
</jquery>
|
78 |
</fields>
|
79 |
</general>
|
80 |
<instances translate="label">
|
81 |
<label>Instances</label>
|
82 |
<frontend_type>text</frontend_type>
|
83 |
+
<sort_order>2</sort_order>
|
84 |
<show_in_default>1</show_in_default>
|
85 |
<show_in_website>1</show_in_website>
|
86 |
<show_in_store>1</show_in_store>
|
94 |
<show_in_website>1</show_in_website>
|
95 |
<show_in_store>1</show_in_store>
|
96 |
</grid>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
<layer>
|
98 |
<label>Use in Layer mode</label>
|
99 |
<frontend_type>select</frontend_type>
|
103 |
<show_in_website>1</show_in_website>
|
104 |
<show_in_store>1</show_in_store>
|
105 |
</layer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<search>
|
107 |
<label>Use in Search</label>
|
108 |
<frontend_type>select</frontend_type>
|
112 |
<show_in_website>1</show_in_website>
|
113 |
<show_in_store>1</show_in_store>
|
114 |
</search>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<advanced>
|
116 |
<label>Use in Advanced Search</label>
|
117 |
<frontend_type>select</frontend_type>
|
121 |
<show_in_website>1</show_in_website>
|
122 |
<show_in_store>1</show_in_store>
|
123 |
</advanced>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
</fields>
|
125 |
</instances>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
<selectors translate="label">
|
127 |
<label>Selectors</label>
|
128 |
<frontend_type>text</frontend_type>
|
139 |
<show_in_store>1</show_in_store>
|
140 |
<comment>Selector for the element that surrounds the items you will be loading more of.</comment>
|
141 |
</content>
|
142 |
+
<toolbar>
|
143 |
+
<label>Toolbar</label>
|
144 |
<sort_order>2</sort_order>
|
145 |
<show_in_default>1</show_in_default>
|
146 |
<show_in_website>1</show_in_website>
|
147 |
<show_in_store>1</show_in_store>
|
148 |
+
<comment>Selector for the toolbar (normally pagination, sort-by and display type are inside here)</comment>
|
149 |
+
</toolbar>
|
150 |
+
<pagination>
|
151 |
+
<label>Pagination</label>
|
152 |
+
<sort_order>2</sort_order>
|
153 |
+
<show_in_default>1</show_in_default>
|
154 |
+
<show_in_website>1</show_in_website>
|
155 |
+
<show_in_store>1</show_in_store>
|
156 |
+
<comment>Selector for pagination</comment>
|
157 |
+
</pagination>
|
158 |
<next>
|
159 |
<label>Next</label>
|
160 |
<sort_order>3</sort_order>
|
163 |
<show_in_store>1</show_in_store>
|
164 |
<comment>Selector for the link to the next page.</comment>
|
165 |
</next>
|
166 |
+
<items_grid>
|
167 |
+
<label>Items (grid mode)</label>
|
168 |
<sort_order>4</sort_order>
|
169 |
<show_in_default>1</show_in_default>
|
170 |
<show_in_website>1</show_in_website>
|
171 |
<show_in_store>1</show_in_store>
|
172 |
<comment>Selector for all items you'll retrieve.</comment>
|
173 |
+
</items_grid>
|
174 |
+
<items_list>
|
175 |
+
<label>Items (list mode)</label>
|
176 |
<sort_order>5</sort_order>
|
177 |
<show_in_default>1</show_in_default>
|
178 |
<show_in_website>1</show_in_website>
|
179 |
<show_in_store>1</show_in_store>
|
180 |
+
</items_list>
|
|
|
181 |
</fields>
|
182 |
</selectors>
|
183 |
<design translate="label">
|
194 |
<show_in_default>1</show_in_default>
|
195 |
<show_in_website>1</show_in_website>
|
196 |
<show_in_store>1</show_in_store>
|
197 |
+
<comment>use absolute url or relative path to skin path</comment>
|
198 |
</loading_img>
|
199 |
<loading_text>
|
200 |
<label>Loading Text</label>
|
210 |
<show_in_website>1</show_in_website>
|
211 |
<show_in_store>1</show_in_store>
|
212 |
</done_text>
|
213 |
+
<!--<animate>-->
|
214 |
+
<!--<label>Animate</label>-->
|
215 |
+
<!--<frontend_type>select</frontend_type>-->
|
216 |
+
<!--<source_model>adminhtml/system_config_source_yesno</source_model>-->
|
217 |
+
<!--<sort_order>4</sort_order>-->
|
218 |
+
<!--<show_in_default>1</show_in_default>-->
|
219 |
+
<!--<show_in_website>1</show_in_website>-->
|
220 |
+
<!--<show_in_store>1</show_in_store>-->
|
221 |
+
<!--<comment>Automatically scroll the page when new content loads.</comment>-->
|
222 |
+
<!--</animate>-->
|
223 |
+
<extra_scroll_px>
|
224 |
+
<label>Extra Scroll (px)</label>
|
225 |
+
<validate>validate-digits</validate>
|
226 |
+
<sort_order>5</sort_order>
|
227 |
<show_in_default>1</show_in_default>
|
228 |
<show_in_website>1</show_in_website>
|
229 |
<show_in_store>1</show_in_store>
|
230 |
+
<comment>Number of pixels the page will scroll in addition to the height of the loaded DIV. Animate must be 'yes' in order for this to take effect.</comment>
|
231 |
+
<depends>
|
232 |
+
<animate>1</animate>
|
233 |
+
</depends>
|
234 |
+
</extra_scroll_px>
|
235 |
<hide_toolbar>
|
236 |
<label>Hide Toolbar</label>
|
237 |
<frontend_type>select</frontend_type>
|
238 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
239 |
+
<sort_order>6</sort_order>
|
240 |
<show_in_default>1</show_in_default>
|
241 |
<show_in_website>1</show_in_website>
|
242 |
<show_in_store>1</show_in_store>
|
243 |
+
<comment>Make sure you have the right css selector for the toolbar</comment>
|
244 |
</hide_toolbar>
|
245 |
+
<!--<hide_pagination>-->
|
246 |
+
<!--<label>Hide Pagination</label>-->
|
247 |
+
<!--<frontend_type>select</frontend_type>-->
|
248 |
+
<!--<source_model>adminhtml/system_config_source_yesno</source_model>-->
|
249 |
+
<!--<sort_order>6</sort_order>-->
|
250 |
+
<!--<show_in_default>1</show_in_default>-->
|
251 |
+
<!--<show_in_website>1</show_in_website>-->
|
252 |
+
<!--<show_in_store>1</show_in_store>-->
|
253 |
+
<!--<comment>Make sure you have the right css selector for the pagination</comment>-->
|
254 |
+
<!--</hide_pagination>-->
|
255 |
<local_mode>
|
256 |
<label>Local Mode</label>
|
257 |
<frontend_type>select</frontend_type>
|
258 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
259 |
+
<sort_order>7</sort_order>
|
260 |
<show_in_default>1</show_in_default>
|
261 |
<show_in_website>1</show_in_website>
|
262 |
<show_in_store>1</show_in_store>
|
263 |
<comment>Instead of watching the entire window scrolling, watch only the element this plugin was called on (set in Selectors->Content).</comment>
|
264 |
</local_mode>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
<buffer_px>
|
266 |
<label>Buffer (px)</label>
|
267 |
+
<frontend_type>text</frontend_type>
|
268 |
<validate>validate-digits</validate>
|
269 |
+
<sort_order>8</sort_order>
|
270 |
<show_in_default>1</show_in_default>
|
271 |
<show_in_website>1</show_in_website>
|
272 |
<show_in_store>1</show_in_store>
|
273 |
<comment>Set an offset before page end from which the content will start to load. A high number will load the next page a long time before the user reaches the bottom of the screen.</comment>
|
274 |
</buffer_px>
|
275 |
+
<load_more_threshold>
|
276 |
+
<label>Load More threshold</label>
|
277 |
+
<frontend_type>text</frontend_type>
|
278 |
+
<validate>validate-digits</validate>
|
279 |
+
<sort_order>9</sort_order>
|
280 |
+
<show_in_default>1</show_in_default>
|
281 |
+
<show_in_website>1</show_in_website>
|
282 |
+
<show_in_store>1</show_in_store>
|
283 |
+
<comment>When this page number is reached, a button to load more products will be shown instead of continue loading products automatically with the scroll (this could be useful to help the user to reach the footer). TIP: use a high number to disable this feature.</comment>
|
284 |
+
</load_more_threshold>
|
285 |
+
<load_more_text>
|
286 |
+
<label>Load More button text</label>
|
287 |
+
<frontend_type>text</frontend_type>
|
288 |
+
<sort_order>10</sort_order>
|
289 |
+
<show_in_default>1</show_in_default>
|
290 |
+
<show_in_website>1</show_in_website>
|
291 |
+
<show_in_store>1</show_in_store>
|
292 |
+
</load_more_text>
|
293 |
</fields>
|
294 |
</design>
|
295 |
<memory translate="label">
|
310 |
<show_in_website>1</show_in_website>
|
311 |
<show_in_store>1</show_in_store>
|
312 |
</enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
</fields>
|
314 |
</memory>
|
315 |
+
<advanced translate="label">
|
316 |
+
<label>Advanced</label>
|
317 |
<frontend_type>text</frontend_type>
|
318 |
<sort_order>6</sort_order>
|
319 |
<show_in_default>1</show_in_default>
|
320 |
<show_in_website>1</show_in_website>
|
321 |
<show_in_store>1</show_in_store>
|
322 |
<fields>
|
323 |
+
<ias_config>
|
324 |
+
<label>Custom IAS config</label>
|
325 |
+
<comment>Path to custom js file relative to the skin path. This js file must declare: window.ias_config = { /* your custom settings for IAS here */ };. For details about the custom options see: https://github.com/webcreate/infinite-ajax-scroll</comment>
|
326 |
+
<frontend_type>text</frontend_type>
|
327 |
+
<sort_order>0</sort_order>
|
328 |
<show_in_default>1</show_in_default>
|
329 |
<show_in_website>1</show_in_website>
|
330 |
<show_in_store>1</show_in_store>
|
331 |
+
<tooltip>Example: js/ias_config.js</tooltip>
|
332 |
+
</ias_config>
|
333 |
</fields>
|
334 |
+
</advanced>
|
335 |
</groups>
|
336 |
+
</infinitescroll>
|
337 |
</sections>
|
338 |
+
</config>
|
app/code/community/Strategery/Infinitescroll2/Block/Config.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll2 - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Miguel Balparda
|
17 |
-
*/
|
18 |
-
class Strategery_Infinitescroll2_Block_Config extends Mage_Core_Block_Text
|
19 |
-
{
|
20 |
-
|
21 |
-
public function setJsText($text)
|
22 |
-
{
|
23 |
-
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$text;
|
24 |
-
$val = "<script type='text/javascript' src='$url'></script>";
|
25 |
-
$this->setData('text', $val);
|
26 |
-
return $this;
|
27 |
-
}
|
28 |
-
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Strategery/Infinitescroll2/Block/Flush.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Strategery_Infinitescroll2_Block_Flush extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
-
{
|
4 |
-
|
5 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
6 |
-
$this->setElement($element);
|
7 |
-
$fromStore = $element->getScopeId();
|
8 |
-
$layout = $this->getLayout();
|
9 |
-
$flushTag = $element->getOriginalData('flush_tag');
|
10 |
-
$flushUrl = Mage::getUrl($element->getOriginalData('flush_url'));
|
11 |
-
$button = $layout->createBlock('adminhtml/widget_button')
|
12 |
-
->setType('button')
|
13 |
-
->setClass('scalable')
|
14 |
-
->setLabel('Flush Cache')
|
15 |
-
->setOnClick('javascript:executeFlush'.$flushTag.'();');
|
16 |
-
$buttonHTML = $button->toHtml();
|
17 |
-
$jsFunction = '
|
18 |
-
<script type="text/javascript">
|
19 |
-
function executeFlush'.$flushTag.'()
|
20 |
-
{
|
21 |
-
if(confirm("Are you sure?")) {
|
22 |
-
new Ajax.Request("'.$flushUrl.'",{
|
23 |
-
method: "get",
|
24 |
-
onSuccess: function(transport){
|
25 |
-
if (transport.responseText=="1"){
|
26 |
-
alert("Cache flushed.");
|
27 |
-
}
|
28 |
-
},
|
29 |
-
onFailure: function (transport){
|
30 |
-
alert("Error");
|
31 |
-
}
|
32 |
-
});
|
33 |
-
}
|
34 |
-
}
|
35 |
-
</script>';
|
36 |
-
$html = $layout->createBlock('core/text','flush-button')->setText($jsFunction.$buttonHTML)->toHtml();
|
37 |
-
return $html;
|
38 |
-
}
|
39 |
-
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Strategery/Infinitescroll2/Helper/Data.php
DELETED
@@ -1,199 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll2 - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
-
* @link http://gabrielsomoza.com/
|
18 |
-
*
|
19 |
-
* Update 2.0.0
|
20 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
21 |
-
* @link http://www.dwdesigner.com/
|
22 |
-
*/
|
23 |
-
class Strategery_Infinitescroll2_Helper_Data extends Mage_Core_Helper_Abstract
|
24 |
-
{
|
25 |
-
|
26 |
-
protected $_optionsMap;
|
27 |
-
|
28 |
-
public function __construct()
|
29 |
-
{
|
30 |
-
$this->_optionsMap = array(
|
31 |
-
'loading' => array
|
32 |
-
(
|
33 |
-
'data' => '',
|
34 |
-
'type' => 'object',
|
35 |
-
'sub-items' => array
|
36 |
-
(
|
37 |
-
'finishedMsg'=>array('data' => 'design/done_text', 'type' => 'string'),
|
38 |
-
'img'=>array('data' => 'design/loading_img', 'type' => 'string'),
|
39 |
-
'msgText'=>array('data' => 'design/loading_text', 'type' => 'string'),
|
40 |
-
'selector'=>array('data' => 'selectors/loading', 'type' => 'string-JSIE8FIX'),
|
41 |
-
)
|
42 |
-
),
|
43 |
-
'navSelector' => array('data' => 'selectors/navigation', 'type' => 'string'),
|
44 |
-
'nextSelector' => array('data' => 'selectors/next', 'type' => 'string'),
|
45 |
-
'itemSelector' => array('data' => 'selectors/items', 'type' => 'string'),
|
46 |
-
'debug' => array('data' => 'general/debug', 'type' => 'boolean'),
|
47 |
-
'animate' => array('data' => 'design/animate', 'type' => 'boolean'),
|
48 |
-
'extraScrollPx' => array('data' => 'design/extra_scroll_px', 'type' => 'integer'),
|
49 |
-
'doneText' => array('data' => 'design/done_text', 'type' => 'string'),
|
50 |
-
'bufferPx' => array('data' => 'design/buffer_px', 'type' => 'integer'),
|
51 |
-
'callback' => array('data' => 'callbacks/processed_callback', 'type' => 'function'),
|
52 |
-
'behavior' => array('data' => 'magento', 'type'=>'literal-JSIE8FIX')
|
53 |
-
);
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getConfigData($node)
|
57 |
-
{
|
58 |
-
return Mage::getStoreConfig('infinitescroll2/' . $node);
|
59 |
-
}
|
60 |
-
|
61 |
-
public function getJsConfig($optionsMap=false)
|
62 |
-
{
|
63 |
-
if(!$optionsMap){
|
64 |
-
$optionsMap=$this->_optionsMap;
|
65 |
-
}
|
66 |
-
$result='';
|
67 |
-
foreach ($optionsMap as $jsOption => $config) {
|
68 |
-
$colon=',';
|
69 |
-
$jsIE8Fix=strpos($config['type'],'-JSIE8FIX');
|
70 |
-
if($jsIE8Fix!==false){
|
71 |
-
$colon='';
|
72 |
-
$config['type']=substr($config['type'],0,$jsIE8Fix);
|
73 |
-
}
|
74 |
-
if ($value = $this->getConfigData($config['data']) || $config['type']=='object' || $config['type']=='literal') {
|
75 |
-
switch ($config['type']) {
|
76 |
-
case 'string':
|
77 |
-
$value = '"' . $this->getConfigData($config['data']) . '"'; // wrap in double quotes
|
78 |
-
break;
|
79 |
-
case 'boolean':
|
80 |
-
$value = $value == 1 ? 'true' : 'false';
|
81 |
-
break;
|
82 |
-
case 'object':
|
83 |
-
$value='""';
|
84 |
-
if(is_array($config['sub-items']))
|
85 |
-
{
|
86 |
-
$value="{\n";
|
87 |
-
foreach($config['sub-items'] as $name=>$subItem)
|
88 |
-
{
|
89 |
-
$value .= $this->getJsConfig(array($name=>$subItem));
|
90 |
-
}
|
91 |
-
$value.='}';
|
92 |
-
}
|
93 |
-
break;
|
94 |
-
case 'literal':
|
95 |
-
$value = '"' . $config['data'] . '"';
|
96 |
-
break;
|
97 |
-
default:
|
98 |
-
// nothing
|
99 |
-
}
|
100 |
-
$result .= "'{$jsOption}': {$value}$colon\n";
|
101 |
-
}
|
102 |
-
}
|
103 |
-
return $result;
|
104 |
-
}
|
105 |
-
|
106 |
-
public function isMemoryActive()
|
107 |
-
{
|
108 |
-
return $this->getConfigData('memory/enabled');
|
109 |
-
}
|
110 |
-
|
111 |
-
public function isScrollCall()
|
112 |
-
{
|
113 |
-
$result=false;
|
114 |
-
if(Mage::app()->getRequest()->getParam('scrollCall')==1) {
|
115 |
-
$result=true;
|
116 |
-
}
|
117 |
-
return $result;
|
118 |
-
}
|
119 |
-
|
120 |
-
public function getNextPageNumber()
|
121 |
-
{
|
122 |
-
return Mage::app()->getRequest()->getParam('p');
|
123 |
-
}
|
124 |
-
|
125 |
-
public function isMemoryEnableForEachPage()
|
126 |
-
{
|
127 |
-
return $this->getConfigData('memory/each_page');
|
128 |
-
}
|
129 |
-
|
130 |
-
public function hasMemoryLimit()
|
131 |
-
{
|
132 |
-
$result = false;
|
133 |
-
if($this->getConfigData('memory/limit') && $this->getConfigData('memory/limit')>1) {
|
134 |
-
$result=$this->getConfigData('memory/limit');
|
135 |
-
}
|
136 |
-
return $result;
|
137 |
-
}
|
138 |
-
|
139 |
-
public function getSession()
|
140 |
-
{
|
141 |
-
return Mage::getSingleton("core/session");
|
142 |
-
}
|
143 |
-
|
144 |
-
public function initMemory()
|
145 |
-
{
|
146 |
-
$result = false;
|
147 |
-
if($this->getSession()->setData('infiniteScroll',array())) {
|
148 |
-
$result=true;
|
149 |
-
}
|
150 |
-
return $result;
|
151 |
-
}
|
152 |
-
|
153 |
-
public function saveMemory($pageNumber,$page=false)
|
154 |
-
{
|
155 |
-
$data = $this->getSession()->getData('infiniteScroll');
|
156 |
-
if($page!=false && $this->isMemoryEnableForEachPage()) {
|
157 |
-
$data[$page] = $pageNumber;
|
158 |
-
}
|
159 |
-
else {
|
160 |
-
$data['generic']=$pageNumber;
|
161 |
-
}
|
162 |
-
$this->getSession()->setData('infiniteScroll',$data);
|
163 |
-
}
|
164 |
-
|
165 |
-
public function loadMemory($page=false)
|
166 |
-
{
|
167 |
-
$result = false;
|
168 |
-
$data=$this->getSession()->getData('infiniteScroll');
|
169 |
-
if($page!=false && $this->isMemoryEnableForEachPage()) {
|
170 |
-
$result = $data[$page];
|
171 |
-
}
|
172 |
-
else {
|
173 |
-
$result = $data['generic'];
|
174 |
-
}
|
175 |
-
return $result;
|
176 |
-
}
|
177 |
-
|
178 |
-
public function isCacheEnabled()
|
179 |
-
{
|
180 |
-
return $this->getConfigData('cache/enabled');
|
181 |
-
}
|
182 |
-
|
183 |
-
public function flushCache()
|
184 |
-
{
|
185 |
-
$result = false;
|
186 |
-
try {
|
187 |
-
Mage::getModel('core/design_package')->cleanMergedJsCss();
|
188 |
-
Mage::dispatchEvent('clean_media_cache_after');
|
189 |
-
$cache = Mage::getSingleton('core/cache');
|
190 |
-
$cache->flush("infinitescroll2");
|
191 |
-
$result = '1';
|
192 |
-
}
|
193 |
-
catch (Exception $e) {
|
194 |
-
$this->_getSession()->addError($e->getMessage());
|
195 |
-
}
|
196 |
-
return $result;
|
197 |
-
}
|
198 |
-
|
199 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Strategery/Infinitescroll2/Model/Catalog/Observer.php
DELETED
@@ -1,198 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll2 - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
17 |
-
* @link http://www.dwdesigner.com/
|
18 |
-
*/
|
19 |
-
class Strategery_Infinitescroll2_Model_Catalog_Observer
|
20 |
-
{
|
21 |
-
|
22 |
-
public function modifyCollection($observer)
|
23 |
-
{
|
24 |
-
// check general and instance enable:
|
25 |
-
$whereare = $this->_whereAreWe();
|
26 |
-
if(Mage::getStoreConfig('infinitescroll2/general/enabled') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
|
27 |
-
{
|
28 |
-
// reset:
|
29 |
-
$this->hardReset();
|
30 |
-
// helper:
|
31 |
-
$helper = Mage::helper('infinitescroll2');
|
32 |
-
// observer data:
|
33 |
-
$cacheName = str_replace('/','_',Mage::app()->getRequest()->getRequestString());
|
34 |
-
if(Mage::registry('current_category'))
|
35 |
-
{
|
36 |
-
$cacheName = Mage::registry('current_category')->getId();
|
37 |
-
}
|
38 |
-
$collection = $this->_getCache($observer, $cacheName);
|
39 |
-
$lastPageNumber = $collection->getLastPageNumber();
|
40 |
-
if(Mage::registry('current_category') && $helper->isMemoryActive() && $lastPageNumber>1)
|
41 |
-
{
|
42 |
-
// info:
|
43 |
-
$pageId = Mage::registry('current_category')->getId();
|
44 |
-
$pageByParam = $helper->getNextPageNumber();
|
45 |
-
$pageLoaded = $helper->loadMemory($pageId);
|
46 |
-
// chek page size or default
|
47 |
-
if (Mage::getStoreConfig('infinitescroll2/instances/size_'.$whereare.''))
|
48 |
-
$defaultPageSize = Mage::getStoreConfig('infinitescroll2/instances/size_'.$whereare.'');
|
49 |
-
else
|
50 |
-
$defaultPageSize = $collection->getPageSize();
|
51 |
-
|
52 |
-
Mage::getSingleton('checkout/session')->setData('defautlPageSize',$defaultPageSize);
|
53 |
-
// actions:
|
54 |
-
if(!$helper->isScrollCall())
|
55 |
-
{
|
56 |
-
if(!Mage::getSingleton('checkout/session')->getData('recursiveCollection'))
|
57 |
-
{
|
58 |
-
if($pageLoaded>1)
|
59 |
-
{
|
60 |
-
Mage::getSingleton('checkout/session')->setData('recursiveCollection',true);
|
61 |
-
Mage::getSingleton('checkout/session')->setData('pageLoaded',$pageLoaded);
|
62 |
-
// replace page size:
|
63 |
-
$tmpPageSize = $defaultPageSize*$pageLoaded;
|
64 |
-
$collection->setPageSize($tmpPageSize);
|
65 |
-
}
|
66 |
-
else
|
67 |
-
{
|
68 |
-
Mage::getSingleton('checkout/session')->setData('pageLoaded','');
|
69 |
-
Mage::getSingleton('checkout/session')->setData('nextPage','');
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
else
|
74 |
-
{
|
75 |
-
$nextPage = Mage::getSingleton('checkout/session')->getData('nextPage');
|
76 |
-
if($pageLoaded>$nextPage)
|
77 |
-
{
|
78 |
-
$nextPage = $pageLoaded+1;
|
79 |
-
}
|
80 |
-
if($nextPage>1 && $nextPage<=$lastPageNumber)
|
81 |
-
{
|
82 |
-
$pageByParam=$nextPage;
|
83 |
-
}
|
84 |
-
if($nextPage<=$lastPageNumber)
|
85 |
-
{
|
86 |
-
$helper->saveMemory($pageByParam,$pageId);
|
87 |
-
}
|
88 |
-
$collection->setCurPage($pageByParam);
|
89 |
-
Mage::getSingleton('checkout/session')->setData('pageLoaded',$pageByParam);
|
90 |
-
}
|
91 |
-
}
|
92 |
-
}
|
93 |
-
return $this;
|
94 |
-
}
|
95 |
-
|
96 |
-
public function restoreCollection($observer)
|
97 |
-
{
|
98 |
-
// check general and instance enable:
|
99 |
-
$whereare = $this->_whereAreWe();
|
100 |
-
if(Mage::getStoreConfig('infinitescroll2/general/enabled') && Mage::getStoreConfig('infinitescroll2/instances/'.$whereare))
|
101 |
-
{
|
102 |
-
// helper:
|
103 |
-
$helper = Mage::helper('infinitescroll2');
|
104 |
-
// observer data:
|
105 |
-
$event = $observer->getEvent();
|
106 |
-
$collection = $event->getCollection();
|
107 |
-
$lastPageNumber = $collection->getLastPageNumber();
|
108 |
-
if(Mage::registry('current_category') && $helper->isMemoryActive() && $lastPageNumber>1)
|
109 |
-
{
|
110 |
-
// info:
|
111 |
-
$pageLoaded = Mage::getSingleton('checkout/session')->getData('pageLoaded');
|
112 |
-
$nextPageSaved = Mage::getSingleton('checkout/session')->getData('nextPage');
|
113 |
-
$tmpNext = false;
|
114 |
-
// restore page number:
|
115 |
-
$restorePageSize = Mage::getSingleton('checkout/session')->getData('defautlPageSize');
|
116 |
-
$collection->setPageSize($restorePageSize);
|
117 |
-
Mage::getSingleton('checkout/session')->setData('recursiveCollection',false);
|
118 |
-
// last page:
|
119 |
-
$lastPageNumber = $collection->getLastPageNumber();
|
120 |
-
// actions:
|
121 |
-
if(Mage::getSingleton('checkout/session')->getData('recursiveCollection'))
|
122 |
-
{
|
123 |
-
if($pageLoaded>1)
|
124 |
-
{
|
125 |
-
$tmpNext=$pageLoaded+1;
|
126 |
-
if($tmpNext<=$lastPageNumber)
|
127 |
-
{
|
128 |
-
Mage::getSingleton('checkout/session')->setData('nextPage',$tmpNext);
|
129 |
-
}
|
130 |
-
$collection->setCurPage($pageLoaded);
|
131 |
-
}
|
132 |
-
}
|
133 |
-
if(!$tmpNext)
|
134 |
-
{
|
135 |
-
$tmpNext=$pageLoaded+1;
|
136 |
-
}
|
137 |
-
if($helper->isScrollCall() && $nextPageSaved>$lastPageNumber)
|
138 |
-
{
|
139 |
-
die();
|
140 |
-
}
|
141 |
-
if($helper->isScrollCall() && $pageLoaded>1 && $pageLoaded<=$lastPageNumber)
|
142 |
-
{
|
143 |
-
Mage::getSingleton('checkout/session')->setData('nextPage',$tmpNext);
|
144 |
-
}
|
145 |
-
}
|
146 |
-
}
|
147 |
-
return $this;
|
148 |
-
}
|
149 |
-
|
150 |
-
public function hardReset()
|
151 |
-
{
|
152 |
-
if(Mage::app()->getRequest()->getParam('resetAll'))
|
153 |
-
{
|
154 |
-
$helper = Mage::helper('infinitescroll2');
|
155 |
-
$helper->getSession()->setData('defautlPageSize','');
|
156 |
-
$helper->getSession()->setData('pageLoaded','');
|
157 |
-
$helper->getSession()->setData('nextPage','');
|
158 |
-
$helper->getSession()->setData('recursiveCollection','');
|
159 |
-
$helper->getSession()->setData('infiniteScroll','');
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
public function refreshCache($observer)
|
164 |
-
{
|
165 |
-
if (Mage::app()->getRequest()->getParam("section") == "infinitescroll2") {
|
166 |
-
Mage::helper('infinitescroll2')->flushCache();
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
protected function _whereAreWe()
|
171 |
-
{
|
172 |
-
$where = 'grid';
|
173 |
-
if (Mage::registry('current_category')) { $where = "grid"; }
|
174 |
-
if(is_object(Mage::registry('current_category')) && Mage::registry('current_category')->getIsAnchor()) {
|
175 |
-
$where = "layer";
|
176 |
-
}
|
177 |
-
if (Mage::app()->getRequest()->getControllerName() == "result"){ $where = "search"; }
|
178 |
-
if (Mage::app()->getRequest()->getControllerName() == "advanced") { $where = "advanced"; }
|
179 |
-
return $where;
|
180 |
-
}
|
181 |
-
|
182 |
-
protected function _getCache ($observer, $categoryId)
|
183 |
-
{
|
184 |
-
$collection = $observer->getCollection();
|
185 |
-
if(Mage::helper('infinitescroll2')->isCacheEnabled())
|
186 |
-
{
|
187 |
-
$cache = Mage::getSingleton('core/cache');
|
188 |
-
if ($cacheCollection = $cache->load("infinitescroll2_collection_".$categoryId)) {
|
189 |
-
$collection = $cacheCollection;
|
190 |
-
}
|
191 |
-
else {
|
192 |
-
$cache->save($collection, "infinitescroll2_collection_".$categoryId,array('infinitescroll2'));
|
193 |
-
}
|
194 |
-
}
|
195 |
-
return $collection;
|
196 |
-
}
|
197 |
-
|
198 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Strategery/Infinitescroll2/controllers/CacheController.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll2 - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
17 |
-
* @link http://www.dwdesigner.com/
|
18 |
-
*/
|
19 |
-
class Strategery_Infinitescroll2_CacheController extends Mage_Core_Controller_Front_Action
|
20 |
-
{
|
21 |
-
|
22 |
-
public function flushAction()
|
23 |
-
{
|
24 |
-
$result = false;
|
25 |
-
try {
|
26 |
-
$result = Mage::helper('infinitescroll2')->flushCache();
|
27 |
-
}
|
28 |
-
catch (Exception $e) {
|
29 |
-
$this->_getSession()->addError($e->getMessage());
|
30 |
-
}
|
31 |
-
echo $result;
|
32 |
-
}
|
33 |
-
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Strategery/Infinitescroll2/etc/config.xml
DELETED
@@ -1,161 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* InfiniteScroll2 - Magento Integration
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
-
* available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
*
|
12 |
-
* @category Strategery
|
13 |
-
* @package Strategery_Infinitescroll2
|
14 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
-
*
|
17 |
-
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
-
* @link http://gabrielsomoza.com/
|
19 |
-
*
|
20 |
-
* Update 2.0.0
|
21 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
-
* @link http://www.dwdesigner.com/
|
23 |
-
*/
|
24 |
-
-->
|
25 |
-
<config>
|
26 |
-
<modules>
|
27 |
-
<Strategery_Infinitescroll2>
|
28 |
-
<version>2.1.7</version>
|
29 |
-
</Strategery_Infinitescroll2>
|
30 |
-
</modules>
|
31 |
-
<global>
|
32 |
-
<helpers>
|
33 |
-
<infinitescroll2>
|
34 |
-
<class>Strategery_Infinitescroll2_Helper</class>
|
35 |
-
</infinitescroll2>
|
36 |
-
</helpers>
|
37 |
-
<models>
|
38 |
-
<infinitescroll2>
|
39 |
-
<class>Strategery_Infinitescroll2_Model</class>
|
40 |
-
</infinitescroll2>
|
41 |
-
</models>
|
42 |
-
<blocks>
|
43 |
-
<infinitescroll2>
|
44 |
-
<class>Strategery_Infinitescroll2_Block</class>
|
45 |
-
</infinitescroll2>
|
46 |
-
</blocks>
|
47 |
-
<events>
|
48 |
-
<controller_action_postdispatch_adminhtml_system_config_save>
|
49 |
-
<observers>
|
50 |
-
<infinitescroll2_save_observer>
|
51 |
-
<type>singleton</type>
|
52 |
-
<class>Strategery_Infinitescroll2_Model_Catalog_Observer</class>
|
53 |
-
<method>refreshCache</method>
|
54 |
-
</infinitescroll2_save_observer>
|
55 |
-
</observers>
|
56 |
-
</controller_action_postdispatch_adminhtml_system_config_save>
|
57 |
-
</events>
|
58 |
-
</global>
|
59 |
-
<frontend>
|
60 |
-
<routers>
|
61 |
-
<infinitescroll2>
|
62 |
-
<use>standard</use>
|
63 |
-
<args>
|
64 |
-
<module>Strategery_Infinitescroll2</module>
|
65 |
-
<frontName>infinitescroll2</frontName>
|
66 |
-
</args>
|
67 |
-
</infinitescroll2>
|
68 |
-
</routers>
|
69 |
-
<layout>
|
70 |
-
<updates>
|
71 |
-
<infinitescroll2>
|
72 |
-
<file>strategery-infinitescroll2.xml</file>
|
73 |
-
</infinitescroll2>
|
74 |
-
</updates>
|
75 |
-
</layout>
|
76 |
-
<events>
|
77 |
-
<catalog_product_collection_load_before>
|
78 |
-
<observers>
|
79 |
-
<infinitescroll2_catalog_observer>
|
80 |
-
<type>singleton</type>
|
81 |
-
<class>Strategery_Infinitescroll2_Model_Catalog_Observer</class>
|
82 |
-
<method>modifyCollection</method>
|
83 |
-
</infinitescroll2_catalog_observer>
|
84 |
-
</observers>
|
85 |
-
</catalog_product_collection_load_before>
|
86 |
-
<catalog_product_collection_load_after>
|
87 |
-
<observers>
|
88 |
-
<infinitescroll2_catalog_observer>
|
89 |
-
<type>singleton</type>
|
90 |
-
<class>Strategery_Infinitescroll2_Model_Catalog_Observer</class>
|
91 |
-
<method>restoreCollection</method>
|
92 |
-
</infinitescroll2_catalog_observer>
|
93 |
-
</observers>
|
94 |
-
</catalog_product_collection_load_after>
|
95 |
-
</events>
|
96 |
-
</frontend>
|
97 |
-
<default>
|
98 |
-
<infinitescroll2>
|
99 |
-
<general>
|
100 |
-
<enabled>1</enabled>
|
101 |
-
<debug>0</debug>
|
102 |
-
</general>
|
103 |
-
<instances>
|
104 |
-
<grid>1</grid>
|
105 |
-
<layer>1</layer>
|
106 |
-
<search>1</search>
|
107 |
-
<advanced>1</advanced>
|
108 |
-
</instances>
|
109 |
-
<cache>
|
110 |
-
<enabled>0</enabled>
|
111 |
-
</cache>
|
112 |
-
<selectors>
|
113 |
-
<content>div.category-products</content>
|
114 |
-
<navigation>div.toolbar:last</navigation>
|
115 |
-
<next>div.pages a.next:first</next>
|
116 |
-
<items>ul.products-grid</items>
|
117 |
-
<loading>div.category-products</loading>
|
118 |
-
</selectors>
|
119 |
-
<design>
|
120 |
-
<loading_img>http://www.infinite-scroll.com/loading.gif</loading_img>
|
121 |
-
<loading_text><![CDATA[<em>Loading the next set of posts...</em>]]></loading_text>
|
122 |
-
<done_text><![CDATA[<em>Congratulations, you've reached the end of the internet.</em>]]></done_text>
|
123 |
-
<hide_toolbar>1</hide_toolbar>
|
124 |
-
<animate>0</animate>
|
125 |
-
<local_mode>0</local_mode>
|
126 |
-
<extra_scroll_px>150</extra_scroll_px>
|
127 |
-
<buffer_px>150</buffer_px>
|
128 |
-
</design>
|
129 |
-
<memory>
|
130 |
-
<enabled>1</enabled>
|
131 |
-
<each_page>0</each_page>
|
132 |
-
<each_page>30</each_page>
|
133 |
-
</memory>
|
134 |
-
<callbacks>
|
135 |
-
<processed_callback><![CDATA[ function(elements){ decorateGeneric($$('ul.products-grid'), ['odd','even','first','last']); } ]]></processed_callback>
|
136 |
-
</callbacks>
|
137 |
-
</infinitescroll2>
|
138 |
-
</default>
|
139 |
-
<adminhtml>
|
140 |
-
<acl>
|
141 |
-
<resources>
|
142 |
-
<admin>
|
143 |
-
<children>
|
144 |
-
<system>
|
145 |
-
<children>
|
146 |
-
<config>
|
147 |
-
<children>
|
148 |
-
<infinitescroll2 translate="title" module="infinitescroll2">
|
149 |
-
<title>Infinite Scroll</title>
|
150 |
-
<sort_order>50</sort_order>
|
151 |
-
</infinitescroll2>
|
152 |
-
</children>
|
153 |
-
</config>
|
154 |
-
</children>
|
155 |
-
</system>
|
156 |
-
</children>
|
157 |
-
</admin>
|
158 |
-
</resources>
|
159 |
-
</acl>
|
160 |
-
</adminhtml>
|
161 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/layout/strategery-infinitescroll.xml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
+
* @link http://gabrielsomoza.com/
|
19 |
+
*
|
20 |
+
* Update 2.0.0
|
21 |
+
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
+
* @link http://www.dwdesigner.com/
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<layout version="0.1.0">
|
26 |
+
|
27 |
+
<catalog_category_default>
|
28 |
+
<update handle="infinitescroll"/>
|
29 |
+
</catalog_category_default>
|
30 |
+
|
31 |
+
<catalog_category_layered>
|
32 |
+
<update handle="infinitescroll"/>
|
33 |
+
</catalog_category_layered>
|
34 |
+
|
35 |
+
<catalogsearch_result_index>
|
36 |
+
<update handle="infinitescroll"/>
|
37 |
+
</catalogsearch_result_index>
|
38 |
+
|
39 |
+
<catalogsearch_advanced_result>
|
40 |
+
<update handle="infinitescroll"/>
|
41 |
+
</catalogsearch_advanced_result>
|
42 |
+
|
43 |
+
|
44 |
+
<infinitescroll>
|
45 |
+
<reference name="head">
|
46 |
+
<!--
|
47 |
+
<action method="addItem" ifconfig="infinitescroll/general/enabled">
|
48 |
+
<type>js</type>
|
49 |
+
<name>jquery/infinitescroll/https.js</name>
|
50 |
+
</action>
|
51 |
+
-->
|
52 |
+
|
53 |
+
</reference>
|
54 |
+
<reference name="before_body_end">
|
55 |
+
<block type="infinitescroll/init" name="infinitescroll_init">
|
56 |
+
<action method="setTemplate">
|
57 |
+
<template>strategery/infinitescroll/init.phtml</template>
|
58 |
+
</action>
|
59 |
+
</block>
|
60 |
+
</reference>
|
61 |
+
<!--<reference name="product_list_toolbar">-->
|
62 |
+
<!--<action method="setTemplate" ifconfig="infinitescroll/design/hide_toolbar">-->
|
63 |
+
<!--<template>strategery/infinitescroll/toolbar.phtml</template>-->
|
64 |
+
<!--</action>-->
|
65 |
+
<!--</reference>-->
|
66 |
+
</infinitescroll>
|
67 |
+
|
68 |
+
</layout>
|
app/design/frontend/default/default/layout/strategery-infinitescroll2.xml
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* InfiniteScroll - Magento Integration
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
-
* available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
*
|
12 |
-
* @category Strategery
|
13 |
-
* @package Strategery_Infinitescroll2
|
14 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
-
*
|
17 |
-
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
18 |
-
* @link http://gabrielsomoza.com/
|
19 |
-
*
|
20 |
-
* Update 2.0.0
|
21 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
22 |
-
* @link http://www.dwdesigner.com/
|
23 |
-
*/
|
24 |
-
-->
|
25 |
-
<layout version="0.1.0">
|
26 |
-
<infinitescroll2_js_index>
|
27 |
-
<reference name="root">
|
28 |
-
<action method="setTemplate" ifconfig="infinitescroll2/general/enabled">
|
29 |
-
<template>strategery/infinitescroll2/js.phtml</template>
|
30 |
-
</action>
|
31 |
-
</reference>
|
32 |
-
</infinitescroll2_js_index>
|
33 |
-
|
34 |
-
<catalog_category_default>
|
35 |
-
<reference name="head">
|
36 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
37 |
-
<type>js</type>
|
38 |
-
<name>jquery/jquery.latest.min.js</name>
|
39 |
-
</action>
|
40 |
-
<!--
|
41 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
42 |
-
<type>js</type>
|
43 |
-
<name>jquery/infinitescroll2/https.js</name>
|
44 |
-
</action>
|
45 |
-
-->
|
46 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
47 |
-
<type>js</type>
|
48 |
-
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
49 |
-
</action>
|
50 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
51 |
-
<type>js</type>
|
52 |
-
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
53 |
-
</action>
|
54 |
-
</reference>
|
55 |
-
<reference name="before_body_end">
|
56 |
-
<block type="infinitescroll2/config" name="infinitescroll2_config">
|
57 |
-
<action method="setJsText">
|
58 |
-
<text>infinitescroll2/js</text>
|
59 |
-
</action>
|
60 |
-
</block>
|
61 |
-
</reference>
|
62 |
-
<reference name="product_list_toolbar">
|
63 |
-
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
64 |
-
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
65 |
-
</action>
|
66 |
-
</reference>
|
67 |
-
</catalog_category_default>
|
68 |
-
|
69 |
-
<catalog_category_layered>
|
70 |
-
<reference name="head">
|
71 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
72 |
-
<type>js</type>
|
73 |
-
<name>jquery/jquery.latest.min.js</name>
|
74 |
-
</action>
|
75 |
-
<!--
|
76 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
77 |
-
<type>js</type>
|
78 |
-
<name>jquery/infinitescroll2/https.js</name>
|
79 |
-
</action>
|
80 |
-
-->
|
81 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
82 |
-
<type>js</type>
|
83 |
-
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
84 |
-
</action>
|
85 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
86 |
-
<type>js</type>
|
87 |
-
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
88 |
-
</action>
|
89 |
-
</reference>
|
90 |
-
<reference name="before_body_end">
|
91 |
-
<block type="infinitescroll2/config" name="infinitescroll2_config">
|
92 |
-
<action method="setJsText">
|
93 |
-
<text>infinitescroll2/js</text>
|
94 |
-
</action>
|
95 |
-
</block>
|
96 |
-
</reference>
|
97 |
-
<reference name="product_list_toolbar">
|
98 |
-
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
99 |
-
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
100 |
-
</action>
|
101 |
-
</reference>
|
102 |
-
</catalog_category_layered>
|
103 |
-
|
104 |
-
<catalogsearch_result_index>
|
105 |
-
<reference name="head">
|
106 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
107 |
-
<type>js</type>
|
108 |
-
<name>jquery/jquery.latest.min.js</name>
|
109 |
-
</action>
|
110 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
111 |
-
<type>js</type>
|
112 |
-
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
113 |
-
</action>
|
114 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
115 |
-
<type>js</type>
|
116 |
-
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
117 |
-
</action>
|
118 |
-
</reference>
|
119 |
-
<reference name="before_body_end">
|
120 |
-
<block type="infinitescroll2/config" name="infinitescroll2_config">
|
121 |
-
<action method="setJsText">
|
122 |
-
<text>infinitescroll2/js</text>
|
123 |
-
</action>
|
124 |
-
</block>
|
125 |
-
</reference>
|
126 |
-
<reference name="product_list_toolbar">
|
127 |
-
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
128 |
-
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
129 |
-
</action>
|
130 |
-
</reference>
|
131 |
-
</catalogsearch_result_index>
|
132 |
-
|
133 |
-
<catalogsearch_advanced_index>
|
134 |
-
<reference name="head">
|
135 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
136 |
-
<type>js</type>
|
137 |
-
<name>jquery/jquery.latest.min.js</name>
|
138 |
-
</action>
|
139 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
140 |
-
<type>js</type>
|
141 |
-
<name>jquery/infinitescroll2/jquery.infinitescroll.js</name>
|
142 |
-
</action>
|
143 |
-
<action method="addItem" ifconfig="infinitescroll2/general/enabled">
|
144 |
-
<type>js</type>
|
145 |
-
<name>jquery/infinitescroll2/behaviors/infinitescroll-magento.js</name>
|
146 |
-
</action>
|
147 |
-
</reference>
|
148 |
-
<reference name="before_body_end">
|
149 |
-
<block type="infinitescroll2/config" name="infinitescroll2_config">
|
150 |
-
<action method="setJsText">
|
151 |
-
<text>infinitescroll2/js</text>
|
152 |
-
</action>
|
153 |
-
</block>
|
154 |
-
</reference>
|
155 |
-
<reference name="product_list_toolbar">
|
156 |
-
<action method="setTemplate" ifconfig="infinitescroll2/design/hide_toolbar">
|
157 |
-
<template>strategery/infinitescroll2/toolbar.phtml</template>
|
158 |
-
</action>
|
159 |
-
</reference>
|
160 |
-
</catalogsearch_advanced_index>
|
161 |
-
|
162 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/strategery/infinitescroll/init.phtml
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** @var $this Strategery_Infinitescroll_Block_Init */
|
3 |
+
/**
|
4 |
+
* InfiniteScroll - Magento Integration
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0),
|
9 |
+
* available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
*
|
12 |
+
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll
|
14 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
+
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
+
*
|
17 |
+
* @author Enrique Piatti (contacto@enriquepiatti.com)
|
18 |
+
*/
|
19 |
+
?>
|
20 |
+
<?php if($this->isEnabled()): ?>
|
21 |
+
<?php
|
22 |
+
$configData = $this->getConfigData();
|
23 |
+
$helper = Mage::helper('infinitescroll');
|
24 |
+
$productListMode = $this->getProductListMode();
|
25 |
+
?>
|
26 |
+
<?php if(Mage::getStoreConfig('infinitescroll/general/jquery')): ?>
|
27 |
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
28 |
+
<script>window.jQuery || document.write('<script src="<?php echo $this->getJsUrl('jquery/jquery.latest.min.js') ?>"><\/script>')</script>
|
29 |
+
<script>jQuery.noConflict();</script>
|
30 |
+
<?php endif ?>
|
31 |
+
<?php if($iasConfig = $helper->getConfigData('advanced/ias_config')) :?>
|
32 |
+
<script src="<?php echo $this->getSkinUrl($iasConfig) ?>"></script>
|
33 |
+
<?php endif ?>
|
34 |
+
<script>
|
35 |
+
|
36 |
+
windowLoadedFlag = false;
|
37 |
+
window.onload = function () {
|
38 |
+
windowLoadedFlag = true;
|
39 |
+
};
|
40 |
+
|
41 |
+
<?php // use: jQueryWaiter.execute(function(){ // safe jQuery code here }); ?>
|
42 |
+
var jQueryWaiter = function () {
|
43 |
+
var functions = [];
|
44 |
+
var timer = function() {
|
45 |
+
if (window.jQuery ) {
|
46 |
+
while (functions.length) {
|
47 |
+
functions.shift()(window.jQuery);
|
48 |
+
}
|
49 |
+
} else {
|
50 |
+
window.setTimeout(timer, 100);
|
51 |
+
}
|
52 |
+
};
|
53 |
+
timer();
|
54 |
+
return {
|
55 |
+
execute: function(onJQueryReady) {
|
56 |
+
if (window.jQuery) {
|
57 |
+
onJQueryReady(window.jQuery);
|
58 |
+
} else {
|
59 |
+
functions.push(onJQueryReady);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
};
|
63 |
+
}();
|
64 |
+
|
65 |
+
var StrategeryInfiniteScroll = {
|
66 |
+
loadScript : function(url, callback) {
|
67 |
+
var safelistener = function(){
|
68 |
+
try {
|
69 |
+
callback();
|
70 |
+
} catch(e) {
|
71 |
+
console.log(e.message);
|
72 |
+
}
|
73 |
+
};
|
74 |
+
|
75 |
+
jQuery.ajax({
|
76 |
+
url: url,
|
77 |
+
dataType: "script",
|
78 |
+
success: safelistener
|
79 |
+
// ,error: errorCallback
|
80 |
+
});
|
81 |
+
},
|
82 |
+
init: function(){
|
83 |
+
StrategeryInfiniteScroll.loadScript("<?php echo $this->getJsUrl('jquery/infinitescroll/jquery-ias.min.js') ?>", function(){
|
84 |
+
jQuery(function($) {
|
85 |
+
|
86 |
+
var config = {
|
87 |
+
container : '<?php echo $helper->getConfigData('selectors/content') ?>',
|
88 |
+
item: '<?php echo $productListMode == 'grid' ? $helper->getConfigData('selectors/items_grid') : $helper->getConfigData('selectors/items_list') ?>',
|
89 |
+
pagination: '<?php echo $helper->getConfigData('selectors/pagination') ?>',
|
90 |
+
next: '<?php echo $helper->getConfigData('selectors/next') ?>',
|
91 |
+
triggerPageThreshold: <?php echo (int) $helper->getConfigData('design/load_more_threshold') ?>,
|
92 |
+
trigger: '<?php echo $helper->jsQuoteEscape($this->__($helper->getConfigData('design/load_more_text'))) ?>',
|
93 |
+
history: <?php echo ($helper->isMemoryActive()) ? 'true' : 'false'; ?>,
|
94 |
+
noneleft: '<?php echo $helper->jsQuoteEscape($this->__($helper->getConfigData('design/done_text'))) ?>',
|
95 |
+
loader: '<img src="<?php echo $this->getLoaderImage() ?>" /> <?php echo $helper->jsQuoteEscape($this->__($helper->getConfigData('design/loading_text'))); ?>',
|
96 |
+
scrollContainer: <?php if($helper->getConfigData('design/local_mode')): ?>$('<?php echo $helper->getConfigData('selectors/content') ?>')<?php else: ?>$(window)<?php endif ?>,
|
97 |
+
thresholdMargin: -<?php echo (int) $helper->getConfigData('design/buffer_px') ?>
|
98 |
+
};
|
99 |
+
|
100 |
+
if (window.ias_config){
|
101 |
+
$.extend(config, window.ias_config);
|
102 |
+
}
|
103 |
+
|
104 |
+
$.ias(config);
|
105 |
+
|
106 |
+
$('<?php echo Mage::getStoreConfig('infinitescroll/selectors/toolbar') ?>').<?php echo $helper->getConfigData('design/hide_toolbar') ? 'hide' : 'show' ?>();
|
107 |
+
|
108 |
+
if(windowLoadedFlag){
|
109 |
+
$(window).load();
|
110 |
+
}
|
111 |
+
|
112 |
+
});
|
113 |
+
});
|
114 |
+
}
|
115 |
+
};
|
116 |
+
<?php // this will prevent executing the infinite scroll before jQuery is loaded even when jQuery is loaded after this code ?>
|
117 |
+
jQueryWaiter.execute(function(){
|
118 |
+
StrategeryInfiniteScroll.init();
|
119 |
+
});
|
120 |
+
</script>
|
121 |
+
<?php endif ?>
|
app/design/frontend/default/default/template/strategery/infinitescroll2/js.phtml
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
-
* @link http://gabrielsomoza.com/
|
18 |
-
*/
|
19 |
-
$helper = Mage::helper('infinitescroll2');
|
20 |
-
$cache = Mage::getSingleton('core/cache');
|
21 |
-
if ($jsConfig = $cache->load("infinitescroll2_jsConfig")) {
|
22 |
-
$configData = $cache->load("infinitescroll2_configData");
|
23 |
-
} else {
|
24 |
-
$jsConfig = $helper->getJsConfig();
|
25 |
-
$configData = $helper->getConfigData('selectors/content');
|
26 |
-
$cache->save($jsConfig, "infinitescroll2_jsConfig", array("infinitescroll2"));
|
27 |
-
$cache->save($configData, "infinitescroll2_configData", array("infinitescroll2"));
|
28 |
-
}
|
29 |
-
?>
|
30 |
-
jQuery(document).ready(function ($) {
|
31 |
-
$('<?php echo $configData ?>').infinitescroll({
|
32 |
-
<?php echo $jsConfig; ?>
|
33 |
-
},
|
34 |
-
<?php echo Mage::getStoreConfig('infinitescroll2/callbacks/processed_callback')?>
|
35 |
-
);
|
36 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/strategery/infinitescroll2/toolbar.phtml
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* InfiniteScroll - Magento Integration
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
8 |
-
* available through the world-wide-web at this URL:
|
9 |
-
* http://opensource.org/licenses/afl-3.0.php
|
10 |
-
*
|
11 |
-
* @category Strategery
|
12 |
-
* @package Strategery_Infinitescroll2
|
13 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
14 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
15 |
-
*
|
16 |
-
* @author Gabriel Somoza (me@gabrielsomoza.com)
|
17 |
-
* @link http://gabrielsomoza.com/
|
18 |
-
*
|
19 |
-
* Update 2.0.0
|
20 |
-
* @author Damian A. Pastorini (admin@dwdesigner.com)
|
21 |
-
* @link http://www.dwdesigner.com/
|
22 |
-
*/
|
23 |
-
?>
|
24 |
-
<?php if(Mage::getVersion()>1.3): ?>
|
25 |
-
<?php if($this->getCollection()->getSize()): ?>
|
26 |
-
<div class="toolbar" style="display:none;">
|
27 |
-
<?php echo $this->getPagerHtml() ?>
|
28 |
-
</div>
|
29 |
-
<?php endif ?>
|
30 |
-
<?php else: ?>
|
31 |
-
<?php if($this->getCollection()->getSize() && $this->getLastPageNum()>1): ?>
|
32 |
-
<table class="pager" cellspacing="0" style="display:none;">
|
33 |
-
<tr>
|
34 |
-
<td class="pages">
|
35 |
-
<strong><?php echo $this->__('Page:') ?></strong>
|
36 |
-
<ol>
|
37 |
-
<?php if (!$this->isFirstPage()): ?>
|
38 |
-
<li><a href="<?php echo $this->getPreviousPageUrl() ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" /></a></li>
|
39 |
-
<?php endif ?>
|
40 |
-
<?php foreach ($this->getPages() as $_page): ?>
|
41 |
-
<?php if ($this->isPageCurrent($_page)): ?>
|
42 |
-
<li><span class="on"><?php echo $_page ?></span></li>
|
43 |
-
<?php else: ?>
|
44 |
-
<li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
|
45 |
-
<?php endif ?>
|
46 |
-
<?php endforeach;; ?>
|
47 |
-
<?php if (!$this->isLastPage()): ?>
|
48 |
-
<li><a href="<?php echo $this->getNextPageUrl() ?>"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" /></a></li>
|
49 |
-
<?php endif ?>
|
50 |
-
</ol>
|
51 |
-
</td>
|
52 |
-
</tr>
|
53 |
-
</table>
|
54 |
-
<?php endif ?>
|
55 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/{Strategery_Infinitescroll2.xml → Strategery_Infinitescroll.xml}
RENAMED
@@ -10,7 +10,7 @@
|
|
10 |
* http://opensource.org/licenses/afl-3.0.php
|
11 |
*
|
12 |
* @category Strategery
|
13 |
-
* @package
|
14 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
*
|
@@ -20,9 +20,9 @@
|
|
20 |
-->
|
21 |
<config>
|
22 |
<modules>
|
23 |
-
<
|
24 |
<codePool>community</codePool>
|
25 |
<active>true</active>
|
26 |
-
</
|
27 |
</modules>
|
28 |
-
</config>
|
10 |
* http://opensource.org/licenses/afl-3.0.php
|
11 |
*
|
12 |
* @category Strategery
|
13 |
+
* @package Strategery_Infinitescroll
|
14 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
15 |
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
16 |
*
|
20 |
-->
|
21 |
<config>
|
22 |
<modules>
|
23 |
+
<Strategery_Infinitescroll>
|
24 |
<codePool>community</codePool>
|
25 |
<active>true</active>
|
26 |
+
</Strategery_Infinitescroll>
|
27 |
</modules>
|
28 |
+
</config>
|
js/jquery/infinitescroll/jquery-ias.js
ADDED
@@ -0,0 +1,770 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Infinite Ajax Scroll, a jQuery plugin
|
3 |
+
* Version 1.0.2
|
4 |
+
* https://github.com/webcreate/infinite-ajax-scroll
|
5 |
+
*
|
6 |
+
* Copyright (c) 2011-2013 Jeroen Fiege
|
7 |
+
* Licensed under MIT:
|
8 |
+
* https://raw.github.com/webcreate/infinite-ajax-scroll/master/MIT-LICENSE.txt
|
9 |
+
*/
|
10 |
+
|
11 |
+
(function ($) {
|
12 |
+
|
13 |
+
'use strict';
|
14 |
+
|
15 |
+
Date.now = Date.now || function () { return +new Date(); };
|
16 |
+
|
17 |
+
$.ias = function (options)
|
18 |
+
{
|
19 |
+
// setup
|
20 |
+
var opts = $.extend({}, $.ias.defaults, options);
|
21 |
+
var util = new $.ias.util(); // utilities module
|
22 |
+
var paging = new $.ias.paging(opts.scrollContainer); // paging module
|
23 |
+
var hist = (opts.history ? new $.ias.history() : false); // history module
|
24 |
+
var _self = this;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Initialize
|
28 |
+
*
|
29 |
+
* - tracks scrolling through pages
|
30 |
+
* - remembers current page with the history module
|
31 |
+
* - setup scroll event and hides pagination element
|
32 |
+
* - loads and scrolls to previous page when we have something in our history
|
33 |
+
*
|
34 |
+
* @return self
|
35 |
+
*/
|
36 |
+
function init()
|
37 |
+
{
|
38 |
+
var pageNum;
|
39 |
+
|
40 |
+
// track page number changes
|
41 |
+
paging.onChangePage(function (pageNum, scrollOffset, pageUrl) {
|
42 |
+
if (hist) {
|
43 |
+
hist.setPage(pageNum, pageUrl);
|
44 |
+
}
|
45 |
+
|
46 |
+
// call onPageChange event
|
47 |
+
opts.onPageChange.call(this, pageNum, pageUrl, scrollOffset);
|
48 |
+
});
|
49 |
+
|
50 |
+
if (opts.triggerPageThreshold > 0) {
|
51 |
+
// setup scroll and hide pagination
|
52 |
+
reset();
|
53 |
+
} else if ($(opts.next).attr('href')) {
|
54 |
+
var curScrOffset = util.getCurrentScrollOffset(opts.scrollContainer);
|
55 |
+
show_trigger(function () {
|
56 |
+
paginate(curScrOffset);
|
57 |
+
});
|
58 |
+
}
|
59 |
+
|
60 |
+
// load and scroll to previous page
|
61 |
+
if (hist && hist.havePage()) {
|
62 |
+
stop_scroll();
|
63 |
+
|
64 |
+
pageNum = hist.getPage();
|
65 |
+
util.forceScrollTop(function () {
|
66 |
+
var curThreshold;
|
67 |
+
if (pageNum > 1) {
|
68 |
+
paginateToPage(pageNum);
|
69 |
+
|
70 |
+
curThreshold = get_scroll_threshold(true);
|
71 |
+
$('html, body').scrollTop(curThreshold);
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
reset();
|
75 |
+
}
|
76 |
+
});
|
77 |
+
}
|
78 |
+
|
79 |
+
return _self;
|
80 |
+
}
|
81 |
+
|
82 |
+
// initialize
|
83 |
+
init();
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Reset scrolling and hide pagination links
|
87 |
+
*
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
function reset()
|
91 |
+
{
|
92 |
+
hide_pagination();
|
93 |
+
|
94 |
+
opts.scrollContainer.scroll(scroll_handler);
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Scroll event handler
|
99 |
+
*
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
function scroll_handler()
|
103 |
+
{
|
104 |
+
var curScrOffset,
|
105 |
+
scrThreshold;
|
106 |
+
|
107 |
+
curScrOffset = util.getCurrentScrollOffset(opts.scrollContainer);
|
108 |
+
scrThreshold = get_scroll_threshold();
|
109 |
+
|
110 |
+
if (curScrOffset >= scrThreshold) {
|
111 |
+
if (get_current_page() >= opts.triggerPageThreshold) {
|
112 |
+
stop_scroll();
|
113 |
+
show_trigger(function () {
|
114 |
+
paginate(curScrOffset);
|
115 |
+
});
|
116 |
+
}
|
117 |
+
else {
|
118 |
+
paginate(curScrOffset);
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Cancel scrolling
|
125 |
+
*
|
126 |
+
* @return void
|
127 |
+
*/
|
128 |
+
function stop_scroll()
|
129 |
+
{
|
130 |
+
opts.scrollContainer.unbind('scroll', scroll_handler);
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Hide pagination
|
135 |
+
*
|
136 |
+
* @return void
|
137 |
+
*/
|
138 |
+
function hide_pagination()
|
139 |
+
{
|
140 |
+
$(opts.pagination).hide();
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Get scroll threshold based on the last item element
|
145 |
+
*
|
146 |
+
* @param boolean pure indicates if the thresholdMargin should be applied
|
147 |
+
* @return integer threshold
|
148 |
+
*/
|
149 |
+
function get_scroll_threshold(pure)
|
150 |
+
{
|
151 |
+
var el,
|
152 |
+
threshold;
|
153 |
+
|
154 |
+
el = $(opts.container).find(opts.item).last();
|
155 |
+
|
156 |
+
if (el.size() === 0) {
|
157 |
+
return 0;
|
158 |
+
}
|
159 |
+
|
160 |
+
threshold = el.offset().top + el.height();
|
161 |
+
|
162 |
+
if (!pure) {
|
163 |
+
threshold += opts.thresholdMargin;
|
164 |
+
}
|
165 |
+
|
166 |
+
return threshold;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Load the items from the next page.
|
171 |
+
*
|
172 |
+
* @param int curScrOffset current scroll offset
|
173 |
+
* @param function onCompleteHandler callback function
|
174 |
+
* @return void
|
175 |
+
*/
|
176 |
+
function paginate(curScrOffset, onCompleteHandler)
|
177 |
+
{
|
178 |
+
var urlNextPage;
|
179 |
+
|
180 |
+
urlNextPage = $(opts.next).attr('href');
|
181 |
+
if (!urlNextPage) {
|
182 |
+
return stop_scroll();
|
183 |
+
}
|
184 |
+
|
185 |
+
if (opts.beforePageChange && $.isFunction(opts.beforePageChange)) {
|
186 |
+
if (opts.beforePageChange(curScrOffset, urlNextPage) === false) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
paging.pushPages(curScrOffset, urlNextPage);
|
192 |
+
|
193 |
+
stop_scroll();
|
194 |
+
show_loader();
|
195 |
+
|
196 |
+
loadItems(urlNextPage, function (data, items) {
|
197 |
+
// call the onLoadItems callback
|
198 |
+
var result = opts.onLoadItems.call(this, items),
|
199 |
+
curLastItem;
|
200 |
+
|
201 |
+
if (result !== false) {
|
202 |
+
$(items).hide(); // at first, hide it so we can fade it in later
|
203 |
+
|
204 |
+
// insert them after the last item with a nice fadeIn effect
|
205 |
+
curLastItem = $(opts.container).find(opts.item).last();
|
206 |
+
curLastItem.after(items);
|
207 |
+
$(items).fadeIn();
|
208 |
+
}
|
209 |
+
|
210 |
+
urlNextPage = $(opts.next, data).attr('href');
|
211 |
+
|
212 |
+
// update pagination
|
213 |
+
$(opts.pagination).replaceWith($(opts.pagination, data));
|
214 |
+
|
215 |
+
remove_loader();
|
216 |
+
hide_pagination();
|
217 |
+
|
218 |
+
if (urlNextPage) {
|
219 |
+
reset();
|
220 |
+
}
|
221 |
+
else {
|
222 |
+
if (opts.noneleft) {
|
223 |
+
$(opts.container).find(opts.item).last().after(opts.noneleft);
|
224 |
+
}
|
225 |
+
stop_scroll();
|
226 |
+
}
|
227 |
+
|
228 |
+
// call the onRenderComplete callback
|
229 |
+
opts.onRenderComplete.call(this, items);
|
230 |
+
|
231 |
+
if (onCompleteHandler) {
|
232 |
+
onCompleteHandler.call(this);
|
233 |
+
}
|
234 |
+
});
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Loads items from certain url, triggers
|
239 |
+
* onComplete handler when finished
|
240 |
+
*
|
241 |
+
* @param string the url to load
|
242 |
+
* @param function the callback function
|
243 |
+
* @param int minimal time the loading should take, defaults to $.ias.default.loaderDelay
|
244 |
+
* @return void
|
245 |
+
*/
|
246 |
+
function loadItems(url, onCompleteHandler, delay)
|
247 |
+
{
|
248 |
+
var items = [],
|
249 |
+
container,
|
250 |
+
startTime = Date.now(),
|
251 |
+
diffTime,
|
252 |
+
self;
|
253 |
+
|
254 |
+
delay = delay || opts.loaderDelay;
|
255 |
+
|
256 |
+
$.get(url, null, function (data) {
|
257 |
+
// walk through the items on the next page
|
258 |
+
// and add them to the items array
|
259 |
+
container = $(opts.container, data).eq(0);
|
260 |
+
if (0 === container.length) {
|
261 |
+
// incase the element is a root element (body > element),
|
262 |
+
// try to filter it
|
263 |
+
container = $(data).filter(opts.container).eq(0);
|
264 |
+
}
|
265 |
+
|
266 |
+
if (container) {
|
267 |
+
container.find(opts.item).each(function () {
|
268 |
+
items.push(this);
|
269 |
+
});
|
270 |
+
}
|
271 |
+
|
272 |
+
if (onCompleteHandler) {
|
273 |
+
self = this;
|
274 |
+
diffTime = Date.now() - startTime;
|
275 |
+
if (diffTime < delay) {
|
276 |
+
setTimeout(function () {
|
277 |
+
onCompleteHandler.call(self, data, items);
|
278 |
+
}, delay - diffTime);
|
279 |
+
} else {
|
280 |
+
onCompleteHandler.call(self, data, items);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
}, 'html');
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Paginate to a certain page number.
|
288 |
+
*
|
289 |
+
* - keeps paginating till the pageNum is reached
|
290 |
+
*
|
291 |
+
* @return void
|
292 |
+
*/
|
293 |
+
function paginateToPage(pageNum)
|
294 |
+
{
|
295 |
+
var curThreshold = get_scroll_threshold(true);
|
296 |
+
|
297 |
+
if (curThreshold > 0) {
|
298 |
+
paginate(curThreshold, function () {
|
299 |
+
stop_scroll();
|
300 |
+
|
301 |
+
if ((paging.getCurPageNum(curThreshold) + 1) < pageNum) {
|
302 |
+
paginateToPage(pageNum);
|
303 |
+
|
304 |
+
$('html,body').animate({'scrollTop': curThreshold}, 400, 'swing');
|
305 |
+
}
|
306 |
+
else {
|
307 |
+
$('html,body').animate({'scrollTop': curThreshold}, 1000, 'swing');
|
308 |
+
|
309 |
+
reset();
|
310 |
+
}
|
311 |
+
});
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
function get_current_page()
|
316 |
+
{
|
317 |
+
var curScrOffset = util.getCurrentScrollOffset(opts.scrollContainer);
|
318 |
+
|
319 |
+
return paging.getCurPageNum(curScrOffset);
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Return the active loader or creates a new loader
|
324 |
+
*
|
325 |
+
* @return object loader jquery object
|
326 |
+
*/
|
327 |
+
function get_loader()
|
328 |
+
{
|
329 |
+
var loader = $('.ias_loader');
|
330 |
+
|
331 |
+
if (loader.size() === 0) {
|
332 |
+
loader = $('<div class="ias_loader">' + opts.loader + '</div>');
|
333 |
+
loader.hide();
|
334 |
+
}
|
335 |
+
return loader;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Inserts the loader and does a fadeIn.
|
340 |
+
*
|
341 |
+
* @return void
|
342 |
+
*/
|
343 |
+
function show_loader()
|
344 |
+
{
|
345 |
+
var loader = get_loader(),
|
346 |
+
el;
|
347 |
+
|
348 |
+
if (opts.customLoaderProc !== false) {
|
349 |
+
opts.customLoaderProc(loader);
|
350 |
+
} else {
|
351 |
+
el = $(opts.container).find(opts.item).last();
|
352 |
+
el.after(loader);
|
353 |
+
loader.fadeIn();
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Removes the loader.
|
359 |
+
*
|
360 |
+
* return void
|
361 |
+
*/
|
362 |
+
function remove_loader()
|
363 |
+
{
|
364 |
+
var loader = get_loader();
|
365 |
+
loader.remove();
|
366 |
+
}
|
367 |
+
|
368 |
+
/**
|
369 |
+
* Return the active trigger or creates a new trigger
|
370 |
+
*
|
371 |
+
* @return object trigger jquery object
|
372 |
+
*/
|
373 |
+
function get_trigger(callback)
|
374 |
+
{
|
375 |
+
var trigger = $('.ias_trigger');
|
376 |
+
|
377 |
+
if (trigger.size() === 0) {
|
378 |
+
trigger = $('<div class="ias_trigger"><a href="#">' + opts.trigger + '</a></div>');
|
379 |
+
trigger.hide();
|
380 |
+
}
|
381 |
+
|
382 |
+
$('a', trigger)
|
383 |
+
.unbind('click')
|
384 |
+
.bind('click', function () { remove_trigger(); callback.call(); return false; })
|
385 |
+
;
|
386 |
+
|
387 |
+
return trigger;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* @param function callback of the trigger (get's called onClick)
|
392 |
+
*/
|
393 |
+
function show_trigger(callback)
|
394 |
+
{
|
395 |
+
var trigger = get_trigger(callback),
|
396 |
+
el;
|
397 |
+
|
398 |
+
if (opts.customTriggerProc !== false) {
|
399 |
+
opts.customTriggerProc(trigger);
|
400 |
+
} else {
|
401 |
+
el = $(opts.container).find(opts.item).last();
|
402 |
+
el.after(trigger);
|
403 |
+
trigger.fadeIn();
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Removes the trigger.
|
409 |
+
*
|
410 |
+
* return void
|
411 |
+
*/
|
412 |
+
function remove_trigger()
|
413 |
+
{
|
414 |
+
var trigger = get_trigger();
|
415 |
+
|
416 |
+
trigger.remove();
|
417 |
+
}
|
418 |
+
};
|
419 |
+
|
420 |
+
// plugin defaults
|
421 |
+
$.ias.defaults = {
|
422 |
+
container: '#container',
|
423 |
+
scrollContainer: $(window),
|
424 |
+
item: '.item',
|
425 |
+
pagination: '#pagination',
|
426 |
+
next: '.next',
|
427 |
+
noneleft: false,
|
428 |
+
loader: '<img src="images/loader.gif"/>',
|
429 |
+
loaderDelay: 600,
|
430 |
+
triggerPageThreshold: 3,
|
431 |
+
trigger: 'Load more items',
|
432 |
+
thresholdMargin: 0,
|
433 |
+
history : true,
|
434 |
+
onPageChange: function () {},
|
435 |
+
beforePageChange: function () {},
|
436 |
+
onLoadItems: function () {},
|
437 |
+
onRenderComplete: function () {},
|
438 |
+
customLoaderProc: false,
|
439 |
+
customTriggerProc: false
|
440 |
+
};
|
441 |
+
|
442 |
+
// utility module
|
443 |
+
$.ias.util = function ()
|
444 |
+
{
|
445 |
+
// setup
|
446 |
+
var wndIsLoaded = false;
|
447 |
+
var forceScrollTopIsCompleted = false;
|
448 |
+
var self = this;
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Initialize
|
452 |
+
*
|
453 |
+
* @return void
|
454 |
+
*/
|
455 |
+
function init()
|
456 |
+
{
|
457 |
+
$(window).load(function () {
|
458 |
+
wndIsLoaded = true;
|
459 |
+
});
|
460 |
+
}
|
461 |
+
|
462 |
+
// initialize
|
463 |
+
init();
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Force browsers to scroll to top.
|
467 |
+
*
|
468 |
+
* - When you hit back in you browser, it automatically scrolls
|
469 |
+
* back to the last position. There is no way to stop this
|
470 |
+
* in a nice way, so this function does it the hard way.
|
471 |
+
*
|
472 |
+
* @param function onComplete callback function
|
473 |
+
* @return void
|
474 |
+
*/
|
475 |
+
this.forceScrollTop = function (onCompleteHandler)
|
476 |
+
{
|
477 |
+
$('html,body').scrollTop(0);
|
478 |
+
if (!forceScrollTopIsCompleted) {
|
479 |
+
if (!wndIsLoaded) {
|
480 |
+
setTimeout(function () {self.forceScrollTop(onCompleteHandler); }, 1);
|
481 |
+
} else {
|
482 |
+
onCompleteHandler.call();
|
483 |
+
forceScrollTopIsCompleted = true;
|
484 |
+
}
|
485 |
+
}
|
486 |
+
};
|
487 |
+
|
488 |
+
this.getCurrentScrollOffset = function (container)
|
489 |
+
{
|
490 |
+
var scrTop,
|
491 |
+
wndHeight;
|
492 |
+
|
493 |
+
// the way we calculate if we have to load the next page depends on which container we have
|
494 |
+
if (container.get(0) === window) {
|
495 |
+
scrTop = container.scrollTop();
|
496 |
+
} else {
|
497 |
+
scrTop = container.offset().top;
|
498 |
+
}
|
499 |
+
|
500 |
+
wndHeight = container.height();
|
501 |
+
|
502 |
+
return scrTop + wndHeight;
|
503 |
+
};
|
504 |
+
};
|
505 |
+
|
506 |
+
// paging module
|
507 |
+
$.ias.paging = function ()
|
508 |
+
{
|
509 |
+
// setup
|
510 |
+
var pagebreaks = [[0, document.location.toString()]];
|
511 |
+
var changePageHandler = function () {};
|
512 |
+
var lastPageNum = 1;
|
513 |
+
var util = new $.ias.util();
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Initialize
|
517 |
+
*
|
518 |
+
* @return void
|
519 |
+
*/
|
520 |
+
function init()
|
521 |
+
{
|
522 |
+
$(window).scroll(scroll_handler);
|
523 |
+
}
|
524 |
+
|
525 |
+
// initialize
|
526 |
+
init();
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Scroll handler
|
530 |
+
*
|
531 |
+
* - Triggers changePage event
|
532 |
+
*
|
533 |
+
* @return void
|
534 |
+
*/
|
535 |
+
function scroll_handler()
|
536 |
+
{
|
537 |
+
var curScrOffset,
|
538 |
+
curPageNum,
|
539 |
+
curPagebreak,
|
540 |
+
scrOffset,
|
541 |
+
urlPage;
|
542 |
+
|
543 |
+
curScrOffset = util.getCurrentScrollOffset($(window));
|
544 |
+
|
545 |
+
curPageNum = getCurPageNum(curScrOffset);
|
546 |
+
curPagebreak = getCurPagebreak(curScrOffset);
|
547 |
+
|
548 |
+
if (lastPageNum !== curPageNum) {
|
549 |
+
scrOffset = curPagebreak[0];
|
550 |
+
urlPage = curPagebreak[1];
|
551 |
+
changePageHandler.call({}, curPageNum, scrOffset, urlPage); // @todo fix for window height
|
552 |
+
}
|
553 |
+
|
554 |
+
lastPageNum = curPageNum;
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Returns current page number based on scroll offset
|
559 |
+
*
|
560 |
+
* @param int scroll offset
|
561 |
+
* @return int current page number
|
562 |
+
*/
|
563 |
+
function getCurPageNum(scrollOffset)
|
564 |
+
{
|
565 |
+
for (var i = (pagebreaks.length - 1); i > 0; i--) {
|
566 |
+
if (scrollOffset > pagebreaks[i][0]) {
|
567 |
+
return i + 1;
|
568 |
+
}
|
569 |
+
}
|
570 |
+
return 1;
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Public function for getCurPageNum
|
575 |
+
*
|
576 |
+
* @param int scrollOffset defaulst to the current
|
577 |
+
* @return int current page number
|
578 |
+
*/
|
579 |
+
this.getCurPageNum = function (scrollOffset)
|
580 |
+
{
|
581 |
+
scrollOffset = scrollOffset || util.getCurrentScrollOffset($(window));
|
582 |
+
|
583 |
+
return getCurPageNum(scrollOffset);
|
584 |
+
};
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Returns current pagebreak information based on scroll offset
|
588 |
+
*
|
589 |
+
* @param int scroll offset
|
590 |
+
* @return array pagebreak information
|
591 |
+
*/
|
592 |
+
function getCurPagebreak(scrollOffset)
|
593 |
+
{
|
594 |
+
for (var i = (pagebreaks.length - 1); i >= 0; i--) {
|
595 |
+
if (scrollOffset > pagebreaks[i][0]) {
|
596 |
+
return pagebreaks[i];
|
597 |
+
}
|
598 |
+
}
|
599 |
+
return null;
|
600 |
+
}
|
601 |
+
|
602 |
+
/**
|
603 |
+
* Sets onchangePage event handler
|
604 |
+
*
|
605 |
+
* @param function event handler
|
606 |
+
* @return void
|
607 |
+
*/
|
608 |
+
this.onChangePage = function (fn)
|
609 |
+
{
|
610 |
+
changePageHandler = fn;
|
611 |
+
};
|
612 |
+
|
613 |
+
/**
|
614 |
+
* pushes the pages tracker
|
615 |
+
*
|
616 |
+
* @param int scroll offset for the new page
|
617 |
+
* @return void
|
618 |
+
*/
|
619 |
+
this.pushPages = function (scrollOffset, urlNextPage)
|
620 |
+
{
|
621 |
+
pagebreaks.push([scrollOffset, urlNextPage]);
|
622 |
+
};
|
623 |
+
};
|
624 |
+
|
625 |
+
// history module
|
626 |
+
$.ias.history = function ()
|
627 |
+
{
|
628 |
+
// setup
|
629 |
+
var isPushed = false;
|
630 |
+
var isHtml5 = false;
|
631 |
+
|
632 |
+
/**
|
633 |
+
* Initialize
|
634 |
+
*
|
635 |
+
* @return void
|
636 |
+
*/
|
637 |
+
function init()
|
638 |
+
{
|
639 |
+
isHtml5 = !!(window.history && history.pushState && history.replaceState);
|
640 |
+
isHtml5 = false; // html5 functions disabled due to problems in chrome
|
641 |
+
}
|
642 |
+
|
643 |
+
// initialize
|
644 |
+
init();
|
645 |
+
|
646 |
+
/**
|
647 |
+
* Sets page to history
|
648 |
+
*
|
649 |
+
* @return void;
|
650 |
+
*/
|
651 |
+
this.setPage = function (pageNum, pageUrl)
|
652 |
+
{
|
653 |
+
this.updateState({page : pageNum}, '', pageUrl);
|
654 |
+
};
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Checks if we have a page set in the history
|
658 |
+
*
|
659 |
+
* @return bool returns true when we have a previous page, false otherwise
|
660 |
+
*/
|
661 |
+
this.havePage = function ()
|
662 |
+
{
|
663 |
+
return (this.getState() !== false);
|
664 |
+
};
|
665 |
+
|
666 |
+
/**
|
667 |
+
* Gets the previous page from history
|
668 |
+
*
|
669 |
+
* @return int page number of previous page
|
670 |
+
*/
|
671 |
+
this.getPage = function ()
|
672 |
+
{
|
673 |
+
var stateObj;
|
674 |
+
|
675 |
+
if (this.havePage()) {
|
676 |
+
stateObj = this.getState();
|
677 |
+
return stateObj.page;
|
678 |
+
}
|
679 |
+
return 1;
|
680 |
+
};
|
681 |
+
|
682 |
+
/**
|
683 |
+
* Returns current state
|
684 |
+
*
|
685 |
+
* @return object stateObj
|
686 |
+
*/
|
687 |
+
this.getState = function ()
|
688 |
+
{
|
689 |
+
var haveState,
|
690 |
+
stateObj,
|
691 |
+
pageNum;
|
692 |
+
|
693 |
+
if (isHtml5) {
|
694 |
+
stateObj = history.state;
|
695 |
+
if (stateObj && stateObj.ias) {
|
696 |
+
return stateObj.ias;
|
697 |
+
}
|
698 |
+
}
|
699 |
+
else {
|
700 |
+
haveState = (window.location.hash.substring(0, 7) === '#/page/');
|
701 |
+
if (haveState) {
|
702 |
+
pageNum = parseInt(window.location.hash.replace('#/page/', ''), 10);
|
703 |
+
return { page : pageNum };
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
return false;
|
708 |
+
};
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Pushes state when not pushed already, otherwise
|
712 |
+
* replaces the state.
|
713 |
+
*
|
714 |
+
* @param obj stateObj
|
715 |
+
* @param string title
|
716 |
+
* @param string url
|
717 |
+
* @return void
|
718 |
+
*/
|
719 |
+
this.updateState = function (stateObj, title, url)
|
720 |
+
{
|
721 |
+
if (isPushed) {
|
722 |
+
this.replaceState(stateObj, title, url);
|
723 |
+
}
|
724 |
+
else {
|
725 |
+
this.pushState(stateObj, title, url);
|
726 |
+
}
|
727 |
+
};
|
728 |
+
|
729 |
+
/**
|
730 |
+
* Pushes state to history.
|
731 |
+
*
|
732 |
+
* @param obj stateObj
|
733 |
+
* @param string title
|
734 |
+
* @param string url
|
735 |
+
* @return void
|
736 |
+
*/
|
737 |
+
this.pushState = function (stateObj, title, url)
|
738 |
+
{
|
739 |
+
var hash;
|
740 |
+
|
741 |
+
if (isHtml5) {
|
742 |
+
history.pushState({ ias : stateObj }, title, url);
|
743 |
+
}
|
744 |
+
else {
|
745 |
+
hash = (stateObj.page > 0 ? '#/page/' + stateObj.page : '');
|
746 |
+
window.location.hash = hash;
|
747 |
+
}
|
748 |
+
|
749 |
+
isPushed = true;
|
750 |
+
};
|
751 |
+
|
752 |
+
/**
|
753 |
+
* Replaces current history state.
|
754 |
+
*
|
755 |
+
* @param obj stateObj
|
756 |
+
* @param string title
|
757 |
+
* @param string url
|
758 |
+
* @return void
|
759 |
+
*/
|
760 |
+
this.replaceState = function (stateObj, title, url)
|
761 |
+
{
|
762 |
+
if (isHtml5) {
|
763 |
+
history.replaceState({ ias : stateObj }, title, url);
|
764 |
+
}
|
765 |
+
else {
|
766 |
+
this.pushState(stateObj, title, url);
|
767 |
+
}
|
768 |
+
};
|
769 |
+
};
|
770 |
+
})(jQuery);
|
js/jquery/infinitescroll/jquery-ias.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Infinite Ajax Scroll, a jQuery plugin
|
3 |
+
* Version 1.0.2
|
4 |
+
* https://github.com/webcreate/infinite-ajax-scroll
|
5 |
+
*
|
6 |
+
* Copyright (c) 2011-2013 Jeroen Fiege
|
7 |
+
* Licensed under MIT:
|
8 |
+
* https://raw.github.com/webcreate/infinite-ajax-scroll/master/MIT-LICENSE.txt
|
9 |
+
*/
|
10 |
+
!function(a){"use strict";Date.now=Date.now||function(){return+new Date},a.ias=function(b){function h(){var b;if(e.onChangePage(function(a,b,d){f&&f.setPage(a,d),c.onPageChange.call(this,a,d,b)}),c.triggerPageThreshold>0)i();else if(a(c.next).attr("href")){var h=d.getCurrentScrollOffset(c.scrollContainer);v(function(){n(h)})}return f&&f.havePage()&&(k(),b=f.getPage(),d.forceScrollTop(function(){var c;b>1?(p(b),c=m(!0),a("html, body").scrollTop(c)):i()})),g}function i(){l(),c.scrollContainer.scroll(j)}function j(){var a,b;a=d.getCurrentScrollOffset(c.scrollContainer),b=m(),a>=b&&(q()>=c.triggerPageThreshold?(k(),v(function(){n(a)})):n(a))}function k(){c.scrollContainer.unbind("scroll",j)}function l(){a(c.pagination).hide()}function m(b){var d,e;return d=a(c.container).find(c.item).last(),0===d.size()?0:(e=d.offset().top+d.height(),b||(e+=c.thresholdMargin),e)}function n(b,d){var f;return(f=a(c.next).attr("href"))?(c.beforePageChange&&a.isFunction(c.beforePageChange)&&c.beforePageChange(b,f)===!1||(e.pushPages(b,f),k(),s(),o(f,function(b,e){var h,g=c.onLoadItems.call(this,e);g!==!1&&(a(e).hide(),h=a(c.container).find(c.item).last(),h.after(e),a(e).fadeIn()),f=a(c.next,b).attr("href"),a(c.pagination).replaceWith(a(c.pagination,b)),t(),l(),f?i():(c.noneleft&&a(c.container).find(c.item).last().after(c.noneleft),k()),c.onRenderComplete.call(this,e),d&&d.call(this)})),void 0):k()}function o(b,d,e){var g,i,j,f=[],h=Date.now();e=e||c.loaderDelay,a.get(b,null,function(b){g=a(c.container,b).eq(0),0===g.length&&(g=a(b).filter(c.container).eq(0)),g&&g.find(c.item).each(function(){f.push(this)}),d&&(j=this,i=Date.now()-h,e>i?setTimeout(function(){d.call(j,b,f)},e-i):d.call(j,b,f))},"html")}function p(b){var c=m(!0);c>0&&n(c,function(){k(),e.getCurPageNum(c)+1<b?(p(b),a("html,body").animate({scrollTop:c},400,"swing")):(a("html,body").animate({scrollTop:c},1e3,"swing"),i())})}function q(){var a=d.getCurrentScrollOffset(c.scrollContainer);return e.getCurPageNum(a)}function r(){var b=a(".ias_loader");return 0===b.size()&&(b=a('<div class="ias_loader">'+c.loader+"</div>"),b.hide()),b}function s(){var d,b=r();c.customLoaderProc!==!1?c.customLoaderProc(b):(d=a(c.container).find(c.item).last(),d.after(b),b.fadeIn())}function t(){var a=r();a.remove()}function u(b){var d=a(".ias_trigger");return 0===d.size()&&(d=a('<div class="ias_trigger"><a href="#">'+c.trigger+"</a></div>"),d.hide()),a("a",d).unbind("click").bind("click",function(){return w(),b.call(),!1}),d}function v(b){var e,d=u(b);c.customTriggerProc!==!1?c.customTriggerProc(d):(e=a(c.container).find(c.item).last(),e.after(d),d.fadeIn())}function w(){var a=u();a.remove()}var c=a.extend({},a.ias.defaults,b),d=new a.ias.util,e=new a.ias.paging(c.scrollContainer),f=c.history?new a.ias.history:!1,g=this;h()},a.ias.defaults={container:"#container",scrollContainer:a(window),item:".item",pagination:"#pagination",next:".next",noneleft:!1,loader:'<img src="images/loader.gif"/>',loaderDelay:600,triggerPageThreshold:3,trigger:"Load more items",thresholdMargin:0,history:!0,onPageChange:function(){},beforePageChange:function(){},onLoadItems:function(){},onRenderComplete:function(){},customLoaderProc:!1,customTriggerProc:!1},a.ias.util=function(){function e(){a(window).load(function(){b=!0})}var b=!1,c=!1,d=this;e(),this.forceScrollTop=function(e){a("html,body").scrollTop(0),c||(b?(e.call(),c=!0):setTimeout(function(){d.forceScrollTop(e)},1))},this.getCurrentScrollOffset=function(a){var b,c;return b=a.get(0)===window?a.scrollTop():a.offset().top,c=a.height(),b+c}},a.ias.paging=function(){function f(){a(window).scroll(g)}function g(){var b,f,g,j,k;b=e.getCurrentScrollOffset(a(window)),f=h(b),g=i(b),d!==f&&(j=g[0],k=g[1],c.call({},f,j,k)),d=f}function h(a){for(var c=b.length-1;c>0;c--)if(a>b[c][0])return c+1;return 1}function i(a){for(var c=b.length-1;c>=0;c--)if(a>b[c][0])return b[c];return null}var b=[[0,document.location.toString()]],c=function(){},d=1,e=new a.ias.util;f(),this.getCurPageNum=function(b){return b=b||e.getCurrentScrollOffset(a(window)),h(b)},this.onChangePage=function(a){c=a},this.pushPages=function(a,c){b.push([a,c])}},a.ias.history=function(){function c(){b=!!(window.history&&history.pushState&&history.replaceState),b=!1}var a=!1,b=!1;c(),this.setPage=function(a,b){this.updateState({page:a},"",b)},this.havePage=function(){return this.getState()!==!1},this.getPage=function(){var a;return this.havePage()?(a=this.getState(),a.page):1},this.getState=function(){var a,c,d;if(b){if(c=history.state,c&&c.ias)return c.ias}else if(a="#/page/"===window.location.hash.substring(0,7))return d=parseInt(window.location.hash.replace("#/page/",""),10),{page:d};return!1},this.updateState=function(b,c,d){a?this.replaceState(b,c,d):this.pushState(b,c,d)},this.pushState=function(c,d,e){var f;b?history.pushState({ias:c},d,e):(f=c.page>0?"#/page/"+c.page:"",window.location.hash=f),a=!0},this.replaceState=function(a,c,d){b?history.replaceState({ias:a},c,d):this.pushState(a,c,d)}}}(jQuery);
|
js/jquery/infinitescroll/jquery.easing-1.3.pack.js
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
3 |
+
*
|
4 |
+
* Uses the built in easing capabilities added In jQuery 1.1
|
5 |
+
* to offer multiple easing options
|
6 |
+
*
|
7 |
+
* TERMS OF USE - jQuery Easing
|
8 |
+
*
|
9 |
+
* Open source under the BSD License.
|
10 |
+
*
|
11 |
+
* Copyright © 2008 George McGinley Smith
|
12 |
+
* All rights reserved.
|
13 |
+
*
|
14 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
15 |
+
* are permitted provided that the following conditions are met:
|
16 |
+
*
|
17 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
18 |
+
* conditions and the following disclaimer.
|
19 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
20 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
21 |
+
* provided with the distribution.
|
22 |
+
*
|
23 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
24 |
+
* or promote products derived from this software without specific prior written permission.
|
25 |
+
*
|
26 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
27 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
28 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
29 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
30 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
31 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
32 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
33 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
34 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
|
38 |
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
39 |
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
|
40 |
+
|
41 |
+
/*
|
42 |
+
*
|
43 |
+
* TERMS OF USE - EASING EQUATIONS
|
44 |
+
*
|
45 |
+
* Open source under the BSD License.
|
46 |
+
*
|
47 |
+
* Copyright © 2001 Robert Penner
|
48 |
+
* All rights reserved.
|
49 |
+
*
|
50 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
51 |
+
* are permitted provided that the following conditions are met:
|
52 |
+
*
|
53 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
54 |
+
* conditions and the following disclaimer.
|
55 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
56 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
57 |
+
* provided with the distribution.
|
58 |
+
*
|
59 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
60 |
+
* or promote products derived from this software without specific prior written permission.
|
61 |
+
*
|
62 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
63 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
64 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
65 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
66 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
67 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
68 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
69 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
70 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
71 |
+
*
|
72 |
+
*/
|
js/jquery/infinitescroll/jquery.ui.totop.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */
|
2 |
+
(function($){$.fn.UItoTop=function(options){var defaults={text:'To Top',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1200,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('<span id="'+settings.containerHoverID+'"></span>').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});}
|
3 |
+
if(sd>settings.min)
|
4 |
+
$(containerIDhash).fadeIn(settings.inDelay);else
|
5 |
+
$(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery);
|
js/jquery/infinitescroll2/behaviors/infinitescroll-magento.js
DELETED
@@ -1,183 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* InfiniteScroll - Magento Integration
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
*
|
6 |
-
* This source file is subject to the Academic Free License (AFL 3.0),
|
7 |
-
* available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/afl-3.0.php
|
9 |
-
*
|
10 |
-
* @category Strategery
|
11 |
-
* @package Strategery_Infinitescroll2
|
12 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
13 |
-
* @copyright Copyright (c) 2011 Strategery Inc. (http://usestrategery.com)
|
14 |
-
*
|
15 |
-
* @author Nicolas Far (nicolas.far@usestrategery.com)
|
16 |
-
|
17 |
-
--------------------------------
|
18 |
-
Infinite Scroll Behavior
|
19 |
-
Behavior for Magento
|
20 |
-
--------------------------------
|
21 |
-
INFINITE SCROLL:
|
22 |
-
+ https://github.com/paulirish/infinitescroll/
|
23 |
-
+ version 2.0b2.110617
|
24 |
-
+ Copyright 2011 Paul Irish & Luke Shumard
|
25 |
-
+ Licensed under the MIT license
|
26 |
-
+ Documentation: http://infinite-scroll.com/
|
27 |
-
*/
|
28 |
-
(function($){
|
29 |
-
$(document).ready(function(){
|
30 |
-
$.extend($.infinitescroll.prototype,{
|
31 |
-
_loadcallback_magento: function infscr_loadcallback_magento (box,data) {
|
32 |
-
var opts = this.options,
|
33 |
-
callback = this.options.callback, // GLOBAL OBJECT FOR CALLBACK
|
34 |
-
result = ( opts.wasDoneLastTime || opts.isDone) ? 'done' : (!opts.appendCallback) ? 'no-append' : 'append',
|
35 |
-
originalData = data,
|
36 |
-
frag;
|
37 |
-
switch (result) {
|
38 |
-
case 'done':
|
39 |
-
this._showdonemsg();
|
40 |
-
return false;
|
41 |
-
break;
|
42 |
-
case 'no-append':
|
43 |
-
if (opts.dataType == 'html') {
|
44 |
-
data = '<div>' + data + '</div>';
|
45 |
-
data = $(data).find(opts.itemSelector);
|
46 |
-
};
|
47 |
-
break;
|
48 |
-
case 'append':
|
49 |
-
var children = box.children();
|
50 |
-
if (children.length == 0) {
|
51 |
-
return this._error('end');
|
52 |
-
}
|
53 |
-
frag = document.createDocumentFragment();
|
54 |
-
while (box[0].firstChild) {
|
55 |
-
frag.appendChild(box[0].firstChild);
|
56 |
-
}
|
57 |
-
this._debug('contentSelector', $(opts.contentSelector)[0])
|
58 |
-
$(opts.contentSelector)[0].appendChild(frag);
|
59 |
-
data = children.get();
|
60 |
-
break;
|
61 |
-
}
|
62 |
-
opts.loading.finished.call($(opts.contentSelector)[0],opts);
|
63 |
-
if (opts.animate) {
|
64 |
-
var scrollTo = $(window).scrollTop() + $('#infscr-loading').height() + opts.extraScrollPx + 'px';
|
65 |
-
$('html,body').animate({
|
66 |
-
scrollTop: scrollTo
|
67 |
-
}, 800, function () {
|
68 |
-
opts.state.isDuringAjax = false;
|
69 |
-
});
|
70 |
-
}
|
71 |
-
if (!opts.animate) opts.state.isDuringAjax = false;
|
72 |
-
// detect last page in Magento catalog
|
73 |
-
if ($(this.options.nextSelector,originalData).length==0){
|
74 |
-
this.options.wasDoneLastTime=true;
|
75 |
-
}
|
76 |
-
callback.call($(opts.contentSelector)[0], data);
|
77 |
-
},
|
78 |
-
// Retrieve next set of content items
|
79 |
-
retrieve: function infscr_retrieve(pageNum) {
|
80 |
-
|
81 |
-
var instance = this,
|
82 |
-
opts = instance.options,
|
83 |
-
path = opts.path,
|
84 |
-
box, frag, desturl, method, condition,
|
85 |
-
pageNum = pageNum || null,
|
86 |
-
getPage = (!!pageNum) ? pageNum : opts.state.currPage;
|
87 |
-
beginAjax = function infscr_ajax(opts) {
|
88 |
-
|
89 |
-
// increment the URL bit. e.g. /page/3/
|
90 |
-
opts.state.currPage++;
|
91 |
-
|
92 |
-
instance._debug('heading into ajax', path);
|
93 |
-
|
94 |
-
// if we're dealing with a table we can't use DIVs
|
95 |
-
box = $(opts.contentSelector).is('table') ? $('<tbody/>') : $('<div/>');
|
96 |
-
|
97 |
-
desturl = path.join(opts.state.currPage);
|
98 |
-
|
99 |
-
desturl += '&scrollCall=1';
|
100 |
-
|
101 |
-
method = (opts.dataType == 'html' || opts.dataType == 'json' ) ? opts.dataType : 'html+callback';
|
102 |
-
if (opts.appendCallback && opts.dataType == 'html') method += '+callback'
|
103 |
-
|
104 |
-
switch (method) {
|
105 |
-
|
106 |
-
case 'html+callback':
|
107 |
-
|
108 |
-
instance._debug('Using HTML via .load() method');
|
109 |
-
box.load(desturl + ' ' + opts.itemSelector, null, function infscr_ajax_callback(responseText) {
|
110 |
-
instance._loadcallback(box, responseText);
|
111 |
-
});
|
112 |
-
|
113 |
-
break;
|
114 |
-
|
115 |
-
case 'html':
|
116 |
-
instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
|
117 |
-
$.ajax({
|
118 |
-
// params
|
119 |
-
url: desturl,
|
120 |
-
dataType: opts.dataType,
|
121 |
-
complete: function infscr_ajax_callback(jqXHR, textStatus) {
|
122 |
-
condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
|
123 |
-
(condition) ? instance._loadcallback(box, jqXHR.responseText) : instance._error('end');
|
124 |
-
}
|
125 |
-
});
|
126 |
-
|
127 |
-
break;
|
128 |
-
case 'json':
|
129 |
-
instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
|
130 |
-
$.ajax({
|
131 |
-
dataType: 'json',
|
132 |
-
type: 'GET',
|
133 |
-
url: desturl,
|
134 |
-
success: function(data, textStatus, jqXHR) {
|
135 |
-
condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
|
136 |
-
if(opts.appendCallback) {
|
137 |
-
// if appendCallback is true, you must defined template in options.
|
138 |
-
// note that data passed into _loadcallback is already an html (after processed in opts.template(data)).
|
139 |
-
if(opts.template != undefined) {
|
140 |
-
var theData = opts.template(data);
|
141 |
-
box.append(theData);
|
142 |
-
(condition) ? instance._loadcallback(box, theData) : instance._error('end');
|
143 |
-
} else {
|
144 |
-
instance._debug("template must be defined.");
|
145 |
-
instance._error('end');
|
146 |
-
}
|
147 |
-
} else {
|
148 |
-
// if appendCallback is false, we will pass in the JSON object. you should handle it yourself in your callback.
|
149 |
-
(condition) ? instance._loadcallback(box, data) : instance._error('end');
|
150 |
-
}
|
151 |
-
},
|
152 |
-
error: function(jqXHR, textStatus, errorThrown) {
|
153 |
-
instance._debug("JSON ajax request failed.");
|
154 |
-
instance._error('end');
|
155 |
-
}
|
156 |
-
});
|
157 |
-
|
158 |
-
break;
|
159 |
-
}
|
160 |
-
};
|
161 |
-
|
162 |
-
// if behavior is defined and this function is extended, call that instead of default
|
163 |
-
if (!!opts.behavior && this['retrieve_'+opts.behavior] !== undefined) {
|
164 |
-
this['retrieve_'+opts.behavior].call(this,pageNum);
|
165 |
-
return;
|
166 |
-
}
|
167 |
-
|
168 |
-
|
169 |
-
// for manual triggers, if destroyed, get out of here
|
170 |
-
if (opts.state.isDestroyed) {
|
171 |
-
this._debug('Instance is destroyed');
|
172 |
-
return false;
|
173 |
-
};
|
174 |
-
|
175 |
-
// we dont want to fire the ajax multiple times
|
176 |
-
opts.state.isDuringAjax = true;
|
177 |
-
|
178 |
-
opts.loading.start.call($(opts.contentSelector)[0],opts);
|
179 |
-
|
180 |
-
}
|
181 |
-
});
|
182 |
-
});
|
183 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jquery/infinitescroll2/https.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
if("https:" == document.location.protocol)
|
2 |
-
{
|
3 |
-
var child;
|
4 |
-
jQuery('.pages ol li').each(function(index)
|
5 |
-
{
|
6 |
-
child = jQuery(this).children().first();
|
7 |
-
if(child.attr('href'))
|
8 |
-
{
|
9 |
-
child.attr('href',child.attr('href').replace('http://','https://'));
|
10 |
-
}
|
11 |
-
});
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jquery/infinitescroll2/jquery.infinitescroll.js
DELETED
@@ -1,747 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
--------------------------------
|
3 |
-
Infinite Scroll
|
4 |
-
--------------------------------
|
5 |
-
+ https://github.com/paulirish/infinite-scroll
|
6 |
-
+ version 2.0b2.120519
|
7 |
-
+ Copyright 2011/12 Paul Irish & Luke Shumard
|
8 |
-
+ Licensed under the MIT license
|
9 |
-
|
10 |
-
+ Documentation: http://infinite-scroll.com/
|
11 |
-
|
12 |
-
*/
|
13 |
-
|
14 |
-
(function (window, $, undefined) {
|
15 |
-
|
16 |
-
$.infinitescroll = function infscr(options, callback, element) {
|
17 |
-
|
18 |
-
this.element = $(element);
|
19 |
-
|
20 |
-
// Flag the object in the event of a failed creation
|
21 |
-
if (!this._create(options, callback)) {
|
22 |
-
this.failed = true;
|
23 |
-
}
|
24 |
-
|
25 |
-
};
|
26 |
-
|
27 |
-
$.infinitescroll.defaults = {
|
28 |
-
loading: {
|
29 |
-
finished: undefined,
|
30 |
-
finishedMsg: "<em>Congratulations, you've reached the end of the internet.</em>",
|
31 |
-
img: "http://www.infinite-scroll.com/loading.gif",
|
32 |
-
msg: null,
|
33 |
-
msgText: "<em>Loading the next set of posts...</em>",
|
34 |
-
selector: null,
|
35 |
-
speed: 'fast',
|
36 |
-
start: undefined
|
37 |
-
},
|
38 |
-
state: {
|
39 |
-
isDuringAjax: false,
|
40 |
-
isInvalidPage: false,
|
41 |
-
isDestroyed: false,
|
42 |
-
isDone: false, // For when it goes all the way through the archive.
|
43 |
-
isPaused: false,
|
44 |
-
currPage: 1
|
45 |
-
},
|
46 |
-
callback: undefined,
|
47 |
-
debug: false,
|
48 |
-
behavior: undefined,
|
49 |
-
binder: $(window), // used to cache the selector
|
50 |
-
nextSelector: "div.navigation a:first",
|
51 |
-
navSelector: "div.navigation",
|
52 |
-
contentSelector: null, // rename to pageFragment
|
53 |
-
extraScrollPx: 150,
|
54 |
-
itemSelector: "div.post",
|
55 |
-
animate: false,
|
56 |
-
pathParse: undefined,
|
57 |
-
dataType: 'html',
|
58 |
-
appendCallback: true,
|
59 |
-
bufferPx: 40,
|
60 |
-
errorCallback: function () { },
|
61 |
-
infid: 0, //Instance ID
|
62 |
-
pixelsFromNavToBottom: undefined,
|
63 |
-
path: undefined
|
64 |
-
};
|
65 |
-
|
66 |
-
|
67 |
-
$.infinitescroll.prototype = {
|
68 |
-
|
69 |
-
/*
|
70 |
-
----------------------------
|
71 |
-
Private methods
|
72 |
-
----------------------------
|
73 |
-
*/
|
74 |
-
|
75 |
-
// Bind or unbind from scroll
|
76 |
-
_binding: function infscr_binding(binding) {
|
77 |
-
|
78 |
-
var instance = this,
|
79 |
-
opts = instance.options;
|
80 |
-
|
81 |
-
opts.v = '2.0b2.111027';
|
82 |
-
|
83 |
-
// if behavior is defined and this function is extended, call that instead of default
|
84 |
-
if (!!opts.behavior && this['_binding_'+opts.behavior] !== undefined) {
|
85 |
-
this['_binding_'+opts.behavior].call(this);
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
if (binding !== 'bind' && binding !== 'unbind') {
|
90 |
-
this._debug('Binding value ' + binding + ' not valid')
|
91 |
-
return false;
|
92 |
-
}
|
93 |
-
|
94 |
-
if (binding == 'unbind') {
|
95 |
-
|
96 |
-
(this.options.binder).unbind('smartscroll.infscr.' + instance.options.infid);
|
97 |
-
|
98 |
-
} else {
|
99 |
-
|
100 |
-
(this.options.binder)[binding]('smartscroll.infscr.' + instance.options.infid, function () {
|
101 |
-
instance.scroll();
|
102 |
-
});
|
103 |
-
|
104 |
-
};
|
105 |
-
|
106 |
-
this._debug('Binding', binding);
|
107 |
-
|
108 |
-
},
|
109 |
-
|
110 |
-
// Fundamental aspects of the plugin are initialized
|
111 |
-
_create: function infscr_create(options, callback) {
|
112 |
-
|
113 |
-
// Add custom options to defaults
|
114 |
-
var opts = $.extend(true, {}, $.infinitescroll.defaults, options);
|
115 |
-
|
116 |
-
// Validate selectors
|
117 |
-
if (!this._validate(options)) { return false; }
|
118 |
-
this.options = opts;
|
119 |
-
|
120 |
-
// Validate page fragment path
|
121 |
-
var path = $(opts.nextSelector).attr('href');
|
122 |
-
if (!path) {
|
123 |
-
this._debug('Navigation selector not found');
|
124 |
-
return false;
|
125 |
-
}
|
126 |
-
|
127 |
-
// Set the path to be a relative URL from root.
|
128 |
-
opts.path = this._determinepath(path);
|
129 |
-
|
130 |
-
// contentSelector is 'page fragment' option for .load() / .ajax() calls
|
131 |
-
opts.contentSelector = opts.contentSelector || this.element;
|
132 |
-
|
133 |
-
// loading.selector - if we want to place the load message in a specific selector, defaulted to the contentSelector
|
134 |
-
opts.loading.selector = opts.loading.selector || opts.contentSelector;
|
135 |
-
|
136 |
-
// Define loading.msg
|
137 |
-
opts.loading.msg = $('<div id="infscr-loading"><img alt="Loading..." src="' + opts.loading.img + '" /><div>' + opts.loading.msgText + '</div></div>');
|
138 |
-
|
139 |
-
// Preload loading.img
|
140 |
-
(new Image()).src = opts.loading.img;
|
141 |
-
|
142 |
-
// distance from nav links to bottom
|
143 |
-
// computed as: height of the document + top offset of container - top offset of nav link
|
144 |
-
opts.pixelsFromNavToBottom = $(document).height() - $(opts.navSelector).offset().top;
|
145 |
-
|
146 |
-
// determine loading.start actions
|
147 |
-
opts.loading.start = opts.loading.start || function() {
|
148 |
-
|
149 |
-
$(opts.navSelector).hide();
|
150 |
-
opts.loading.msg
|
151 |
-
.appendTo(opts.loading.selector)
|
152 |
-
.show(opts.loading.speed, function () {
|
153 |
-
beginAjax(opts);
|
154 |
-
});
|
155 |
-
};
|
156 |
-
|
157 |
-
// determine loading.finished actions
|
158 |
-
opts.loading.finished = opts.loading.finished || function() {
|
159 |
-
opts.loading.msg.fadeOut('normal');
|
160 |
-
};
|
161 |
-
|
162 |
-
// callback loading
|
163 |
-
opts.callback = function(instance,data) {
|
164 |
-
if (!!opts.behavior && instance['_callback_'+opts.behavior] !== undefined) {
|
165 |
-
instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0], data);
|
166 |
-
}
|
167 |
-
if (callback) {
|
168 |
-
callback.call($(opts.contentSelector)[0], data, opts);
|
169 |
-
}
|
170 |
-
};
|
171 |
-
|
172 |
-
this._setup();
|
173 |
-
|
174 |
-
// Return true to indicate successful creation
|
175 |
-
return true;
|
176 |
-
},
|
177 |
-
|
178 |
-
// Console log wrapper
|
179 |
-
_debug: function infscr_debug() {
|
180 |
-
|
181 |
-
if (this.options && this.options.debug) {
|
182 |
-
return window.console && console.log.call(console, arguments);
|
183 |
-
}
|
184 |
-
|
185 |
-
},
|
186 |
-
|
187 |
-
// find the number to increment in the path.
|
188 |
-
_determinepath: function infscr_determinepath(path) {
|
189 |
-
|
190 |
-
var opts = this.options;
|
191 |
-
|
192 |
-
// if behavior is defined and this function is extended, call that instead of default
|
193 |
-
if (!!opts.behavior && this['_determinepath_'+opts.behavior] !== undefined) {
|
194 |
-
this['_determinepath_'+opts.behavior].call(this,path);
|
195 |
-
return;
|
196 |
-
}
|
197 |
-
|
198 |
-
if (!!opts.pathParse) {
|
199 |
-
|
200 |
-
this._debug('pathParse manual');
|
201 |
-
return opts.pathParse(path, this.options.state.currPage+1);
|
202 |
-
|
203 |
-
} else if (path.match(/^(.*?)\b2\b(.*?$)/)) {
|
204 |
-
path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1);
|
205 |
-
|
206 |
-
// if there is any 2 in the url at all.
|
207 |
-
} else if (path.match(/^(.*?)2(.*?$)/)) {
|
208 |
-
|
209 |
-
// page= is used in django:
|
210 |
-
// http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127
|
211 |
-
if (path.match(/^(.*?page=)2(\/.*|$)/)) {
|
212 |
-
path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1);
|
213 |
-
return path;
|
214 |
-
}
|
215 |
-
|
216 |
-
path = path.match(/^(.*?)2(.*?$)/).slice(1);
|
217 |
-
|
218 |
-
} else {
|
219 |
-
|
220 |
-
// page= is used in drupal too but second page is page=1 not page=2:
|
221 |
-
// thx Jerod Fritz, vladikoff
|
222 |
-
if (path.match(/^(.*?page=)1(\/.*|$)/)) {
|
223 |
-
path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1);
|
224 |
-
return path;
|
225 |
-
} else {
|
226 |
-
this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');
|
227 |
-
// Get rid of isInvalidPage to allow permalink to state
|
228 |
-
opts.state.isInvalidPage = true; //prevent it from running on this page.
|
229 |
-
}
|
230 |
-
}
|
231 |
-
this._debug('determinePath', path);
|
232 |
-
return path;
|
233 |
-
|
234 |
-
},
|
235 |
-
|
236 |
-
// Custom error
|
237 |
-
_error: function infscr_error(xhr) {
|
238 |
-
|
239 |
-
var opts = this.options;
|
240 |
-
|
241 |
-
// if behavior is defined and this function is extended, call that instead of default
|
242 |
-
if (!!opts.behavior && this['_error_'+opts.behavior] !== undefined) {
|
243 |
-
this['_error_'+opts.behavior].call(this,xhr);
|
244 |
-
return;
|
245 |
-
}
|
246 |
-
|
247 |
-
if (xhr !== 'destroy' && xhr !== 'end') {
|
248 |
-
xhr = 'unknown';
|
249 |
-
}
|
250 |
-
|
251 |
-
this._debug('Error', xhr);
|
252 |
-
|
253 |
-
if (xhr == 'end') {
|
254 |
-
this._showdonemsg();
|
255 |
-
}
|
256 |
-
|
257 |
-
opts.state.isDone = true;
|
258 |
-
opts.state.currPage = 1; // if you need to go back to this instance
|
259 |
-
opts.state.isPaused = false;
|
260 |
-
this._binding('unbind');
|
261 |
-
|
262 |
-
},
|
263 |
-
|
264 |
-
// Load Callback
|
265 |
-
_loadcallback: function infscr_loadcallback(box, data) {
|
266 |
-
|
267 |
-
var opts = this.options,
|
268 |
-
callback = this.options.callback, // GLOBAL OBJECT FOR CALLBACK
|
269 |
-
result = (opts.state.isDone) ? 'done' : (!opts.appendCallback) ? 'no-append' : 'append',
|
270 |
-
frag;
|
271 |
-
|
272 |
-
// if behavior is defined and this function is extended, call that instead of default
|
273 |
-
if (!!opts.behavior && this['_loadcallback_'+opts.behavior] !== undefined) {
|
274 |
-
this['_loadcallback_'+opts.behavior].call(this,box,data);
|
275 |
-
return;
|
276 |
-
}
|
277 |
-
|
278 |
-
switch (result) {
|
279 |
-
|
280 |
-
case 'done':
|
281 |
-
|
282 |
-
this._showdonemsg();
|
283 |
-
return false;
|
284 |
-
|
285 |
-
break;
|
286 |
-
|
287 |
-
case 'no-append':
|
288 |
-
|
289 |
-
if (opts.dataType == 'html') {
|
290 |
-
data = '<div>' + data + '</div>';
|
291 |
-
data = $(data).find(opts.itemSelector);
|
292 |
-
}
|
293 |
-
|
294 |
-
break;
|
295 |
-
|
296 |
-
case 'append':
|
297 |
-
|
298 |
-
var children = box.children();
|
299 |
-
|
300 |
-
// if it didn't return anything
|
301 |
-
if (children.length == 0) {
|
302 |
-
return this._error('end');
|
303 |
-
}
|
304 |
-
|
305 |
-
|
306 |
-
// use a documentFragment because it works when content is going into a table or UL
|
307 |
-
frag = document.createDocumentFragment();
|
308 |
-
while (box[0].firstChild) {
|
309 |
-
frag.appendChild(box[0].firstChild);
|
310 |
-
}
|
311 |
-
|
312 |
-
this._debug('contentSelector', $(opts.contentSelector)[0])
|
313 |
-
$(opts.contentSelector)[0].appendChild(frag);
|
314 |
-
// previously, we would pass in the new DOM element as context for the callback
|
315 |
-
// however we're now using a documentfragment, which doesnt havent parents or children,
|
316 |
-
// so the context is the contentContainer guy, and we pass in an array
|
317 |
-
// of the elements collected as the first argument.
|
318 |
-
|
319 |
-
data = children.get();
|
320 |
-
|
321 |
-
|
322 |
-
break;
|
323 |
-
|
324 |
-
}
|
325 |
-
|
326 |
-
// loadingEnd function
|
327 |
-
opts.loading.finished.call($(opts.contentSelector)[0],opts)
|
328 |
-
|
329 |
-
|
330 |
-
// smooth scroll to ease in the new content
|
331 |
-
if (opts.animate) {
|
332 |
-
var scrollTo = $(window).scrollTop() + $('#infscr-loading').height() + opts.extraScrollPx + 'px';
|
333 |
-
$('html,body').animate({ scrollTop: scrollTo }, 800, function () { opts.state.isDuringAjax = false; });
|
334 |
-
}
|
335 |
-
|
336 |
-
if (!opts.animate) opts.state.isDuringAjax = false; // once the call is done, we can allow it again.
|
337 |
-
|
338 |
-
callback(this,data);
|
339 |
-
|
340 |
-
},
|
341 |
-
|
342 |
-
_nearbottom: function infscr_nearbottom() {
|
343 |
-
|
344 |
-
var opts = this.options,
|
345 |
-
pixelsFromWindowBottomToBottom = 0 + $(document).height() - (opts.binder.scrollTop()) - $(window).height();
|
346 |
-
|
347 |
-
// if behavior is defined and this function is extended, call that instead of default
|
348 |
-
if (!!opts.behavior && this['_nearbottom_'+opts.behavior] !== undefined) {
|
349 |
-
return this['_nearbottom_'+opts.behavior].call(this);
|
350 |
-
}
|
351 |
-
|
352 |
-
this._debug('math:', pixelsFromWindowBottomToBottom, opts.pixelsFromNavToBottom);
|
353 |
-
|
354 |
-
// if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom....
|
355 |
-
return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.pixelsFromNavToBottom);
|
356 |
-
|
357 |
-
},
|
358 |
-
|
359 |
-
// Pause / temporarily disable plugin from firing
|
360 |
-
_pausing: function infscr_pausing(pause) {
|
361 |
-
|
362 |
-
var opts = this.options;
|
363 |
-
|
364 |
-
// if behavior is defined and this function is extended, call that instead of default
|
365 |
-
if (!!opts.behavior && this['_pausing_'+opts.behavior] !== undefined) {
|
366 |
-
this['_pausing_'+opts.behavior].call(this,pause);
|
367 |
-
return;
|
368 |
-
}
|
369 |
-
|
370 |
-
// If pause is not 'pause' or 'resume', toggle it's value
|
371 |
-
if (pause !== 'pause' && pause !== 'resume' && pause !== null) {
|
372 |
-
this._debug('Invalid argument. Toggling pause value instead');
|
373 |
-
};
|
374 |
-
|
375 |
-
pause = (pause && (pause == 'pause' || pause == 'resume')) ? pause : 'toggle';
|
376 |
-
|
377 |
-
switch (pause) {
|
378 |
-
case 'pause':
|
379 |
-
opts.state.isPaused = true;
|
380 |
-
break;
|
381 |
-
|
382 |
-
case 'resume':
|
383 |
-
opts.state.isPaused = false;
|
384 |
-
break;
|
385 |
-
|
386 |
-
case 'toggle':
|
387 |
-
opts.state.isPaused = !opts.state.isPaused;
|
388 |
-
break;
|
389 |
-
}
|
390 |
-
|
391 |
-
this._debug('Paused', opts.state.isPaused);
|
392 |
-
return false;
|
393 |
-
|
394 |
-
},
|
395 |
-
|
396 |
-
// Behavior is determined
|
397 |
-
// If the behavior option is undefined, it will set to default and bind to scroll
|
398 |
-
_setup: function infscr_setup() {
|
399 |
-
|
400 |
-
var opts = this.options;
|
401 |
-
|
402 |
-
// if behavior is defined and this function is extended, call that instead of default
|
403 |
-
if (!!opts.behavior && this['_setup_'+opts.behavior] !== undefined) {
|
404 |
-
this['_setup_'+opts.behavior].call(this);
|
405 |
-
return;
|
406 |
-
}
|
407 |
-
|
408 |
-
this._binding('bind');
|
409 |
-
|
410 |
-
return false;
|
411 |
-
|
412 |
-
},
|
413 |
-
|
414 |
-
// Show done message
|
415 |
-
_showdonemsg: function infscr_showdonemsg() {
|
416 |
-
|
417 |
-
var opts = this.options;
|
418 |
-
|
419 |
-
// if behavior is defined and this function is extended, call that instead of default
|
420 |
-
if (!!opts.behavior && this['_showdonemsg_'+opts.behavior] !== undefined) {
|
421 |
-
this['_showdonemsg_'+opts.behavior].call(this);
|
422 |
-
return;
|
423 |
-
}
|
424 |
-
|
425 |
-
opts.loading.msg
|
426 |
-
.find('img')
|
427 |
-
.hide()
|
428 |
-
.parent()
|
429 |
-
.find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
|
430 |
-
$(this).parent().fadeOut('normal');
|
431 |
-
});
|
432 |
-
|
433 |
-
// user provided callback when done
|
434 |
-
opts.errorCallback.call($(opts.contentSelector)[0],'done');
|
435 |
-
|
436 |
-
},
|
437 |
-
|
438 |
-
// grab each selector option and see if any fail
|
439 |
-
_validate: function infscr_validate(opts) {
|
440 |
-
|
441 |
-
for (var key in opts) {
|
442 |
-
if (key.indexOf && key.indexOf('Selector') > -1 && $(opts[key]).length === 0) {
|
443 |
-
this._debug('Your ' + key + ' found no elements.');
|
444 |
-
return false;
|
445 |
-
}
|
446 |
-
}
|
447 |
-
|
448 |
-
return true;
|
449 |
-
|
450 |
-
},
|
451 |
-
|
452 |
-
/*
|
453 |
-
----------------------------
|
454 |
-
Public methods
|
455 |
-
----------------------------
|
456 |
-
*/
|
457 |
-
|
458 |
-
// Bind to scroll
|
459 |
-
bind: function infscr_bind() {
|
460 |
-
this._binding('bind');
|
461 |
-
},
|
462 |
-
|
463 |
-
// Destroy current instance of plugin
|
464 |
-
destroy: function infscr_destroy() {
|
465 |
-
|
466 |
-
this.options.state.isDestroyed = true;
|
467 |
-
return this._error('destroy');
|
468 |
-
|
469 |
-
},
|
470 |
-
|
471 |
-
// Set pause value to false
|
472 |
-
pause: function infscr_pause() {
|
473 |
-
this._pausing('pause');
|
474 |
-
},
|
475 |
-
|
476 |
-
// Set pause value to false
|
477 |
-
resume: function infscr_resume() {
|
478 |
-
this._pausing('resume');
|
479 |
-
},
|
480 |
-
|
481 |
-
// Retrieve next set of content items
|
482 |
-
retrieve: function infscr_retrieve(pageNum) {
|
483 |
-
|
484 |
-
var instance = this,
|
485 |
-
opts = instance.options,
|
486 |
-
path = opts.path,
|
487 |
-
box, frag, desturl, method, condition,
|
488 |
-
pageNum = pageNum || null,
|
489 |
-
getPage = (!!pageNum) ? pageNum : opts.state.currPage;
|
490 |
-
beginAjax = function infscr_ajax(opts) {
|
491 |
-
|
492 |
-
// increment the URL bit. e.g. /page/3/
|
493 |
-
opts.state.currPage++;
|
494 |
-
|
495 |
-
instance._debug('heading into ajax', path);
|
496 |
-
|
497 |
-
// if we're dealing with a table we can't use DIVs
|
498 |
-
box = $(opts.contentSelector).is('table') ? $('<tbody/>') : $('<div/>');
|
499 |
-
|
500 |
-
desturl = path.join(opts.state.currPage);
|
501 |
-
|
502 |
-
method = (opts.dataType == 'html' || opts.dataType == 'json' ) ? opts.dataType : 'html+callback';
|
503 |
-
if (opts.appendCallback && opts.dataType == 'html') method += '+callback'
|
504 |
-
|
505 |
-
switch (method) {
|
506 |
-
|
507 |
-
case 'html+callback':
|
508 |
-
|
509 |
-
instance._debug('Using HTML via .load() method');
|
510 |
-
box.load(desturl + ' ' + opts.itemSelector, null, function infscr_ajax_callback(responseText) {
|
511 |
-
instance._loadcallback(box, responseText);
|
512 |
-
});
|
513 |
-
|
514 |
-
break;
|
515 |
-
|
516 |
-
case 'html':
|
517 |
-
instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
|
518 |
-
$.ajax({
|
519 |
-
// params
|
520 |
-
url: desturl,
|
521 |
-
dataType: opts.dataType,
|
522 |
-
complete: function infscr_ajax_callback(jqXHR, textStatus) {
|
523 |
-
condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
|
524 |
-
(condition) ? instance._loadcallback(box, jqXHR.responseText) : instance._error('end');
|
525 |
-
}
|
526 |
-
});
|
527 |
-
|
528 |
-
break;
|
529 |
-
case 'json':
|
530 |
-
instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method');
|
531 |
-
$.ajax({
|
532 |
-
dataType: 'json',
|
533 |
-
type: 'GET',
|
534 |
-
url: desturl,
|
535 |
-
success: function(data, textStatus, jqXHR) {
|
536 |
-
condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified");
|
537 |
-
if(opts.appendCallback) {
|
538 |
-
// if appendCallback is true, you must defined template in options.
|
539 |
-
// note that data passed into _loadcallback is already an html (after processed in opts.template(data)).
|
540 |
-
if(opts.template != undefined) {
|
541 |
-
var theData = opts.template(data);
|
542 |
-
box.append(theData);
|
543 |
-
(condition) ? instance._loadcallback(box, theData) : instance._error('end');
|
544 |
-
} else {
|
545 |
-
instance._debug("template must be defined.");
|
546 |
-
instance._error('end');
|
547 |
-
}
|
548 |
-
} else {
|
549 |
-
// if appendCallback is false, we will pass in the JSON object. you should handle it yourself in your callback.
|
550 |
-
(condition) ? instance._loadcallback(box, data) : instance._error('end');
|
551 |
-
}
|
552 |
-
},
|
553 |
-
error: function(jqXHR, textStatus, errorThrown) {
|
554 |
-
instance._debug("JSON ajax request failed.");
|
555 |
-
instance._error('end');
|
556 |
-
}
|
557 |
-
});
|
558 |
-
|
559 |
-
break;
|
560 |
-
}
|
561 |
-
};
|
562 |
-
|
563 |
-
// if behavior is defined and this function is extended, call that instead of default
|
564 |
-
if (!!opts.behavior && this['retrieve_'+opts.behavior] !== undefined) {
|
565 |
-
this['retrieve_'+opts.behavior].call(this,pageNum);
|
566 |
-
return;
|
567 |
-
}
|
568 |
-
|
569 |
-
|
570 |
-
// for manual triggers, if destroyed, get out of here
|
571 |
-
if (opts.state.isDestroyed) {
|
572 |
-
this._debug('Instance is destroyed');
|
573 |
-
return false;
|
574 |
-
};
|
575 |
-
|
576 |
-
// we dont want to fire the ajax multiple times
|
577 |
-
opts.state.isDuringAjax = true;
|
578 |
-
|
579 |
-
opts.loading.start.call($(opts.contentSelector)[0],opts);
|
580 |
-
|
581 |
-
},
|
582 |
-
|
583 |
-
// Check to see next page is needed
|
584 |
-
scroll: function infscr_scroll() {
|
585 |
-
|
586 |
-
var opts = this.options,
|
587 |
-
state = opts.state;
|
588 |
-
|
589 |
-
// if behavior is defined and this function is extended, call that instead of default
|
590 |
-
if (!!opts.behavior && this['scroll_'+opts.behavior] !== undefined) {
|
591 |
-
this['scroll_'+opts.behavior].call(this);
|
592 |
-
return;
|
593 |
-
}
|
594 |
-
|
595 |
-
if (state.isDuringAjax || state.isInvalidPage || state.isDone || state.isDestroyed || state.isPaused) return;
|
596 |
-
|
597 |
-
if (!this._nearbottom()) return;
|
598 |
-
|
599 |
-
this.retrieve();
|
600 |
-
|
601 |
-
},
|
602 |
-
|
603 |
-
// Toggle pause value
|
604 |
-
toggle: function infscr_toggle() {
|
605 |
-
this._pausing();
|
606 |
-
},
|
607 |
-
|
608 |
-
// Unbind from scroll
|
609 |
-
unbind: function infscr_unbind() {
|
610 |
-
this._binding('unbind');
|
611 |
-
},
|
612 |
-
|
613 |
-
// update options
|
614 |
-
update: function infscr_options(key) {
|
615 |
-
if ($.isPlainObject(key)) {
|
616 |
-
this.options = $.extend(true,this.options,key);
|
617 |
-
}
|
618 |
-
}
|
619 |
-
|
620 |
-
}
|
621 |
-
|
622 |
-
|
623 |
-
/*
|
624 |
-
----------------------------
|
625 |
-
Infinite Scroll function
|
626 |
-
----------------------------
|
627 |
-
|
628 |
-
Borrowed logic from the following...
|
629 |
-
|
630 |
-
jQuery UI
|
631 |
-
- https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js
|
632 |
-
|
633 |
-
jCarousel
|
634 |
-
- https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js
|
635 |
-
|
636 |
-
Masonry
|
637 |
-
- https://github.com/desandro/masonry/blob/master/jquery.masonry.js
|
638 |
-
|
639 |
-
*/
|
640 |
-
|
641 |
-
$.fn.infinitescroll = function infscr_init(options, callback) {
|
642 |
-
|
643 |
-
|
644 |
-
var thisCall = typeof options;
|
645 |
-
|
646 |
-
switch (thisCall) {
|
647 |
-
|
648 |
-
// method
|
649 |
-
case 'string':
|
650 |
-
|
651 |
-
var args = Array.prototype.slice.call(arguments, 1);
|
652 |
-
|
653 |
-
this.each(function () {
|
654 |
-
|
655 |
-
var instance = $.data(this, 'infinitescroll');
|
656 |
-
|
657 |
-
if (!instance) {
|
658 |
-
// not setup yet
|
659 |
-
// return $.error('Method ' + options + ' cannot be called until Infinite Scroll is setup');
|
660 |
-
return false;
|
661 |
-
}
|
662 |
-
if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
|
663 |
-
// return $.error('No such method ' + options + ' for Infinite Scroll');
|
664 |
-
return false;
|
665 |
-
}
|
666 |
-
|
667 |
-
// no errors!
|
668 |
-
instance[options].apply(instance, args);
|
669 |
-
|
670 |
-
});
|
671 |
-
|
672 |
-
break;
|
673 |
-
|
674 |
-
// creation
|
675 |
-
case 'object':
|
676 |
-
|
677 |
-
this.each(function () {
|
678 |
-
|
679 |
-
var instance = $.data(this, 'infinitescroll');
|
680 |
-
|
681 |
-
if (instance) {
|
682 |
-
|
683 |
-
// update options of current instance
|
684 |
-
instance.update(options);
|
685 |
-
|
686 |
-
} else {
|
687 |
-
|
688 |
-
// initialize new instance
|
689 |
-
instance = new $.infinitescroll(options, callback, this);
|
690 |
-
|
691 |
-
// don't attach if instantiation failed
|
692 |
-
if (!instance.failed) {
|
693 |
-
$.data(this, 'infinitescroll', instance);
|
694 |
-
}
|
695 |
-
|
696 |
-
}
|
697 |
-
|
698 |
-
});
|
699 |
-
|
700 |
-
break;
|
701 |
-
|
702 |
-
}
|
703 |
-
|
704 |
-
return this;
|
705 |
-
|
706 |
-
};
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
/*
|
711 |
-
* smartscroll: debounced scroll event for jQuery *
|
712 |
-
* https://github.com/lukeshumard/smartscroll
|
713 |
-
* Based on smartresize by @louis_remi: https://github.com/lrbabe/jquery.smartresize.js *
|
714 |
-
* Copyright 2011 Louis-Remi & Luke Shumard * Licensed under the MIT license. *
|
715 |
-
*/
|
716 |
-
|
717 |
-
var event = $.event,
|
718 |
-
scrollTimeout;
|
719 |
-
|
720 |
-
event.special.smartscroll = {
|
721 |
-
setup: function () {
|
722 |
-
$(this).bind("scroll", event.special.smartscroll.handler);
|
723 |
-
},
|
724 |
-
teardown: function () {
|
725 |
-
$(this).unbind("scroll", event.special.smartscroll.handler);
|
726 |
-
},
|
727 |
-
handler: function (event, execAsap) {
|
728 |
-
// Save the context
|
729 |
-
var context = this,
|
730 |
-
args = arguments;
|
731 |
-
|
732 |
-
// set correct event type
|
733 |
-
event.type = "smartscroll";
|
734 |
-
|
735 |
-
if (scrollTimeout) { clearTimeout(scrollTimeout); }
|
736 |
-
scrollTimeout = setTimeout(function () {
|
737 |
-
$.event.handle.apply(context, args);
|
738 |
-
}, execAsap === "execAsap" ? 0 : 100);
|
739 |
-
}
|
740 |
-
};
|
741 |
-
|
742 |
-
$.fn.smartscroll = function (fn) {
|
743 |
-
return fn ? this.bind("smartscroll", fn) : this.trigger("smartscroll", ["execAsap"]);
|
744 |
-
};
|
745 |
-
|
746 |
-
|
747 |
-
})(window, jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jquery/infinitescroll2/jquery.infinitescroll.min.js
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
--------------------------------
|
3 |
-
Infinite Scroll
|
4 |
-
--------------------------------
|
5 |
-
+ https://github.com/paulirish/infinite-scroll
|
6 |
-
+ version 2.0b2.120519
|
7 |
-
+ Copyright 2011/12 Paul Irish & Luke Shumard
|
8 |
-
+ Licensed under the MIT license
|
9 |
-
|
10 |
-
+ Documentation: http://infinite-scroll.com/
|
11 |
-
|
12 |
-
*/
|
13 |
-
|
14 |
-
(function(h,d,e){d.infinitescroll=function(a,c,b){this.element=d(b);this._create(a,c)||(this.failed=!0)};d.infinitescroll.defaults={loading:{finished:e,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"http://www.infinite-scroll.com/loading.gif",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:e},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,currPage:1},callback:e,debug:!1,behavior:e,binder:d(h),
|
15 |
-
nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:e,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:e,path:e};d.infinitescroll.prototype={_binding:function(a){var c=this,b=c.options;b.v="2.0b2.111027";if(b.behavior&&this["_binding_"+b.behavior]!==e)this["_binding_"+b.behavior].call(this);else{if("bind"!==a&&"unbind"!==a)return this._debug("Binding value "+
|
16 |
-
a+" not valid"),!1;if("unbind"==a)this.options.binder.unbind("smartscroll.infscr."+c.options.infid);else this.options.binder[a]("smartscroll.infscr."+c.options.infid,function(){c.scroll()});this._debug("Binding",a)}},_create:function(a,c){var b=d.extend(!0,{},d.infinitescroll.defaults,a);if(!this._validate(a))return!1;this.options=b;var g=d(b.nextSelector).attr("href");if(!g)return this._debug("Navigation selector not found"),!1;b.path=this._determinepath(g);b.contentSelector=b.contentSelector||this.element;
|
17 |
-
b.loading.selector=b.loading.selector||b.contentSelector;b.loading.msg=d('<div id="infscr-loading"><img alt="Loading..." src="'+b.loading.img+'" /><div>'+b.loading.msgText+"</div></div>");(new Image).src=b.loading.img;b.pixelsFromNavToBottom=d(document).height()-d(b.navSelector).offset().top;b.loading.start=b.loading.start||function(){d(b.navSelector).hide();b.loading.msg.appendTo(b.loading.selector).show(b.loading.speed,function(){beginAjax(b)})};b.loading.finished=b.loading.finished||function(){b.loading.msg.fadeOut("normal")};
|
18 |
-
b.callback=function(a,g){b.behavior&&a["_callback_"+b.behavior]!==e&&a["_callback_"+b.behavior].call(d(b.contentSelector)[0],g);c&&c.call(d(b.contentSelector)[0],g,b)};this._setup();return!0},_debug:function(){if(this.options&&this.options.debug)return h.console&&console.log.call(console,arguments)},_determinepath:function(a){var c=this.options;if(c.behavior&&this["_determinepath_"+c.behavior]!==e)this["_determinepath_"+c.behavior].call(this,a);else{if(c.pathParse)return this._debug("pathParse manual"),
|
19 |
-
c.pathParse(a,this.options.state.currPage+1);if(a.match(/^(.*?)\b2\b(.*?$)/))a=a.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(a.match(/^(.*?)2(.*?$)/)){if(a.match(/^(.*?page=)2(\/.*|$)/))return a=a.match(/^(.*?page=)2(\/.*|$)/).slice(1);a=a.match(/^(.*?)2(.*?$)/).slice(1)}else{if(a.match(/^(.*?page=)1(\/.*|$)/))return a=a.match(/^(.*?page=)1(\/.*|$)/).slice(1);this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");
|
20 |
-
c.state.isInvalidPage=!0}this._debug("determinePath",a);return a}},_error:function(a){var c=this.options;c.behavior&&this["_error_"+c.behavior]!==e?this["_error_"+c.behavior].call(this,a):("destroy"!==a&&"end"!==a&&(a="unknown"),this._debug("Error",a),"end"==a&&this._showdonemsg(),c.state.isDone=!0,c.state.currPage=1,c.state.isPaused=!1,this._binding("unbind"))},_loadcallback:function(a,c){var b=this.options,g=this.options.callback,f=b.state.isDone?"done":!b.appendCallback?"no-append":"append";if(b.behavior&&
|
21 |
-
this["_loadcallback_"+b.behavior]!==e)this["_loadcallback_"+b.behavior].call(this,a,c);else{switch(f){case "done":return this._showdonemsg(),!1;case "no-append":"html"==b.dataType&&(c=d("<div>"+c+"</div>").find(b.itemSelector));break;case "append":var i=a.children();if(0==i.length)return this._error("end");for(f=document.createDocumentFragment();a[0].firstChild;)f.appendChild(a[0].firstChild);this._debug("contentSelector",d(b.contentSelector)[0]);d(b.contentSelector)[0].appendChild(f);c=i.get()}b.loading.finished.call(d(b.contentSelector)[0],
|
22 |
-
b);b.animate&&(f=d(h).scrollTop()+d("#infscr-loading").height()+b.extraScrollPx+"px",d("html,body").animate({scrollTop:f},800,function(){b.state.isDuringAjax=!1}));b.animate||(b.state.isDuringAjax=!1);g(this,c)}},_nearbottom:function(){var a=this.options,c=0+d(document).height()-a.binder.scrollTop()-d(h).height();if(a.behavior&&this["_nearbottom_"+a.behavior]!==e)return this["_nearbottom_"+a.behavior].call(this);this._debug("math:",c,a.pixelsFromNavToBottom);return c-a.bufferPx<a.pixelsFromNavToBottom},
|
23 |
-
_pausing:function(a){var c=this.options;if(c.behavior&&this["_pausing_"+c.behavior]!==e)this["_pausing_"+c.behavior].call(this,a);else{"pause"!==a&&("resume"!==a&&null!==a)&&this._debug("Invalid argument. Toggling pause value instead");switch(a&&("pause"==a||"resume"==a)?a:"toggle"){case "pause":c.state.isPaused=!0;break;case "resume":c.state.isPaused=!1;break;case "toggle":c.state.isPaused=!c.state.isPaused}this._debug("Paused",c.state.isPaused);return!1}},_setup:function(){var a=this.options;if(a.behavior&&
|
24 |
-
this["_setup_"+a.behavior]!==e)this["_setup_"+a.behavior].call(this);else return this._binding("bind"),!1},_showdonemsg:function(){var a=this.options;a.behavior&&this["_showdonemsg_"+a.behavior]!==e?this["_showdonemsg_"+a.behavior].call(this):(a.loading.msg.find("img").hide().parent().find("div").html(a.loading.finishedMsg).animate({opacity:1},2E3,function(){d(this).parent().fadeOut("normal")}),a.errorCallback.call(d(a.contentSelector)[0],"done"))},_validate:function(a){for(var c in a)if(c.indexOf&&
|
25 |
-
-1<c.indexOf("Selector")&&0===d(a[c]).length)return this._debug("Your "+c+" found no elements."),!1;return!0},bind:function(){this._binding("bind")},destroy:function(){this.options.state.isDestroyed=!0;return this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},retrieve:function(a){var c=this,b=c.options,g=b.path,f,i,j,h,a=a||null;beginAjax=function(a){a.state.currPage++;c._debug("heading into ajax",g);f=d(a.contentSelector).is("table")?d("<tbody/>"):
|
26 |
-
d("<div/>");i=g.join(a.state.currPage);j="html"==a.dataType||"json"==a.dataType?a.dataType:"html+callback";a.appendCallback&&"html"==a.dataType&&(j+="+callback");switch(j){case "html+callback":c._debug("Using HTML via .load() method");f.load(i+" "+a.itemSelector,null,function(a){c._loadcallback(f,a)});break;case "html":c._debug("Using "+j.toUpperCase()+" via $.ajax() method");d.ajax({url:i,dataType:a.dataType,complete:function(a,b){(h="undefined"!==typeof a.isResolved?a.isResolved():"success"===b||
|
27 |
-
"notmodified"===b)?c._loadcallback(f,a.responseText):c._error("end")}});break;case "json":c._debug("Using "+j.toUpperCase()+" via $.ajax() method"),d.ajax({dataType:"json",type:"GET",url:i,success:function(b,d,g){h="undefined"!==typeof g.isResolved?g.isResolved():"success"===d||"notmodified"===d;a.appendCallback?a.template!=e?(b=a.template(b),f.append(b),h?c._loadcallback(f,b):c._error("end")):(c._debug("template must be defined."),c._error("end")):h?c._loadcallback(f,b):c._error("end")},error:function(){c._debug("JSON ajax request failed.");
|
28 |
-
c._error("end")}})}};if(b.behavior&&this["retrieve_"+b.behavior]!==e)this["retrieve_"+b.behavior].call(this,a);else{if(b.state.isDestroyed)return this._debug("Instance is destroyed"),!1;b.state.isDuringAjax=!0;b.loading.start.call(d(b.contentSelector)[0],b)}},scroll:function(){var a=this.options,c=a.state;a.behavior&&this["scroll_"+a.behavior]!==e?this["scroll_"+a.behavior].call(this):!c.isDuringAjax&&!c.isInvalidPage&&!c.isDone&&!c.isDestroyed&&!c.isPaused&&this._nearbottom()&&this.retrieve()},toggle:function(){this._pausing()},
|
29 |
-
unbind:function(){this._binding("unbind")},update:function(a){d.isPlainObject(a)&&(this.options=d.extend(!0,this.options,a))}};d.fn.infinitescroll=function(a,c){switch(typeof a){case "string":var b=Array.prototype.slice.call(arguments,1);this.each(function(){var c=d.data(this,"infinitescroll");if(!c||!d.isFunction(c[a])||"_"===a.charAt(0))return!1;c[a].apply(c,b)});break;case "object":this.each(function(){var b=d.data(this,"infinitescroll");b?b.update(a):(b=new d.infinitescroll(a,c,this),b.failed||
|
30 |
-
d.data(this,"infinitescroll",b))})}return this};var k=d.event,l;k.special.smartscroll={setup:function(){d(this).bind("scroll",k.special.smartscroll.handler)},teardown:function(){d(this).unbind("scroll",k.special.smartscroll.handler)},handler:function(a,c){var b=this,e=arguments;a.type="smartscroll";l&&clearTimeout(l);l=setTimeout(function(){d.event.handle.apply(b,e)},"execAsap"===c?0:100)}};d.fn.smartscroll=function(a){return a?this.bind("smartscroll",a):this.trigger("smartscroll",["execAsap"])}})(window,
|
31 |
-
jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jquery/jquery.latest.min.js
CHANGED
@@ -1,19 +1,6 @@
|
|
1 |
-
/*!
|
2 |
-
|
3 |
-
|
4 |
-
*
|
5 |
-
* Copyright 2011, John Resig
|
6 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
-
* http://jquery.org/license
|
8 |
-
*
|
9 |
-
* Includes Sizzle.js
|
10 |
-
* http://sizzlejs.com/
|
11 |
-
* Copyright 2011, The Dojo Foundation
|
12 |
-
* Released under the MIT, BSD, and GPL Licenses.
|
13 |
-
*
|
14 |
-
* Date: Thu Jun 30 14:16:56 2011 -0400
|
15 |
-
*/
|
16 |
-
(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(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 bZ(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 bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(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===bR,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=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),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 bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(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 bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(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(R.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 V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}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=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,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=n.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.6.2",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.done(a);return this},eq:function(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.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();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},isNaN:function(a){return a==null||!m.test(a)||isNaN(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;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw 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(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},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,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){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(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=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.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="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.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:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([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&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=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=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},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"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(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(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},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._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;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(o);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(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");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(o);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+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.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}})}}),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=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},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},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.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}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.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=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?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}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},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.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)}})),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 x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
|
17 |
-
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},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.preventDefault)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()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},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)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),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".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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&&!j.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&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.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&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,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(i,"")+" ";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(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.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]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),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]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.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!!k(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=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([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}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||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=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":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=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=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(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)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 s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=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}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},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)&&(l.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:[]}},l.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&&(l.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")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[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}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.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 k(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;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={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(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?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,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.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(l?l.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||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());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(V(c[0])||V(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),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.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 X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={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,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._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){return this.each(function(){f(this).wrapAll(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(arguments[0]);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(arguments[0]).toArray());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(){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(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$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"&&bc.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?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=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
|
18 |
-
)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},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(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");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&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.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++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.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.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;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=bx(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;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),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(bx)return bx(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 bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.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;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,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=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,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.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.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(bL,"")).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||bM.test(this.nodeName)||bG.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(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(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?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[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","*":"*/*"},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}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),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?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),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._Deferred(),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=bF.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.done,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(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.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]!=="*"?", */*; 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=bX(bS,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){status<2?w(-1,z):f.error(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)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),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&&(ca.test(b.url)||e&&ca.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(ca,l),b.url===j&&(e&&(k=k.replace(ca,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 cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,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,cb&&delete cd[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=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("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",cs(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(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].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(cr("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){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){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?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("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,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):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,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=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.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?: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=cv(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);f.offset.initialize();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.offset.supportsFixedPosition&&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.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.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.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.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=cu.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&&!cu.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=cv(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=cv(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")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):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];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["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 h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
|
19 |
-
jQuery.noConflict();
|
1 |
+
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery-1.10.2.min.map
|
3 |
+
*/
|
4 |
+
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
|
5 |
+
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
|
6 |
+
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.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(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,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":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);jQuery.noConflict();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,40 +1,38 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Strategery_InfiniteScroll2</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Automatically load the next page of products by AJAX after the end of the list.</summary>
|
10 |
-
<description
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
<
|
34 |
-
<
|
35 |
-
<
|
36 |
-
<time>16:16:31</time>
|
37 |
-
<contents><target name="magecommunity"><dir name="Strategery"><dir name="Infinitescroll2"><dir name="Block"><file name="Config.php" hash="427f0bd42480db0b93e04711c9f1c8fe"/><file name="Flush.php" hash="335bf80fc852b77d96e20aceb7ec97fe"/></dir><dir name="Helper"><file name="Data.php" hash="05de0d81682ca71b7d34e82e1ba2be60"/></dir><dir name="Model"><dir name="Catalog"><file name="Observer.php" hash="c405df5c8985688c1cc11a6b8e464381"/></dir></dir><dir name="controllers"><file name="CacheController.php" hash="8d15ceda1ccd223f22c34d85f9714684"/><file name="JsController.php" hash="3d97abe7a35b69bb70e6bb3ab1414f47"/></dir><dir name="etc"><file name="config.xml" hash="8fed346b0c54f2dc1d1df3eff6763491"/><file name="system.xml" hash="6c0034e3648fc34d730642876f376161"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll2.xml" hash="f8c0447f74f31b576d9e9cee89c99b8f"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll2"><file name="js.phtml" hash="f8382319866aad391ccaaa75d4a75d91"/><file name="toolbar.phtml" hash="d16882d540e2c23501f84a64e33c67e2"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Strategery_Infinitescroll2.xml" hash="8724cb82b6d47b9996610029e302e5d4"/></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><dir name="infinitescroll2"><dir name="behaviors"><file name="infinitescroll-magento.js" hash="88a5a092c68911819302952e2128fe34"/></dir><file name="https.js" hash="be476c35fecb93b0a88625d8bc8a128b"/><file name="jquery.infinitescroll.js" hash="862b580a996c3f7a9daa1fcc1fae808d"/><file name="jquery.infinitescroll.min.js" hash="24131ba057a50077af7a97dfa1fcde30"/></dir><file name="jquery.latest.min.js" hash="7ffe78e450bedfa8878241c3abc5edba"/></dir></dir></target></contents>
|
38 |
<compatible/>
|
39 |
-
<dependencies><required><php><min>5.
|
40 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Strategery_InfiniteScroll2</name>
|
4 |
+
<version>3.0.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Automatically load the next page of products by AJAX after the end of the list.</summary>
|
10 |
+
<description>This extension is for when the user reaches the end of the current product list, the next page is loaded automatically by AJAX after the end of the list.
|
11 |
+
Easy to install and configure, this module works 100% out of the box with Magento&apos;s default theme, and also gives to you the posibility to configurate the custom selectors of your custom theme.
|
12 |
+
Now you can get a more friendly UI by helping the user to save clicks and time.
|
13 |
+

|
14 |
+
Demo:
|
15 |
+
http://demo.usestrategery.com/infinite-scroll
|
16 |
+
Admin:
|
17 |
+
http://demo.usestrategery.com/infinite-scroll/admin
|
18 |
+
User: demo
|
19 |
+
Password: demo1234
|
20 |
+

|
21 |
+
Installation:
|
22 |
+
Download from Magento Connect.
|
23 |
+
Configure the selectos for your theme on System / Configuration seccion.
|
24 |
+
Refresh your Magento cache.
|
25 |
+
Scroll to infinity and beyond!
|
26 |
+

|
27 |
+
Configuration:
|
28 |
+
If you have a different theme other than the default, you will need to copy the default theme files to your custom theme folder and configure the plugin by going to System / Configuration / Catalog / Infinite Scroll.
|
29 |
+
</description>
|
30 |
+
<notes>Automatic load next page of current product list.
|
31 |
+
Support for Magento 1.4 up to 1.8</notes>
|
32 |
+
<authors><author><name>Gabriel Somoza</name><user>gabrielsomoza</user><email>gabriel@usestrategery.com</email></author><author><name>Enrique Piatti</name><user>enriquepiatti</user><email>enrique.piatti@usestrategery.com</email></author><author><name>Damian Pastorini</name><user>damianpastorini</user><email>damian.pastorini@usestrategery.com</email></author></authors>
|
33 |
+
<date>2013-12-04</date>
|
34 |
+
<time>16:10:53</time>
|
35 |
+
<contents><target name="magecommunity"><dir name="Strategery"><dir name="Infinitescroll"><dir name="Block"><file name="Init.php" hash="b87c4f347f2cafaf427e98678adb2d9d"/></dir><dir name="Helper"><file name="Data.php" hash="dd52515b5b7951023f1f9a20c9bd0a2d"/></dir><dir name="Model"><dir name="Admin"><file name="Feed.php" hash="c7773b4784bc141fde397932ddefdc4e"/></dir><file name="Observer.php" hash="2ade581b07f47ee8e6c5c3f96f3b7f10"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c7729a65c53f84047a9df2adfe445649"/><file name="config.xml" hash="407a16b9f8d0bf721a5c29e53645f069"/><file name="system.xml" hash="1f7032bf2558ba2143a491d62af6dc7a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Strategery_Infinitescroll.xml" hash="c8b3828ac543c7006ac9402f7663cb16"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="strategery-infinitescroll.xml" hash="c311f573ed80d079b18c15478f138af2"/></dir><dir name="template"><dir name="strategery"><dir name="infinitescroll"><file name="init.phtml" hash="34f80ed0bf13b096734df7ba22c07fa0"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="jquery"><file name="jquery.latest.min.js" hash="081a630addf862ccdaa440a5705d11af"/><dir name="infinitescroll"><file name="jquery-ias.js" hash="fce11a5aa4796f3c6ebe14de44d3ed62"/><file name="jquery-ias.min.js" hash="4f58eb799842c8e35b902b90ffd40d25"/><file name="jquery.easing-1.3.pack.js" hash="83e56485c52e15ff74e1c02615af14af"/><file name="jquery.ui.totop.min.js" hash="c0c43bf13983cd65ab4584b479d2a2d9"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="infinitescroll"><file name="ias_config.js" hash="02d6946529710c31ee248027d8f4212e"/></dir></dir></dir></dir></dir></target></contents>
|
|
|
|
|
36 |
<compatible/>
|
37 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|
skin/frontend/base/default/js/infinitescroll/ias_config.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
window.ias_config = {
|
2 |
+
// options from https://github.com/webcreate/infinite-ajax-scroll
|
3 |
+
// ex. Google Analytics
|
4 |
+
// onPageChange: function(pageNum, pageUrl, scrollOffset) {
|
5 |
+
// // This will track a pageview every time the user scrolls up or down the screen to a different page.
|
6 |
+
// // NOTE: make sure jQuery is already loaded here before using it
|
7 |
+
// var path = jQuery('<a/>').attr('href',pageUrl)[0].pathname.replace(/^[^\/]/,'/');
|
8 |
+
// _gaq.push(['_trackPageview', path]);
|
9 |
+
// }
|
10 |
+
};
|