makgento_mobile - Version 0.1.0

Version Notes

- Content organized into a one column layout
- Custom Home page with mobile-friendly design
- Display list of products or list of categories on home page.
- Upload featured images for each category on the homepage.
- Choose a list of CMS pages which links will appear in footer.
- Set custom number of products in a row on the category page.
- Tabs on product page.
- Improved image gallery with gestures support and additional images in horizontal scroll view.

Download this release

Release Info

Developer MKMage
Extension makgento_mobile
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (70) hide show
  1. app/code/local/MKMage/Makgento/Block/Adminhtml/System/Config/Button.php +35 -0
  2. app/code/local/MKMage/Makgento/Block/Adminhtml/System/Config/Buttoncat.php +35 -0
  3. app/code/local/MKMage/Makgento/Block/Makgento.php +5 -0
  4. app/code/local/MKMage/Makgento/Helper/Data.php +4 -0
  5. app/code/local/MKMage/Makgento/Model/Backend/ImageUpload.php +92 -0
  6. app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Attributes.php +24 -0
  7. app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Categories.php +23 -0
  8. app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Featured.php +26 -0
  9. app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Footer.php +25 -0
  10. app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/List.php +27 -0
  11. app/code/local/MKMage/Makgento/etc/config.xml +63 -0
  12. app/code/local/MKMage/Makgento/etc/system.xml +437 -0
  13. app/code/local/MKMage/Mkcore/Block/Mkcore.php +5 -0
  14. app/code/local/MKMage/Mkcore/Helper/Data.php +7 -0
  15. app/code/local/MKMage/Mkcore/etc/config.xml +45 -0
  16. app/code/local/MKMage/Mkcore/etc/system.xml +9 -0
  17. app/design/adminhtml/default/default/template/makgento/button.phtml +29 -0
  18. app/design/adminhtml/default/default/template/makgento/buttoncat.phtml +14 -0
  19. app/design/frontend/makgento/default/layout/local.xml +229 -0
  20. app/design/frontend/makgento/default/layout/page.xml +100 -0
  21. app/design/frontend/makgento/default/template/makgento/1column.phtml +29 -0
  22. app/design/frontend/makgento/default/template/makgento/account_address_book.phtml +72 -0
  23. app/design/frontend/makgento/default/template/makgento/account_address_edit.phtml +127 -0
  24. app/design/frontend/makgento/default/template/makgento/account_dashboard.phtml +16 -0
  25. app/design/frontend/makgento/default/template/makgento/account_info_edit.phtml +91 -0
  26. app/design/frontend/makgento/default/template/makgento/account_orders.phtml +45 -0
  27. app/design/frontend/makgento/default/template/makgento/addtocart.phtml +12 -0
  28. app/design/frontend/makgento/default/template/makgento/billing.phtml +189 -0
  29. app/design/frontend/makgento/default/template/makgento/cart.phtml +158 -0
  30. app/design/frontend/makgento/default/template/makgento/category.phtml +9 -0
  31. app/design/frontend/makgento/default/template/makgento/checkout.phtml +33 -0
  32. app/design/frontend/makgento/default/template/makgento/checkout_login.phtml +78 -0
  33. app/design/frontend/makgento/default/template/makgento/contact.phtml +45 -0
  34. app/design/frontend/makgento/default/template/makgento/default.phtml +3 -0
  35. app/design/frontend/makgento/default/template/makgento/footer.phtml +27 -0
  36. app/design/frontend/makgento/default/template/makgento/head.phtml +23 -0
  37. app/design/frontend/makgento/default/template/makgento/header_mobile.phtml +132 -0
  38. app/design/frontend/makgento/default/template/makgento/homepage.phtml +142 -0
  39. app/design/frontend/makgento/default/template/makgento/item_renderer.phtml +144 -0
  40. app/design/frontend/makgento/default/template/makgento/list.phtml +39 -0
  41. app/design/frontend/makgento/default/template/makgento/login.phtml +31 -0
  42. app/design/frontend/makgento/default/template/makgento/media.phtml +19 -0
  43. app/design/frontend/makgento/default/template/makgento/options_wrapper.phtml +4 -0
  44. app/design/frontend/makgento/default/template/makgento/order_review_info.phtml +58 -0
  45. app/design/frontend/makgento/default/template/makgento/order_review_item.phtml +103 -0
  46. app/design/frontend/makgento/default/template/makgento/order_review_totals.phtml +17 -0
  47. app/design/frontend/makgento/default/template/makgento/payment.phtml +47 -0
  48. app/design/frontend/makgento/default/template/makgento/product.phtml +146 -0
  49. app/design/frontend/makgento/default/template/makgento/register.phtml +58 -0
  50. app/design/frontend/makgento/default/template/makgento/related.phtml +35 -0
  51. app/design/frontend/makgento/default/template/makgento/shipping.phtml +129 -0
  52. app/design/frontend/makgento/default/template/makgento/shipping_method.phtml +20 -0
  53. app/design/frontend/makgento/default/template/page/html/header.phtml +132 -0
  54. package.xml +25 -0
  55. skin/frontend/makgento/default/css/styles.css +413 -0
  56. skin/frontend/makgento/default/images/ajax-loader.gif +0 -0
  57. skin/frontend/makgento/default/images/cart.png +0 -0
  58. skin/frontend/makgento/default/images/check.png +0 -0
  59. skin/frontend/makgento/default/images/delete.png +0 -0
  60. skin/frontend/makgento/default/images/edit.png +0 -0
  61. skin/frontend/makgento/default/images/logo.gif +0 -0
  62. skin/frontend/makgento/default/images/logo.jpg +0 -0
  63. skin/frontend/makgento/default/images/menu.png +0 -0
  64. skin/frontend/makgento/default/images/search-icon-mobile.jpg +0 -0
  65. skin/frontend/makgento/default/images/search.gif +0 -0
  66. skin/frontend/makgento/default/images/search.png +0 -0
  67. skin/frontend/makgento/default/js/jquery-2.1.0.min.js +4 -0
  68. skin/frontend/makgento/default/js/scripts.js +24 -0
  69. skin/frontend/makgento/default/js/slide.js +4057 -0
  70. skin/frontend/makgento/default/js/slider.js +2831 -0
app/code/local/MKMage/Makgento/Block/Adminhtml/System/Config/Button.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Block_Adminhtml_System_Config_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('makgento/button.phtml');
10
+ }
11
+
12
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ return $this->_toHtml();
15
+ }
16
+
17
+ public function getButtonHtml()
18
+ {
19
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')
20
+ ->setData(array(
21
+ 'id' => 'makgento_button',
22
+ 'label' => $this->helper('adminhtml')->__('+ Add Slide'),
23
+ 'onclick' => 'javascript:addSlide(); return false;'
24
+ ));
25
+
26
+ return $button->toHtml();
27
+ }
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+ }
app/code/local/MKMage/Makgento/Block/Adminhtml/System/Config/Buttoncat.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Block_Adminhtml_System_Config_Buttoncat extends Mage_Adminhtml_Block_System_Config_Form_Field
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('makgento/buttoncat.phtml');
10
+ }
11
+
12
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
13
+ {
14
+ return $this->_toHtml();
15
+ }
16
+
17
+ public function getButtonHtml()
18
+ {
19
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')
20
+ ->setData(array(
21
+ 'id' => 'makgento_button',
22
+ 'label' => $this->helper('adminhtml')->__('+ Add Category Image'),
23
+ 'onclick' => 'javascript:addCategory(); return false;'
24
+ ));
25
+
26
+ return $button->toHtml();
27
+ }
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+ }
app/code/local/MKMage/Makgento/Block/Makgento.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class MKMage_Makgento_Block_Makgento extends Mage_Core_Block_Template
3
+ {
4
+
5
+ }
app/code/local/MKMage/Makgento/Helper/Data.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class MKMage_Makgento_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
app/code/local/MKMage/Makgento/Model/Backend/ImageUpload.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MKMage_Makgento_Model_Backend_ImageUpload extends Mage_Core_Model_Config_Data
3
+ {
4
+ protected function _beforeSave()
5
+ {
6
+ $value = $this->getValue();
7
+ if (is_array($value) && !empty($value['delete'])) {
8
+ $this->setValue('');
9
+ }
10
+
11
+ if ($_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value']){
12
+
13
+ $fieldConfig = $this->getFieldConfig();
14
+ /* @var $fieldConfig Varien_Simplexml_Element */
15
+
16
+ if (empty($fieldConfig->upload_dir)) {
17
+ Mage::throwException(Mage::helper('catalog')->__('Base directory to upload image file is not specified'));
18
+ }
19
+
20
+ $uploadDir = (string)$fieldConfig->upload_dir;
21
+
22
+ $el = $fieldConfig->descend('upload_dir');
23
+
24
+ /**
25
+ * Add scope info
26
+ */
27
+ if (!empty($el['scope_info'])) {
28
+ $uploadDir = $this->_appendScopeInfo($uploadDir);
29
+ }
30
+
31
+ /**
32
+ * Take root from config
33
+ */
34
+ if (!empty($el['config'])) {
35
+ $uploadRoot = (string)Mage::getConfig()->getNode((string)$el['config'], $this->getScope(), $this->getScopeId());
36
+ $uploadRoot = Mage::getConfig()->substDistroServerVars($uploadRoot);
37
+ $uploadDir = $uploadRoot . '/' . $uploadDir;
38
+ }
39
+
40
+ try {
41
+ $file = array();
42
+ $file['tmp_name'] = $_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
43
+ $file['name'] = $_FILES['groups']['name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
44
+ $uploader = new Varien_File_Uploader($file);
45
+ $uploader->setAllowedExtensions($this->_getAllowedExtensions());
46
+ $uploader->setAllowRenameFiles(true);
47
+ $uploader->save($uploadDir);
48
+ } catch (Exception $e) {
49
+ Mage::throwException($e->getMessage());
50
+ return $this;
51
+ }
52
+
53
+ if ($filename = $uploader->getUploadedFileName()) {
54
+
55
+ /**
56
+ * Add scope info
57
+ */
58
+ if (!empty($el['scope_info'])) {
59
+ $filename = $this->_prependScopeInfo($filename);
60
+ }
61
+
62
+ $this->setValue($filename);
63
+ }
64
+ }
65
+
66
+ return $this;
67
+ }
68
+
69
+ protected function _prependScopeInfo($path)
70
+ {
71
+ $scopeInfo = $this->getScope();
72
+ if ('default' != $this->getScope()) {
73
+ $scopeInfo .= '/' . $this->getScopeId();
74
+ }
75
+ return $scopeInfo . '/' . $path;
76
+ }
77
+
78
+
79
+ protected function _appendScopeInfo($path)
80
+ {
81
+ $path .= '/' . $this->getScope();
82
+ if ('default' != $this->getScope()) {
83
+ $path .= '/' . $this->getScopeId();
84
+ }
85
+ return $path;
86
+ }
87
+
88
+ protected function _getAllowedExtensions()
89
+ {
90
+ return array('jpg', 'jpeg', 'gif', 'png');
91
+ }
92
+ }
app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Attributes.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Model_System_Config_Source_Dropdown_Attributes
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ $attributes = Mage::getModel('catalog/product')->getAttributes();
8
+ $attributeArray = array();
9
+ $disabled=array("category_ids","created_at","custom_design","custom_design_from","custom_design_to","gallery","gift_message_available","group_price","has_options","image","image_label","custom_layout_update","category_ids","cost","country_of_manufacture","is_recurring","links_exist","links_purchased_separately","links_title","manufacturer","media_gallery","meta_description","meta_keyword","meta_title","minimal_price","msrp","msrp_display_actual_price_type","msrp_enabled","news_from_date","news_to_date","old_id","options_container","page_layout","price_type","price_view","recurring_profile","required_options","samples_title","shipment_type","sku_type","small_image","small_image_label","special_from_date","special_to_date","status","tax_class_id","thumbnail","thumbnail_label","updated_at","url_key","url_path","use_smd_colorswatch","visibility","weight_type");
10
+ foreach($attributes as $a){
11
+
12
+ foreach ($a->getEntityType()->getAttributeCodes() as $attributeName) {
13
+ if(!in_array($attributeName,$disabled)){
14
+ $attributeArray[] = array(
15
+ 'label' => $attributeName,
16
+ 'value' => $attributeName
17
+ );
18
+ }
19
+ }
20
+ break;
21
+ }
22
+ return $attributeArray;
23
+ }
24
+ }
app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Categories.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Model_System_Config_Source_Dropdown_Categories
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array(
9
+ 'value' => 1,
10
+ 'label' => 'Products'
11
+ ),
12
+ array(
13
+ 'value' => 2,
14
+ 'label' => 'Category products'
15
+ ),
16
+ array(
17
+ 'value' => 3,
18
+ 'label' => 'List of Categories'
19
+ ),
20
+
21
+ );
22
+ }
23
+ }
app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Featured.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Model_System_Config_Source_Dropdown_Featured
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+
8
+ $_categories = Mage::getModel('catalog/category')->getCollection()
9
+ ->addAttributeToSelect('*')
10
+ ->addAttributeToFilter('is_active', 1);
11
+ $cats = array();
12
+ if ($_categories->getSize()) {
13
+ foreach($_categories as $_category) {
14
+ if ($_category->getName() == 'Default Category') {
15
+ continue;
16
+ }
17
+ $cats[] = array(
18
+ 'value' => (int)$_category->getId(),
19
+ 'label' => $_category->getName(),
20
+ );
21
+ }
22
+ }
23
+
24
+ return $cats;
25
+ }
26
+ }
app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/Footer.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Model_System_Config_Source_Dropdown_Footer
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+
8
+ $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());
9
+ $collection->getSelect()->where('is_active = 1');
10
+ $cms_list = array();
11
+ $i=0;
12
+ foreach($collection as $_c) {
13
+ $pdata = $_c->getData();
14
+ if($pdata['identifier']!='no-route' && $pdata['identifier']!='enable-cookies' && $pdata['identifier']!='home2') {
15
+ $cms_list[] = array(
16
+ 'value' => $pdata['identifier'],
17
+ 'label' => $pdata['title'],
18
+ );
19
+ }
20
+ }
21
+
22
+
23
+ return $cms_list;
24
+ }
25
+ }
app/code/local/MKMage/Makgento/Model/System/Config/Source/Dropdown/List.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MKMage_Makgento_Model_System_Config_Source_Dropdown_List
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array(
9
+ 'value' => 'grid_one',
10
+ 'label' => '1'
11
+ ),
12
+ array(
13
+ 'value' => 'grid_two',
14
+ 'label' => '2'
15
+ ),
16
+ array(
17
+ 'value' => 'grid_three',
18
+ 'label' => '3'
19
+ ),
20
+ array(
21
+ 'value' => 'grid_four',
22
+ 'label' => '4'
23
+ ),
24
+
25
+ );
26
+ }
27
+ }
app/code/local/MKMage/Makgento/etc/config.xml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MKMage_Makgento>
5
+ <version>0.1.0</version>
6
+ </MKMage_Makgento>
7
+ </modules>
8
+ <global>
9
+ <blocks>
10
+ <makgento>
11
+ <class>MKMage_Makgento_Block</class>
12
+ </makgento>
13
+ </blocks>
14
+ <helpers>
15
+ <makgento>
16
+ <class>MKMage_Makgento_Helper</class>
17
+ </makgento>
18
+ </helpers>
19
+ <models>
20
+ <backend>
21
+ <class>MKMage_Makgento_Model_Backend</class>
22
+ </backend>
23
+ <featured>
24
+ <class>MKMage_Makgento_Model</class>
25
+ </featured>
26
+ </models>
27
+ </global>
28
+ <admin>
29
+ <routers>
30
+ <makgento>
31
+ <use>admin</use>
32
+ <args>
33
+ <module>MKMage_Makgento</module>
34
+ <frontName>makgento</frontName>
35
+ </args>
36
+ </makgento>
37
+ </routers>
38
+ </admin>
39
+ <adminhtml>
40
+ <acl>
41
+ <resources>
42
+ <all>
43
+ <title>Allow Everything</title>
44
+ </all>
45
+ <admin>
46
+ <children>
47
+ <system>
48
+ <children>
49
+ <config>
50
+ <children>
51
+ <makgento>
52
+ <title>MageMobile - All</title>
53
+ </makgento>
54
+ </children>
55
+ </config>
56
+ </children>
57
+ </system>
58
+ </children>
59
+ </admin>
60
+ </resources>
61
+ </acl>
62
+ </adminhtml>
63
+ </config>
app/code/local/MKMage/Makgento/etc/system.xml ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <makgento translate="label" module="makgento">
5
+ <label>MakGento Mobile Settings</label>
6
+ <tab>mkmage</tab>
7
+ <sort_order>2000</sort_order>
8
+ <show_in_default>1</show_in_default>
9
+ <show_in_website>1</show_in_website>
10
+ <show_in_store>1</show_in_store>
11
+ <groups>
12
+ <header_footer translate="label" module="makgento">
13
+ <label>Header and Footer</label>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>0</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <fields>
20
+ <logo translate="label, comment">
21
+ <label>Logo:</label>
22
+ <comment><![CDATA[190px wide by 60px]]></comment>
23
+ <frontend_type>image</frontend_type>
24
+ <backend_model>backend/ImageUpload</backend_model>
25
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
26
+ <base_url type="media" scope_info="1">makgento</base_url>
27
+ <sort_order>1</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ </logo>
32
+ <footer translate="label, comment">
33
+ <label>Footer links:</label>
34
+ <frontend_type>multiselect</frontend_type>
35
+ <sort_order>7</sort_order>
36
+ <source_model>featured/system_config_source_dropdown_footer</source_model>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ </footer>
41
+ </fields>
42
+ </header_footer>
43
+ <home_page translate="label" module="makgento">
44
+ <label>Home Page</label>
45
+ <frontend_type>text</frontend_type>
46
+ <sort_order>1</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
+ <fields>
51
+ <banner translate="label, comment">
52
+ <label>Banner:</label>
53
+ <frontend_type>image</frontend_type>
54
+ <backend_model>backend/ImageUpload</backend_model>
55
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
56
+ <base_url type="media" scope_info="1">makgento</base_url>
57
+ <sort_order>0</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </banner>
62
+ <featured_title translate="label, comment">
63
+ <label>Featured Products Title:</label>
64
+ <frontend_type>text</frontend_type>
65
+ <sort_order>1</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ </featured_title>
70
+ <featured_type translate="label, comment">
71
+ <label>Featured Type:</label>
72
+ <comment><![CDATA[]]></comment>
73
+ <frontend_type>select</frontend_type>
74
+ <source_model>featured/system_config_source_dropdown_categories</source_model>
75
+ <sort_order>2</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ </featured_type>
80
+ <featured_categories translate="label, comment">
81
+ <label>Featured Category:</label>
82
+ <comment><![CDATA[]]></comment>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>featured/system_config_source_dropdown_featured</source_model>
85
+ <sort_order>3</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>1</show_in_store>
89
+ </featured_categories>
90
+ <featured_products translate="label, comment">
91
+ <label>Featured Products/Categories:</label>
92
+ <comment><![CDATA[Enter the product/category ids, delimited by comma ',']]></comment>
93
+ <frontend_type>text</frontend_type>
94
+ <sort_order>4</sort_order>
95
+ <show_in_default>1</show_in_default>
96
+ <show_in_website>1</show_in_website>
97
+ <show_in_store>1</show_in_store>
98
+ </featured_products>
99
+ <makgento_category_img translate="label">
100
+ <label>Category images</label>
101
+ <comment>Click on the button to add new category image. Max 10 images. Upload the images according to the category ids.</comment>
102
+ <frontend_type>button</frontend_type>
103
+ <frontend_model>makgento/adminhtml_system_config_buttoncat</frontend_model>
104
+ <sort_order>5</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>1</show_in_store>
108
+ </makgento_category_img>
109
+ <makgento_category_images_1 translate="label">
110
+ <label>Category 1</label>
111
+ <frontend_type>image</frontend_type>
112
+ <backend_model>backend/ImageUpload</backend_model>
113
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
114
+ <base_url type="media" scope_info="1">makgento</base_url>
115
+ <sort_order>6</sort_order>
116
+ <show_in_default>1</show_in_default>
117
+ <show_in_website>1</show_in_website>
118
+ <show_in_store>1</show_in_store>
119
+ </makgento_category_images_1>
120
+ <makgento_category_images_2 translate="label">
121
+ <label>Category 2</label>
122
+ <frontend_type>image</frontend_type>
123
+ <backend_model>backend/ImageUpload</backend_model>
124
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
125
+ <base_url type="media" scope_info="1">makgento</base_url>
126
+ <sort_order>7</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
+ </makgento_category_images_2>
131
+ <makgento_category_images_3 translate="label">
132
+ <label>Category 3</label>
133
+ <frontend_type>image</frontend_type>
134
+ <backend_model>backend/ImageUpload</backend_model>
135
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
136
+ <base_url type="media" scope_info="1">makgento</base_url>
137
+ <sort_order>8</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>1</show_in_store>
141
+ </makgento_category_images_3>
142
+ <makgento_category_images_4 translate="label">
143
+ <label>Category 4</label>
144
+ <frontend_type>image</frontend_type>
145
+ <backend_model>backend/ImageUpload</backend_model>
146
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
147
+ <base_url type="media" scope_info="1">makgento</base_url>
148
+ <sort_order>9</sort_order>
149
+ <show_in_default>1</show_in_default>
150
+ <show_in_website>1</show_in_website>
151
+ <show_in_store>1</show_in_store>
152
+ </makgento_category_images_4>
153
+ <makgento_category_images_5 translate="label">
154
+ <label>Category 5</label>
155
+ <frontend_type>image</frontend_type>
156
+ <backend_model>backend/ImageUpload</backend_model>
157
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
158
+ <base_url type="media" scope_info="1">makgento</base_url>
159
+ <sort_order>10</sort_order>
160
+ <show_in_default>1</show_in_default>
161
+ <show_in_website>1</show_in_website>
162
+ <show_in_store>1</show_in_store>
163
+ </makgento_category_images_5>
164
+ <makgento_category_images_6 translate="label">
165
+ <label>Category 6</label>
166
+ <frontend_type>image</frontend_type>
167
+ <backend_model>backend/ImageUpload</backend_model>
168
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
169
+ <base_url type="media" scope_info="1">makgento</base_url>
170
+ <sort_order>11</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ </makgento_category_images_6>
175
+ <makgento_category_images_7 translate="label">
176
+ <label>Category 7</label>
177
+ <frontend_type>image</frontend_type>
178
+ <backend_model>backend/ImageUpload</backend_model>
179
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
180
+ <base_url type="media" scope_info="1">makgento</base_url>
181
+ <sort_order>12</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>1</show_in_store>
185
+ </makgento_category_images_7>
186
+ <makgento_category_images_8 translate="label">
187
+ <label>Category 8</label>
188
+ <frontend_type>image</frontend_type>
189
+ <backend_model>backend/ImageUpload</backend_model>
190
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
191
+ <base_url type="media" scope_info="1">makgento</base_url>
192
+ <sort_order>13</sort_order>
193
+ <show_in_default>1</show_in_default>
194
+ <show_in_website>1</show_in_website>
195
+ <show_in_store>1</show_in_store>
196
+ </makgento_category_images_8>
197
+ <makgento_category_images_9 translate="label">
198
+ <label>Category 9</label>
199
+ <frontend_type>image</frontend_type>
200
+ <backend_model>backend/ImageUpload</backend_model>
201
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
202
+ <base_url type="media" scope_info="1">makgento</base_url>
203
+ <sort_order>14</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>1</show_in_website>
206
+ <show_in_store>1</show_in_store>
207
+ </makgento_category_images_9>
208
+ <makgento_category_images_10 translate="label">
209
+ <label>Category 10</label>
210
+ <frontend_type>image</frontend_type>
211
+ <backend_model>backend/ImageUpload</backend_model>
212
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
213
+ <base_url type="media" scope_info="1">makgento</base_url>
214
+ <sort_order>15</sort_order>
215
+ <show_in_default>1</show_in_default>
216
+ <show_in_website>1</show_in_website>
217
+ <show_in_store>1</show_in_store>
218
+ </makgento_category_images_10>
219
+ <makgento_slides translate="label">
220
+ <label>Slider images</label>
221
+ <comment>Click on the button to add new slide. Max 10 slides. Image size 375px x 295px</comment>
222
+ <frontend_type>button</frontend_type>
223
+ <frontend_model>makgento/adminhtml_system_config_button</frontend_model>
224
+ <sort_order>16</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
+ </makgento_slides>
229
+ <makgento_slide_images_1 translate="label">
230
+ <label>Slide 1</label>
231
+ <frontend_type>image</frontend_type>
232
+ <backend_model>backend/ImageUpload</backend_model>
233
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
234
+ <base_url type="media" scope_info="1">makgento</base_url>
235
+ <sort_order>17</sort_order>
236
+ <show_in_default>1</show_in_default>
237
+ <show_in_website>1</show_in_website>
238
+ <show_in_store>1</show_in_store>
239
+ </makgento_slide_images_1>
240
+ <makgento_slide_images_2 translate="label">
241
+ <label>Slide 2</label>
242
+ <frontend_type>image</frontend_type>
243
+ <backend_model>backend/ImageUpload</backend_model>
244
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
245
+ <base_url type="media" scope_info="1">makgento</base_url>
246
+ <sort_order>18</sort_order>
247
+ <show_in_default>1</show_in_default>
248
+ <show_in_website>1</show_in_website>
249
+ <show_in_store>1</show_in_store>
250
+ </makgento_slide_images_2>
251
+ <makgento_slide_images_3 translate="label">
252
+ <label>Slide 3</label>
253
+ <frontend_type>image</frontend_type>
254
+ <backend_model>backend/ImageUpload</backend_model>
255
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
256
+ <base_url type="media" scope_info="1">makgento</base_url>
257
+ <sort_order>19</sort_order>
258
+ <show_in_default>1</show_in_default>
259
+ <show_in_website>1</show_in_website>
260
+ <show_in_store>1</show_in_store>
261
+ </makgento_slide_images_3>
262
+ <makgento_slide_images_4 translate="label">
263
+ <label>Slide 4</label>
264
+ <frontend_type>image</frontend_type>
265
+ <backend_model>backend/ImageUpload</backend_model>
266
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
267
+ <base_url type="media" scope_info="1">makgento</base_url>
268
+ <sort_order>20</sort_order>
269
+ <show_in_default>1</show_in_default>
270
+ <show_in_website>1</show_in_website>
271
+ <show_in_store>1</show_in_store>
272
+ </makgento_slide_images_4>
273
+ <makgento_slide_images_5 translate="label">
274
+ <label>Slide 5</label>
275
+ <frontend_type>image</frontend_type>
276
+ <backend_model>backend/ImageUpload</backend_model>
277
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
278
+ <base_url type="media" scope_info="1">makgento</base_url>
279
+ <sort_order>21</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
+ </makgento_slide_images_5>
284
+ <makgento_slide_images_6 translate="label">
285
+ <label>Slide 6</label>
286
+ <frontend_type>image</frontend_type>
287
+ <backend_model>backend/ImageUpload</backend_model>
288
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
289
+ <base_url type="media" scope_info="1">makgento</base_url>
290
+ <sort_order>22</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>1</show_in_website>
293
+ <show_in_store>1</show_in_store>
294
+ </makgento_slide_images_6>
295
+ <makgento_slide_images_7 translate="label">
296
+ <label>Slide 7</label>
297
+ <frontend_type>image</frontend_type>
298
+ <backend_model>backend/ImageUpload</backend_model>
299
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
300
+ <base_url type="media" scope_info="1">makgento</base_url>
301
+ <sort_order>23</sort_order>
302
+ <show_in_default>1</show_in_default>
303
+ <show_in_website>1</show_in_website>
304
+ <show_in_store>1</show_in_store>
305
+ </makgento_slide_images_7>
306
+ <makgento_slide_images_8 translate="label">
307
+ <label>Slide 8</label>
308
+ <frontend_type>image</frontend_type>
309
+ <backend_model>backend/ImageUpload</backend_model>
310
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
311
+ <base_url type="media" scope_info="1">makgento</base_url>
312
+ <sort_order>24</sort_order>
313
+ <show_in_default>1</show_in_default>
314
+ <show_in_website>1</show_in_website>
315
+ <show_in_store>1</show_in_store>
316
+ </makgento_slide_images_8>
317
+ <makgento_slide_images_9 translate="label">
318
+ <label>Slide 9</label>
319
+ <frontend_type>image</frontend_type>
320
+ <backend_model>backend/ImageUpload</backend_model>
321
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
322
+ <base_url type="media" scope_info="1">makgento</base_url>
323
+ <sort_order>25</sort_order>
324
+ <show_in_default>1</show_in_default>
325
+ <show_in_website>1</show_in_website>
326
+ <show_in_store>1</show_in_store>
327
+ </makgento_slide_images_9>
328
+ <makgento_slide_images_10 translate="label">
329
+ <label>Slide 10</label>
330
+ <frontend_type>image</frontend_type>
331
+ <backend_model>backend/ImageUpload</backend_model>
332
+ <upload_dir config="system/filesystem/media" scope_info="1">makgento</upload_dir>
333
+ <base_url type="media" scope_info="1">makgento</base_url>
334
+ <sort_order>26</sort_order>
335
+ <show_in_default>1</show_in_default>
336
+ <show_in_website>1</show_in_website>
337
+ <show_in_store>1</show_in_store>
338
+ </makgento_slide_images_10>
339
+ </fields>
340
+ </home_page>
341
+ <makgento_grid>
342
+ <label>Category Page</label>
343
+ <frontend_type>text</frontend_type>
344
+ <sort_order>3000</sort_order>
345
+ <show_in_default>1</show_in_default>
346
+ <show_in_website>1</show_in_website>
347
+ <show_in_store>1</show_in_store>
348
+ <fields>
349
+ <makgento_grid_width translate="label">
350
+ <label>Product image width resize</label>
351
+ <frontend_type>text</frontend_type>
352
+ <sort_order>0</sort_order>
353
+ <show_in_default>1</show_in_default>
354
+ <show_in_website>1</show_in_website>
355
+ <show_in_store>1</show_in_store>
356
+ </makgento_grid_width>
357
+ <makgento_grid_height translate="label">
358
+ <label>Product image height resize</label>
359
+ <frontend_type>text</frontend_type>
360
+ <sort_order>1</sort_order>
361
+ <show_in_default>1</show_in_default>
362
+ <show_in_website>1</show_in_website>
363
+ <show_in_store>1</show_in_store>
364
+ </makgento_grid_height>
365
+ <makgento_list_items translate="label">
366
+ <label>Number of products in row</label>
367
+ <frontend_type>select</frontend_type>
368
+ <source_model>featured/system_config_source_dropdown_list</source_model>
369
+ <sort_order>3</sort_order>
370
+ <show_in_default>1</show_in_default>
371
+ <show_in_website>1</show_in_website>
372
+ <show_in_store>1</show_in_store>
373
+ </makgento_list_items>
374
+
375
+ </fields>
376
+ </makgento_grid>
377
+
378
+ <makgento_product>
379
+ <label>Product Page</label>
380
+ <frontend_type>text</frontend_type>
381
+ <sort_order>4000</sort_order>
382
+ <show_in_default>1</show_in_default>
383
+ <show_in_website>1</show_in_website>
384
+ <show_in_store>1</show_in_store>
385
+ <fields>
386
+ <makgento_product_image_width translate="label">
387
+ <label>Product image width resize</label>
388
+ <frontend_type>text</frontend_type>
389
+ <sort_order>0</sort_order>
390
+ <show_in_default>1</show_in_default>
391
+ <show_in_website>1</show_in_website>
392
+ <show_in_store>1</show_in_store>
393
+ </makgento_product_image_width>
394
+ <makgento_product_image_height translate="label">
395
+ <label>Product image height resize</label>
396
+ <frontend_type>text</frontend_type>
397
+ <sort_order>1</sort_order>
398
+ <show_in_default>1</show_in_default>
399
+ <show_in_website>1</show_in_website>
400
+ <show_in_store>1</show_in_store>
401
+ </makgento_product_image_height>
402
+ <makgento_product_special_title translate="label, comment">
403
+ <label>Special tab title: </label>
404
+ <frontend_type>text</frontend_type>
405
+ <sort_order>2</sort_order>
406
+ <show_in_default>1</show_in_default>
407
+ <show_in_website>1</show_in_website>
408
+ <show_in_store>1</show_in_store>
409
+ </makgento_product_special_title>
410
+ <makgento_special_attributes translate="label">
411
+ <label>Attributes tab</label>
412
+ <frontend_type>multiselect</frontend_type>
413
+ <sort_order>3</sort_order>
414
+ <comment><![CDATA[Select the attributes that you want to show up in the special tab on the product page.]]></comment>
415
+ <source_model>featured/system_config_source_dropdown_attributes</source_model>
416
+ <show_in_default>1</show_in_default>
417
+ <show_in_website>1</show_in_website>
418
+ <show_in_store>1</show_in_store>
419
+ </makgento_special_attributes>
420
+ <video_attribute translate="label, comment">
421
+ <label>YouTube video attribute ID:</label>
422
+ <frontend_type>text</frontend_type>
423
+ <comment><![CDATA[Enter the attribute ID for youtube videos. The attribute vaules need to be the video ID.]]></comment>
424
+ <sort_order>41</sort_order>
425
+ <show_in_default>1</show_in_default>
426
+ <show_in_website>1</show_in_website>
427
+ <show_in_store>1</show_in_store>
428
+ </video_attribute>
429
+
430
+ </fields>
431
+ </makgento_product>
432
+
433
+
434
+ </groups>
435
+ </makgento>
436
+ </sections>
437
+ </config>
app/code/local/MKMage/Mkcore/Block/Mkcore.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class MKMage_Mkcore_Block_Mkmkcore extends Mage_Core_Block_Template
3
+ {
4
+
5
+ }
app/code/local/MKMage/Mkcore/Helper/Data.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class MKMage_Mkcore_Helper_Data extends Mage_Core_Helper_Data
3
+ {
4
+
5
+
6
+ }
7
+
app/code/local/MKMage/Mkcore/etc/config.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <MKMage_Mkcore>
4
+ <version>0.1.0</version>
5
+ </MKMage_Mkcore>
6
+ </modules>
7
+ <global>
8
+ <blocks>
9
+ <mkcore>
10
+ <class>MKMage_Mkcore_Block</class>
11
+ </mkcore>
12
+ </blocks>
13
+ <helpers>
14
+ <mkcore>
15
+ <class>MKMage_Mkcore_Helper</class>
16
+ </mkcore>
17
+ </helpers>
18
+ </global>
19
+ <adminhtml>
20
+ <acl>
21
+ <resources>
22
+ <all>
23
+ <title>Allow Everything</title>
24
+ </all>
25
+ <admin>
26
+ <children>
27
+ <system>
28
+ <children>
29
+ <config>
30
+ <children>
31
+ <mkmage>
32
+ <title>MKMage - All</title>
33
+ </mkmage>
34
+ </children>
35
+ </config>
36
+ </children>
37
+ </system>
38
+ </children>
39
+ </admin>
40
+ </resources>
41
+ </acl>
42
+ </adminhtml>
43
+ </config>
44
+
45
+
app/code/local/MKMage/Mkcore/etc/system.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <mkmage translate="label" module="mkcore">
5
+ <label>MKMage Extensions</label>
6
+ <sort_order>100</sort_order>
7
+ </mkmage>
8
+ </tabs>
9
+ </config>
app/design/adminhtml/default/default/template/makgento/button.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ function addSlide() {
3
+ for(var i=1;i<11;i++){
4
+ var a='row_makgento_home_page_makgento_slide_images_'+i;
5
+ var b='makgento_home_page_makgento_slide_images_'+i;
6
+ if(document.getElementById(b).value=='' && document.getElementById(a).style.display=='none'){
7
+ document.getElementById(a).style.display='table-row';
8
+ break;
9
+ }
10
+ }
11
+ }
12
+ window.onload=function(){
13
+ for(var i=1;i<11;i++){
14
+ var a="row_makgento_home_page_makgento_slide_images_"+i;
15
+ var b="makgento_home_page_makgento_slide_images_"+i;
16
+ if(!document.getElementById(b).getAttribute('value')){
17
+ document.getElementById(a).style.display='none';
18
+ }
19
+
20
+ var a2="row_makgento_home_page_makgento_category_images_"+i;
21
+ var b2="makgento_home_page_makgento_category_images_"+i;
22
+ if(!document.getElementById(b2).getAttribute('value')){
23
+ document.getElementById(a2).style.display='none';
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+
29
+ <?php echo $this->getButtonHtml(); ?>
app/design/adminhtml/default/default/template/makgento/buttoncat.phtml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ function addCategory() {
3
+ for(var i=1;i<11;i++){
4
+ var a='row_makgento_home_page_makgento_category_images_'+i;
5
+ var b='makgento_home_page_makgento_category_images_'+i;
6
+ if(document.getElementById(b).value=='' && document.getElementById(a).style.display=='none'){
7
+ document.getElementById(a).style.display='table-row';
8
+ break;
9
+ }
10
+ }
11
+ }
12
+ </script>
13
+
14
+ <?php echo $this->getButtonHtml(); ?>
app/design/frontend/makgento/default/layout/local.xml ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout version="0.1.0">
2
+ <default translate="label">
3
+ <reference name="head">
4
+ <action method="setTemplate" ><template>makgento/head.phtml</template></action>
5
+ </reference>
6
+ <reference name="header">
7
+ <action method="setTemplate" ><template>makgento/header_mobile.phtml</template></action>
8
+ </reference>
9
+ <reference name="footer">
10
+ <action method="setTemplate" >
11
+ <template>makgento/footer.phtml</template></action>
12
+ </reference>
13
+ <reference name="content">
14
+ <remove name="breadcrumbs"/>
15
+ </reference>
16
+ </default>
17
+ <page_empty>
18
+ <reference name="root">
19
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
20
+ <action method="setIsHandle"><applied>1</applied></action>
21
+ <action method="setLayoutCode"><name>empty</name></action>
22
+ </reference>
23
+ </page_empty>
24
+ <page_one_column>
25
+ <reference name="root">
26
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
27
+ </reference>
28
+ </page_one_column>
29
+ <page_two_columns_left>
30
+ <reference name="root">
31
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
32
+ </reference>
33
+ </page_two_columns_left>
34
+ <page_two_columns_right>
35
+ <reference name="root">
36
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
37
+ </reference>
38
+ </page_two_columns_right>
39
+ <page_three_columns>
40
+ <reference name="root">
41
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
42
+ </reference>
43
+ </page_three_columns>
44
+ <cms_index_index>
45
+ <reference name="root">
46
+ <block type="catalog/product_send" name="homepage">
47
+ <action method="setTemplate"><template>makgento/homepage.phtml</template></action>
48
+ </block>
49
+ </reference>
50
+ </cms_index_index>
51
+ <catalog_category_default>
52
+ <reference name="product_list">
53
+ <action method="setTemplate"><template>makgento/list.phtml</template></action>
54
+ </reference>
55
+ <reference name="category.products">
56
+ <action method="setTemplate"><template>makgento/category.phtml</template></action>
57
+ </reference>
58
+ </catalog_category_default>
59
+ <catalog_category_layered>
60
+ <reference name="product_list">
61
+ <action method="setTemplate"><template>makgento/list.phtml</template></action>
62
+ </reference>
63
+ <reference name="category.products">
64
+ <action method="setTemplate"><template>makgento/category.phtml</template></action>
65
+ </reference>
66
+ </catalog_category_layered>
67
+ <tag_product_list>
68
+ <reference name="product_list">
69
+ <action method="setTemplate"><template>makgento/list.phtml</template></action>
70
+ </reference>
71
+ <reference name="category.products">
72
+ <action method="setTemplate"><template>makgento/category.phtml</template></action>
73
+ </reference>
74
+ </tag_product_list>
75
+ <catalogsearch_result_index>
76
+ <reference name="root">
77
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
78
+ </reference>
79
+ <reference name="product_list">
80
+ <action method="setTemplate"><template>makgento/list.phtml</template></action>
81
+ </reference>
82
+ <reference name="category.products">
83
+ <action method="setTemplate"><template>makgento/category.phtml</template></action>
84
+ </reference>
85
+ </catalogsearch_result_index>
86
+ <catalogsearch_advanced_result>
87
+ <reference name="root">
88
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
89
+ </reference>
90
+ <reference name="product_list">
91
+ <action method="setTemplate"><template>makgento/list.phtml</template></action>
92
+ </reference>
93
+ <reference name="category.products">
94
+ <action method="setTemplate"><template>makgento/category.phtml</template></action>
95
+ </reference>
96
+ </catalogsearch_advanced_result>
97
+ <catalog_product_view>
98
+ <reference name="product.info">
99
+ <action method="setTemplate"><template>makgento/product.phtml</template></action>
100
+ </reference>
101
+ <reference name="product.info.options.wrapper">
102
+ <action method="setTemplate"><template>makgento/options_wrapper.phtml</template></action>
103
+ </reference>
104
+ <reference name="product.info">
105
+ <remove name="product.info.addto"/>
106
+ <remove name="product.clone_prices" />
107
+ <reference name="product.info.media" as="media" before="-">
108
+ <action method="setTemplate"><template>makgento/media.phtml</template></action>
109
+ </reference>
110
+ </reference>
111
+ <reference name="product.info.related">
112
+ <action method="setTemplate"><template>makgento/related.phtml</template></action>
113
+ </reference>
114
+ <reference name="product.info.additional">
115
+ <action method="unsetChild"><name>product_tag_list</name></action>
116
+ </reference>
117
+ <reference name="product.info.addtocart">
118
+ <action method="setTemplate"><template>makgento/addtocart.phtml</template></action>
119
+ </reference>
120
+
121
+ </catalog_product_view>
122
+ <PRODUCT_TYPE_simple>
123
+ <reference name="product.info.simple">
124
+ <action method="setTemplate"><template>makgento/default.phtml</template>
125
+ </action>
126
+ </reference>
127
+ </PRODUCT_TYPE_simple>
128
+ <PRODUCT_TYPE_configurable>
129
+ <reference name="product.info.configurable">
130
+ <action method="setTemplate"><template>makgento/default.phtml</template>
131
+ </action>
132
+ </reference>
133
+ </PRODUCT_TYPE_configurable>
134
+ <checkout_cart_index>
135
+ <reference name="checkout.cart">
136
+ <action method="setTemplate"><template>makgento/cart.phtml</template></action>
137
+ <action method="addItemRender">
138
+ <type>simple</type>
139
+ <block>checkout/cart_item_renderer</block>
140
+ <template>makgento/item_renderer.phtml</template>
141
+ </action>
142
+ <action method="addItemRender">
143
+ <type>grouped</type>
144
+ <block>checkout/cart_item_renderer_grouped</block>
145
+ <template>makgento/item_renderer.phtml</template>
146
+ </action>
147
+ <action method="addItemRender">
148
+ <type>configurable</type>
149
+ <block>checkout/cart_item_renderer_configurable</block>
150
+ <template>makgento/item_renderer.phtml</template>
151
+ </action>
152
+ </reference>
153
+
154
+ </checkout_cart_index>
155
+ <checkout_onepage_index>
156
+ <reference name="checkout.onepage">
157
+ <action method="setTemplate"><template>makgento/checkout.phtml</template></action>
158
+ </reference>
159
+ <reference name="checkout.onepage.login">
160
+ <action method="setTemplate"><template>makgento/checkout_login.phtml</template></action>
161
+ </reference>
162
+ <reference name="checkout.onepage.billing">
163
+ <action method="setTemplate"><template>makgento/billing.phtml</template></action>
164
+ </reference>
165
+ <reference name="checkout.onepage.shipping">
166
+ <action method="setTemplate"><template>makgento/shipping.phtml</template></action>
167
+ </reference>
168
+ <reference name="checkout.onepage.shipping_method">
169
+ <action method="setTemplate"><template>makgento/shipping_method.phtml</template></action>
170
+ </reference>
171
+ <reference name="checkout.onepage.payment">
172
+ <action method="setTemplate"><template>makgento/payment.phtml</template></action>
173
+ </reference>
174
+ </checkout_onepage_index>
175
+ <checkout_onepage_review>
176
+ <reference name="root">
177
+ <action method="setTemplate"><template>makgento/order_review_info.phtml</template></action>
178
+ <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>makgento/order_review_item.phtml</template></action>
179
+ <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>makgento/order_review_item.phtml</template></action>
180
+ <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>makgento/order_review_item.phtml</template></action>
181
+ </reference>
182
+ <reference name="checkout.onepage.review.info.totals">
183
+ <action method="setTemplate"><template>makgento/order_review_totals.phtml</template></action>
184
+ </reference>
185
+ </checkout_onepage_review>
186
+ <customer_account_login>
187
+ <reference name="customer_form_login">
188
+ <action method="setTemplate"><template>makgento/login.phtml</template></action>
189
+ </reference>
190
+ </customer_account_login>
191
+ <customer_account_create>
192
+ <reference name="customer_form_register">
193
+ <action method="setTemplate"><template>makgento/register.phtml</template></action>
194
+ </reference>
195
+ </customer_account_create>
196
+ <contacts_index_index>
197
+ <reference name="contactForm">
198
+ <action method="setTemplate"><template>makgento/contact.phtml</template></action>
199
+ </reference>
200
+ </contacts_index_index>
201
+ <customer_account_index>
202
+ <reference name="root">
203
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
204
+ </reference>
205
+ <reference name="customer_account_dashboard">
206
+ <action method="setTemplate"><template>makgento/account_dashboard.phtml</template></action>
207
+ </reference>
208
+ </customer_account_index>
209
+ <customer_account_edit>
210
+ <reference name="customer_edit">
211
+ <action method="setTemplate"><template>makgento/account_info_edit.phtml</template></action>
212
+ </reference>
213
+ </customer_account_edit>
214
+ <customer_address_form>
215
+ <reference name="customer_address_edit">
216
+ <action method="setTemplate"><template>makgento/account_address_edit.phtml</template></action>
217
+ </reference>
218
+ </customer_address_form>
219
+ <customer_address_index>
220
+ <reference name="address_book">
221
+ <action method="setTemplate"><template>makgento/account_address_book.phtml</template></action>
222
+ </reference>
223
+ </customer_address_index>
224
+ <sales_order_history>
225
+ <reference name="sales.order.history">
226
+ <action method="setTemplate"><template>makgento/account_orders.phtml</template></action>
227
+ </reference>
228
+ </sales_order_history>
229
+ </layout>
app/design/frontend/makgento/default/layout/page.xml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default translate="label">
4
+ <label>All Pages</label>
5
+ <block type="page/html" name="root" output="toHtml" template="page/1column.phtml">
6
+ <block type="page/html_head" name="head" as="head">
7
+ <action method="addJs"><script>prototype/prototype.js</script></action>
8
+ <action method="addJs"><script>lib/ccard.js</script></action>
9
+ <action method="addJs"><script>prototype/validation.js</script></action>
10
+ <action method="addJs"><script>scriptaculous/builder.js</script></action>
11
+ <action method="addJs"><script>scriptaculous/effects.js</script></action>
12
+ <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
13
+ <action method="addJs"><script>scriptaculous/controls.js</script></action>
14
+ <action method="addJs"><script>scriptaculous/slider.js</script></action>
15
+ <action method="addJs"><script>varien/js.js</script></action>
16
+ <action method="addJs"><script>varien/form.js</script></action>
17
+ <action method="addJs"><script>mage/translate.js</script></action>
18
+ <action method="addJs"><script>mage/cookies.js</script></action>
19
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
20
+ </block>
21
+
22
+ <block type="core/text_list" name="after_body_start" as="after_body_start" translate="label">
23
+ <label>Page Top</label>
24
+ </block>
25
+
26
+ <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
27
+
28
+ <block type="page/html_header" name="header" as="header">
29
+ <block name="user_links" as="user_links" type="page/template_links" />
30
+ <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
31
+ <block type="page/template_links" name="top.links" as="topLinks"/>
32
+ <block type="page/template_links" name="account.links" as="accountLinks"/>
33
+ </block>
34
+ <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
35
+
36
+ <block type="core/messages" name="global_messages" as="global_messages"/>
37
+ <block type="core/messages" name="messages" as="messages"/>
38
+ <block type="core/text_list" name="content" as="content" translate="label">
39
+ <label>Main Content Area</label>
40
+ </block>
41
+
42
+ <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
43
+ <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
44
+ <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
45
+ </block>
46
+
47
+ <block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
48
+ <label>Page Bottom</label>
49
+ </block>
50
+ </block>
51
+
52
+ <block type="core/profiler" output="toHtml" name="core_profiler"/>
53
+ </default>
54
+
55
+ <!-- Custom page layout handles -->
56
+ <page_empty>
57
+ <reference name="root">
58
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
59
+ <!-- Mark root page block that template is applied -->
60
+ <action method="setIsHandle"><applied>1</applied></action>
61
+ <action method="setLayoutCode"><name>empty</name></action>
62
+ </reference>
63
+ </page_empty>
64
+
65
+ <page_one_column>
66
+ <reference name="root">
67
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
68
+ <!-- Mark root page block that template is applied -->
69
+ <action method="setIsHandle"><applied>1</applied></action>
70
+ <action method="setLayoutCode"><name>one_column</name></action>
71
+ </reference>
72
+ </page_one_column>
73
+
74
+ <page_two_columns_left>
75
+ <reference name="root">
76
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
77
+ <!-- Mark root page block that template is applied -->
78
+ <action method="setIsHandle"><applied>1</applied></action>
79
+ <action method="setLayoutCode"><name>two_columns_left</name></action>
80
+ </reference>
81
+ </page_two_columns_left>
82
+
83
+ <page_two_columns_right>
84
+ <reference name="root">
85
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
86
+ <!-- Mark root page block that template is applied -->
87
+ <action method="setIsHandle"><applied>1</applied></action>
88
+ <action method="setLayoutCode"><name>two_columns_right</name></action>
89
+ </reference>
90
+ </page_two_columns_right>
91
+
92
+ <page_three_columns>
93
+ <reference name="root">
94
+ <action method="setTemplate"><template>makgento/1column.phtml</template></action>
95
+ <!-- Mark root page block that template is applied -->
96
+ <action method="setIsHandle"><applied>1</applied></action>
97
+ <action method="setLayoutCode"><name>three_columns</name></action>
98
+ </reference>
99
+ </page_three_columns>
100
+ </layout>
app/design/frontend/makgento/default/template/makgento/1column.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <head>
2
+ <?php echo $this->getChildHtml('head') ?>
3
+ </head>
4
+ <body<?php echo $this->getBodyClass()?' class="mage-iphone'.$this->getBodyClass().'"':'' ?> home="index.php" ontouchstart="">
5
+ <?php echo $this->getChildHtml('after_body_start') ?>
6
+ <?php echo $this->getChildHtml('global_notices') ?>
7
+ <?php echo $this->getChildHtml('header'); ?>
8
+ <div class="main-container" data-role="main">
9
+ <div class="main col-1-layout">
10
+ <div class="clear"></div>
11
+ <div id="main" class="col-main">
12
+ <div <?php echo $this->getBodyClass()?' class="mage-iphone'.$this->getBodyClass().'"':'' ?>>
13
+ <? if( Mage::getSingleton('cms/page')->getIdentifier() != 'home' || Mage::app()->getFrontController()->getRequest()->getRouteName() != 'cms') : ?>
14
+ <?php echo $this->getChildHtml('content') ?>
15
+ <? else: ?>
16
+ <?php echo $this->getChildHtml('homepage') ?>
17
+ <?php endif; ?>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <?php echo $this->getChildHtml('footer') ?>
24
+ <?php echo $this->getChildHtml('before_body_end') ?>
25
+ <?php echo $this->getAbsoluteFooter() ?>
26
+ </div>
27
+
28
+ </body>
29
+ </html>
app/design/frontend/makgento/default/template/makgento/account_address_book.phtml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/">My Account</a></h1>
3
+ </div>
4
+ <button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="window.location='<?php echo $this->getAddAddressUrl() ?>';"><span><span><?php echo $this->__('Add New Address') ?></span></span></button>
5
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
6
+ <div class="col2-set addresses-list">
7
+ <div class="col-1 addresses-primary">
8
+ <ol>
9
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling()): ?>
10
+ <li class="item">
11
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
12
+ <address>
13
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
14
+ </address>
15
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Billing Address') ?></a></p>
16
+ </li>
17
+ <?php else: ?>
18
+ <li class="item">
19
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
20
+ <?php echo $this->__('You have no default billing address in your address book.') ?>
21
+ </li>
22
+ <?php endif ?>
23
+
24
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?>
25
+ <li class="item">
26
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
27
+ <address>
28
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
29
+ </address>
30
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?></a></p>
31
+ </li>
32
+ <?php else: ?>
33
+ <li class="item empty">
34
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
35
+ <p><?php echo $this->__('You have no default shipping address in your address book.') ?></p>
36
+ </li>
37
+ <?php endif ?>
38
+ </ol>
39
+ </div>
40
+ <div class="col-2 addresses-additional">
41
+ <h2><?php echo $this->__('Additional Address Entries') ?></h2>
42
+ <ol>
43
+ <?php if($_pAddsses = $this->getAdditionalAddresses()): ?>
44
+ <?php foreach($_pAddsses as $_address): ?>
45
+ <li class="item">
46
+ <address>
47
+ <?php echo $this->getAddressHtml($_address) ?>
48
+ </address>
49
+ <p><a href="<?php echo $this->getUrl('customer/address/edit', array('id'=>$_address->getId())) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span> <a href="#" class="link-remove" onclick="return deleteAddress('<?php echo $_address->getId() ?>');"><?php echo $this->__('Delete Address') ?></a></p>
50
+ </li>
51
+ <?php endforeach; ?>
52
+ <?php else: ?>
53
+ <li class="item empty">
54
+ <p><?php echo $this->__('You have no additional address entries in your address book.') ?></p>
55
+ </li>
56
+ <?php endif ?>
57
+ </ol>
58
+ </div>
59
+ </div>
60
+ <div class="buttons-set">
61
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
62
+ </div>
63
+ <script type="text/javascript">
64
+ //<![CDATA[
65
+ function deleteAddress(addressId) {
66
+ if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) {
67
+ window.location='<?php echo $this->getDeleteUrl() ?>id/'+addressId;
68
+ }
69
+ return false;
70
+ }
71
+ //]]>
72
+ </script>
app/design/frontend/makgento/default/template/makgento/account_address_edit.phtml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/">My Account</a></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
5
+ <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="form-validate">
6
+ <div class="fieldset">
7
+ <?php echo $this->getBlockHtml('formkey')?>
8
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
9
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
10
+ <ul class="form-list">
11
+ <li class="fields">
12
+ <?php echo $this->getNameBlockHtml() ?>
13
+ </li>
14
+ <li class="wide">
15
+ <label for="company"><?php echo $this->__('Company') ?></label>
16
+ <div class="input-box">
17
+ <input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
18
+ </div>
19
+ </li>
20
+ <li class="fields">
21
+ <div class="field">
22
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
23
+ <div class="input-box">
24
+ <input type="text" name="telephone" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="telephone" />
25
+ </div>
26
+ </div>
27
+ <div class="field">
28
+ <label for="fax"><?php echo $this->__('Fax') ?></label>
29
+ <div class="input-box">
30
+ <input type="text" name="fax" id="fax" title="<?php echo $this->__('Fax') ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" />
31
+ </div>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+ <div class="fieldset">
37
+ <ul class="form-list">
38
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
39
+ <li class="wide">
40
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
41
+ <div class="input-box">
42
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
43
+ </div>
44
+ </li>
45
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
46
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
47
+ <li class="wide">
48
+ <div class="input-box">
49
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
50
+ </div>
51
+ </li>
52
+ <?php endfor; ?>
53
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
54
+ <li class="wide">
55
+ <label for="vat_id"><?php echo $this->__('VAT Number') ?></label>
56
+ <div class="input-box">
57
+ <input type="text" name="vat_id" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" id="vat_id" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
58
+ </div>
59
+ </li>
60
+ <?php endif; ?>
61
+ <li class="fields">
62
+ <div class="field">
63
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
64
+ <div class="input-box">
65
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
66
+ </div>
67
+ </div>
68
+ <div class="field">
69
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
70
+ <div class="input-box select">
71
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
72
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
73
+ </select>
74
+ <script type="text/javascript">
75
+ //<![CDATA[
76
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
77
+ //]]>
78
+ </script>
79
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" />
80
+ </div>
81
+ </div>
82
+ </li>
83
+ <li class="fields">
84
+ <div class="field">
85
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
86
+ <div class="input-box">
87
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
88
+ </div>
89
+ </div>
90
+ <div class="field">
91
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
92
+ <div class="input-box select">
93
+ <?php echo $this->getCountryHtmlSelect() ?>
94
+ </div>
95
+ </div>
96
+ </li>
97
+ <li<?php if($this->canSetAsDefaultBilling()) echo ' class="control"' ?>>
98
+ <?php if($this->isDefaultBilling()): ?>
99
+ <strong><?php echo $this->__('Default Billing Address') ?></strong>
100
+ <?php elseif($this->canSetAsDefaultBilling()): ?>
101
+ <input type="checkbox" id="primary_billing" name="default_billing" value="1" title="<?php echo $this->__('Use as My Default Billing Address') ?>" class="checkbox" /><label for="primary_billing"><?php echo $this->__('Use as my default billing address') ?></label>
102
+ <?php else: ?>
103
+ <input type="hidden" name="default_billing" value="1" />
104
+ <?php endif; ?>
105
+ </li>
106
+ <li<?php if($this->canSetAsDefaultShipping()) echo ' class="control"' ?>>
107
+ <?php if($this->isDefaultShipping()): ?>
108
+ <strong><?php echo $this->__('Default Shipping Address') ?></strong>
109
+ <?php elseif($this->canSetAsDefaultShipping()): ?>
110
+ <input type="checkbox" id="primary_shipping" name="default_shipping" value="1" title="<?php echo $this->__('Use as My Default Shipping Address') ?>" class="checkbox" /><label for="primary_shipping"><?php echo $this->__('Use as my default shipping address') ?></label>
111
+ <?php else: ?>
112
+ <input type="hidden" name="default_shipping" value="1" />
113
+ <?php endif; ?>
114
+ </li>
115
+ </ul>
116
+ </div>
117
+ <div class="buttons-set">
118
+ <button data-action="save-customer-address" type="submit" title="<?php echo $this->__('Save Address') ?>" class="button"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
119
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
120
+ </div>
121
+ </form>
122
+ <script type="text/javascript">
123
+ //<![CDATA[
124
+ var dataForm = new VarienForm('form-validate', true);
125
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
126
+ //]]>
127
+ </script>
app/design/frontend/makgento/default/template/makgento/account_dashboard.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="dashboard">
2
+ <div class="page-title">
3
+ <h1><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/">My Account</a></h1>
4
+ </div>
5
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
6
+ <div class="box-account box-info">
7
+ <ul>
8
+ <li><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/edit/">Account Information</a></li>
9
+ <li><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/address/new/">Address Book</a></li>
10
+ <li><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>sales/order/history/">My Orders</a></li>
11
+ </ul>
12
+ </div>
13
+ </div>
14
+ <?php echo $this->getChildHtml('info1') ?>
15
+ <?php echo $this->getChildHtml('info2') ?>
16
+ </div>
app/design/frontend/makgento/default/template/makgento/account_info_edit.phtml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/">My Account</a></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
5
+ <form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate" autocomplete="off">
6
+ <div class="fieldset">
7
+ <?php echo $this->getBlockHtml('formkey')?>
8
+ <h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
9
+ <ul class="form-list">
10
+ <li class="fields">
11
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
12
+ </li>
13
+ <li>
14
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
15
+ <div class="input-box">
16
+ <input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
17
+ </div>
18
+ </li>
19
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
20
+ <?php if ($_dob->isEnabled()): ?>
21
+ <li><?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?></li>
22
+ <?php endif ?>
23
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
24
+ <?php if ($_taxvat->isEnabled()): ?>
25
+ <li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
26
+ <?php endif ?>
27
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
28
+ <?php if ($_gender->isEnabled()): ?>
29
+ <li><?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?></li>
30
+ <?php endif ?>
31
+ <li class="control radio">
32
+ <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+ <div class="fieldset" style="display:none;">
37
+ <h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
38
+ <ul class="form-list">
39
+ <li>
40
+ <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
41
+ <div class="input-box">
42
+ <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
43
+ <input type="text" class="input-text no-display" name="dummy" id="dummy" />
44
+ <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
45
+ </div>
46
+ </li>
47
+ <li class="fields">
48
+ <div class="field">
49
+ <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
50
+ <div class="input-box">
51
+ <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" />
52
+ </div>
53
+ </div>
54
+ <div class="field">
55
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
56
+ <div class="input-box">
57
+ <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
58
+ </div>
59
+ </div>
60
+ </li>
61
+ </ul>
62
+ </div>
63
+ <div class="buttons-set">
64
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
65
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
66
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
67
+ </div>
68
+ </form>
69
+ <script type="text/javascript">
70
+ //<![CDATA[
71
+ var dataForm = new VarienForm('form-validate', true);
72
+ function setPasswordForm(arg){
73
+ if(arg){
74
+ $('current_password').up(3).show();
75
+ $('current_password').addClassName('required-entry');
76
+ $('password').addClassName('required-entry');
77
+ $('confirmation').addClassName('required-entry');
78
+
79
+ }else{
80
+ $('current_password').up(3).hide();
81
+ $('current_password').removeClassName('required-entry');
82
+ $('password').removeClassName('required-entry');
83
+ $('confirmation').removeClassName('required-entry');
84
+ }
85
+ }
86
+
87
+ <?php if($this->getCustomer()->getChangePassword()): ?>
88
+ setPasswordForm(true);
89
+ <?php endif; ?>
90
+ //]]>
91
+ </script>
app/design/frontend/makgento/default/template/makgento/account_orders.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
2
+ <?php $_orders = $this->getOrders(); ?>
3
+ <div class="page-title">
4
+ <h1><a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>customer/account/">My Account</a></h1>
5
+ </div>
6
+ <?php echo $this->getPagerHtml(); ?>
7
+ <?php if($_orders->getSize()): ?>
8
+ <table class="data-table" id="my-orders-table">
9
+ <col width="1" />
10
+ <col width="1" />
11
+ <col />
12
+ <col width="1" />
13
+ <col width="1" />
14
+ <col width="1" />
15
+ <thead>
16
+ <tr>
17
+ <th><?php echo $this->__('Order #') ?></th>
18
+ <th><?php echo $this->__('Date') ?></th>
19
+ <th><span class="nobr"><?php echo $this->__('Total') ?></span></th>
20
+ <th>&nbsp;</th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ <?php $_odd = ''; ?>
25
+ <?php foreach ($_orders as $_order): ?>
26
+ <tr>
27
+ <td><?php echo $_order->getRealOrderId() ?></td>
28
+ <td><span class="nobr"><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?></span></td>
29
+ <td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
30
+ <td class="a-center">
31
+ <span class="nobr"><a href="<?php echo $this->getViewUrl($_order) ?>"><?php echo $this->__('View') ?></a>
32
+ <?php /*<span class="separator">|</span><a href="<?php echo $this->getTrackUrl($_order) ?>"><?php echo $this->__('Track Order') ?></a>&nbsp;*/ ?>
33
+ <?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
34
+ <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" class="link-reorder"><?php echo $this->__('Reorder') ?></a>
35
+ <?php endif ?>
36
+ </span>
37
+ </td>
38
+ </tr>
39
+ <?php endforeach; ?>
40
+ </tbody>
41
+ </table>
42
+ <script type="text/javascript">decorateTable('my-orders-table');</script>
43
+ <?php else: ?>
44
+ <p style="text-align:center"><?php echo $this->__('You have placed no orders.'); ?></p>
45
+ <?php endif ?>
app/design/frontend/makgento/default/template/makgento/addtocart.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_product = $this->getProduct(); ?>
2
+ <?php $buttonTitle = $this->__('Add to Cart'); ?>
3
+ <?php if($_product->isSaleable()): ?>
4
+ <div class="add-to-cart">
5
+ <?php if(!$_product->isGrouped()): ?>
6
+ <label for="qty"><?php echo $this->__('Qty:') ?></label>
7
+ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
8
+ <?php endif; ?>
9
+ <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
10
+ <?php echo $this->getChildHtml('', true, true) ?>
11
+ </div>
12
+ <?php endif; ?>
app/design/frontend/makgento/default/template/makgento/billing.phtml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form id="co-billing-form" action="">
2
+ <fieldset>
3
+ <ul class="form-list">
4
+ <?php if ($this->customerHasAddresses()): ?>
5
+ <li class="wide">
6
+ <div class="input-box select">
7
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
8
+ </div>
9
+ </li>
10
+ <?php endif; ?>
11
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
12
+ <fieldset>
13
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
14
+ <ul>
15
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
16
+ <?php if(!$this->isCustomerLoggedIn()): ?>
17
+ <li class="fields">
18
+ <div class="field">
19
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
20
+ <div class="input-box">
21
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
22
+ </div>
23
+ </div>
24
+ </li>
25
+ <?php endif; ?>
26
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
27
+ <li class="fields">
28
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
29
+ <div class="input-box">
30
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
31
+ </div>
32
+ </li>
33
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
34
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
35
+ <li class="fields">
36
+ <div class="input-box">
37
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
38
+ </div>
39
+ </li>
40
+ <?php endfor; ?>
41
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
42
+ <li class="fields">
43
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
44
+ <div class="input-box">
45
+ <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
46
+ </div>
47
+ </li>
48
+ <?php endif; ?>
49
+ <li class="fields">
50
+ <div class="field">
51
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
52
+ <div class="input-box">
53
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
54
+ </div>
55
+ </div>
56
+ </li>
57
+ <li class="fields">
58
+ <div class="field">
59
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
60
+ <div class="input-box select">
61
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
62
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
63
+ </select>
64
+ <script type="text/javascript">
65
+ //<![CDATA[
66
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
67
+ //]]>
68
+ </script>
69
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
70
+ </div>
71
+ </div>
72
+ </li>
73
+ <li class="fields">
74
+ <div class="field">
75
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
76
+ <div class="input-box">
77
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
78
+ </div>
79
+ </div>
80
+ </li>
81
+ <li class="fields">
82
+ <div class="field">
83
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
84
+ <div class="input-box select">
85
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
86
+ </div>
87
+ </div>
88
+ </li>
89
+ <li class="fields">
90
+ <div class="field">
91
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
92
+ <div class="input-box">
93
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
94
+ </div>
95
+ </div>
96
+ </li>
97
+ <li class="fields">
98
+ <div class="field">
99
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
100
+ <div class="input-box">
101
+ <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
102
+ </div>
103
+ </div>
104
+ </li>
105
+ <?php if(!$this->isCustomerLoggedIn()): ?>
106
+
107
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
108
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
109
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
110
+ <li class="fields">
111
+ <?php if ($_dob->isEnabled()): ?>
112
+ <div class="field">
113
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
114
+ </div>
115
+ <?php endif; ?>
116
+ <?php if ($_gender->isEnabled()): ?>
117
+ <div class="field">
118
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
119
+ </div>
120
+ <?php endif ?>
121
+ </li>
122
+ <?php endif ?>
123
+
124
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
125
+ <?php if ($_taxvat->isEnabled()): ?>
126
+ <li>
127
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
128
+ </li>
129
+ <?php endif ?>
130
+
131
+ <li class="fields" id="register-customer-password">
132
+ <div class="field">
133
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
134
+ <div class="input-box">
135
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
136
+ </div>
137
+ </div>
138
+ <div class="field">
139
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
140
+ <div class="input-box">
141
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
142
+ </div>
143
+ </div>
144
+ </li>
145
+ <?php endif; ?>
146
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
147
+ <li class="control">
148
+ <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
149
+ </li>
150
+ <?php else:?>
151
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
152
+ <?php endif; ?>
153
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
154
+ </ul>
155
+ </fieldset>
156
+ </li>
157
+ <?php /* Extensions placeholder */ ?>
158
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
159
+ <?php if ($this->canShip()): ?>
160
+ <li class="control radio">
161
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
162
+ <li class="control radio">
163
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
164
+ </li>
165
+ <?php endif; ?>
166
+ </ul>
167
+ <?php if (!$this->canShip()): ?>
168
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
169
+ <?php endif; ?>
170
+ <div class="buttons-set" id="billing-buttons-container">
171
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
172
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
173
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
174
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/images/ajax-loader.gif'; ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
175
+ </span>
176
+ </div>
177
+ </fieldset>
178
+ </form>
179
+ <script type="text/javascript">
180
+ //<![CDATA[
181
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
182
+ var billingForm = new VarienForm('co-billing-form');
183
+
184
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
185
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
186
+
187
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
188
+ //]]>
189
+ </script>
app/design/frontend/makgento/default/template/makgento/cart.phtml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $checkout = Mage::getSingleton('checkout/session')->getQuote();
3
+ $helper = Mage::helper('catalog/product_configuration');
4
+ $items=$checkout->getAllItems();
5
+ $prescriptions=false;
6
+ foreach($items as $item){
7
+ $options = $helper->getCustomOptions($item);
8
+ foreach($options as $option){
9
+ if($option['label']=='Prescriptions' && $option['value']!='No prescription'){
10
+ $prescriptions=true;
11
+ }
12
+ }
13
+ if($item->getProduct()->getSku()=="rowley-care"){
14
+ $care_product=true;
15
+ }
16
+ }
17
+ if(count($checkout->getAllItems())>0){
18
+ ?>
19
+ <div class="cart">
20
+ <div class="page-title">
21
+ <h1><?php echo $this->__('Shopping Cart') ?></h1>
22
+ </div>
23
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
24
+ <?php echo $this->getChildHtml('form_before') ?>
25
+ <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
26
+ <?php echo $this->getBlockHtml('formkey'); ?>
27
+ <fieldset>
28
+ <table id="shopping-cart-table" class="data-table cart-table">
29
+ <col width="1" />
30
+ <col />
31
+ <col width="1" />
32
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
33
+ <col width="1" />
34
+ <?php endif; ?>
35
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
36
+ <col width="1" />
37
+ <?php endif; ?>
38
+ <col width="1" />
39
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
40
+ <col width="1" />
41
+ <?php endif; ?>
42
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
43
+ <col width="1" />
44
+ <?php endif; ?>
45
+ <col width="1" />
46
+
47
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
48
+ <thead>
49
+ <tr>
50
+ <th>Product</th>
51
+ <th>&emsp;</th>
52
+ <th>Price</th>
53
+ <th>Qty</th>
54
+ <th>&emsp;</th>
55
+ </tr>
56
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
57
+ <tr>
58
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
59
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
60
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
61
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
62
+ </tr>
63
+ <?php endif; ?>
64
+ </thead>
65
+ <tfoot>
66
+ <tr>
67
+ <td colspan="50" class="a-right">
68
+
69
+ <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
70
+ <button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>
71
+ <div class="totals">
72
+ <?php echo $this->getChildHtml('totals'); ?>
73
+ <?php if(!$this->hasError()): ?>
74
+ <?php
75
+ if($prescriptions==true):
76
+
77
+ ?>
78
+ <ul class="checkout-types bottom">
79
+ <li class="method-checkout-cart-methods-onepage-bottom">
80
+ <a href="<?php echo $this->getUrl('') ?>prescriptions/" style="display:block" id="pers_true" type="button" title="Proceed to Checkout" class="button btn-proceed-checkout btn-checkout">Proceed to Checkout</a>
81
+ </li>
82
+ </ul>
83
+ <?php else: ?>
84
+ <ul class="checkout-types bottom" id="check_btn">
85
+ <?php foreach ($this->getMethods('methods') as $method): ?>
86
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
87
+ <?php if($method!="checkout.cart.methods.onepage.bottom"): ?>
88
+ <li class="method-<?php echo preg_replace("/[^_a-zA-Z0-9-]/", '-', $method); ?>"><?php echo $methodHtml; ?></li>
89
+ <?php else: ?>
90
+ <li class="method-checkout-cart-methods-onepage-bottom">
91
+
92
+ <button type="button" title="Proceed to Checkout" class="button btn-proceed-checkout btn-checkout" onclick="window.location='<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>onestepcheckout/index/';"><span><span>Proceed to Checkout</span></span></button></li>
93
+ <?php endif; ?>
94
+ <?php endif; ?>
95
+ <?php endforeach; ?>
96
+ </ul>
97
+ <?php endif; ?>
98
+ <?php endif; ?>
99
+ </div>
100
+ <!--[if lt IE 8]>
101
+ <input type="hidden" id="update_cart_action_container" />
102
+ <script type="text/javascript">
103
+ //<![CDATA[
104
+ Event.observe(window, 'load', function()
105
+ {
106
+ // Internet Explorer (lt 8) does not support value attribute in button elements
107
+ $emptyCartButton = $('empty_cart_button');
108
+ $cartActionContainer = $('update_cart_action_container');
109
+ if ($emptyCartButton && $cartActionContainer) {
110
+ Event.observe($emptyCartButton, 'click', function()
111
+ {
112
+ $emptyCartButton.setAttribute('name', 'update_cart_action_temp');
113
+ $cartActionContainer.setAttribute('name', 'update_cart_action');
114
+ $cartActionContainer.setValue('empty_cart');
115
+ });
116
+ }
117
+
118
+ });
119
+ //]]>
120
+ </script>
121
+ <![endif]-->
122
+ </td>
123
+ </tr>
124
+ </tfoot>
125
+ <tbody>
126
+ <?php foreach($this->getItems() as $_item): ?>
127
+ <?php echo $this->getItemHtml($_item) ?>
128
+ <?php endforeach ?>
129
+ </tbody>
130
+ </table>
131
+ <script type="text/javascript">decorateTable('shopping-cart-table')</script>
132
+ </fieldset>
133
+ </form>
134
+ <div class="cart-collaterals">
135
+ <div class="col2-set">
136
+ <div class="col-1">
137
+ <?php echo $this->getChildHtml('crosssell') ?>
138
+ </div>
139
+ <div class="col-2">
140
+ <?php /* Extensions placeholder */ ?>
141
+ <?php echo $this->getChildHtml('checkout.cart.extra') ?>
142
+ <?php echo $this->getChildHtml('coupon') ?>
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+ </div>
148
+ <?php } else{ ?>
149
+ <div class="cart">
150
+ <div class="page-title">
151
+ <h1><?php echo $this->__('Shopping Cart') ?></h1>
152
+ </div>
153
+ <div style="min-height: 300px;padding: 20px;text-align: center;">
154
+ You have no items in your shopping cart.
155
+ Click <a href="<?php echo $this->getUrl('') ?>">here</a> to continue shopping.
156
+ </div>
157
+ </div>
158
+ <?php } ?>
app/design/frontend/makgento/default/template/makgento/category.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_helper = $this->helper('catalog/output');
3
+ $_category = $this->getCurrentCategory();
4
+ ?>
5
+ <div class="page-title category-title">
6
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
7
+ </div>
8
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
9
+ <?php echo $this->getProductListHtml() ?>
app/design/frontend/makgento/default/template/makgento/checkout.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1>Checkout</h1>
3
+ </div>
4
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('varien/accordion.js') ?>"></script>
5
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout.js') ?>"></script>
6
+ <ol class="opc" id="checkoutSteps">
7
+ <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
8
+ <?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
9
+ <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">
10
+ <div class="step-title">
11
+ <h2><?php echo $_stepInfo['label'] ?><a href="#"><?php echo $this->__('Edit') ?></a></h2>
12
+
13
+ </div>
14
+ <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;">
15
+ <?php echo $this->getChildHtml($_stepId) ?>
16
+ </div>
17
+ </li>
18
+ <?php endforeach ?>
19
+ </ol>
20
+ <script type="text/javascript">
21
+ //<![CDATA[
22
+ var accordion = new Accordion('checkoutSteps', '.step-title', true);
23
+ <?php if($this->getActiveStep()): ?>
24
+ accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
25
+ <?php endif ?>
26
+ var checkout = new Checkout(accordion,{
27
+ progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
28
+ review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
29
+ saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
30
+ failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
31
+ );
32
+ //]]>
33
+ </script>
app/design/frontend/makgento/default/template/makgento/checkout_login.phtml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo $this->getChildHtml('checkout.onepage.login.extra')?>
2
+ <div class="col2-set">
3
+ <div class="col-1">
4
+ <h3><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h3>
5
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
6
+ <ul class="form-list">
7
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
8
+ <li class="control">
9
+ <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
10
+ </li>
11
+ <?php endif; ?>
12
+ <li class="control">
13
+ <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
14
+ </li>
15
+ </ul>
16
+ <?php else: ?>
17
+ <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
18
+ <?php endif; ?>
19
+ </div>
20
+ <div class="col-2">
21
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
22
+ <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
23
+ <fieldset>
24
+ <?php echo $this->getBlockHtml('formkey'); ?>
25
+ <h4><?php echo $this->__('Already registered? Please log in below:') ?></h4>
26
+ <ul class="form-list">
27
+ <li>
28
+ <label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
29
+ <div class="input-box">
30
+ <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
31
+ </div>
32
+ </li>
33
+ <li>
34
+ <label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
35
+ <div class="input-box">
36
+ <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
37
+ </div>
38
+ </li>
39
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
40
+ </ul>
41
+ </fieldset>
42
+ </form>
43
+ </div>
44
+ </div>
45
+ <div class="col2-set">
46
+ <div class="col-2">
47
+ <div class="buttons-set">
48
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
49
+ <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
50
+ <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
51
+ </div>
52
+ </div>
53
+ <div class="col-1">
54
+ <div class="buttons-set">
55
+ <p class="required">&nbsp;</p>
56
+ <button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ <script type="text/javascript">
61
+ //<![CDATA[
62
+ var loginForm = new VarienForm('login-form', true);
63
+ $('login-email').observe('keypress', bindLoginPost);
64
+ $('login-password').observe('keypress', bindLoginPost);
65
+ function bindLoginPost(evt){
66
+ if (evt.keyCode == Event.KEY_RETURN) {
67
+ loginForm.submit();
68
+ }
69
+ }
70
+ function onepageLogin(button)
71
+ {
72
+ if(loginForm.validator && loginForm.validator.validate()){
73
+ button.disabled = true;
74
+ loginForm.submit();
75
+ }
76
+ }
77
+ //]]>
78
+ </script>
app/design/frontend/makgento/default/template/makgento/contact.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->toHtml() ?></div>
2
+ <div class="page-title">
3
+ <h1><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1>
4
+ </div>
5
+ <form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
6
+ <div class="fieldset">
7
+ <ul class="form-list">
8
+ <li class="fields">
9
+ <div class="field">
10
+ <label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
11
+ <div class="input-box">
12
+ <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
13
+ </div>
14
+ </div>
15
+ <div class="field">
16
+ <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
17
+ <div class="input-box">
18
+ <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
19
+ </div>
20
+ </div>
21
+ </li>
22
+ <li>
23
+ <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
24
+ <div class="input-box">
25
+ <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
26
+ </div>
27
+ </li>
28
+ <li class="wide">
29
+ <label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
30
+ <div class="input-box">
31
+ <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+ <div class="buttons-set">
37
+ <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
38
+ <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
39
+ </div>
40
+ </form>
41
+ <script type="text/javascript">
42
+ //<![CDATA[
43
+ var contactForm = new VarienForm('contactForm', true);
44
+ //]]>
45
+ </script>
app/design/frontend/makgento/default/template/makgento/default.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php $_product = $this->getProduct() ?>
2
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
3
+ <?php echo $this->getPriceHtml($_product) ?>
app/design/frontend/makgento/default/template/makgento/footer.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $cookie = Mage::getModel("core/cookie");
3
+ $iphone = $cookie->get("iphone");
4
+ $fl=Mage::getStoreConfig('makgento/header_footer/footer',Mage::app()->getStore());
5
+ $footer_links=explode(',',$fl);
6
+ ?>
7
+ <?php if($iphone != 'true'): ?>
8
+ <div class="footer">
9
+ <ul class="footer_links">
10
+ <?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>
11
+ <li><a href="<?php echo Mage::getUrl('customer/account'); ?>">My Account</a></li>
12
+ <li><a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>">Log Out</a></li>
13
+ <?php else: ?>
14
+ <li><a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>">Log In/ Register</a></li>
15
+ <?php endif; ?>
16
+ <li><a href="<?php echo Mage::getUrl('contacts'); ?>">Contact Us</a></li>
17
+ <?php if(count($footer_links)>0): ?>
18
+ <?php foreach($footer_links as $f): ?>
19
+ <?php $pageTitle = Mage::getModel('cms/page')->load($f, 'identifier')->getTitle(); ?>
20
+ <li><a href="<?php echo $this->getUrl('').$f; ?>"><?php echo $pageTitle; ?></a></li>
21
+ <?php endforeach; ?>
22
+ <?php endif; ?>
23
+ </ul>
24
+ <div id="copyright"><?php echo $this->getCopyright() ?></div>
25
+ </div>
26
+ <?php endif; ?>
27
+
app/design/frontend/makgento/default/template/makgento/head.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <title>
2
+ <?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?>
3
+ </title>
4
+ <meta name="msapplication-tap-highlight" content="no"/>
5
+ <meta name="apple-mobile-web-app-capable" content="yes">
6
+ <meta name="mobile-web-app-capable" content="yes">
7
+ <meta name="apple-mobile-web-app-title" content="MTTO">
8
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
10
+ <link rel="apple-touch-icon" href="<?= $store_touch_icon; ?>">
11
+ <link href='http://fonts.googleapis.com/css?family=Cabin:400,500,600,700,400italic,500italic,600italic,700italic' rel='stylesheet' type='text/css'>
12
+ <script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/js/jquery-2.1.0.min.js'; ?>"></script>
13
+ <script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/js/scripts.js'; ?>"></script>
14
+ <script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/js/slide.js'; ?>"></script>
15
+ <script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/js/slider.js'; ?>"></script>
16
+ <script type="text/javascript">
17
+ var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
18
+ var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
19
+ </script>
20
+ <?php echo $this->getCssJsHtml() ?>
21
+ <?php echo $this->getChildHtml() ?>
22
+ <?php echo $this->helper('core/js')->getTranslatorScript() ?>
23
+
app/design/frontend/makgento/default/template/makgento/header_mobile.phtml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $logo=Mage::getStoreConfig('makgento/header_footer/logo',Mage::app()->getStore());
3
+ if (isset($logo)){$logo_img = $logo;}
4
+ else{$logo_img = '';}
5
+
6
+ if ($logo_img == ''){$logo_img = $this->getLogoSrc();}
7
+ else {$logo_img = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'makgento/'. $logo_img;}
8
+
9
+ ?>
10
+ <div class="makgento-content" data-role="page" id="pageone">
11
+ <div class="header">
12
+ <div class="responsive-nav-link" id="main-menu-drop-up">
13
+ <div class="mk-burger-icon">
14
+ <div class="burger-icon-1"></div>
15
+ <div class="burger-icon-2"></div>
16
+ <div class="burger-icon-3"></div>
17
+ </div>
18
+ </div>
19
+ <div class="makgento-logo"><a href="<?php echo $this->getUrl('') ?>" class="logo"><img src="<?php echo $logo_img; ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></div>
20
+ <div class="makgento-search" onclick="open_search();">
21
+ &emsp;
22
+ </div>
23
+ <div class="makgento-cart">
24
+ <a href="<?= $this->getUrl('checkout/cart')?>">&emsp;<span><?php echo Mage::helper('checkout/cart')->getSummaryCount(); ?></span></a>
25
+ </div>
26
+ </div>
27
+ <div id="main-menu-drop-down" style="display:none">
28
+ <ul>
29
+ <?php
30
+ $obj = new Mage_Catalog_Block_Navigation();
31
+ $storeCategories = $obj->getStoreCategories();
32
+ foreach($storeCategories as $categ){
33
+ $_category = Mage::getModel('catalog/category')->load($categ->getId());
34
+ $categoryChildren = $_category->getChildrenCategories();
35
+ ?>
36
+ <?php if($_category->getIsActive()){ ?>
37
+ <li class="main_menu_item_up" cat_id="<?php echo $_category->getId(); ?>" id="menu_down_<?php echo $_category->getId(); ?>" <?php if(count($categoryChildren)>0){ ?>value="true"<?php } ?>>
38
+ <a href="<?php echo $_category->getUrl(); ?>">
39
+ <?php echo $_category->getName(); ?>
40
+ </a>
41
+ </li>
42
+
43
+ <?php if(count($categoryChildren)>0){ ?>
44
+ <li style="display:none" id="menu_up_<?php echo $_category->getId(); ?>" class="main_menu_subitem">
45
+ <ul class="subitem_menu_ul">
46
+ <?php foreach($categoryChildren as $c){ ?>
47
+ <?php
48
+ $category_url=$c->getUrl();
49
+ $category_name=$c->getName();
50
+ ?>
51
+ <li>
52
+ <a href="<?php echo $category_url; ?>"><?php echo $category_name; ?></a>
53
+ </li>
54
+ <?php } ?>
55
+ </ul>
56
+ </li>
57
+ <?php } ?>
58
+ <?php } ?>
59
+ <?php
60
+ }
61
+ ?>
62
+ </ul>
63
+ </div>
64
+ <div id="search_box" style="display:none">
65
+ <?php echo $this->getChildHtml('topSearch') ?>
66
+ </div>
67
+ <script>
68
+ jQuery.noConflict();
69
+ jQuery(function($) {
70
+ $("#main-menu-drop-up").click(
71
+ function(){
72
+ $("#main-menu-drop-down").toggle('fast',function() {
73
+ var menu=document.getElementById('main-menu-drop-down');
74
+ if(menu.style.display=="none"){
75
+ document.getElementById('main-menu-drop-up').className="responsive-nav-link";
76
+ }
77
+ else{
78
+ document.getElementById('main-menu-drop-up').className="responsive-nav-link active-burger";
79
+ }
80
+ });
81
+ }
82
+ );
83
+ $(".main_menu_item_up").click(
84
+ function(){
85
+ var catid=$(this).attr('cat_id');
86
+ var up = "menu_up_"+catid;
87
+ var down = "menu_down_"+catid;
88
+ $("#"+up).toggle('fast',function() {
89
+ var menu=document.getElementById(down);
90
+ if(menu.style.display=="none"){
91
+ document.getElementById(down).className="main_menu_item_up";
92
+ }
93
+ else{
94
+ document.getElementById(down).className="main_menu_item_up drop_down";
95
+ }
96
+ });
97
+ }
98
+ );
99
+
100
+
101
+ });
102
+ function showMenu(el){
103
+ var els=document.getElementsByClassName('subcategory');
104
+ for(var i=0;i<els.length;i++){
105
+ if(els[i].id==el){
106
+ if(els[i].style.display=="none"){
107
+ els[i].style.display="block";
108
+ }
109
+ else{
110
+ els[i].style.display="none";
111
+ }
112
+ }
113
+ else{
114
+ els[i].style.display="none";
115
+ }
116
+ }
117
+ }
118
+ function open_search(){
119
+ var search=document.getElementById('search_box');
120
+ if(search.style.display=="none"){
121
+ search.style.display="block";
122
+ document.getElementById('search').focus();
123
+
124
+ }
125
+ else{
126
+ search.style.display="none";
127
+ document.getElementById('search').blur();
128
+ }
129
+
130
+ }
131
+ </script>
132
+
app/design/frontend/makgento/default/template/makgento/homepage.phtml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $slides=array();
3
+ $catimgs=array();
4
+ $n=0;
5
+ $p=0;
6
+ for($i=1;$i<11;$i++){
7
+ $slide=Mage::getStoreConfig('makgento/home_page/makgento_slide_images_'.$i,Mage::app()->getStore());
8
+ $catimg=Mage::getStoreConfig('makgento/home_page/makgento_category_images_'.$i,Mage::app()->getStore());
9
+ if(isset($slide)){
10
+ $slides[$n]=$slide;
11
+ $n++;
12
+ }
13
+ if(isset($catimg)){
14
+ $catimgs[$p]=$catimg;
15
+ $p++;
16
+ }
17
+ }
18
+ ?>
19
+ <div id="slider1_container">
20
+ <?php
21
+ for($a=0; $a<count($slides); $a++){
22
+ if ($slides[$a]!='') {
23
+ $image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'makgento/'. $slides[$a];
24
+ ?>
25
+ <img u="image" src="<?php echo $image; ?>" />
26
+ <?php }} ?>
27
+ </div>
28
+ <div class="homepage_grid">
29
+ <?php
30
+ $featured_title=Mage::getStoreConfig('makgento/home_page/featured_title',Mage::app()->getStore());
31
+ if(isset($featured_title)){$title=$featured_title;}else{$title="Featured";}
32
+ $img_width=Mage::getStoreConfig('makgento/makgento_grid/makgento_grid_width',Mage::app()->getStore());
33
+ $img_height=Mage::getStoreConfig('makgento/makgento_grid/makgento_grid_height',Mage::app()->getStore());
34
+ if(isset($img_width) && $img_width!=""){$imgw=$img_width;}else{$imgw=200;}
35
+ if(isset($img_height) && $img_height!=""){$imgh=$img_height;}else{$imgh=200;}
36
+ ?>
37
+ <div class="homepage_grid_title"><?php echo $title; ?></div>
38
+ <?php
39
+ $coll_type=Mage::getStoreConfig('makgento/home_page/featured_type',Mage::app()->getStore());
40
+ if($coll_type == 1){
41
+ $collection_list=Mage::getStoreConfig('makgento/home_page/featured_products',Mage::app()->getStore());
42
+ $collection=split(',',trim($collection_list));
43
+ if(isset($collection_list)){
44
+ ?>
45
+ <ul class="makgento-grid category-products-grid">
46
+ <?php foreach($collection as $pr){ ?>
47
+ <li class="makgento-item grid_two">
48
+ <?php $_product = Mage::getModel('catalog/product')->load($pr); ?>
49
+ <div class="makgento-image">
50
+ <a href="<?php echo $_product->getProductUrl(); ?>">
51
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($imgw,$imgh); ?>" alt="" />
52
+ </a>
53
+ </div>
54
+ <div class="makgento-info">
55
+ <h2 class="product-name">
56
+ <a href="<?php echo $_product->getProductUrl(); ?>">
57
+ <?php echo $_product->getName(); ?>
58
+ </a>
59
+ </h2>
60
+ <div class="prices"><?php echo $this->getPriceHtml($_product, true); ?></div>
61
+ </div>
62
+ </li>
63
+ <?php } ?>
64
+ </ul>
65
+ <?php
66
+ }
67
+ }
68
+ else if($coll_type == 2){
69
+ $collection_list=Mage::getStoreConfig('makgento/home_page/featured_categories',Mage::app()->getStore());
70
+ $category = Mage::getModel('catalog/category')->load($collection_list);
71
+ $collection1 = $category->getProductCollection()->addAttributeToSort('position');
72
+ Mage::getModel('catalog/layer')->prepareProductCollection($collection1);
73
+ $collection=$collection1->getAllIds();
74
+ ?>
75
+ <ul class="makgento-grid category-products-grid">
76
+ <?php foreach($collection as $pr){ ?>
77
+ <li class="makgento-item grid_two">
78
+ <?php $_product = Mage::getModel('catalog/product')->load($pr); ?>
79
+ <div class="makgento-image">
80
+ <a href="<?php echo $_product->getProductUrl(); ?>">
81
+ <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($imgw,$imgh); ?>" alt="" />
82
+ </a>
83
+ </div>
84
+ <div class="makgento-info">
85
+ <h2 class="product-name">
86
+ <a href="<?php echo $_product->getProductUrl(); ?>">
87
+ <?php echo $_product->getName(); ?>
88
+ </a>
89
+ </h2>
90
+ <div class="prices"><?php echo $this->getPriceHtml($_product, true); ?></div>
91
+ </div>
92
+ </li>
93
+ <?php } ?>
94
+ </ul>
95
+ <?php
96
+ }
97
+ else if($coll_type == 3){
98
+ $collection_list=Mage::getStoreConfig('makgento/home_page/featured_products',Mage::app()->getStore());
99
+ $collection=split(',',trim($collection_list));
100
+ $j=0;
101
+ ?>
102
+ <ul class="makgento-grid category-products-grid">
103
+ <?php foreach($collection as $pr){ ?>
104
+ <?php $_cat=Mage::getModel('catalog/category')->load($pr); ?>
105
+ <li class="makgento-item grid_two">
106
+ <div class="makgento-image">
107
+ <a href="<?php echo $_cat->getUrl(); ?>">
108
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>/makgento/<?php echo $catimgs[$j];$j++; ?>" alt="" />
109
+ </a>
110
+ </div>
111
+ <div class="makgento-info">
112
+ <h2 class="product-name">
113
+ <a href="<?php echo $_cat->getUrl(); ?>">
114
+ <?php echo $_cat->getName(); ?>
115
+ </a>
116
+ </h2>
117
+ </div>
118
+ </li>
119
+ <?php } ?>
120
+ </ul>
121
+ <?php
122
+ }
123
+ ?>
124
+ </div>
125
+ <div class="homepage_banners">
126
+ <?php
127
+ $banner=Mage::getStoreConfig('makgento/home_page/banner',Mage::app()->getStore());
128
+ if(isset($banner)){
129
+ $banner_img = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'makgento/'. $banner;
130
+ ?>
131
+ <img src="<?php echo $banner_img; ?>">
132
+ <?php } ?>
133
+ </div>
134
+ <div class="homepage_box">
135
+ <div class="hp_box_button"></div>
136
+ </div>
137
+ <script>
138
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden="hidden",e.paused=!1,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=c.options.asNavFor;d&&null!==d&&(d=a(d).not(c.$slider)),null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};c[b.transitionType]=b.options.fade===!1?b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:"opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(0===a.currentSlide-1&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="'+b.options.dotsClass+'">',c=0;c<=b.getDotCount();c+=1)d+="<li>"+b.options.customPaging.call(this,b,c)+"</li>";d+="</ul>",b.$dots=a(d).appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slidesCache=b.$slides,b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.html(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.target);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=0!==d.slideCount%d.options.slidesToScroll,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&(a("li",b.$dots).off("click.slick",b.changeSlide),b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).off("mouseenter.slick",a.proxy(b.setPaused,b,!0)).off("mouseleave.slick",a.proxy(b.setPaused,b,!1))),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.$list.off("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.html(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.options.arrows===!0&&(c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove())),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToShow,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else for(;b<a.slideCount;)++d,b=c+a.options.slidesToShow,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=-1*b.slideWidth*b.options.slidesToShow,e=-1*d*b.options.slidesToShow),0!==b.slideCount%b.options.slidesToScroll&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=-1*(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth,e=-1*(b.options.slidesToShow-(a-b.slideCount))*d):(b.slideOffset=-1*b.slideCount%b.options.slidesToScroll*b.slideWidth,e=-1*b.slideCount%b.options.slidesToScroll*d))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?-1*a*b.slideWidth+b.slideOffset:-1*a*d+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.setPaused,b,!0)).on("mouseleave.slick",a.proxy(b.setPaused,b,!1))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.$list.on("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:"next"}}))},b.prototype.lazyLoad=function(){function g(b){a("img[data-lazy]",b).each(function(){var b=a(this),c=a(this).attr("data-lazy"),d=document.createElement("img");d.onload=function(){b.animate({opacity:0},100,function(){b.attr("src",c).animate({opacity:1},200,function(){b.removeAttr("data-lazy").removeClass("slick-loading")})})},d.src=c})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow,b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.paused=!1,a.autoPlay()},b.prototype.postSlide=function(a){var b=this;b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay(),b.options.accessibility===!0&&b.initADA()},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a("img[data-lazy]",b.$slider).length,c>0&&(d=a("img[data-lazy]",b.$slider).first(),d.attr("src",d.attr("data-lazy")).removeClass("slick-loading").load(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad(),b.options.adaptiveHeight===!0&&b.setPosition()}).error(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad()}))},b.prototype.refresh=function(b){var c=this,d=c.currentSlide;c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses(0),b.setPosition(),b.$slider.trigger("reInit",[b]),b.options.autoplay===!0&&b.focusHandler()},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,d.reinit(),void 0)},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=-1*b.slideWidth*d,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(b,c,d){var f,g,e=this;if("responsive"===b&&"array"===a.type(c))for(g in c)if("array"!==a.type(e.options.responsive))e.options.responsive=[c[g]];else{for(f=e.options.responsive.length-1;f>=0;)e.options.responsive[f].breakpoint===c[g].breakpoint&&e.options.responsive.splice(f,1),f--;e.options.responsive.push(c[g])}else e.options[b]=c;d===!0&&(e.unload(),e.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.setPaused=function(a){var b=this;b.options.autoplay===!0&&b.options.pauseOnHover===!0&&(b.paused=a,a?b.autoPlayClear():b.autoPlay())},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),c.asNavFor(e),void 0):(c.slideHandler(e),void 0)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):(i.options.autoplay===!0&&clearInterval(i.autoPlayTimer),e=0>d?0!==i.slideCount%i.options.slidesToScroll?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?0!==i.slideCount%i.options.slidesToScroll?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),i.animateHeight(),void 0):(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e),void 0)))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"left":"right":"vertical"},b.prototype.swipeEnd=function(){var c,b=this;if(b.dragging=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case"left":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.slideHandler(c),b.currentDirection=0,b.touchObject={},b.$slider.trigger("swipe",[b,"left"]);break;case"right":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.slideHandler(c),b.currentDirection=1,b.touchObject={},b.$slider.trigger("swipe",[b,"right"])}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.swipeLeft=b.options.vertical===!1?d+f*g:d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):(b.setCSS(b.swipeLeft),void 0)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,b.dragging=!0,void 0)},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):a.options.autoplay===!0&&(a.paused=!1,a.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.activateADA=function(){var a=this,b=a.$slider.find("*").is(":focus");a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false",tabindex:"0"}).find("a, input, button, select").attr({tabindex:"0"}),b&&a.$slideTrack.find(".slick-active").focus()},b.prototype.focusHandler=function(){var b=this;b.$slider.on("focus.slick blur.slick","*",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.isPlay&&(d.is(":focus")?(b.autoPlayClear(),b.paused=!0):(b.paused=!1,b.autoPlay()))},0)})},a.fn.slick=function(){var g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length,f=0;for(f;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
139
+ </script>
140
+ <script>
141
+ jQuery("#slider1_container").slick({arrows: false,slidesToScroll:1,infinite:1,slidesToShow:1,autoplay: true,autoplaySpeed: 3000})
142
+ </script>
app/design/frontend/makgento/default/template/makgento/item_renderer.phtml ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_item = $this->getItem();
3
+ $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
4
+ $canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
5
+ ?>
6
+ <tr>
7
+ <td width="100">
8
+ <a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image">
9
+ <img src="<?php echo $this->getProductThumbnail()->resize(100); ?>" width="100" height="100" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
10
+ </a>
11
+ </td>
12
+ <td width="120">
13
+ <?php if ($_options = $this->getOptionList()):?>
14
+ <dl class="item-options">
15
+ <?php foreach ($_options as $_option) : ?>
16
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
17
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
18
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
19
+ <div class="truncated_full_value">
20
+ <dl class="item-options">
21
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
22
+ </dl>
23
+ </div>
24
+ <?php endif; ?>
25
+ </dd>
26
+ <?php endforeach; ?>
27
+ </dl>
28
+ <?php endif;?>
29
+ </td>
30
+ <td>
31
+ <div class="item-options">
32
+ <?php if ($canApplyMsrp): ?>
33
+
34
+ <span class="cart-price">
35
+ <span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
36
+ <?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
37
+ <a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
38
+ <script type="text/javascript">
39
+ Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
40
+ </script>
41
+ </span>
42
+
43
+ <?php else: ?>
44
+
45
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
46
+
47
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
48
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
49
+ <?php else: ?>
50
+ <span class="cart-price">
51
+ <?php endif; ?>
52
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
53
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
54
+ <?php else: ?>
55
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
56
+ <?php endif; ?>
57
+
58
+ </span>
59
+
60
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
61
+
62
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
63
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
64
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
65
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
66
+ <?php endforeach; ?>
67
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
68
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
69
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
70
+ <?php endforeach; ?>
71
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
72
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
73
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
74
+ <?php endforeach; ?>
75
+ <?php endif; ?>
76
+ </div>
77
+
78
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
79
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
80
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
81
+ </div>
82
+ <?php endif; ?>
83
+ <?php endif; ?>
84
+
85
+ <?php endif; ?><!-- inclusive price starts here -->
86
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
87
+
88
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
89
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
90
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
91
+ <?php else: ?>
92
+ <span class="cart-price">
93
+ <?php endif; ?>
94
+
95
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
96
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
97
+ <?php else: ?>
98
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
99
+ <?php endif; ?>
100
+
101
+ </span>
102
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
103
+
104
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
105
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
106
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
107
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
108
+ <?php endforeach; ?>
109
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
110
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
111
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
112
+ <?php endforeach; ?>
113
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
114
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
115
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
116
+ <?php endforeach; ?>
117
+ <?php endif; ?>
118
+ </div>
119
+
120
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
121
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
122
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
123
+ </div>
124
+ <?php endif; ?>
125
+ <?php endif; ?>
126
+
127
+ <?php endif; ?>
128
+ <?php endif; ?>
129
+ </div>
130
+
131
+ </td>
132
+ <td>
133
+ <div class="item-options">
134
+ <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" />
135
+ </div>
136
+ </td>
137
+
138
+
139
+ <td>
140
+ <?php if ($isVisibleProduct): ?>
141
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>" class="btn-edit btn-edit2">&emsp;</a>
142
+ <?php endif ?>
143
+ <a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2">&emsp;</a></td>
144
+ </tr>
app/design/frontend/makgento/default/template/makgento/list.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $cookie = Mage::getModel("core/cookie");
3
+ $iphone = $cookie->get("iphone");
4
+ $_productCollection = $this->getLoadedProductCollection();
5
+ $_helper = $this->helper('catalog/output');
6
+ $img_width=Mage::getStoreConfig('makgento/makgento_grid/makgento_grid_width',Mage::app()->getStore());
7
+ $img_height=Mage::getStoreConfig('makgento/makgento_grid/makgento_grid_height',Mage::app()->getStore());
8
+ $items_no=Mage::getStoreConfig('makgento/makgento_grid/makgento_list_items',Mage::app()->getStore());
9
+ if(isset($items_no)){$itno=$items_no;}else{$itno="grid_two";}
10
+ if(isset($img_width)){$imgw=$img_width;}else{$imgw=200;}
11
+ if(isset($img_height)){$imgh=$img_height;}else{$imgh=200;}
12
+ if(!$_productCollection->getSize()): ?>
13
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.');?></p>
14
+ <?php else: ?>
15
+ <?php echo $this->getToolbarHtml(); ?>
16
+ <div class="makgento-catalog">
17
+ <ul class="makgento-grid category-products-grid">
18
+ <?php foreach ($_productCollection as $_product): ?>
19
+ <li class="makgento-item <?php echo $itno; ?>">
20
+ <div class="makgento-image">
21
+ <?php if($iphone == 'true'): ?>
22
+ <a <?=$bg_colors[array_rand($bg_colors)]?>" href="<?= $_product->getProductUrl() . "?ios_title=" . $_product->getName() . '&ios_action=hidemenu' ?>">
23
+ <?php else : ?>
24
+ <a <?=$bg_colors[array_rand($bg_colors)]?>" href="<?= $_product->getProductUrl() ?>">
25
+ <?php endif; ?>
26
+ <img src="<?= $this->helper('catalog/image')->init($_product, 'small_image')->resize($imgw,$imgh); ?>" alt="" />
27
+ </a>
28
+ </div>
29
+ <div class="makgento-info">
30
+ <? $name = $_helper->productAttribute($_product, $_product->getName() , 'name'); ?>
31
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() . "?ios_title=" . $_product->getName() . '&ios_action=hidemenu' ?>"><?=ucwords(strtolower($name))?></a></h2>
32
+ <div class="prices"><?php echo $this->getPriceHtml($_product, true); ?></div>
33
+ </div>
34
+ </li>
35
+ <?php endforeach; ?>
36
+ </ul>
37
+ </div>
38
+ <?php endif; ?>
39
+
app/design/frontend/makgento/default/template/makgento/login.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="account-login">
2
+ <div class="page-title"><h1>Login/ Register</h1></div>
3
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
4
+ <?php echo $this->getChildHtml('customer.form.login.extra')?>
5
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
6
+ <?php echo $this->getBlockHtml('formkey'); ?>
7
+ <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
8
+ <ul class="form-list">
9
+ <li>
10
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
11
+ <div class="input-box"><input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" /></div>
12
+ </li>
13
+ <li>
14
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
15
+ <div class="input-box"><input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" /></div>
16
+ </li>
17
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
18
+ </ul>
19
+ <div class="col2-set">
20
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
21
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
22
+ <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
23
+ </div>
24
+
25
+ </form>
26
+ <script type="text/javascript">
27
+ //<![CDATA[
28
+ var dataForm = new VarienForm('login-form', true);
29
+ //]]>
30
+ </script>
31
+ </div>
app/design/frontend/makgento/default/template/makgento/media.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_product = $this->getProduct(); $_helper = $this->helper('catalog/output');
3
+ $iw=Mage::getStoreConfig('makgento/makgento_product/makgento_product_image_width',Mage::app()->getStore());
4
+ $ih=Mage::getStoreConfig('makgento/makgento_product/makgento_product_image_height',Mage::app()->getStore());
5
+ if(isset($iw)){$imw=$iw;}else{$imw=600;}
6
+ if(isset($ih)){$imh=$ih;}else{$imw=600;}
7
+ ?>
8
+ <div id="slider1_container">
9
+ <?php foreach($this->getGalleryImages() as $_image){ ?>
10
+ <img u="image" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($imw,$imh); ?>" />
11
+ <?php } ?>
12
+ </div>
13
+ <?php echo $this->getChildHtml('after'); ?>
14
+ <script>
15
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden="hidden",e.paused=!1,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=c.options.asNavFor;d&&null!==d&&(d=a(d).not(c.$slider)),null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};c[b.transitionType]=b.options.fade===!1?b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:"opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(0===a.currentSlide-1&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="'+b.options.dotsClass+'">',c=0;c<=b.getDotCount();c+=1)d+="<li>"+b.options.customPaging.call(this,b,c)+"</li>";d+="</ul>",b.$dots=a(d).appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slidesCache=b.$slides,b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.html(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.target);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=0!==d.slideCount%d.options.slidesToScroll,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&(a("li",b.$dots).off("click.slick",b.changeSlide),b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).off("mouseenter.slick",a.proxy(b.setPaused,b,!0)).off("mouseleave.slick",a.proxy(b.setPaused,b,!1))),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.$list.off("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.html(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.options.arrows===!0&&(c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove())),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToShow,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else for(;b<a.slideCount;)++d,b=c+a.options.slidesToShow,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=-1*b.slideWidth*b.options.slidesToShow,e=-1*d*b.options.slidesToShow),0!==b.slideCount%b.options.slidesToScroll&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=-1*(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth,e=-1*(b.options.slidesToShow-(a-b.slideCount))*d):(b.slideOffset=-1*b.slideCount%b.options.slidesToScroll*b.slideWidth,e=-1*b.slideCount%b.options.slidesToScroll*d))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?-1*a*b.slideWidth+b.slideOffset:-1*a*d+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.setPaused,b,!0)).on("mouseleave.slick",a.proxy(b.setPaused,b,!1))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.$list.on("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:"next"}}))},b.prototype.lazyLoad=function(){function g(b){a("img[data-lazy]",b).each(function(){var b=a(this),c=a(this).attr("data-lazy"),d=document.createElement("img");d.onload=function(){b.animate({opacity:0},100,function(){b.attr("src",c).animate({opacity:1},200,function(){b.removeAttr("data-lazy").removeClass("slick-loading")})})},d.src=c})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow,b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.paused=!1,a.autoPlay()},b.prototype.postSlide=function(a){var b=this;b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay(),b.options.accessibility===!0&&b.initADA()},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a("img[data-lazy]",b.$slider).length,c>0&&(d=a("img[data-lazy]",b.$slider).first(),d.attr("src",d.attr("data-lazy")).removeClass("slick-loading").load(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad(),b.options.adaptiveHeight===!0&&b.setPosition()}).error(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad()}))},b.prototype.refresh=function(b){var c=this,d=c.currentSlide;c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses(0),b.setPosition(),b.$slider.trigger("reInit",[b]),b.options.autoplay===!0&&b.focusHandler()},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,d.reinit(),void 0)},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=-1*b.slideWidth*d,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(b,c,d){var f,g,e=this;if("responsive"===b&&"array"===a.type(c))for(g in c)if("array"!==a.type(e.options.responsive))e.options.responsive=[c[g]];else{for(f=e.options.responsive.length-1;f>=0;)e.options.responsive[f].breakpoint===c[g].breakpoint&&e.options.responsive.splice(f,1),f--;e.options.responsive.push(c[g])}else e.options[b]=c;d===!0&&(e.unload(),e.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.setPaused=function(a){var b=this;b.options.autoplay===!0&&b.options.pauseOnHover===!0&&(b.paused=a,a?b.autoPlayClear():b.autoPlay())},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),c.asNavFor(e),void 0):(c.slideHandler(e),void 0)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d)),void 0):(i.options.autoplay===!0&&clearInterval(i.autoPlayTimer),e=0>d?0!==i.slideCount%i.options.slidesToScroll?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?0!==i.slideCount%i.options.slidesToScroll?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),i.animateHeight(),void 0):(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e),void 0)))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"left":"right":"vertical"},b.prototype.swipeEnd=function(){var c,b=this;if(b.dragging=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case"left":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.slideHandler(c),b.currentDirection=0,b.touchObject={},b.$slider.trigger("swipe",[b,"left"]);break;case"right":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.slideHandler(c),b.currentDirection=1,b.touchObject={},b.$slider.trigger("swipe",[b,"right"])}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.swipeLeft=b.options.vertical===!1?d+f*g:d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):(b.setCSS(b.swipeLeft),void 0)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,b.dragging=!0,void 0)},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):a.options.autoplay===!0&&(a.paused=!1,a.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.activateADA=function(){var a=this,b=a.$slider.find("*").is(":focus");a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false",tabindex:"0"}).find("a, input, button, select").attr({tabindex:"0"}),b&&a.$slideTrack.find(".slick-active").focus()},b.prototype.focusHandler=function(){var b=this;b.$slider.on("focus.slick blur.slick","*",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.isPlay&&(d.is(":focus")?(b.autoPlayClear(),b.paused=!0):(b.paused=!1,b.autoPlay()))},0)})},a.fn.slick=function(){var g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length,f=0;for(f;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
16
+ </script>
17
+ <script>
18
+ jQuery("#slider1_container").slick({arrows: false,slidesToScroll:1,infinite:1,slidesToShow:1,autoplay: false})
19
+ </script>
app/design/frontend/makgento/default/template/makgento/options_wrapper.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <div class="product-options" id="product-options-wrapper">
2
+ <?php echo $this->getChildHtml('', true, true);?>
3
+ </div>
4
+ <script type="text/javascript">decorateGeneric($$('#product-options-wrapper dl'), ['last']);</script>
app/design/frontend/makgento/default/template/makgento/order_review_info.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo $this->getChildHtml('items_before'); ?>
2
+ <div id="checkout-review-table-wrapper">
3
+ <table class="data-table" id="checkout-review-table">
4
+ <?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
5
+ <col />
6
+ <col width="1" />
7
+ <col width="1" />
8
+ <col width="1" />
9
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
10
+ <col width="1" />
11
+ <col width="1" />
12
+ <?php endif; ?>
13
+ <thead>
14
+ <tr>
15
+ <th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
16
+ <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
17
+ <th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
18
+
19
+ </tr>
20
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
21
+ <tr>
22
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
23
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
24
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
25
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
26
+ </tr>
27
+ <?php endif; ?>
28
+ </thead>
29
+ <?php echo $this->getChildHtml('totals'); ?>
30
+ <tbody>
31
+ <?php foreach($this->getItems() as $_item): ?>
32
+ <?php echo $this->getItemHtml($_item)?>
33
+ <?php endforeach ?>
34
+ </tbody>
35
+ </table>
36
+ </div>
37
+ <?php echo $this->getChildHtml('items_after'); ?>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ decorateTable('checkout-review-table');
41
+ truncateOptions();
42
+ //]]>
43
+ </script>
44
+ <div id="checkout-review-submit">
45
+ <?php echo $this->getChildHtml('agreements') ?>
46
+ <div class="buttons-set" id="review-buttons-container">
47
+ <p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
48
+ <?php echo $this->getChildHtml('button') ?>
49
+ <span class="please-wait" id="review-please-wait" style="display:none;">
50
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/images/ajax-loader.gif'; ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
51
+ </span>
52
+ </div>
53
+ <script type="text/javascript">
54
+ //<![CDATA[
55
+ review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
56
+ //]]>
57
+ </script>
58
+ </div>
app/design/frontend/makgento/default/template/makgento/order_review_item.phtml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_item = $this->getItem()?>
2
+ <tr>
3
+ <td width="120">
4
+ <img src="<?php echo $this->getProductThumbnail()->resize(120); ?>" width="120" height="120" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
5
+ </td>
6
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
7
+ <td>
8
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
9
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
10
+ <?php else: ?>
11
+ <span class="cart-price">
12
+ <?php endif; ?>
13
+
14
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
15
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
16
+ <?php else: ?>
17
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
18
+ <?php endif; ?>
19
+
20
+ </span>
21
+
22
+
23
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
24
+
25
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
26
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
27
+ <small>
28
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
29
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
30
+ <?php endforeach; ?>
31
+ </small>
32
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
33
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
34
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></small></span><br />
35
+ <?php endforeach; ?>
36
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
37
+ <small>
38
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
39
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
40
+ <?php endforeach; ?>
41
+ </small>
42
+ <?php endif; ?>
43
+ </div>
44
+
45
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
46
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
47
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
48
+ </div>
49
+ <?php endif; ?>
50
+ <?php endif; ?>
51
+ </td>
52
+ <?php endif; ?>
53
+
54
+
55
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
56
+ <td>
57
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
58
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
59
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
60
+ <?php else: ?>
61
+ <span class="cart-price">
62
+ <?php endif; ?>
63
+
64
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
65
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
66
+ <?php else: ?>
67
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
68
+ <?php endif; ?>
69
+
70
+ </span>
71
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
72
+
73
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
74
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
75
+ <small>
76
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
77
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
78
+ <?php endforeach; ?>
79
+ </small>
80
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
81
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
82
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
83
+ <?php endforeach; ?>
84
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
85
+ <small>
86
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
87
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
88
+ <?php endforeach; ?>
89
+ </small>
90
+ <?php endif; ?>
91
+ </div>
92
+
93
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
94
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
95
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
96
+ </div>
97
+ <?php endif; ?>
98
+ <?php endif; ?>
99
+ </td>
100
+ <?php endif; ?>
101
+
102
+ <td><?php echo $_item->getQty() ?></td>
103
+ </tr>
app/design/frontend/makgento/default/template/makgento/order_review_totals.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ($this->getTotals()): ?>
2
+ <tfoot>
3
+ <?php $_colspan = 2; ?>
4
+ <?php echo $this->renderTotals(null, $_colspan); ?>
5
+ <?php echo $this->renderTotals('footer', $_colspan); ?>
6
+ <?php if ($this->needDisplayBaseGrandtotal()):?>
7
+ <tr>
8
+ <td class="a-right" colspan="<?php echo $_colspan; ?>">
9
+ <small><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></small>
10
+ </td>
11
+ <td class="a-right">
12
+ <small><?php echo $this->displayBaseGrandtotal() ?></small>
13
+ </td>
14
+ </tr>
15
+ <?php endif?>
16
+ </tfoot>
17
+ <?php endif; ?>
app/design/frontend/makgento/default/template/makgento/payment.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ //<![CDATA[
3
+ var quoteBaseGrandTotal = <?php echo (float)$this->getQuoteBaseGrandTotal(); ?>;
4
+ var checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
5
+ var payment = new Payment('co-payment-form', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
6
+ var lastPrice;
7
+ //]]>
8
+ </script>
9
+ <form action="" id="co-payment-form">
10
+ <fieldset>
11
+ <?php echo $this->getChildHtml('methods') ?>
12
+ </fieldset>
13
+ </form>
14
+ <div class="tool-tip" id="payment-tool-tip" style="display:none;">
15
+ <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
16
+ <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
17
+ </div>
18
+ <div class="buttons-set" id="payment-buttons-container">
19
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
20
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
21
+ <button type="button" class="button" onclick="payment.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
22
+ <span class="please-wait" id="payment-please-wait" style="display:none;">
23
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/images/ajax-loader.gif'; ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
24
+ </span>
25
+ </div>
26
+ <script type="text/javascript">
27
+ //<![CDATA[
28
+ function toggleToolTip(event){
29
+ if($('payment-tool-tip')){
30
+ $('payment-tool-tip').setStyle({
31
+ top: (Event.pointerY(event)-560)+'px'//,
32
+ //left: (Event.pointerX(event)+100)+'px'
33
+ })
34
+ $('payment-tool-tip').toggle();
35
+ }
36
+ Event.stop(event);
37
+ }
38
+ if($('payment-tool-tip-close')){
39
+ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
40
+ }
41
+ //]]>
42
+ </script>
43
+ <script type="text/javascript">
44
+ //<![CDATA[
45
+ payment.currentMethod = "<?php echo $this->getChild('methods')->getSelectedMethodCode() ?>";
46
+ //]]>
47
+ </script>
app/design/frontend/makgento/default/template/makgento/product.phtml ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_helper = $this->helper('catalog/output'); ?>
2
+ <?php $_product = $this->getProduct(); ?>
3
+ <script>var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);</script>
4
+ <div id="mobileproductview">
5
+ <?php
6
+ $cookie = Mage::getModel("core/cookie");
7
+ $iphone = $cookie->get("iphone");
8
+ $at=Mage::getStoreConfig('makgento/makgento_product/makgento_product_special_title',Mage::app()->getStore());
9
+ $atr=Mage::getStoreConfig('makgento/makgento_product/makgento_special_attributes',Mage::app()->getStore());
10
+ if(isset($at)){$at_title=$at;}else{$at_title="Specifications";}
11
+ if(isset($atr)){$at_list=explode(',',$atr);}else{$at_list=array("name","price");}
12
+ if($iphone == 'true') : ?>
13
+ <form action="<?php echo $this->getSubmitUrl($_product) ."?ios_action=addtocart" ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
14
+ <?php else : ?>
15
+
16
+ <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
17
+ <?php endif; ?>
18
+ <div class="no-display">
19
+ <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
20
+ <input type="hidden" name="related_product" id="related-products-field" value="" />
21
+ </div>
22
+
23
+ <div class="single-product-page">
24
+ <div class="row product-shop">
25
+
26
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
27
+
28
+ <div class="product-img-box">
29
+ <?php echo $this->getChildHtml('media') ?>
30
+ </div>
31
+
32
+ <?php if($iphone != 'true') : ?>
33
+ <div class="product small-12 columns">
34
+ <? $pname = $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
35
+ <h1 class="product product-name"><?= ucwords(strtolower($pname)); ?></h1>
36
+ </div>
37
+ <?php endif; ?>
38
+
39
+ <div class="small-12 columns">
40
+ <div class="product">
41
+ <?php echo $this->getChildHtml('alert_urls') ?>
42
+ <?php echo $this->getChildHtml('product_type_data') ?>
43
+ <?php echo $this->getTierPriceHtml() ?>
44
+ <?php echo $this->getChildHtml('extrahint') ?>
45
+ </div>
46
+ <div class="row">
47
+ <div class="makgento-description">
48
+ <div class="makgento-sh" id="des_btn">Description</div>
49
+ <div class="makgento-tx" style="display:none" id="desc"><?php echo $_product->getDescription(); ?></div>
50
+ </div>
51
+
52
+ <div class="makgento-description">
53
+ <div class="makgento-sh" id="attr_btn"><?php echo $at_title; ?></div>
54
+ <div class="makgento-tx" style="display:none" id="attr">
55
+ <?php foreach($at_list as $at):
56
+ $attribute = $_product->getResource()->getAttribute($at);
57
+ if ($attribute):
58
+ ?>
59
+ <div><span><?php echo $attribute->getStoreLabel(); ?>: </span><?php echo $attribute ->getFrontend()->getValue($_product); ?></div>
60
+ <?php endif; ?>
61
+ <?php endforeach; ?>
62
+ </div>
63
+ </div>
64
+ <?php
65
+ $youtube_video=Mage::getStoreConfig('makgento/makgento_product/video_attribute',Mage::app()->getStore());
66
+ if($youtube_video!=""){
67
+ $youtube = $_product->getResource()->getAttribute($youtube_video)->getFrontend()->getValue($_product);
68
+ }
69
+ ?>
70
+ <?php if($youtube!=""){ ?>
71
+ <div class="makgento-description">
72
+ <div class="makgento-sh" id="video_btn">Video</div>
73
+ <div class="makgento-tx" style="display:none" id="video">
74
+ <iframe width="100%" height="250" src="//www.youtube.com/embed/<?php echo $youtube; ?>?rel=0" frameborder="0" allowfullscreen></iframe>
75
+ </div>
76
+ </div>
77
+ <?php } ?>
78
+ </div>
79
+ <?php if (!$this->hasOptions()): ?>
80
+ <div class="add-to-box">
81
+ <?php if ($_product->isSaleable()): ?>
82
+ <?php echo $this->getChildHtml('addtocart') ?>
83
+ <?php endif; ?>
84
+ </div>
85
+ <?php echo $this->getChildHtml('extra_buttons') ?>
86
+ <?php elseif (!$_product->isSaleable()): ?>
87
+ <?php endif; ?>
88
+
89
+ <?php echo $this->getChildHtml('other'); ?>
90
+ <?php if ($_product->isSaleable() && $this->hasOptions()): ?>
91
+ <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
92
+ <?php endif; ?>
93
+
94
+ <div class="clearer"></div>
95
+ <?php if ($_product->isSaleable() && $this->hasOptions()): ?>
96
+ <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
97
+ <?php endif; ?>
98
+ </div>
99
+ </div><!--product shop-->
100
+ </div><!--row-->
101
+ </form>
102
+ <script type="text/javascript">
103
+ //<![CDATA[
104
+ var productAddToCartForm = new VarienForm('product_addtocart_form');
105
+ productAddToCartForm.submit = function(button, url) {
106
+ if (this.validator.validate()) {
107
+ var form = this.form;
108
+ var oldUrl = form.action;
109
+
110
+ if (url) {
111
+ form.action = url;
112
+ }
113
+ var e = null;
114
+ try {
115
+ this.form.submit();
116
+ } catch (e) {
117
+ }
118
+ this.form.action = oldUrl;
119
+ if (e) {
120
+ throw e;
121
+ }
122
+
123
+ if (button && button != 'undefined') {
124
+ button.disabled = true;
125
+ }
126
+ }
127
+ }.bind(productAddToCartForm);
128
+
129
+ productAddToCartForm.submitLight = function(button, url){
130
+ if(this.validator) {
131
+ var nv = Validation.methods;
132
+ delete Validation.methods['required-entry'];
133
+ delete Validation.methods['validate-one-required'];
134
+ delete Validation.methods['validate-one-required-by-name'];
135
+ if (this.validator.validate()) {
136
+ if (url) {
137
+ this.form.action = url;
138
+ }
139
+ this.form.submit();
140
+ }
141
+ Object.extend(Validation.methods, nv);
142
+ }
143
+ }.bind(productAddToCartForm);
144
+ //]]>
145
+ </script>
146
+ </div>
app/design/frontend/makgento/default/template/makgento/register.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="account-create">
2
+ <div class="page-title"><h1>Register</h1></div>
3
+ <?php echo $this->getChildHtml('form_fields_before')?>
4
+ <?php echo $this->getMessagesBlock()->toHtml() ?>
5
+ <?php echo $this->getChildHtml('customer.form.register.extra')?>
6
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
7
+ <div class="fieldset">
8
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
9
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
10
+ <ul class="form-list">
11
+ <li class="fields">
12
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
13
+ </li>
14
+ <li>
15
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
16
+ <div class="input-box">
17
+ <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
18
+ </div>
19
+ </li>
20
+ <?php if ($this->isNewsletterEnabled()): ?>
21
+ <li class="control radio">
22
+ <div class="input-box">
23
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
24
+ </div>
25
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
26
+ <?php echo $this->getChildHtml('customer.form.register.newsletter')?>
27
+ </li>
28
+ <?php endif ?>
29
+ <li class="fields">
30
+ <div class="field">
31
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
32
+ <div class="input-box">
33
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
34
+ </div>
35
+ </div>
36
+ <div class="field">
37
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
38
+ <div class="input-box">
39
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
40
+ </div>
41
+ </div>
42
+ </li>
43
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
44
+ </ul>
45
+ </div>
46
+ <div class="buttons-set">
47
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
48
+ </div>
49
+ </form>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ var dataForm = new VarienForm('form-validate', true);
53
+ <?php if($this->getShowAddressFields()): ?>
54
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
55
+ <?php endif; ?>
56
+ //]]>
57
+ </script>
58
+ </div>
app/design/frontend/makgento/default/template/makgento/related.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(count($this->getItemCollection()->getItems())): ?>
2
+ <div class="page-title">
3
+ <h1><?php echo $this->__('You may also like') ?></h1>
4
+ </div>
5
+
6
+ <!-- Grid View -->
7
+ <div class="row">
8
+ <ul class="ui-grid-a category-products-grid upsell-products">
9
+ <?php
10
+ $cookie = Mage::getModel("core/cookie");
11
+ $iphone = $cookie->get("iphone");
12
+ $bg_colors = array('s1','s2','s3','s4','s5');
13
+ $_productCollection = $this->getItemCollection();
14
+ $i=0; foreach ($_productCollection as $_product):
15
+ $_productNameStripped = $this->stripTags($_product->getName(), null, true);?>
16
+
17
+ <li class="small-6 columns ui-block-<?= $i%2==0?'a':'b'?> grid-block">
18
+ <?php if($iphone == 'true'): ?>
19
+ <a class="product-link s <?=$bg_colors[array_rand($bg_colors)]?>" href="<?= $_product->getProductUrl() . '?ios_title=' . $_product->getName() . '&ios_action=hidemenu' ?>">
20
+ <?php else: ?>
21
+ <a class="product-link d <?=$bg_colors[array_rand($bg_colors)]?>" href="<?= $_product->getProductUrl() ?>">
22
+ <?php endif; ?>
23
+ <img class="thumb" src="<?= $this->helper('catalog/image')->init($_product, 'small_image')->resize(223,319); ?>" alt="" />
24
+ </a>
25
+ <div class="info-sec small-12 columns">
26
+ <h2 class="product-name"><?=ucwords(strtolower($_productNameStripped))?></h2>
27
+ <div class="prices"><?= $this->getPriceHtml($_product, true); ?></div>
28
+ </div>
29
+ </li>
30
+ <?php $i++;endforeach; ?>
31
+ </ul>
32
+ </div>
33
+ <?php endif ?>
34
+
35
+
app/design/frontend/makgento/default/template/makgento/shipping.phtml ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form action="" id="co-shipping-form">
2
+ <ul class="form-list">
3
+ <?php if ($this->customerHasAddresses()): ?>
4
+ <li class="wide">
5
+ <div class="input-box select">
6
+ <?php echo $this->getAddressesHtmlSelect('shipping') ?>
7
+ </div>
8
+ </li>
9
+ <?php endif ?>
10
+ <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
11
+ <fieldset>
12
+ <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
13
+ <ul>
14
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
15
+ <li class="fields">
16
+ <div class="fields">
17
+ <label for="shipping:company"><?php echo $this->__('Company') ?></label>
18
+ <div class="input-box">
19
+ <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
20
+ </div>
21
+ </div>
22
+ </li>
23
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
24
+ <li class="wide">
25
+ <label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
26
+ <div class="input-box">
27
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
28
+ </div>
29
+ </li>
30
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
31
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
32
+ <li class="wide">
33
+ <div class="input-box">
34
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
35
+ </div>
36
+ </li>
37
+ <?php endfor; ?>
38
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
39
+ <li class="wide">
40
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
41
+ <div class="input-box">
42
+ <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
43
+ </div>
44
+ </li>
45
+ <?php endif; ?>
46
+ <li class="fields">
47
+ <div class="field">
48
+ <label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
49
+ <div class="input-box">
50
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
51
+ </div>
52
+ </div>
53
+ <div class="field">
54
+ <label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
55
+ <div class="input-box">
56
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
57
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
58
+ </select>
59
+ <script type="text/javascript">
60
+ //<![CDATA[
61
+ $('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
62
+ //]]>
63
+ </script>
64
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
65
+ </div>
66
+ </div>
67
+ </li>
68
+ <li class="fields">
69
+ <div class="field">
70
+ <label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
71
+ <div class="input-box">
72
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
73
+ </div>
74
+ </div>
75
+ <div class="field">
76
+ <label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
77
+ <div class="input-box">
78
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
79
+ </div>
80
+ </div>
81
+ </li>
82
+ <li class="fields">
83
+ <div class="field">
84
+ <label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
85
+ <div class="input-box">
86
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
87
+ </div>
88
+ </div>
89
+ <div class="field">
90
+ <label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
91
+ <div class="input-box">
92
+ <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
93
+ </div>
94
+ </div>
95
+ </li>
96
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
97
+ <li class="control">
98
+ <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
99
+ <?php else:?>
100
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
101
+ <?php endif;?>
102
+ </ul>
103
+ </fieldset>
104
+ </li>
105
+ <li class="control">
106
+ <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
107
+ </li>
108
+ </ul>
109
+ <div class="buttons-set" id="shipping-buttons-container">
110
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
111
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
112
+ <button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
113
+ <span id="shipping-please-wait" class="please-wait" style="display:none;">
114
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/images/ajax-loader.gif'; ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
115
+ </span>
116
+ </div>
117
+ </form>
118
+ <script type="text/javascript">
119
+ //<![CDATA[
120
+ var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
121
+ '<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
122
+ var shippingForm = new VarienForm('co-shipping-form');
123
+ shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
124
+ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
125
+ $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
126
+
127
+ var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
128
+ //]]>
129
+ </script>
app/design/frontend/makgento/default/template/makgento/shipping_method.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form id="co-shipping-method-form" action="">
2
+ <div id="checkout-shipping-method-load">
3
+ <!-- Content loaded dynamically -->
4
+ </div>
5
+ <script type="text/javascript">
6
+ //<![CDATA[
7
+ var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");
8
+ //]]>
9
+ </script>
10
+ <div id="onepage-checkout-shipping-method-additional-load">
11
+ <?php echo $this->getChildHtml('additional') ?>
12
+ </div>
13
+ <div class="buttons-set" id="shipping-method-buttons-container">
14
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
15
+ <button type="button" class="button" onclick="shippingMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
16
+ <span id="shipping-method-please-wait" class="please-wait" style="display:none;">
17
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'skin/frontend/makgento/default/images/ajax-loader.gif'; ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
18
+ </span>
19
+ </div>
20
+ </form>
app/design/frontend/makgento/default/template/page/html/header.phtml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $logo=Mage::getStoreConfig('makgento/header_footer/logo',Mage::app()->getStore());
3
+ if (isset($logo)){$logo_img = $logo;}
4
+ else{$logo_img = '';}
5
+
6
+ if ($logo_img == ''){$logo_img = $this->getLogoSrc();}
7
+ else {$logo_img = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'makgento/'. $logo_img;}
8
+
9
+ ?>
10
+ <div class="makgento-content" data-role="page" id="pageone">
11
+ <div class="header">
12
+ <div class="responsive-nav-link" id="main-menu-drop-up">
13
+ <div class="mk-burger-icon">
14
+ <div class="burger-icon-1"></div>
15
+ <div class="burger-icon-2"></div>
16
+ <div class="burger-icon-3"></div>
17
+ </div>
18
+ </div>
19
+ <div class="makgento-logo"><a href="<?php echo $this->getUrl('') ?>" class="logo"><img src="<?php echo $logo_img; ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></div>
20
+ <div class="makgento-search" onclick="open_search();">
21
+ &emsp;
22
+ </div>
23
+ <div class="makgento-cart">
24
+ <a href="<?= $this->getUrl('checkout/cart')?>">&emsp;<span><?php echo Mage::helper('checkout/cart')->getSummaryCount(); ?></span></a>
25
+ </div>
26
+ </div>
27
+ <div id="main-menu-drop-down" style="display:none">
28
+ <ul>
29
+ <?php
30
+ $obj = new Mage_Catalog_Block_Navigation();
31
+ $storeCategories = $obj->getStoreCategories();
32
+ foreach($storeCategories as $categ){
33
+ $_category = Mage::getModel('catalog/category')->load($categ->getId());
34
+ $categoryChildren = $_category->getChildrenCategories();
35
+ ?>
36
+ <?php if($_category->getIsActive()){ ?>
37
+ <li class="main_menu_item_up" cat_id="<?php echo $_category->getId(); ?>" id="menu_down_<?php echo $_category->getId(); ?>" <?php if(count($categoryChildren)>0){ ?>value="true"<?php } ?>>
38
+ <a href="<?php echo $_category->getUrl(); ?>">
39
+ <?php echo $_category->getName(); ?>
40
+ </a>
41
+ </li>
42
+
43
+ <?php if(count($categoryChildren)>0){ ?>
44
+ <li style="display:none" id="menu_up_<?php echo $_category->getId(); ?>" class="main_menu_subitem">
45
+ <ul class="subitem_menu_ul">
46
+ <?php foreach($categoryChildren as $c){ ?>
47
+ <?php
48
+ $category_url=$c->getUrl();
49
+ $category_name=$c->getName();
50
+ ?>
51
+ <li>
52
+ <a href="<?php echo $category_url; ?>"><?php echo $category_name; ?></a>
53
+ </li>
54
+ <?php } ?>
55
+ </ul>
56
+ </li>
57
+ <?php } ?>
58
+ <?php } ?>
59
+ <?php
60
+ }
61
+ ?>
62
+ </ul>
63
+ </div>
64
+ <div id="search_box" style="display:none">
65
+ <?php echo $this->getChildHtml('topSearch') ?>
66
+ </div>
67
+ <script>
68
+ jQuery.noConflict();
69
+ jQuery(function($) {
70
+ $("#main-menu-drop-up").click(
71
+ function(){
72
+ $("#main-menu-drop-down").toggle('fast',function() {
73
+ var menu=document.getElementById('main-menu-drop-down');
74
+ if(menu.style.display=="none"){
75
+ document.getElementById('main-menu-drop-up').className="responsive-nav-link";
76
+ }
77
+ else{
78
+ document.getElementById('main-menu-drop-up').className="responsive-nav-link active-burger";
79
+ }
80
+ });
81
+ }
82
+ );
83
+ $(".main_menu_item_up").click(
84
+ function(){
85
+ var catid=$(this).attr('cat_id');
86
+ var up = "menu_up_"+catid;
87
+ var down = "menu_down_"+catid;
88
+ $("#"+up).toggle('fast',function() {
89
+ var menu=document.getElementById(down);
90
+ if(menu.style.display=="none"){
91
+ document.getElementById(down).className="main_menu_item_up";
92
+ }
93
+ else{
94
+ document.getElementById(down).className="main_menu_item_up drop_down";
95
+ }
96
+ });
97
+ }
98
+ );
99
+
100
+
101
+ });
102
+ function showMenu(el){
103
+ var els=document.getElementsByClassName('subcategory');
104
+ for(var i=0;i<els.length;i++){
105
+ if(els[i].id==el){
106
+ if(els[i].style.display=="none"){
107
+ els[i].style.display="block";
108
+ }
109
+ else{
110
+ els[i].style.display="none";
111
+ }
112
+ }
113
+ else{
114
+ els[i].style.display="none";
115
+ }
116
+ }
117
+ }
118
+ function open_search(){
119
+ var search=document.getElementById('search_box');
120
+ if(search.style.display=="none"){
121
+ search.style.display="block";
122
+ document.getElementById('search').focus();
123
+
124
+ }
125
+ else{
126
+ search.style.display="none";
127
+ document.getElementById('search').blur();
128
+ }
129
+
130
+ }
131
+ </script>
132
+
package.xml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MKMage_Makgento</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Robust responsive mobile theme for your store.</summary>
10
+ <description>All content is organized into a one column layout for a better mobile store view and is adjusted for touchscreen navigation. Opportunity to assign a custom Home page with mobile-friendly design. Opportunity to display list of products or list of categories on home page. You can upload featured images for each category on the homepage. Menu, search, account and shopping cart links available from any page. You can choose a list of CMS pages which links will appear in footer. Set custom size for the image resizes on category or product page. Set custom number of products in a row on the category page. Tabs on product page. Choose which attributes to appear in the attributes tab. YouTube videos on product page (first create one text attribute, and in the configuration set up the attribute ID). The values of this attribute should be the youtube video ID. Improved image gallery with gestures support and additional images in horizontal scroll view. Search results pages. Access to cart available from every page. Opportunity to edit information on any step of checkout process. Adjust MKMAGE Mobile Theme design easily as just HTML, CSS and JavaScript are used. Fully responsive theme</description>
11
+ <notes>- Content organized into a one column layout&#xD;
12
+ - Custom Home page with mobile-friendly design&#xD;
13
+ - Display list of products or list of categories on home page.&#xD;
14
+ - Upload featured images for each category on the homepage.&#xD;
15
+ - Choose a list of CMS pages which links will appear in footer.&#xD;
16
+ - Set custom number of products in a row on the category page.&#xD;
17
+ - Tabs on product page.&#xD;
18
+ - Improved image gallery with gestures support and additional images in horizontal scroll view.</notes>
19
+ <authors><author><name>MkMage</name><user>mkmage</user><email>ilievski156@gmail.com</email></author></authors>
20
+ <date>2016-03-29</date>
21
+ <time>17:10:14</time>
22
+ <contents><target name="magelocal"><dir name="MKMage"><dir name="Mkcore"><dir name="Block"><file name="Mkcore.php" hash="b841de22fb2eb4a310e4aa93cdeae5aa"/></dir><dir name="etc"><file name="config.xml" hash="06f199d292e349bbf6e9da87cda93b37"/><file name="system.xml" hash="4edf3119ef71412bf3083a59e827b945"/></dir><dir name="Helper"><file name="Data.php" hash="6296acb7c76f4972bfcd94ed19966d9a"/></dir></dir><dir name="Makgento"><dir name="Block"><file name="Makgento.php" hash="99715abd9261d0d5313d1f59b9f7b133"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Button.php" hash="3f62fe9a3f1bd31bf55aaf20ffcf12a8"/><file name="Buttoncat.php" hash="c3eed6ca29b7fc10998d827651df216e"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="76a01e5df8f4332be20c2e73c4601883"/><file name="system.xml" hash="3d7b446198aa5359400c6b956959d9c8"/></dir><dir name="Helper"><file name="Data.php" hash="0ab39614c6c32c5dd9ae4a05164c772e"/></dir><dir name="Model"><dir name="Backend"><file name="ImageUpload.php" hash="bfdd0729c8ba93d209a3b433e5a935c2"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Attributes.php" hash="03c62ea61efd77650a7b7144af7a1fe8"/><file name="Categories.php" hash="8920e26901ffb2e7202cca5528aed4ea"/><file name="Featured.php" hash="fc1e6037ccda0120fa1ae77d9f8a70d6"/><file name="Footer.php" hash="a32cbb806bc39c0f85af416bf5cf86b2"/><file name="List.php" hash="054d5b878f80740640d69fa047f0c679"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="etc"><dir name="modules"><file name="MKMage_Mkcore.xml" hash=""/><file name="MKMage_Makgento.xml" hash=""/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="makgento"><file name="button.phtml" hash="fd30954942bd841dba2b9d5b61bd8fd8"/><file name="buttoncat.phtml" hash="5ab792f550a88635439f7aabff22a30c"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="makgento"><dir name="default"><dir name="layout"><file name="local.xml" hash="076fae4a1c987272edf758ffa134fccd"/><file name="page.xml" hash="1362311b5dbd65d5d2020b67bd7763a6"/></dir><dir name="template"><dir name="makgento"><file name="1column.phtml" hash="cb5c1a04bc63e6d6b869717109694811"/><file name="account_address_book.phtml" hash="53845607e05fc63b8c2ce9aa2464089a"/><file name="account_address_edit.phtml" hash="93c2677492b5c687fa3317e6d0320b85"/><file name="account_dashboard.phtml" hash="0a2ec878bc812f1d6a8795090e94cc0c"/><file name="account_info_edit.phtml" hash="98581d404b6b89cf2bd61cdf06fb7e13"/><file name="account_orders.phtml" hash="8b36b73ca504be9312c29171e8d6ebc4"/><file name="addtocart.phtml" hash="4c20d52c3cc1484039ccb5fced234859"/><file name="billing.phtml" hash="4359fbd4cfefd455d7a9935c2c6165b9"/><file name="cart.phtml" hash="dc51d5f9cd0536c15053c2c4d05f952e"/><file name="category.phtml" hash="12ab3969b01cba844bd11070dc9f5f5a"/><file name="checkout_login.phtml" hash="8062b62511ca536fb5cdb79306c770e7"/><file name="checkout.phtml" hash="57f43bc51f3746f4d544049652575a37"/><file name="contact.phtml" hash="a4e294f908227d1e4a288f98cc6c2afd"/><file name="default.phtml" hash="0c2a1aa26937c713435b1e5302abcf3c"/><file name="footer.phtml" hash="65cbd166eb7afda68c3a1b5260284cde"/><file name="head.phtml" hash="aaf5bdad4eaa4b9dd49e9d5b3dea08df"/><file name="header_mobile.phtml" hash="a37ddee5fc4274a08d9b6671452aca17"/><file name="homepage.phtml" hash="f81412458d05ba96c1c0d9b1d919aee2"/><file name="item_renderer.phtml" hash="031840fa08531e114d50d67f348a9d03"/><file name="list.phtml" hash="3f70d0449df9e05c4e78f04c3fa1b7ae"/><file name="login.phtml" hash="67aad0aa0ae5e83cf9d26a5e393fb513"/><file name="media.phtml" hash="37b188b31fc6af1e8856aae2a8b61d22"/><file name="options_wrapper.phtml" hash="e9fae4a51037f04e3c1f57676be29dd6"/><file name="order_review_info.phtml" hash="34d1e307830df429a64a4d17cf15ab05"/><file name="order_review_item.phtml" hash="259b2a4daca8cab404c8910a8b17d46a"/><file name="order_review_totals.phtml" hash="ee7cd46e5e6f446dea7b617febfb8f30"/><file name="payment.phtml" hash="9452e7e2ee5a11bffd101fa1fc8a1893"/><file name="product.phtml" hash="9a17d7d3579d357ef9179029ef872d0b"/><file name="register.phtml" hash="438f9064e803ac2973d372a56e1a21cf"/><file name="related.phtml" hash="1b734830f2a3f0238b1143c9d1a8c6f0"/><file name="shipping_method.phtml" hash="098e279333be6f1aaee107dfa8827357"/><file name="shipping.phtml" hash="0cb9ee5ed545c52dcc340b683af19929"/></dir><dir name="page"><dir name="html"><file name="header.phtml" hash="a37ddee5fc4274a08d9b6671452aca17"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="makgento"><dir name="default"><dir name="css"><file name="styles.css" hash="4979abfd22c08cd2604323603aa0b1e4"/></dir><dir name="images"><file name="ajax-loader.gif" hash="f48ee069890b16455c3ddcacee9b5f75"/><file name="cart.png" hash="af6f8c664f059a9c18181f63bd1c89e4"/><file name="check.png" hash="dbadfce9c28a18235604fccc493a30bf"/><file name="delete.png" hash="3b20c569d4922deda343f2d494a3cdef"/><file name="edit.png" hash="585fc194f3f42815af0eae2d2f5ad537"/><file name="logo.gif" hash="5e0912a388db8cd83c062766ac3a5d89"/><file name="logo.jpg" hash="9d913384b472f9d21b71184e15b4b7f7"/><file name="menu.png" hash="a6cb9ebbf5d7cdb9b0a8a7c3f553f438"/><file name="search-icon-mobile.jpg" hash="a359536f043b208d5d0f35d20dcc543c"/><file name="search.gif" hash="9d30e3d2404bb436870fc011f0bf7e3b"/><file name="search.png" hash="753149a30be339fb15ee798443b51e9f"/></dir><dir name="js"><file name="jquery-2.1.0.min.js" hash="1514be1acf771d5a484aeed96b2d30ba"/><file name="scripts.js" hash="6fdb6eb02f4b5a697d35f1c13cea2c97"/><file name="slide.js" hash="3d73c78c880d3685595d5a02722c60b4"/><file name="slider.js" hash="8965beb7898e0e0faf71f9f178d7f423"/></dir></dir></dir></dir></target></contents>
23
+ <compatible/>
24
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
25
+ </package>
skin/frontend/makgento/default/css/styles.css ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body,dd,dl,dt,fieldset,html,li,ol,ul{margin:0;padding:0}
2
+ body{font-family:arial,Helvetica}
3
+ *{-webkit-touch-callout:none;-webkit-user-select:none}
4
+ input,textarea{-webkit-user-select:auto}
5
+ a{cursor:pointer;display:inline;color:#4c4c4c;text-decoration:none}
6
+ a[disabled=true]{color:#c1cee2;text-shadow:none}
7
+ img{border:0}
8
+ embed,img,object{max-width:100%;height:auto}
9
+ embed,object{height:100%}
10
+ img{-ms-interpolation-mode:bicubic}
11
+ button,input,select,textarea{vertical-align:middle}
12
+ fieldset{border:0}
13
+ legend{display:none}
14
+ select{padding:0}
15
+ label{clear:both}
16
+ ol,ul{list-style:none}
17
+ h1,h2,h3,h4,h5,h6{margin:5px 0;padding:0}
18
+ h1{font-weight:400}
19
+ .clearfix{*zoom:1}
20
+ .clearfix:after,.clearfix:before{content:" ";display:table}
21
+ .clearfix:after{clear:both}
22
+ img{display:inline-block;vertical-align:middle}
23
+ .makgento-menu-holder{width:0;display:none;background:#fff;z-index:999;-webkit-transition:margin-left 1s ease;-moz-transition:margin-left 1s ease;-o-transition:margin-left 1s ease;transition:margin-left 1s ease;position:absolute;left:0;top:0}
24
+ .makgento-menu{background:url(..//images/menu.png);width:30px;height:25px;display:block;background-size:100% 100%;background-repeat:no-repeat;float:left;margin-top:15px;margin-left:2px}
25
+ .makgento-cart{background:url(..//images/cart.png);width:30px;height:30px;display:block;background-size:100% 100%;background-repeat:no-repeat;float:right;margin-top:-38px;margin-right:10px}
26
+ .makgento-content{width:100%;clear:both}
27
+ .header{background:#000;clear:both;padding:10px}
28
+ .main-container{background:#fff;clear:both}
29
+ .footer{background:#000;clear:both;padding:10px;color:#fff}
30
+ div#copyright{font-size:13px}
31
+ .makgento-logo img{width:100%}
32
+ .makgento-logo{max-width:150px;margin:auto}
33
+ .page-title h1{text-align:center;border-bottom:2px solid;padding:10px 0}
34
+ li.makgento-item.grid_two{width:48%;float:left;margin:24px 1%}
35
+ .makgento-image img{width:80%;margin:auto;display:block}
36
+ .makgento-info{text-align:center;color:#000;font-size:17px}
37
+ .makgento-info a{color:#000;font-size:19px}
38
+ li.makgento-category-name{font-size:21px;padding:5px 5px 5px 10px;color:#000;background:#F6F6F6;margin:5px;font-weight:700}
39
+ li.makgento-category-name a{color:#000}
40
+ .homepage_banners{clear:both;margin:5px 0}
41
+ img#main-img{width:80%;margin:10px auto;display:block}
42
+ ul.product-image-thumbs li{display:inline-block}
43
+ .more-views{text-align:center}
44
+ ul.product-image-thumbs li span{display:inline-block;border:2px solid #000;border-radius:200px;width:10px;height:10px;cursor:pointer;margin: 3px}
45
+ h1.product.product-name{text-align:center;font-size:16px;text-transform:uppercase;padding: 10px;}
46
+ .product .price{font-size:25px;text-align:center;display:block}
47
+ div#attr span {font-weight: bold;}
48
+ #product-options-wrapper dl.last{display:none}
49
+ button.button.btn-cart {display: block;width: 100%;background: #000;border: none;color: #fff;font-size: 20px;padding: 6px 0px;margin: 10px 0px;}
50
+ p.paypal-logo {text-align: center;}
51
+ span.paypal-or {display: block;margin-top: 15px;}
52
+ li.onestepcheckout-login-link {display: none;}
53
+ .one-step-checkout #billing_step_header, .one-step-checkout #shipping_step_header,.one-step-checkout .shipping-method #shipping_method_step_header,.one-step-checkout #payment_method_step_header,.one-step-checkout #review_step_header{background-color: #000 !important;}
54
+ div#product-options-wrapper{margin:10px 0;padding:10px}
55
+ div#product-options-wrapper label{font-size:20px;font-weight:600;color:#000;margin:5px 0}
56
+ div#product-options-wrapper .input-box{border:3px solid #ededed;padding:5px}
57
+ #co-shipping-form .select select,.customer-address-form .input-box.select select,div#product-options-wrapper .input-box select,ol#checkoutSteps #co-billing-form .input-box.select select{border-radius:0;appearance:none;box-shadow:none!important;box-sizing:initial!important;-moz-appearance:none;text-indent:.01px;background:0 0;background-color:transparent;border:none;-webkit-appearance:none;font-family:roboto,sans-serif;padding:0 6px;font-size:17px}
58
+ p.required{display:none}
59
+ .makgento-search{background:url(..//images/search.png);width:30px;height:30px;display:block;background-size:100% 100%;background-repeat:no-repeat;float:right;margin-top:-38px;margin-right:60px}
60
+ .searchautocomplete {top:0px !important;padding:0px !Important;position: relative;height: 34px;width: 90% !important;display: block !important;float: none !important;text-align: center !important;margin: 5px auto !important;}
61
+ .searchautocomplete .nav {background: #fff !important;height: 34px;position: relative;width: 70% !important;display: inline-block !important}
62
+ .searchautocomplete .nav-submit-button {background: #000 !important;padding-left: 0px !important;width: 30% !important;text-align: center !important;display: inline-block !important;position: absolute;right: 0px;}
63
+ .searchautocomplete .nav-submit-button .button {width: 39px;height: 34px;padding: 0px 9px;margin: 0px;cursor: pointer;font-weight: bold;color: white;line-height: 12px;font-size: 13px;background-color: #000 !important;background-image: none !important;background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000', endColorstr='#000', GradientType=0) !important;border: none !important;-webkit-border-radius: 0px !important;-moz-border-radius: 0px !important;border-radius: 0px !important;z-index: 14;}
64
+ .searchautocomplete .nav .nav-input input{font-size:19px !Important;border: 1px solid #000 !important;height: 30px !important;margin:0px !important;}
65
+ .searchautocomplete .nav .nav-input{margin:0px !important;padding:0px !important}
66
+ .product-options-bottom label{font-size:20px;font-weight:600;color:#000;margin:5px 0;display:inline-block}
67
+ .product-options-bottom{margin:10px 0;padding:10px}
68
+ input#qty{width:100px;height:20px;font-size:20px;border:3px solid #ededed;padding:3px;display:inline-block}
69
+ button#product-addtocart-button{display:block;width:100%;background:#000;border:none;color:#fff;font-size:30px;padding:10px 0;margin:10px 0}
70
+ .makgento-sh{padding:10px;font-size:20px;background:#ededed;margin:10px 0;position:relative}
71
+ .makgento-tx{padding:10px;border:3px solid #ededed;margin:10px;font-size:16px}
72
+ .add-to-cart{text-align:center;clear: both}
73
+ .makgento-sh:after{content:"";position:absolute;right:5%;top:44%;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #000}
74
+ div#advice-required-entry-attribute92{background:red;padding:8px;color:#fff;font-size:15px;margin:5px}
75
+ .homepage_banners img{width:100%}
76
+ table#shopping-cart-table{border-collapse:collapse;width:100%}
77
+ table#shopping-cart-table tr{border-bottom:1px solid #000}
78
+ table#shopping-cart-table dl.item-options{font-size:20px;padding:5px;text-align:center}
79
+ table#shopping-cart-table dl.item-options dt{font-weight:600}
80
+ table#shopping-cart-table span.cart-price .price{font-size:25px;text-align:center;display:block;font-weight:600}
81
+ table#shopping-cart-table input.input-text.qty{width:40px;height:20px;margin:0 10px;text-align:center;border:1px solid #000;font-size:20px}
82
+ a.btn-edit.btn-edit2{background:url(..//images/edit.png);height:20px;width:20px;display:block;margin:5px 10px;background-repeat:no-repeat}
83
+ a.btn-remove.btn-remove2{background:url(..//images/delete.png);height:20px;width:20px;display:block;margin:5px 10px;background-repeat:no-repeat}
84
+ .discount-form .button{width:100%;background:#ededed;color:#000;font-size:16px;margin:3px 0 0;border:none}
85
+ button#empty_cart_button,button.button.btn-update{width:47%;background:#ededed;color:#000;font-size:14px;margin:20px 0 0;border:none}
86
+ button#empty_cart_button{float:right;margin-right:1%}
87
+ button.button.btn-update{float: none;margin: 0px;display: block;width: 100%;}
88
+ li.method-checkout-cart-methods-multishipping a {display: block;text-align: center;margin: 10px 0px;font-size: 19px;}
89
+ table#shopping-cart-table tfoot tr{border-bottom:none}
90
+ table#shopping-cart-table .totals{clear:both;overflow:auto}
91
+ button.button.btn-proceed-checkout.btn-checkout{width:100%;background:#000;color:#fff;font-size:20px;margin:3px 0 0;border:none}
92
+ .discount-form .button span,button#empty_cart_button span,button.button.btn-continue span,button.button.btn-proceed-checkout.btn-checkout span,button.button.btn-update span{padding:3px 0;text-align:center;display:block}
93
+ .discount h2{font-size:20px;text-align:center;margin-top:30px}
94
+ .discount-form label{display:none}
95
+ input#coupon_code{width:90%;display:block;margin:10px auto;border:2px solid #000;height:20px;font-size:20px}
96
+ .discount-form{margin-bottom:30px}
97
+ table#shopping-cart-totals-table{font-size:16px;width:90%;margin:30px auto}
98
+ ul.footer_links li{display:inline-block;color:#fff;min-width:47%;margin-bottom:5px}
99
+ ul.footer_links li a{color:#fff}
100
+ ul.footer_links{margin:10px auto 20px;text-align:center}
101
+ div#copyright{text-align:center}
102
+ .step-title h2{display:block;background:#ededed;padding:10px;font-size:20px}
103
+ .step-title a{display:inline;color:#000;font-weight:400;font-size:13px;float:right;margin-right:10px;margin-top:5px}
104
+ ol#checkoutSteps h3,ol#checkoutSteps h4{display:block;font-size:16px;padding:10px;border-bottom:1px solid #000;line-height:24px}
105
+ ol#checkoutSteps .ul,ol#checkoutSteps p{padding:10px;font-size:16px;margin:0 0 10px}
106
+ .color-swatch-wrapper ul li img{border-radius:100px}
107
+ ol#checkoutSteps .form-list{padding:10px;font-size:16px}
108
+ ol#checkoutSteps input[type=radio]{margin:10px}
109
+ ol#checkoutSteps #login-form label{font-size:16px;display:block;padding:10px 0 5px}
110
+ ol#checkoutSteps #login-form input{width:90%;height:20px;font-size:16px;border:1px solid #999;margin-bottom:10px}
111
+ ol#checkoutSteps .button{width:100%;border:none;background:#ededed;font-size:20px;padding:10px 0;margin:10px 0}
112
+ ol#checkoutSteps #login-form a{display:block;padding:0 10px;color:#000}
113
+ .validation-advice{background:red;padding:5px 10px;color:#fff;margin:10px 0}
114
+ ol#checkoutSteps #co-billing-form input{width:90%;height:20px;font-size:16px;border:1px solid #999;margin-bottom:10px}
115
+ ol#checkoutSteps #co-billing-form label{font-size:16px;display:block;padding:10px 0 5px}
116
+ li.control.radio label{display:inline!important;padding:0!important}
117
+ li.control.radio input{display:inline;width:20px!important;margin:0!Important;border:none!important;height:20px!important}
118
+ dl.sp-methods{padding:10px}
119
+ span#billing-please-wait img,span#payment-please-wait img,span#shipping-method-please-wait img,span#shipping-please-wait img,span#review-please-wait img{display:inline;width:40px;height:auto;margin:20px}
120
+ span#billing-please-wait,span#payment-please-wait,span#shipping-method-please-wait,span#shipping-please-wait,span#review-please-wait{padding:10px;text-align:center}
121
+ table#checkout-review-table{width:100%;border-collapse:collapse}
122
+ table#checkout-review-table thead tr.first.last{border-bottom:1px solid #000}
123
+ table#checkout-review-table tbody tr td:first-child{padding-top:5px;font-weight:700}
124
+ p.f-left{border-top:1px solid #999;border-bottom:1px solid #999;margin:10px 0 0!important}
125
+ p.f-left a{color:#000}
126
+ table#checkout-review-table dl.item-options{font-weight:400;padding-top:5px;margin-top:5px;margin-bottom:24px}
127
+ table#checkout-review-table td{text-align:left}
128
+ table#checkout-review-table td span.cart-price{padding:0 40px 0 0}
129
+ h2.sub-title{text-align:center;padding:10px 0}
130
+ .checkout-onepage-success p{text-align:center}
131
+ .checkout-onepage-success .button{width:100%;padding:10px 0;background:#000;border:none;color:#fff;font-size:18px;margin-bottom:10px}
132
+ li.success-msg{background:green;padding:4px;color:#fff;text-align:center;margin:10px 0}
133
+ li.error-msg{background:red;padding:4px;color:#fff;text-align:center;margin:10px 0}
134
+ form#login-form p{text-align:center;margin-bottom:5px;border-bottom:1px solid #000;padding-bottom:10px}
135
+ form#login-form label{display:block;padding:10px 0 5px;font-size:20px}
136
+ form#login-form ul.form-list{padding:10px}
137
+ form#login-form input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
138
+ form#login-form .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
139
+ .account-create a,form#login-form a{color:#000;text-align:center;background:#ededed;display:block;padding:10px 0}
140
+ .account-create p{text-align:center;margin-bottom:5px;border-bottom:1px solid #000;padding-bottom:10px}
141
+ .account-create label{display:block;padding:10px 0 5px;font-size:20px}
142
+ .account-create ul.form-list{padding:10px}
143
+ .account-create input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
144
+ .account-create .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
145
+ .account-create li.control.radio div{float:left}
146
+ .account-create li.control.radio input{width:20px}
147
+ form#contactForm label{display:block;padding:10px 0 5px;font-size:20px}
148
+ form#contactForm ul.form-list{padding:10px}
149
+ form#contactForm input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
150
+ form#contactForm .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
151
+ form#contactForm textarea{width:90%;height:50px;border:1px solid #000}
152
+ .legend{display:block;text-align:center;border-bottom:1px solid #000;padding-bottom:5px}
153
+ body.customer-account-forgotpassword form label{display:block;padding:10px 0 5px;font-size:20px}
154
+ body.customer-account-forgotpassword form ul.form-list{padding:10px}
155
+ body.customer-account-forgotpassword form input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
156
+ body.customer-account-forgotpassword form .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
157
+ body.customer-account-forgotpassword form p{padding:10px;font-size:18px;text-align:center}
158
+ body.customer-account-forgotpassword form a{background:#ededed;display:block;padding:10px 0;text-align:center;color:#000;font-size:19px}
159
+ .box-account.box-info ul li{display:block;padding:15px 10px;text-align:center;font-size:24px;background:#ededed;margin-bottom:5px}
160
+ .page-title h1 a{color:#000}
161
+ body.customer-account-edit form label{display:block;padding:10px 0 5px;font-size:20px}
162
+ body.customer-account-edit form ul.form-list{padding:10px}
163
+ body.customer-account-edit form input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
164
+ body.customer-account-edit form .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
165
+ body.customer-account-edit form p{padding:10px;font-size:18px;text-align:center}
166
+ body.customer-account-edit form a{background:#ededed;display:block;padding:10px 0;text-align:center;color:#000;font-size:19px}
167
+ .no-display{display:none}
168
+ body.customer-address-form form label{display:block;padding:10px 0 5px;font-size:20px}
169
+ body.customer-address-form form ul.form-list{padding:10px}
170
+ body.customer-address-form form input{border:1px solid #000;width:90%;height:20px;font-size:16px;margin-bottom:10px}
171
+ body.customer-address-form form .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
172
+ body.customer-address-form form p{padding:10px;font-size:18px;text-align:center}
173
+ body.customer-address-form form a{background:#ededed;display:block;padding:10px 0;text-align:center;color:#000;font-size:19px}
174
+ body.customer-address-index .button{width:100%;border:none;padding:10px 0;font-size:20px;color:#fff;background:#000;margin:10px 0}
175
+ body.customer-address-index .col2-set.addresses-list a,body.customer-address-index p.back-link a{background:#ededed;display:block;padding:10px 0;text-align:center;color:#000;font-size:19px}
176
+ .col2-set.addresses-list{padding:10px}
177
+ .col2-set.addresses-list address{border:1px solid #999;padding:10px}
178
+ #co-shipping-form .select,body.customer-address-form form .input-box.select,ol#checkoutSteps #co-billing-form .input-box.select{border:1px solid #000;padding:5px;width:350px;overflow:hidden}
179
+ div#checkout-step-billing .select{margin-bottom:10px}
180
+ li.makgento-category-name.subcategory{padding-left:30px;font-size:19px;font-weight:400}
181
+ p.note-msg{padding:10px;text-align:center;font-size:16px}
182
+ div#attr span{font-weight:bold}
183
+ .col3-set {padding: 15px;}
184
+ .homepage_grid {text-align: center;}
185
+ .homepage_grid.images img{max-width:235px;margin:10px}
186
+ li.makgento-item.grid_two:nth-child(odd) {clear: left;}
187
+ .makgento-item p{margin:0px 0px 5px !Important}
188
+ .makgento-item p {margin: 0px 0px 5px !Important;text-align: center;color: #000;line-height: 12px;font-size: 16px;}
189
+ .makgento-item .price-box{text-align: center;color: #000;line-height: 12px;font-size: 16px;font-weight: bold;}
190
+ p.old-price {text-decoration: line-through;font-weight: normal;font-size: 14px;}
191
+ p.special-price .price-label {font-weight: normal;}
192
+ li.makgento-item.grid_two:nth-child(even) {clear: right}
193
+ .homepage_grid_title{background: #ededed;padding: 10px 20px;font-size: 23px;}
194
+ li.makgento-item.grid_one{float: none;display: block;width: 93%;margin: 0px auto 20px;border-bottom: 1px solid #D3D3D3;padding-bottom: 20px}
195
+ li.makgento-item.grid_three{width: 33%;float: left;margin: 10px 0px}
196
+ li.makgento-item.grid_four {width: 24%;float: left;margin: 0px;}
197
+ .color-swatch-wrapper ul li {float: left;cursor: pointer;text-align: center;position: relative}
198
+ .color-swatch-wrapper ul li {margin: 8px 6px 8px 2px!important;border: none!important;}
199
+ li.method-checkout-cart-methods-onepage-bottom a {background: #000;display: block;padding: 10px;color: #fff;text-align: center;font-size: 20px}
200
+ .pr_holder{width:33%;float:left;font-family:cabin;font-size:14px;text-align:center;border-right:1px solid #ededed;padding:10px 0;opacity:.5}
201
+ .pr_holder.active{opacity:1}
202
+ .cms-prescriptions p{margin-bottom:0!important;-webkit-margin-before:0;-webkit-margin-after:0}
203
+ .product_holders{clear:both}
204
+ div#prescription_form{clear:both;padding:20px 0}
205
+ .pr_holder img{width:70%}
206
+ .p_title{font-size:18px;text-align:center;background:#000;color:#fff;padding:10px;margin-bottom:20px}
207
+ ul.radios_choose{text-align:center}
208
+ h2.product-name {line-height: 13px;}
209
+ .homepage_contact p strong{font-size:18px}
210
+ .homepage_contact p {margin-bottom: 7px;margin-top: 5px;}
211
+ .homepage_contact {text-align: center;font-size: 16px;}
212
+ h2.product-name a {line-height: 13px;font-size: 14px;}
213
+ ul.radios_choose li{display: inline-block;width: 23%;background: #ededed;padding: 10px 0;margin-bottom: 10px;margin-right: 1%;}
214
+ .product-options .input-box {clear: both;}
215
+ ul.radios_choose li span{display:block;padding:10px 5px;text-align:center;font-size:16px}
216
+ .check_box_p,.radio_button{padding:10px}
217
+ .radio_button{font-size:15px;font-family:cabin;clear:both}
218
+ .upload_div label{display:block;padding:15px 0 5px}
219
+ .upload_div{margin:15px 0 10px}
220
+ .radio_button p{padding:10px}
221
+ .upload_div input[type=text]{display:block;width:97%;margin:auto;height:25px;border:2px solid #ededed}
222
+ .radio_button select{display:block;width:97%;font-size:17px}
223
+ .fields table td{padding:5px 0}
224
+ .fields table{width:100%}
225
+ .steps_holder input[type=submit],.go_to_ch a{display:block;border:none;width:100%;float:none;padding:10px;background:#000;color:#fff;font-size:20px;text-align:center;margin-top:10px}
226
+ .subtotal_div{text-align:center;padding:10px;font-size:19px}
227
+ .pr_holder#edit{position:relative}
228
+ .pr_holder#edit:after{position:absolute;content:"";right:9px;bottom:31px;font-size:12px;width:30px;height:30px;background:url(../images/check.png)}
229
+ a#pers_true{display:block;text-align:center;background:#000;color:#fff;padding:10px 0px;font-size:20px}
230
+ .cms-privacy-policy .row,.cms-our-story .row,.cms-customer-service .row{padding:10px 20px}
231
+ .cms-our-story .row img{display:block;margin:auto}
232
+ #one-step-checkout-form .checkout-review-load .data-table td .qty{text-align:center}
233
+ p.qty_in_stock {text-align: center;color: #000;font-size: 20px;}
234
+ p.qty_in_stock.has_items {color: green;}
235
+ p.qty_in_stock.no_items {color: red;}
236
+ div[id_image=bullet_list],div[id_image=bullet_list].av {display: inline-block;border: 2px solid #000;border-radius: 200px;width: 10px;height: 10px;cursor: pointer;margin: 3px;}
237
+ div[id_image=bullet_list].av{background: #000;}
238
+ .product-image-gallery img{width: 80%;margin: auto;float: none;display: block;}
239
+ .jssorb21 {text-align: center;}
240
+ .product-options-bottom label[for=qty],.product-options-bottom input[name=qty] {display: none !important;}
241
+ .product span.price-label {text-align: center;display: block;}
242
+ #slider2_container img {width: 90% !Important;height: 320px !important;left: 50% !important;margin-left: -45% !important;}
243
+ .product-pricing {padding: 10px;text-align: center;}
244
+ input#search {display: block;width: 100%;border-bottom: 2px solid #000;border-top: 0px;border-left: 0px;border-right: 0px;height: 35px;line-height: 30px;font-size: 16px;text-align: center;}
245
+ .form-search label {display: none;}
246
+ .form-search button.button {
247
+ display: block;
248
+ width: 100%;
249
+ background: #000;
250
+ border: none;
251
+ color: #fff;
252
+ font-size: 20px;
253
+ height: 35px;
254
+ text-transform: uppercase;
255
+ }
256
+ .makgento-search{background:url('..//images/search-icon-mobile.jpg');width:30px;height:30px;display:block;background-size:100% 100%;background-repeat:no-repeat;float:right;margin-top:-38px;margin-right:37px}
257
+ .makgento-cart{margin-right:2px !important}
258
+ #slider2_container img{height:auto !important}
259
+ .searchautocomplete {top:0px !important;padding:0px !Important;position: relative;height: 34px;width: 90% !important;display: block !important;float: none !important;text-align: center !important;margin: 5px auto !important;}
260
+ .searchautocomplete .nav {background: #fff !important;height: 34px;position: relative;width: 70% !important;display: inline-block !important}
261
+ .searchautocomplete .nav-submit-button {background: #000 !important;padding-left: 0px !important;width: 30% !important;text-align: center !important;display: inline-block !important;position: absolute;right: 0px;}
262
+ .searchautocomplete .nav-submit-button .button {width: 39px;height: 34px;padding: 0px 9px;margin: 0px;cursor: pointer;font-weight: bold;color: white;line-height: 12px;font-size: 13px;background-color: #000 !important;background-image: none !important;background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000', endColorstr='#000', GradientType=0) !important;border: none !important;-webkit-border-radius: 0px !important;-moz-border-radius: 0px !important;border-radius: 0px !important;z-index: 14;}
263
+ .searchautocomplete .nav .nav-input input{font-size:19px !Important;border: 1px solid #000 !important;height: 32px !important;margin:0px !important;}
264
+ .searchautocomplete .nav .nav-input{margin:0px !important;padding:0px !important}
265
+ .searchautocomplete .searchautocomplete-placeholder {-webkit-border-radius: 0px !Important;-moz-border-radius: 0px !Important;border-radius: 0px !Important;background: #FFF !Important;border: 1px solid #000 !Important;padding: 15px 10px 5px 10px !Important;position: absolute;right: 0px !Important;top: 42px;width: 95% !Important;z-index: 102;}
266
+ .searchautocomplete .searchautocomplete-placeholder:before {border-color: transparent transparent #000 transparent !important;}
267
+ .catalogsearch-result-index .category-products .products-grid .actions{display:none}
268
+ .catalogsearch-result-index .category-products .products-grid{overflow:auto}
269
+ .catalogsearch-result-index .category-products .products-grid .item{width: 32%;float: left;text-align: center;margin-right: 1%;}
270
+ .catalogsearch-result-index .category-products .products-grid .item img{width:90%}
271
+ span.price-label,p.qty_in_stock{display: none !important;}
272
+ p.special-price .price:before {content: "Sale: ";}
273
+ .amount,.limiter,.sorter,.pages strong{display: none !Important;}
274
+ .pages ol:before {content: "Pages: ";}
275
+ .pages ol {text-align: center;}
276
+ .mage-iphone.cms-page-view.cms-rma .main {width: 100% !important;}
277
+ .mage-iphone.cms-page-view.cms-rma #main {width: 100% !important;}
278
+ button#empty_cart_button {display: none;}
279
+ .mage-iphone.cms-page-view.cms-rma .buttons-set button.button {float: left !important;margin-left: 10px !important;}
280
+ .mage-iphone.cms-page-view.cms-rma .main-container{padding-top:0px}
281
+ .mage-iphone.cms-page-view.cms-rma a{text-decoration:none !important}
282
+ .mage-iphone.cms-page-view.cms-rma .form-list label.required em {float: none !Important;position: relative !Important;left: 1px !Important}
283
+ .mage-iphone.cms-page-view.cms-rma button.button span{border: 1px solid #000 !Important;background: #000 !important;}
284
+ .mage-iphone.cms-page-view.cms-rma button.button.btn-update {float: none !Important;margin-left: 0px !important;width: 100% !important;}
285
+ .mage-iphone.cms-page-view.cms-rma #main div input,select,textarea{width: 200px !important;height: 25px;border: 1px solid #000;}
286
+ .mage-iphone.cms-page-view.cms-rma #main div .form-list label {width: 200px !important;padding-left: 10px;font-size: 18px;}
287
+ .mage-iphone.cms-page-view.cms-rma .std div {width: auto !important;margin: 0px !important;padding: 5px !important;border: none !Important;overflow: hidden;}
288
+ .pages ol li {display: inline;}
289
+ .pages ol li.current{font-weight:bold}
290
+ .pages{margin:10px;}
291
+ .homepage_grid p.old-price{width:50%;float:left}
292
+ .homepage_grid p.special-price{width:50%;float:right}
293
+ .homepage_grid p.special-price .price:before{content:""}
294
+ div#main-menu-drop-up {
295
+ width: 30px;
296
+ height: 25px;
297
+ display: block;
298
+ float: left;
299
+ margin-top: 24px;
300
+ margin-left: 13px;
301
+ position: relative;
302
+ }
303
+ div#slider1_container {
304
+ background: #000;
305
+ }
306
+ .mk-burger-icon {
307
+ -webkit-transform: translate(0,-45%);
308
+ -moz-transform: translate(0,-45%);
309
+ -ms-transform: translate(0,-45%);
310
+ -o-transform: translate(0,-45%);
311
+ width: 100%;
312
+ height: 100%;
313
+ position: absolute;
314
+ top: 0;
315
+ left: 0;
316
+ }
317
+ form#search_mini_form {
318
+ margin-bottom: 0px !important;
319
+ }
320
+ .mk-burger-icon div {
321
+ height: 2px;
322
+ margin-bottom: 5px;
323
+ display: block;
324
+ position: relative;
325
+ background-color: #fff;
326
+ }
327
+ .burger-icon-1, .burger-icon-3 {
328
+ transition: transform .2s ease;
329
+ -webkit-transition: -webkit-transform .2s ease;
330
+ -moz-transition: -moz-transform .2s ease;
331
+ -ms-transition: -ms-transform .2s ease;
332
+ -o-transition: -o-transform .2s ease;
333
+ }
334
+ .burger-icon-2 {
335
+ transition: opacity .1s ease;
336
+ -webkit-transition: opacity .1s ease;
337
+ -moz-transition: opacity .1s ease;
338
+ -ms-transition: opacity .1s ease;
339
+ -o-transition: opacity .1s ease;
340
+ }
341
+ .active-burger .burger-icon-1 {
342
+ -webkit-transform: rotate3d(0,0,1,45deg);
343
+ -moz-transform: rotate3d(0,0,1,45deg);
344
+ -ms-transform: rotate3d(0,0,1,45deg);
345
+ -o-transform: rotate3d(0,0,1,45deg);
346
+ top: 8px;
347
+ }
348
+ .active-burger .burger-icon-2, .owl-carousel.owl-hidden {
349
+ opacity: 0;
350
+ }
351
+ .active-burger .burger-icon-3 {
352
+ -webkit-transform: rotate3d(0,0,1,-45deg);
353
+ -moz-transform: rotate3d(0,0,1,-45deg);
354
+ -ms-transform: rotate3d(0,0,1,-45deg);
355
+ -o-transform: rotate3d(0,0,1,-45deg);
356
+ top: -6px;
357
+ }
358
+ div#main-menu-drop-down {
359
+ position: absolute;
360
+ background: rgba(238,238,238,.95);
361
+ width: 100%!important;
362
+ z-index: 9999;
363
+ left: 0;
364
+ top: 62px;
365
+ }
366
+ div#main-menu-drop-down ul li.main_menu_item_up {
367
+ padding: 20px;
368
+ border-bottom: 2px solid #fff;
369
+ text-transform: uppercase;
370
+ position: relative;
371
+ font-size: 17px;
372
+ }
373
+ div#main-menu-drop-down ul li.main_menu_item_up[value=true]:after {
374
+ content: "";
375
+ border-top: 10px solid #000;
376
+ border-bottom: none;
377
+ }
378
+ div#main-menu-drop-down ul li.main_menu_item_up.drop_down[value=true]:after, div#main-menu-drop-down ul li.main_menu_item_up[value=true]:after {
379
+ width: 0;
380
+ top: 50%;
381
+ position: absolute;
382
+ height: 0;
383
+ margin-top: -5px;
384
+ right: 20px;
385
+ border-left: 10px solid transparent;
386
+ border-right: 10px solid transparent;
387
+ }
388
+ div#main-menu-drop-down ul.subitem_menu_ul li {
389
+ padding: 10px 20px 10px 40px;
390
+ font-size: 16px;
391
+ text-transform: uppercase;
392
+ }
393
+ p.back-link a {
394
+ background: #ededed;
395
+ display: block;
396
+ padding: 10px 0;
397
+ text-align: center;
398
+ color: #000;
399
+ font-size: 19px;
400
+ }
401
+ .makgento-cart a span {
402
+ color: #fff;
403
+ position: absolute;
404
+ top: -8px;
405
+ left: 0;
406
+ width: 100%;
407
+ display: block;
408
+ font-size: 12px;
409
+ text-align: center;
410
+ }
411
+ .makgento-cart {
412
+ position: relative;
413
+ }
skin/frontend/makgento/default/images/ajax-loader.gif ADDED
Binary file
skin/frontend/makgento/default/images/cart.png ADDED
Binary file
skin/frontend/makgento/default/images/check.png ADDED
Binary file
skin/frontend/makgento/default/images/delete.png ADDED
Binary file
skin/frontend/makgento/default/images/edit.png ADDED
Binary file
skin/frontend/makgento/default/images/logo.gif ADDED
Binary file
skin/frontend/makgento/default/images/logo.jpg ADDED
Binary file
skin/frontend/makgento/default/images/menu.png ADDED
Binary file
skin/frontend/makgento/default/images/search-icon-mobile.jpg ADDED
Binary file
skin/frontend/makgento/default/images/search.gif ADDED
Binary file
skin/frontend/makgento/default/images/search.png ADDED
Binary file
skin/frontend/makgento/default/js/jquery-2.1.0.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
+ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;
3
+ while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?o.queue(this[0],a):void 0===b?this:this.each(function(){var c=o.queue(this,a,b);o._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&o.dequeue(this,a)})},dequeue:function(a){return this.each(function(){o.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=o.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===o.css(a,"display")||!o.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=m.createDocumentFragment(),b=a.appendChild(m.createElement("div"));b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||m,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[o.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new o.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=m),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return o.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=o.extend(new o.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?o.event.trigger(e,null,b):o.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},o.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},o.Event=function(a,b){return this instanceof o.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.getPreventDefault&&a.getPreventDefault()?Z:$):this.type=a,b&&o.extend(this,b),this.timeStamp=a&&a.timeStamp||o.now(),void(this[o.expando]=!0)):new o.Event(a,b)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){o.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!o.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){o.event.simulate(b,a.target,o.event.fix(a),!0)};o.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),o.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return o().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=o.guid++)),this.each(function(){o.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,o(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){o.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){o.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?o.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||o.contains(a.ownerDocument,a)||(g=o.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",e=m.documentElement,f=m.createElement("div"),g=m.createElement("div");g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",f.appendChild(g);function h(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",e.appendChild(f);var d=a.getComputedStyle(g,null);b="1%"!==d.top,c="4px"===d.width,e.removeChild(f)}a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return h(),b},boxSizingReliable:function(){return null==c&&h(),c},reliableMarginRight:function(){var b,c=g.appendChild(m.createElement("div"));return c.style.cssText=g.style.cssText=d,c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.innerHTML="",b}})}(),o.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=o.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=o.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=o.css(a,"border"+R[f]+"Width",!0,e))):(g+=o.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=o.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===o.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):f[g]||(e=S(d),(c&&"none"!==c||!e)&&L.set(d,"olddisplay",e?c:o.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}o.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=o.camelCase(b),i=a.style;return b=o.cssProps[h]||(o.cssProps[h]=Fb(i,h)),g=o.cssHooks[b]||o.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(o.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||o.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]="",i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=o.camelCase(b);return b=o.cssProps[h]||(o.cssProps[h]=Fb(a.style,h)),g=o.cssHooks[b]||o.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||o.isNumeric(f)?f||0:e):e}}),o.each(["height","width"],function(a,b){o.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&zb.test(o.css(a,"display"))?o.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===o.css(a,"boxSizing",!1,e),e):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(a,b){return b?o.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(a,b){o.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(o.cssHooks[a+b].set=Gb)}),o.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(o.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=o.css(a,b[g],!1,d);return f}return void 0!==c?o.style(a,b,c):o.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(o.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?o.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=o.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){o.fx.step[a.prop]?o.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[o.cssProps[a.prop]]||o.cssHooks[a.prop])?o.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},o.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(o.cssNumber[a]?"":"px"),g=(o.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(o.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,o.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&S(a),p=L.get(a,"fxshow");c.queue||(h=o._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,o.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=o.css(a,"display"),"none"===j&&(j=tb(a.nodeName)),"inline"===j&&"none"===o.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;n=!0}l[d]=p&&p[d]||o.style(a,d)}if(!o.isEmptyObject(l)){p?"hidden"in p&&(n=p.hidden):p=L.access(a,"fxshow",{}),f&&(p.hidden=!n),n?o(a).show():k.done(function(){o(a).hide()}),k.done(function(){var b;L.remove(a,"fxshow");for(b in l)o.style(a,b,l[b])});for(d in l)g=Ub(n?p[d]:0,d,k),d in p||(p[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=o.camelCase(c),e=b[d],f=a[c],o.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=o.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=o.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:o.extend({},b),opts:o.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=o.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return o.map(k,Ub,j),o.isFunction(j.opts.start)&&j.opts.start.call(a,j),o.fx.timer(o.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}o.Animation=o.extend(Xb,{tweener:function(a,b){o.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),o.speed=function(a,b,c){var d=a&&"object"==typeof a?o.extend({},a):{complete:c||!c&&b||o.isFunction(a)&&a,duration:a,easing:c&&b||b&&!o.isFunction(b)&&b};return d.duration=o.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in o.fx.speeds?o.fx.speeds[d.duration]:o.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){o.isFunction(d.old)&&d.old.call(this),d.queue&&o.dequeue(this,d.queue)},d},o.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=o.isEmptyObject(a),f=o.speed(b,c,d),g=function(){var b=Xb(this,o.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=o.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&o.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=o.timers,g=d?d.length:0;for(c.finish=!0,o.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),o.each(["toggle","show","hide"],function(a,b){var c=o.fn[b];o.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){o.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),o.timers=[],o.fx.tick=function(){var a,b=0,c=o.timers;for(Lb=o.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(a){o.timers.push(a),a()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(a,b){return a=o.fx?o.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=m.createElement("input"),b=m.createElement("select"),c=b.appendChild(m.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=m.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(a,b){return J(this,o.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){o.removeAttr(this,a)})}}),o.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?o.prop(a,b,c):(1===f&&o.isXMLDoc(a)||(b=b.toLowerCase(),d=o.attrHooks[b]||(o.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=o.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void o.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=o.propFix[c]||c,o.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&o.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?o.removeAttr(a,c):a.setAttribute(c,c),c}},o.each(o.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||o.find.attr;$b[b]=function(a,b,d){var e,f;
4
+ return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(a,b){return J(this,o.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[o.propFix[a]||a]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!o.isXMLDoc(a),f&&(b=o.propFix[b]||b,e=o.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=o.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?o.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(o.isFunction(a)?function(c){o(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=o(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=o.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,o(this).val()):a,null==e?e="":"number"==typeof e?e+="":o.isArray(e)&&(e=o.map(e,function(a){return null==a?"":a+""})),b=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=o.valHooks[e.type]||o.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),o.extend({valHooks:{select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&o.nodeName(c.parentNode,"optgroup"))){if(b=o(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=o.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=o.inArray(o(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(a,b){return o.isArray(b)?a.checked=o.inArray(o(a).val(),b)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){o.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),o.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(a){return JSON.parse(a+"")},o.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(o.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,o.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=o.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&o.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,o.ajaxSettings),b):tc(o.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=o.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?o(l):o.event,n=o.Deferred(),p=o.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(n.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=o.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=o.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===o.active++&&o.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(o.lastModified[d]&&v.setRequestHeader("If-Modified-Since",o.lastModified[d]),o.etag[d]&&v.setRequestHeader("If-None-Match",o.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(o.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(o.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?n.resolveWith(l,[r,x,v]):n.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--o.active||o.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return o.get(a,b,c,"json")},getScript:function(a,b){return o.get(a,void 0,b,"script")}}),o.each(["get","post"],function(a,b){o[b]=function(a,c,d,e){return o.isFunction(c)&&(e=e||d,d=c,c=void 0),o.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){o.fn[b]=function(a){return this.on(b,a)}}),o._evalUrl=function(a){return o.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(a){var b;return o.isFunction(a)?this.each(function(b){o(this).wrapAll(a.call(this,b))}):(this[0]&&(b=o(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(o.isFunction(a)?function(b){o(this).wrapInner(a.call(this,b))}:function(){var b=o(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=o.isFunction(a);return this.each(function(c){o(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},o.expr.filters.visible=function(a){return!o.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(o.isArray(b))o.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==o.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}o.param=function(a,b){var c,d=[],e=function(a,b){b=o.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(a)||a.jquery&&!o.isPlainObject(a))o.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=o.prop(this,"elements");return a?o.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=o(this).val();return null==c?null:o.isArray(c)?o.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var a in Dc)Dc[a]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(a){var b;return l.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort"),f.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return o.globalEval(a),a}}}),o.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),o.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=o("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),m.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||o.expando+"_"+cc++;return this[a]=!0,a}}),o.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=o.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||o.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&o.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||m;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=o.buildFragment([a],b,e),e&&e.length&&o(e).remove(),o.merge([],d.childNodes))};var Ic=o.fn.load;o.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),o.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&o.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?o("<div>").append(o.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},o.expr.filters.animated=function(a){return o.grep(o.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return o.isWindow(a)?a:9===a.nodeType&&a.defaultView}o.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=o.css(a,"position"),l=o(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=o.css(a,"top"),i=o.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),o.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},o.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){o.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,o.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===o.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),o.nodeName(a[0],"html")||(d=a.offset()),d.top+=o.css(a[0],"borderTopWidth",!0),d.left+=o.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-o.css(c,"marginTop",!0),left:b.left-d.left-o.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!o.nodeName(a,"html")&&"static"===o.css(a,"position"))a=a.offsetParent;return a||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;o.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),o.each(["top","left"],function(a,b){o.cssHooks[b]=yb(l.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?o(a).position()[b]+"px":c):void 0})}),o.each({Height:"height",Width:"width"},function(a,b){o.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){o.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return o.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?o.css(b,c,g):o.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(b){return a.$===o&&(a.$=Mc),b&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o});
skin/frontend/makgento/default/js/scripts.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+ jQuery(function($) {
3
+ $(document).ready(function() {
4
+ $("#pagetwo").css("min-height",$(window).height());
5
+ });
6
+ $(".makgento-menu").click(function() {
7
+ if($(".makgento-menu-holder").width()!=0){
8
+ $(".makgento-content").animate({ marginLeft: '0px', opacity: 1 }, 500);
9
+ $(".makgento-menu-holder").css('width','0px');
10
+ $(".makgento-menu-holder").toggle('slow');
11
+ }
12
+ else{
13
+ $(".makgento-content").animate({ marginLeft: '200px', opacity: 1 }, 500);
14
+ $(".makgento-menu-holder").css('width','200px');
15
+ $(".makgento-menu-holder").toggle('slow');
16
+ }
17
+ });
18
+
19
+ $("#des_btn").click(function() { $("#video").hide();$("#attr").hide();$("#snf").hide();$("#desc").toggle('fast');});
20
+ $("#video_btn").click(function() { $("#desc").hide();$("#attr").hide();$("#snf").hide();$("#video").toggle('fast');});
21
+ $("#attr_btn").click(function() { $("#video").hide();$("#desc").hide();$("#snf").hide();$("#attr").toggle('fast');});
22
+ $("#snf_btn").click(function() { $("#video").hide();$("#desc").hide();$("#attr").hide();$("#snf").toggle('fast');});
23
+
24
+ });
skin/frontend/makgento/default/js/slide.js ADDED
@@ -0,0 +1,4057 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var $JssorSlider$;
2
+ var $JssorSlideshowFormations$ = window.$JssorSlideshowFormations$ = {};
3
+ var $JssorSlideshowRunner$;
4
+
5
+ new function () {
6
+ //Constants +++++++
7
+
8
+ var COLUMN_INCREASE = 0;
9
+ var COLUMN_DECREASE = 1;
10
+ var ROW_INCREASE = 2;
11
+ var ROW_DECREASE = 3;
12
+
13
+ var DIRECTION_HORIZONTAL = 0x0003;
14
+ var DIRECTION_VERTICAL = 0x000C;
15
+
16
+ var TO_LEFT = 0x0001;
17
+ var TO_RIGHT = 0x0002;
18
+ var TO_TOP = 0x0004;
19
+ var TO_BOTTOM = 0x0008;
20
+
21
+ var FROM_LEFT = 0x0100;
22
+ var FROM_TOP = 0x0200;
23
+ var FROM_RIGHT = 0x0400;
24
+ var FROM_BOTTOM = 0x0800;
25
+
26
+ var ASSEMBLY_BOTTOM_LEFT = FROM_BOTTOM + TO_LEFT;
27
+ var ASSEMBLY_BOTTOM_RIGHT = FROM_BOTTOM + TO_RIGHT;
28
+ var ASSEMBLY_TOP_LEFT = FROM_TOP + TO_LEFT;
29
+ var ASSEMBLY_TOP_RIGHT = FROM_TOP + TO_RIGHT;
30
+ var ASSEMBLY_LEFT_TOP = FROM_LEFT + TO_TOP;
31
+ var ASSEMBLY_LEFT_BOTTOM = FROM_LEFT + TO_BOTTOM;
32
+ var ASSEMBLY_RIGHT_TOP = FROM_RIGHT + TO_TOP;
33
+ var ASSEMBLY_RIGHT_BOTTOM = FROM_RIGHT + TO_BOTTOM;
34
+
35
+ //Constants -------
36
+
37
+ //Formation Definition +++++++
38
+ function isToLeft(roadValue) {
39
+ return (roadValue & TO_LEFT) == TO_LEFT;
40
+ }
41
+
42
+ function isToRight(roadValue) {
43
+ return (roadValue & TO_RIGHT) == TO_RIGHT;
44
+ }
45
+
46
+ function isToTop(roadValue) {
47
+ return (roadValue & TO_TOP) == TO_TOP;
48
+ }
49
+
50
+ function isToBottom(roadValue) {
51
+ return (roadValue & TO_BOTTOM) == TO_BOTTOM;
52
+ }
53
+
54
+ function PushFormationOrder(arr, order, formationItem) {
55
+ formationItem.push(order);
56
+ arr[order] = arr[order] || [];
57
+ arr[order].push(formationItem);
58
+ }
59
+
60
+ $JssorSlideshowFormations$.$FormationStraight = function (transition) {
61
+ var cols = transition.$Cols;
62
+ var rows = transition.$Rows;
63
+ var formationDirection = transition.$Assembly;
64
+ var count = transition.$Count;
65
+ var a = [];
66
+ var i = 0;
67
+ var col = 0;
68
+ var r = 0;
69
+ var cl = cols - 1;
70
+ var rl = rows - 1;
71
+ var il = count - 1;
72
+ var cr;
73
+ var order;
74
+ for (r = 0; r < rows; r++) {
75
+ for (col = 0; col < cols; col++) {
76
+ cr = r + ',' + col;
77
+ switch (formationDirection) {
78
+ case ASSEMBLY_BOTTOM_LEFT:
79
+ order = il - (col * rows + (rl - r));
80
+ break;
81
+ case ASSEMBLY_RIGHT_TOP:
82
+ order = il - (r * cols + (cl - col));
83
+ break;
84
+ case ASSEMBLY_TOP_LEFT:
85
+ order = il - (col * rows + r);
86
+ case ASSEMBLY_LEFT_TOP:
87
+ order = il - (r * cols + col);
88
+ break;
89
+ case ASSEMBLY_BOTTOM_RIGHT:
90
+ order = col * rows + r;
91
+ break;
92
+ case ASSEMBLY_LEFT_BOTTOM:
93
+ order = r * cols + (cl - col);
94
+ break;
95
+ case ASSEMBLY_TOP_RIGHT:
96
+ order = col * rows + (rl - r);
97
+ break;
98
+ default:
99
+ order = r * cols + col;
100
+ break; //ASSEMBLY_RIGHT_BOTTOM
101
+ }
102
+ PushFormationOrder(a, order, [r, col]);
103
+ }
104
+ }
105
+
106
+ return a;
107
+ };
108
+
109
+ $JssorSlideshowFormations$.$FormationSwirl = function (transition) {
110
+ var cols = transition.$Cols;
111
+ var rows = transition.$Rows;
112
+ var formationDirection = transition.$Assembly;
113
+ var count = transition.$Count;
114
+ var a = [];
115
+ var hit = [];
116
+ var i = 0;
117
+ var col = 0;
118
+ var r = 0;
119
+ var cl = cols - 1;
120
+ var rl = rows - 1;
121
+ var il = count - 1;
122
+ var cr;
123
+ var courses;
124
+ var course = 0;
125
+ switch (formationDirection) {
126
+ case ASSEMBLY_BOTTOM_LEFT:
127
+ col = cl;
128
+ r = 0;
129
+ courses = [ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE];
130
+ break;
131
+ case ASSEMBLY_RIGHT_TOP:
132
+ col = 0;
133
+ r = rl;
134
+ courses = [COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE];
135
+ break;
136
+ case ASSEMBLY_TOP_LEFT:
137
+ col = cl;
138
+ r = rl;
139
+ courses = [ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE];
140
+ break;
141
+ case ASSEMBLY_LEFT_TOP:
142
+ col = cl;
143
+ r = rl;
144
+ courses = [COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE];
145
+ break;
146
+ case ASSEMBLY_BOTTOM_RIGHT:
147
+ col = 0;
148
+ r = 0;
149
+ courses = [ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE];
150
+ break;
151
+ case ASSEMBLY_LEFT_BOTTOM:
152
+ col = cl;
153
+ r = 0;
154
+ courses = [COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE];
155
+ break;
156
+ case ASSEMBLY_TOP_RIGHT:
157
+ col = 0;
158
+ r = rl;
159
+ courses = [ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE];
160
+ break;
161
+ default:
162
+ col = 0;
163
+ r = 0;
164
+ courses = [COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE];
165
+ break; //ASSEMBLY_RIGHT_BOTTOM
166
+ }
167
+ i = 0;
168
+ while (i < count) {
169
+ cr = r + ',' + col;
170
+ if (col >= 0 && col < cols && r >= 0 && r < rows && !hit[cr]) {
171
+ //a[cr] = i++;
172
+ hit[cr] = true;
173
+ PushFormationOrder(a, i++, [r, col]);
174
+ }
175
+ else {
176
+ switch (courses[course++ % courses.length]) {
177
+ case COLUMN_INCREASE:
178
+ col--;
179
+ break;
180
+ case ROW_INCREASE:
181
+ r--;
182
+ break;
183
+ case COLUMN_DECREASE:
184
+ col++;
185
+ break;
186
+ case ROW_DECREASE:
187
+ r++;
188
+ break;
189
+ }
190
+ }
191
+
192
+ switch (courses[course % courses.length]) {
193
+ case COLUMN_INCREASE:
194
+ col++;
195
+ break;
196
+ case ROW_INCREASE:
197
+ r++;
198
+ break;
199
+ case COLUMN_DECREASE:
200
+ col--;
201
+ break;
202
+ case ROW_DECREASE:
203
+ r--;
204
+ break;
205
+ }
206
+ }
207
+ return a;
208
+ };
209
+
210
+ $JssorSlideshowFormations$.$FormationZigZag = function (transition) {
211
+ var cols = transition.$Cols;
212
+ var rows = transition.$Rows;
213
+ var formationDirection = transition.$Assembly;
214
+ var count = transition.$Count;
215
+ var a = [];
216
+ var i = 0;
217
+ var col = 0;
218
+ var r = 0;
219
+ var cl = cols - 1;
220
+ var rl = rows - 1;
221
+ var il = count - 1;
222
+ var cr;
223
+ var courses;
224
+ var course = 0;
225
+ switch (formationDirection) {
226
+ case ASSEMBLY_BOTTOM_LEFT:
227
+ col = cl;
228
+ r = 0;
229
+ courses = [ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE, COLUMN_DECREASE];
230
+ break;
231
+ case ASSEMBLY_RIGHT_TOP:
232
+ col = 0;
233
+ r = rl;
234
+ courses = [COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE, ROW_DECREASE];
235
+ break;
236
+ case ASSEMBLY_TOP_LEFT:
237
+ col = cl;
238
+ r = rl;
239
+ courses = [ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE, COLUMN_DECREASE];
240
+ break;
241
+ case ASSEMBLY_LEFT_TOP:
242
+ col = cl;
243
+ r = rl;
244
+ courses = [COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE, ROW_DECREASE];
245
+ break;
246
+ case ASSEMBLY_BOTTOM_RIGHT:
247
+ col = 0;
248
+ r = 0;
249
+ courses = [ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE, COLUMN_INCREASE];
250
+ break;
251
+ case ASSEMBLY_LEFT_BOTTOM:
252
+ col = cl;
253
+ r = 0;
254
+ courses = [COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE, ROW_INCREASE];
255
+ break;
256
+ case ASSEMBLY_TOP_RIGHT:
257
+ col = 0;
258
+ r = rl;
259
+ courses = [ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE, COLUMN_INCREASE];
260
+ break;
261
+ default:
262
+ col = 0;
263
+ r = 0;
264
+ courses = [COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE, ROW_INCREASE];
265
+ break; //ASSEMBLY_RIGHT_BOTTOM
266
+ }
267
+ i = 0;
268
+ while (i < count) {
269
+ cr = r + ',' + col;
270
+ if (col >= 0 && col < cols && r >= 0 && r < rows && typeof (a[cr]) == 'undefined') {
271
+ PushFormationOrder(a, i++, [r, col]);
272
+ //a[cr] = i++;
273
+ switch (courses[course % courses.length]) {
274
+ case COLUMN_INCREASE:
275
+ col++;
276
+ break;
277
+ case ROW_INCREASE:
278
+ r++;
279
+ break;
280
+ case COLUMN_DECREASE:
281
+ col--;
282
+ break;
283
+ case ROW_DECREASE:
284
+ r--;
285
+ break;
286
+ }
287
+ }
288
+ else {
289
+ switch (courses[course++ % courses.length]) {
290
+ case COLUMN_INCREASE:
291
+ col--;
292
+ break;
293
+ case ROW_INCREASE:
294
+ r--;
295
+ break;
296
+ case COLUMN_DECREASE:
297
+ col++;
298
+ break;
299
+ case ROW_DECREASE:
300
+ r++;
301
+ break;
302
+ }
303
+ switch (courses[course++ % courses.length]) {
304
+ case COLUMN_INCREASE:
305
+ col++;
306
+ break;
307
+ case ROW_INCREASE:
308
+ r++;
309
+ break;
310
+ case COLUMN_DECREASE:
311
+ col--;
312
+ break;
313
+ case ROW_DECREASE:
314
+ r--;
315
+ break;
316
+ }
317
+ }
318
+ }
319
+ return a;
320
+ };
321
+
322
+ $JssorSlideshowFormations$.$FormationStraightStairs = function (transition) {
323
+ var cols = transition.$Cols;
324
+ var rows = transition.$Rows;
325
+ var formationDirection = transition.$Assembly;
326
+ var count = transition.$Count;
327
+ var a = [];
328
+ var i = 0;
329
+ var col = 0;
330
+ var r = 0;
331
+ var cl = cols - 1;
332
+ var rl = rows - 1;
333
+ var il = count - 1;
334
+ var cr;
335
+ switch (formationDirection) {
336
+ case ASSEMBLY_BOTTOM_LEFT:
337
+ case ASSEMBLY_TOP_RIGHT:
338
+ case ASSEMBLY_TOP_LEFT:
339
+ case ASSEMBLY_BOTTOM_RIGHT:
340
+ var C = 0;
341
+ var R = 0;
342
+ break;
343
+ case ASSEMBLY_LEFT_BOTTOM:
344
+ case ASSEMBLY_RIGHT_TOP:
345
+ case ASSEMBLY_LEFT_TOP:
346
+ case ASSEMBLY_RIGHT_BOTTOM:
347
+ var C = cl;
348
+ var R = 0;
349
+ break;
350
+ default:
351
+ formationDirection = ASSEMBLY_RIGHT_BOTTOM;
352
+ var C = cl;
353
+ var R = 0;
354
+ break;
355
+ }
356
+ col = C;
357
+ r = R;
358
+ while (i < count) {
359
+ cr = r + ',' + col;
360
+ if (isToTop(formationDirection) || isToRight(formationDirection)) {
361
+ PushFormationOrder(a, il - i++, [r, col]);
362
+ //a[cr] = il - i++;
363
+ }
364
+ else {
365
+ PushFormationOrder(a, i++, [r, col]);
366
+ //a[cr] = i++;
367
+ }
368
+ switch (formationDirection) {
369
+ case ASSEMBLY_BOTTOM_LEFT:
370
+ case ASSEMBLY_TOP_RIGHT:
371
+ col--;
372
+ r++;
373
+ break;
374
+ case ASSEMBLY_TOP_LEFT:
375
+ case ASSEMBLY_BOTTOM_RIGHT:
376
+ col++;
377
+ r--;
378
+ break;
379
+ case ASSEMBLY_LEFT_BOTTOM:
380
+ case ASSEMBLY_RIGHT_TOP:
381
+ col--;
382
+ r--;
383
+ break;
384
+ case ASSEMBLY_RIGHT_BOTTOM:
385
+ case ASSEMBLY_LEFT_TOP:
386
+ default:
387
+ col++;
388
+ r++;
389
+ break;
390
+ }
391
+ if (col < 0 || r < 0 || col > cl || r > rl) {
392
+ switch (formationDirection) {
393
+ case ASSEMBLY_BOTTOM_LEFT:
394
+ case ASSEMBLY_TOP_RIGHT:
395
+ C++;
396
+ break;
397
+ case ASSEMBLY_LEFT_BOTTOM:
398
+ case ASSEMBLY_RIGHT_TOP:
399
+ case ASSEMBLY_TOP_LEFT:
400
+ case ASSEMBLY_BOTTOM_RIGHT:
401
+ R++;
402
+ break;
403
+ case ASSEMBLY_RIGHT_BOTTOM:
404
+ case ASSEMBLY_LEFT_TOP:
405
+ default:
406
+ C--;
407
+ break;
408
+ }
409
+ if (C < 0 || R < 0 || C > cl || R > rl) {
410
+ switch (formationDirection) {
411
+ case ASSEMBLY_BOTTOM_LEFT:
412
+ case ASSEMBLY_TOP_RIGHT:
413
+ C = cl;
414
+ R++;
415
+ break;
416
+ case ASSEMBLY_TOP_LEFT:
417
+ case ASSEMBLY_BOTTOM_RIGHT:
418
+ R = rl;
419
+ C++;
420
+ break;
421
+ case ASSEMBLY_LEFT_BOTTOM:
422
+ case ASSEMBLY_RIGHT_TOP: R = rl; C--;
423
+ break;
424
+ case ASSEMBLY_RIGHT_BOTTOM:
425
+ case ASSEMBLY_LEFT_TOP:
426
+ default:
427
+ C = 0;
428
+ R++;
429
+ break;
430
+ }
431
+ if (R > rl)
432
+ R = rl;
433
+ else if (R < 0)
434
+ R = 0;
435
+ else if (C > cl)
436
+ C = cl;
437
+ else if (C < 0)
438
+ C = 0;
439
+ }
440
+ r = R;
441
+ col = C;
442
+ }
443
+ }
444
+ return a;
445
+ };
446
+
447
+ $JssorSlideshowFormations$.$FormationSquare = function (transition) {
448
+ var cols = transition.$Cols || 1;
449
+ var rows = transition.$Rows || 1;
450
+ var arr = [];
451
+ var i = 0;
452
+ var col;
453
+ var r;
454
+ var dc;
455
+ var dr;
456
+ var cr;
457
+ dc = cols < rows ? (rows - cols) / 2 : 0;
458
+ dr = cols > rows ? (cols - rows) / 2 : 0;
459
+ cr = Math.round(Math.max(cols / 2, rows / 2)) + 1;
460
+ for (col = 0; col < cols; col++) {
461
+ for (r = 0; r < rows; r++)
462
+ PushFormationOrder(arr, cr - Math.min(col + 1 + dc, r + 1 + dr, cols - col + dc, rows - r + dr), [r, col]);
463
+ }
464
+ return arr;
465
+ };
466
+
467
+ $JssorSlideshowFormations$.$FormationRectangle = function (transition) {
468
+ var cols = transition.$Cols || 1;
469
+ var rows = transition.$Rows || 1;
470
+ var arr = [];
471
+ var i = 0;
472
+ var col;
473
+ var r;
474
+ var cr;
475
+ cr = Math.round(Math.min(cols / 2, rows / 2)) + 1;
476
+ for (col = 0; col < cols; col++) {
477
+ for (r = 0; r < rows; r++)
478
+ PushFormationOrder(arr, cr - Math.min(col + 1, r + 1, cols - col, rows - r), [r, col]);
479
+ }
480
+ return arr;
481
+ };
482
+
483
+ $JssorSlideshowFormations$.$FormationRandom = function (transition) {
484
+ var a = [];
485
+ var r, col, i;
486
+ for (r = 0; r < transition.$Rows; r++) {
487
+ for (col = 0; col < transition.$Cols; col++)
488
+ PushFormationOrder(a, Math.ceil(100000 * Math.random()) % 13, [r, col]);
489
+ }
490
+
491
+ return a;
492
+ };
493
+
494
+ $JssorSlideshowFormations$.$FormationCircle = function (transition) {
495
+ var cols = transition.$Cols || 1;
496
+ var rows = transition.$Rows || 1;
497
+ var arr = [];
498
+ var i = 0;
499
+ var col;
500
+ var r;
501
+ var hc = cols / 2 - 0.5;
502
+ var hr = rows / 2 - 0.5;
503
+ for (col = 0; col < cols; col++) {
504
+ for (r = 0; r < rows; r++)
505
+ PushFormationOrder(arr, Math.round(Math.sqrt(Math.pow(col - hc, 2) + Math.pow(r - hr, 2))), [r, col]);
506
+ }
507
+ return arr;
508
+ };
509
+
510
+ $JssorSlideshowFormations$.$FormationCross = function (transition) {
511
+ var cols = transition.$Cols || 1;
512
+ var rows = transition.$Rows || 1;
513
+ var arr = [];
514
+ var i = 0;
515
+ var col;
516
+ var r;
517
+ var hc = cols / 2 - 0.5;
518
+ var hr = rows / 2 - 0.5;
519
+ for (col = 0; col < cols; col++) {
520
+ for (r = 0; r < rows; r++)
521
+ PushFormationOrder(arr, Math.round(Math.min(Math.abs(col - hc), Math.abs(r - hr))), [r, col]);
522
+ }
523
+ return arr;
524
+ };
525
+
526
+ $JssorSlideshowFormations$.$FormationRectangleCross = function (transition) {
527
+ var cols = transition.$Cols || 1;
528
+ var rows = transition.$Rows || 1;
529
+ var arr = [];
530
+ var i = 0;
531
+ var col;
532
+ var r;
533
+ var hc = cols / 2 - 0.5;
534
+ var hr = rows / 2 - 0.5;
535
+ var cr = Math.max(hc, hr) + 1;
536
+ for (col = 0; col < cols; col++) {
537
+ for (r = 0; r < rows; r++)
538
+ PushFormationOrder(arr, Math.round(cr - Math.max(hc - Math.abs(col - hc), hr - Math.abs(r - hr))) - 1, [r, col]);
539
+ }
540
+ return arr;
541
+ };
542
+
543
+ function GetFormation(transition) {
544
+
545
+ var formationInstance = transition.$Formation(transition);
546
+
547
+ return transition.$Reverse ? formationInstance.reverse() : formationInstance;
548
+
549
+ } //GetFormation
550
+
551
+ //var _PrototypeTransitions = [];
552
+ function EnsureTransitionInstance(options, slideshowInterval) {
553
+
554
+ var _SlideshowTransition = {
555
+ $Interval: slideshowInterval, //Delay to play next frame
556
+ $Duration: 1, //Duration to finish the entire transition
557
+ $Delay: 0, //Delay to assembly blocks
558
+ $Cols: 1, //Number of columns
559
+ $Rows: 1, //Number of rows
560
+ $Opacity: 0, //Fade block or not
561
+ $Zoom: 0, //Zoom block or not
562
+ $Clip: 0, //Clip block or not
563
+ $Move: false, //Move block or not
564
+ $SlideOut: false, //Slide the previous slide out to display next slide instead
565
+ //$FlyDirection: 0, //Specify fly transform with direction
566
+ $Reverse: false, //Reverse the assembly or not
567
+ $Formation: $JssorSlideshowFormations$.$FormationRandom, //Shape that assembly blocks as
568
+ $Assembly: ASSEMBLY_RIGHT_BOTTOM, //The way to assembly blocks
569
+ $ChessMode: { $Column: 0, $Row: 0 }, //Chess move or fly direction
570
+ $Easing: $JssorEasing$.$EaseSwing, //Specify variation of speed during transition
571
+ $Round: {},
572
+ $Blocks: [],
573
+ $During: {}
574
+ };
575
+
576
+ $Jssor$.$Extend(_SlideshowTransition, options);
577
+
578
+ _SlideshowTransition.$Count = _SlideshowTransition.$Cols * _SlideshowTransition.$Rows;
579
+ if ($Jssor$.$IsFunction(_SlideshowTransition.$Easing))
580
+ _SlideshowTransition.$Easing = { $Default: _SlideshowTransition.$Easing };
581
+
582
+ _SlideshowTransition.$FramesCount = Math.ceil(_SlideshowTransition.$Duration / _SlideshowTransition.$Interval);
583
+ _SlideshowTransition.$EasingInstance = GetEasing(_SlideshowTransition);
584
+
585
+ _SlideshowTransition.$GetBlocks = function (width, height) {
586
+ width /= _SlideshowTransition.$Cols;
587
+ height /= _SlideshowTransition.$Rows;
588
+ var wh = width + 'x' + height;
589
+ if (!_SlideshowTransition.$Blocks[wh]) {
590
+ _SlideshowTransition.$Blocks[wh] = { $Width: width, $Height: height };
591
+ for (var col = 0; col < _SlideshowTransition.$Cols; col++) {
592
+ for (var r = 0; r < _SlideshowTransition.$Rows; r++)
593
+ _SlideshowTransition.$Blocks[wh][r + ',' + col] = { $Top: r * height, $Right: col * width + width, $Bottom: r * height + height, $Left: col * width };
594
+ }
595
+ }
596
+
597
+ return _SlideshowTransition.$Blocks[wh];
598
+ };
599
+
600
+ if (_SlideshowTransition.$Brother) {
601
+ _SlideshowTransition.$Brother = EnsureTransitionInstance(_SlideshowTransition.$Brother, slideshowInterval);
602
+ _SlideshowTransition.$SlideOut = true;
603
+ }
604
+
605
+ return _SlideshowTransition;
606
+ }
607
+
608
+ function GetEasing(transition) {
609
+ var easing = transition.$Easing;
610
+ if (!easing.$Default)
611
+ easing.$Default = $JssorEasing$.$EaseSwing;
612
+
613
+ var duration = transition.$FramesCount;
614
+
615
+ var cache = easing.$Cache;
616
+ if (!cache) {
617
+ var enumerator = $Jssor$.$Extend({}, transition.$Easing, transition.$Round);
618
+ cache = easing.$Cache = {};
619
+
620
+ $Jssor$.$Each(enumerator, function (v, easingName) {
621
+ var easingFunction = easing[easingName] || easing.$Default;
622
+ var round = transition.$Round[easingName] || 1;
623
+
624
+ if (!$Jssor$.$IsArray(easingFunction.$Cache))
625
+ easingFunction.$Cache = [];
626
+
627
+ var easingFunctionCache = easingFunction.$Cache[duration] = easingFunction.$Cache[duration] || [];
628
+
629
+ if (!easingFunctionCache[round]) {
630
+ easingFunctionCache[round] = [0];
631
+ for (var t = 1; t <= duration; t++) {
632
+ var tRound = t / duration * round;
633
+ var tRoundFloor = Math.floor(tRound);
634
+ if (tRound != tRoundFloor)
635
+ tRound -= tRoundFloor;
636
+ easingFunctionCache[round][t] = easingFunction(tRound);
637
+ }
638
+ }
639
+
640
+ cache[easingName] = easingFunctionCache;
641
+
642
+ });
643
+ }
644
+
645
+ return cache;
646
+ } //GetEasing
647
+
648
+ //Formation Definition -------
649
+
650
+ function JssorSlideshowPlayer(slideContainer, slideElement, slideTransition, beginTime, slideContainerWidth, slideContainerHeight) {
651
+ var _Self = this;
652
+
653
+ var _Block;
654
+ var _StartStylesArr = {};
655
+ var _AnimationStylesArrs = {};
656
+ var _AnimationBlockItems = [];
657
+ var _StyleStart;
658
+ var _StyleEnd;
659
+ var _StyleDif;
660
+ var _ChessModeColumn = slideTransition.$ChessMode.$Column || 0;
661
+ var _ChessModeRow = slideTransition.$ChessMode.$Row || 0;
662
+
663
+ var _Blocks = slideTransition.$GetBlocks(slideContainerWidth, slideContainerHeight);
664
+ var _FormationInstance = GetFormation(slideTransition);
665
+ var _MaxOrder = _FormationInstance.length - 1;
666
+ var _Period = slideTransition.$Duration + slideTransition.$Delay * _MaxOrder;
667
+ var _EndTime = beginTime + _Period;
668
+
669
+ var _SlideOut = slideTransition.$SlideOut;
670
+ var _IsIn;
671
+
672
+ _EndTime += $Jssor$.$IsBrowserChrome() ? 260 : 50;
673
+
674
+ _Self.$EndTime = _EndTime;
675
+
676
+ _Self.$ShowFrame = function (time) {
677
+ time -= beginTime;
678
+
679
+ var isIn = time < _Period;
680
+
681
+ if (isIn || _IsIn) {
682
+ _IsIn = isIn;
683
+
684
+ if (!_SlideOut)
685
+ time = _Period - time;
686
+
687
+ var frameIndex = Math.ceil(time / slideTransition.$Interval);
688
+
689
+ $Jssor$.$Each(_AnimationStylesArrs, function (value, index) {
690
+
691
+ var itemFrameIndex = Math.max(frameIndex, value.$Min);
692
+ itemFrameIndex = Math.min(itemFrameIndex, value.length - 1);
693
+
694
+ if (value.$LastFrameIndex != itemFrameIndex) {
695
+ if (!value.$LastFrameIndex && !_SlideOut) {
696
+ $Jssor$.$ShowElement(_AnimationBlockItems[index]);
697
+ }
698
+ else if (itemFrameIndex == value.$Max && _SlideOut) {
699
+ $Jssor$.$HideElement(_AnimationBlockItems[index]);
700
+ }
701
+ value.$LastFrameIndex = itemFrameIndex;
702
+ $Jssor$.$SetStylesEx(_AnimationBlockItems[index], value[itemFrameIndex]);
703
+ }
704
+ });
705
+ }
706
+ };
707
+
708
+ function DisableHWA(elmt) {
709
+ $Jssor$.$DisableHWA(elmt);
710
+
711
+ var children = $Jssor$.$Children(elmt);
712
+
713
+ $Jssor$.$Each(children, function (child) {
714
+ DisableHWA(child);
715
+ });
716
+ }
717
+
718
+ //constructor
719
+ {
720
+ slideElement = $Jssor$.$CloneNode(slideElement);
721
+ //$Jssor$.$RemoveAttribute(slideElement, "id");
722
+ DisableHWA(slideElement);
723
+ if ($Jssor$.$IsBrowserIe9Earlier()) {
724
+ var hasImage = !slideElement["no-image"];
725
+ var slideChildElements = $Jssor$.$FindChildrenByTag(slideElement);
726
+ $Jssor$.$Each(slideChildElements, function (slideChildElement) {
727
+ if (hasImage || slideChildElement["jssor-slider"])
728
+ $Jssor$.$CssOpacity(slideChildElement, $Jssor$.$CssOpacity(slideChildElement), true);
729
+ });
730
+ }
731
+
732
+ $Jssor$.$Each(_FormationInstance, function (formationItems, order) {
733
+ $Jssor$.$Each(formationItems, function (formationItem) {
734
+ var row = formationItem[0];
735
+ var col = formationItem[1];
736
+ {
737
+ var columnRow = row + ',' + col;
738
+
739
+ var chessHorizontal = false;
740
+ var chessVertical = false;
741
+ var chessRotate = false;
742
+
743
+ if (_ChessModeColumn && col % 2) {
744
+ if ($JssorDirection$.$IsHorizontal(_ChessModeColumn)) {
745
+ chessHorizontal = !chessHorizontal;
746
+ }
747
+ if ($JssorDirection$.$IsVertical(_ChessModeColumn)) {
748
+ chessVertical = !chessVertical;
749
+ }
750
+
751
+ if (_ChessModeColumn & 16)
752
+ chessRotate = !chessRotate;
753
+ }
754
+
755
+ if (_ChessModeRow && row % 2) {
756
+ if ($JssorDirection$.$IsHorizontal(_ChessModeRow)) {
757
+ chessHorizontal = !chessHorizontal;
758
+ }
759
+ if ($JssorDirection$.$IsVertical(_ChessModeRow)) {
760
+ chessVertical = !chessVertical;
761
+ }
762
+ if (_ChessModeRow & 16)
763
+ chessRotate = !chessRotate;
764
+ }
765
+
766
+ slideTransition.$Top = slideTransition.$Top || (slideTransition.$Clip & 4);
767
+ slideTransition.$Bottom = slideTransition.$Bottom || (slideTransition.$Clip & 8);
768
+ slideTransition.$Left = slideTransition.$Left || (slideTransition.$Clip & 1);
769
+ slideTransition.$Right = slideTransition.$Right || (slideTransition.$Clip & 2);
770
+
771
+ var topBenchmark = chessVertical ? slideTransition.$Bottom : slideTransition.$Top;
772
+ var bottomBenchmark = chessVertical ? slideTransition.$Top : slideTransition.$Bottom;
773
+ var leftBenchmark = chessHorizontal ? slideTransition.$Right : slideTransition.$Left;
774
+ var rightBenchmark = chessHorizontal ? slideTransition.$Left : slideTransition.$Right;
775
+
776
+ //$JssorDebug$.$Execute(function () {
777
+ // topBenchmark = bottomBenchmark = leftBenchmark = rightBenchmark = false;
778
+ //});
779
+
780
+ slideTransition.$Clip = topBenchmark || bottomBenchmark || leftBenchmark || rightBenchmark;
781
+
782
+ _StyleDif = {};
783
+ _StyleEnd = { $Top: 0, $Left: 0, $Opacity: 1, $Width: slideContainerWidth, $Height: slideContainerHeight };
784
+ _StyleStart = $Jssor$.$Extend({}, _StyleEnd);
785
+ _Block = $Jssor$.$Extend({}, _Blocks[columnRow]);
786
+
787
+ if (slideTransition.$Opacity) {
788
+ _StyleEnd.$Opacity = 2 - slideTransition.$Opacity;
789
+ }
790
+
791
+ if (slideTransition.$ZIndex) {
792
+ _StyleEnd.$ZIndex = slideTransition.$ZIndex;
793
+ _StyleStart.$ZIndex = 0;
794
+ }
795
+
796
+ var allowClip = slideTransition.$Cols * slideTransition.$Rows > 1 || slideTransition.$Clip;
797
+
798
+ if (slideTransition.$Zoom || slideTransition.$Rotate) {
799
+ var allowRotate = true;
800
+ if ($Jssor$.$IsBrowserIE() && $Jssor$.$BrowserEngineVersion() < 9) {
801
+ if (slideTransition.$Cols * slideTransition.$Rows > 1)
802
+ allowRotate = false;
803
+ else
804
+ allowClip = false;
805
+ }
806
+
807
+ if (allowRotate) {
808
+ _StyleEnd.$Zoom = slideTransition.$Zoom ? slideTransition.$Zoom - 1 : 1;
809
+ _StyleStart.$Zoom = 1;
810
+
811
+ if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera())
812
+ _StyleEnd.$Zoom = Math.min(_StyleEnd.$Zoom, 2);
813
+
814
+ var rotate = slideTransition.$Rotate;
815
+
816
+ _StyleEnd.$Rotate = rotate * 360 * ((chessRotate) ? -1 : 1);
817
+ _StyleStart.$Rotate = 0;
818
+ }
819
+ }
820
+
821
+ if (allowClip) {
822
+ if (slideTransition.$Clip) {
823
+ var clipScale = slideTransition.$ScaleClip || 1;
824
+ var blockOffset = _Block.$Offset = {};
825
+ if (topBenchmark && bottomBenchmark) {
826
+ blockOffset.$Top = _Blocks.$Height / 2 * clipScale;
827
+ blockOffset.$Bottom = -blockOffset.$Top;
828
+ }
829
+ else if (topBenchmark) {
830
+ blockOffset.$Bottom = -_Blocks.$Height * clipScale;
831
+ }
832
+ else if (bottomBenchmark) {
833
+ blockOffset.$Top = _Blocks.$Height * clipScale;
834
+ }
835
+
836
+ if (leftBenchmark && rightBenchmark) {
837
+ blockOffset.$Left = _Blocks.$Width / 2 * clipScale;
838
+ blockOffset.$Right = -blockOffset.$Left;
839
+ }
840
+ else if (leftBenchmark) {
841
+ blockOffset.$Right = -_Blocks.$Width * clipScale;
842
+ }
843
+ else if (rightBenchmark) {
844
+ blockOffset.$Left = _Blocks.$Width * clipScale;
845
+ }
846
+ }
847
+
848
+ _StyleDif.$Clip = _Block;
849
+ _StyleStart.$Clip = _Blocks[columnRow];
850
+ }
851
+
852
+ //fly
853
+ {
854
+ var chessHor = chessHorizontal ? 1 : -1;
855
+ var chessVer = chessVertical ? 1 : -1;
856
+
857
+ if (slideTransition.x)
858
+ _StyleEnd.$Left += slideContainerWidth * slideTransition.x * chessHor;
859
+
860
+ if (slideTransition.y)
861
+ _StyleEnd.$Top += slideContainerHeight * slideTransition.y * chessVer;
862
+ }
863
+
864
+ $Jssor$.$Each(_StyleEnd, function (propertyEnd, property) {
865
+ if ($Jssor$.$IsNumeric(propertyEnd)) {
866
+ if (propertyEnd != _StyleStart[property]) {
867
+ _StyleDif[property] = propertyEnd - _StyleStart[property];
868
+ }
869
+ }
870
+ });
871
+
872
+ _StartStylesArr[columnRow] = _SlideOut ? _StyleStart : _StyleEnd;
873
+
874
+ var animationStylesArr = [];
875
+ var virtualFrameCount = Math.round(order * slideTransition.$Delay / slideTransition.$Interval);
876
+ _AnimationStylesArrs[columnRow] = new Array(virtualFrameCount);
877
+ _AnimationStylesArrs[columnRow].$Min = virtualFrameCount;
878
+
879
+ var framesCount = slideTransition.$FramesCount;
880
+ for (var frameN = 0; frameN <= framesCount; frameN++) {
881
+ var styleFrameN = {};
882
+
883
+ $Jssor$.$Each(_StyleDif, function (propertyDiff, property) {
884
+ var propertyEasings = slideTransition.$EasingInstance[property] || slideTransition.$EasingInstance.$Default;
885
+ var propertyEasingArray = propertyEasings[slideTransition.$Round[property] || 1];
886
+
887
+ var propertyDuring = slideTransition.$During[property] || [0, 1];
888
+ var propertyFrameN = (frameN / framesCount - propertyDuring[0]) / propertyDuring[1] * framesCount;
889
+ propertyFrameN = Math.round(Math.min(framesCount, Math.max(propertyFrameN, 0)));
890
+
891
+ var propertyEasingValue = propertyEasingArray[propertyFrameN];
892
+
893
+ if ($Jssor$.$IsNumeric(propertyDiff)) {
894
+ styleFrameN[property] = _StyleStart[property] + propertyDiff * propertyEasingValue;
895
+ }
896
+ else {
897
+ var value = styleFrameN[property] = $Jssor$.$Extend({}, _StyleStart[property]);
898
+ value.$Offset = [];
899
+ $Jssor$.$Each(propertyDiff.$Offset, function (rectX, n) {
900
+ var offsetValue = rectX * propertyEasingValue;
901
+ value.$Offset[n] = offsetValue;
902
+ value[n] += offsetValue;
903
+ });
904
+ }
905
+ });
906
+
907
+ if (_StyleStart.$Zoom) {
908
+ styleFrameN.$Transform = { $Rotate: styleFrameN.$Rotate || 0, $Scale: styleFrameN.$Zoom, $OriginalWidth: slideContainerWidth, $OriginalHeight: slideContainerHeight };
909
+ }
910
+ if (styleFrameN.$Clip && slideTransition.$Move) {
911
+ var styleFrameNClipOffset = styleFrameN.$Clip.$Offset;
912
+ var offsetY = (styleFrameNClipOffset.$Top || 0) + (styleFrameNClipOffset.$Bottom || 0);
913
+ var offsetX = (styleFrameNClipOffset.$Left || 0) + (styleFrameNClipOffset.$Right || 0);
914
+
915
+ styleFrameN.$Left = (styleFrameN.$Left || 0) + offsetX;
916
+ styleFrameN.$Top = (styleFrameN.$Top || 0) + offsetY;
917
+ styleFrameN.$Clip.$Left -= offsetX;
918
+ styleFrameN.$Clip.$Right -= offsetX;
919
+ styleFrameN.$Clip.$Top -= offsetY;
920
+ styleFrameN.$Clip.$Bottom -= offsetY;
921
+ }
922
+
923
+ styleFrameN.$ZIndex = styleFrameN.$ZIndex || 1;
924
+
925
+ _AnimationStylesArrs[columnRow].push(styleFrameN);
926
+ }
927
+
928
+ } //for
929
+ });
930
+ });
931
+
932
+ _FormationInstance.reverse();
933
+ $Jssor$.$Each(_FormationInstance, function (formationItems) {
934
+ $Jssor$.$Each(formationItems, function (formationItem) {
935
+ var row = formationItem[0];
936
+ var col = formationItem[1];
937
+
938
+ var columnRow = row + ',' + col;
939
+
940
+ var image = slideElement;
941
+ if (col || row)
942
+ image = $Jssor$.$CloneNode(slideElement);
943
+
944
+ $Jssor$.$SetStyles(image, _StartStylesArr[columnRow]);
945
+ $Jssor$.$CssOverflow(image, "hidden");
946
+
947
+ $Jssor$.$CssPosition(image, "absolute");
948
+ slideContainer.$AddClipElement(image);
949
+ _AnimationBlockItems[columnRow] = image;
950
+ $Jssor$.$ShowElement(image, !_SlideOut);
951
+ });
952
+ });
953
+ }
954
+ }
955
+
956
+ //JssorSlideshowRunner++++++++
957
+ var _SlideshowRunnerCount = 1;
958
+ $JssorSlideshowRunner$ = window.$JssorSlideshowRunner$ = function (slideContainer, slideContainerWidth, slideContainerHeight, slideshowOptions, handleTouchEventOnly) {
959
+
960
+ var _SelfSlideshowRunner = this;
961
+
962
+ //var _State = 0; //-1 fullfill, 0 clean, 1 initializing, 2 stay, 3 playing
963
+ var _EndTime;
964
+
965
+ var _SliderFrameCount;
966
+
967
+ var _SlideshowPlayerBelow;
968
+ var _SlideshowPlayerAbove;
969
+
970
+ var _PrevItem;
971
+ var _SlideItem;
972
+
973
+ var _TransitionIndex = 0;
974
+ var _TransitionsOrder = slideshowOptions.$TransitionsOrder;
975
+
976
+ var _SlideshowTransition;
977
+
978
+ var _SlideshowPerformance = 8;
979
+
980
+ function SlideshowProcessor() {
981
+ var _SelfSlideshowProcessor = this;
982
+ var _CurrentTime = 0;
983
+
984
+ $JssorAnimator$.call(_SelfSlideshowProcessor, 0, _EndTime);
985
+
986
+ _SelfSlideshowProcessor.$OnPositionChange = function (oldPosition, newPosition) {
987
+ if ((newPosition - _CurrentTime) > _SlideshowPerformance) {
988
+ _CurrentTime = newPosition;
989
+
990
+ _SlideshowPlayerAbove && _SlideshowPlayerAbove.$ShowFrame(newPosition);
991
+ _SlideshowPlayerBelow && _SlideshowPlayerBelow.$ShowFrame(newPosition);
992
+ }
993
+ };
994
+
995
+ _SelfSlideshowProcessor.$Transition = _SlideshowTransition;
996
+ }
997
+
998
+ //member functions
999
+ _SelfSlideshowRunner.$GetTransition = function (slideCount) {
1000
+ var n = 0;
1001
+
1002
+ var transitions = slideshowOptions.$Transitions;
1003
+
1004
+ var transitionCount = transitions.length;
1005
+
1006
+ if (_TransitionsOrder) { /*Sequence*/
1007
+ //if (transitionCount > slideCount && ($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserSafari() || $Jssor$.$IsBrowserFireFox())) {
1008
+ // transitionCount -= transitionCount % slideCount;
1009
+ //}
1010
+ n = _TransitionIndex++ % transitionCount;
1011
+ }
1012
+ else { /*Random*/
1013
+ n = Math.floor(Math.random() * transitionCount);
1014
+ }
1015
+
1016
+ transitions[n] && (transitions[n].$Index = n);
1017
+
1018
+ return transitions[n];
1019
+ };
1020
+
1021
+ _SelfSlideshowRunner.$Initialize = function (slideIndex, prevIndex, slideItem, prevItem, slideshowTransition) {
1022
+ $JssorDebug$.$Execute(function () {
1023
+ if (_SlideshowPlayerBelow) {
1024
+ $JssorDebug$.$Fail("slideshow runner has not been cleared.");
1025
+ }
1026
+ });
1027
+
1028
+ _SlideshowTransition = slideshowTransition;
1029
+
1030
+ slideshowTransition = EnsureTransitionInstance(slideshowTransition, _SlideshowPerformance);
1031
+
1032
+ _SlideItem = slideItem;
1033
+ _PrevItem = prevItem;
1034
+
1035
+ var prevSlideElement = prevItem.$Item;
1036
+ var currentSlideElement = slideItem.$Item;
1037
+ prevSlideElement["no-image"] = !prevItem.$Image;
1038
+ currentSlideElement["no-image"] = !slideItem.$Image;
1039
+
1040
+ var slideElementAbove = prevSlideElement;
1041
+ var slideElementBelow = currentSlideElement;
1042
+
1043
+ var slideTransitionAbove = slideshowTransition;
1044
+ var slideTransitionBelow = slideshowTransition.$Brother || EnsureTransitionInstance({}, _SlideshowPerformance);
1045
+
1046
+ if (!slideshowTransition.$SlideOut) {
1047
+ slideElementAbove = currentSlideElement;
1048
+ slideElementBelow = prevSlideElement;
1049
+ }
1050
+
1051
+ var shift = slideTransitionBelow.$Shift || 0;
1052
+
1053
+ _SlideshowPlayerBelow = new JssorSlideshowPlayer(slideContainer, slideElementBelow, slideTransitionBelow, Math.max(shift - slideTransitionBelow.$Interval, 0), slideContainerWidth, slideContainerHeight);
1054
+ _SlideshowPlayerAbove = new JssorSlideshowPlayer(slideContainer, slideElementAbove, slideTransitionAbove, Math.max(slideTransitionBelow.$Interval - shift, 0), slideContainerWidth, slideContainerHeight);
1055
+
1056
+ _SlideshowPlayerBelow.$ShowFrame(0);
1057
+ _SlideshowPlayerAbove.$ShowFrame(0);
1058
+
1059
+ _EndTime = Math.max(_SlideshowPlayerBelow.$EndTime, _SlideshowPlayerAbove.$EndTime);
1060
+
1061
+ _SelfSlideshowRunner.$Index = slideIndex;
1062
+ };
1063
+
1064
+ _SelfSlideshowRunner.$Clear = function () {
1065
+ slideContainer.$Clear();
1066
+ _SlideshowPlayerBelow = null;
1067
+ _SlideshowPlayerAbove = null;
1068
+ };
1069
+
1070
+ _SelfSlideshowRunner.$GetProcessor = function () {
1071
+ var slideshowProcessor = null;
1072
+
1073
+ if (_SlideshowPlayerAbove)
1074
+ slideshowProcessor = new SlideshowProcessor();
1075
+
1076
+ return slideshowProcessor;
1077
+ };
1078
+
1079
+ //Constructor
1080
+ {
1081
+ if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera() || (handleTouchEventOnly && $Jssor$.$WebKitVersion() < 537)) {
1082
+ _SlideshowPerformance = 16;
1083
+ }
1084
+
1085
+ $JssorObject$.call(_SelfSlideshowRunner);
1086
+ $JssorAnimator$.call(_SelfSlideshowRunner, -10000000, 10000000);
1087
+
1088
+ $JssorDebug$.$LiveStamp(_SelfSlideshowRunner, "slideshow_runner_" + _SlideshowRunnerCount++);
1089
+ }
1090
+ };
1091
+ //JssorSlideshowRunner--------
1092
+
1093
+ //JssorSlider
1094
+ function JssorSlider(elmt, options) {
1095
+ var _SelfSlider = this;
1096
+
1097
+ //private classes
1098
+ function Conveyor() {
1099
+ var _SelfConveyor = this;
1100
+ $JssorAnimator$.call(_SelfConveyor, -100000000, 200000000);
1101
+
1102
+ _SelfConveyor.$GetCurrentSlideInfo = function () {
1103
+ var positionDisplay = _SelfConveyor.$GetPosition_Display();
1104
+ var virtualIndex = Math.floor(positionDisplay);
1105
+ var slideIndex = GetRealIndex(virtualIndex);
1106
+ var slidePosition = positionDisplay - Math.floor(positionDisplay);
1107
+
1108
+ return { $Index: slideIndex, $VirtualIndex: virtualIndex, $Position: slidePosition };
1109
+ };
1110
+
1111
+ _SelfConveyor.$OnPositionChange = function (oldPosition, newPosition) {
1112
+
1113
+ var index = Math.floor(newPosition);
1114
+ if (index != newPosition && newPosition > oldPosition)
1115
+ index++;
1116
+
1117
+ ResetNavigator(index, true);
1118
+
1119
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_POSITION_CHANGE, GetRealIndex(newPosition), GetRealIndex(oldPosition), newPosition, oldPosition);
1120
+ };
1121
+ }
1122
+
1123
+ //Carousel
1124
+ function Carousel() {
1125
+ var _SelfCarousel = this;
1126
+
1127
+ $JssorAnimator$.call(_SelfCarousel, 0, 0, { $LoopLength: _SlideCount });
1128
+
1129
+ //Carousel Constructor
1130
+ {
1131
+ $Jssor$.$Each(_SlideItems, function (slideItem) {
1132
+ (_Loop & 1) && slideItem.$SetLoopLength(_SlideCount);
1133
+ _SelfCarousel.$Chain(slideItem);
1134
+ slideItem.$Shift(_ParkingPosition / _StepLength);
1135
+ });
1136
+ }
1137
+ }
1138
+ //Carousel
1139
+
1140
+ //Slideshow
1141
+ function Slideshow() {
1142
+ var _SelfSlideshow = this;
1143
+ var _Wrapper = _SlideContainer.$Elmt;
1144
+
1145
+ $JssorAnimator$.call(_SelfSlideshow, -1, 2, { $Easing: $JssorEasing$.$EaseLinear, $Setter: { $Position: SetPosition }, $LoopLength: _SlideCount }, _Wrapper, { $Position: 1 }, { $Position: -1 });
1146
+
1147
+ _SelfSlideshow.$Wrapper = _Wrapper;
1148
+
1149
+ //Slideshow Constructor
1150
+ {
1151
+ $JssorDebug$.$Execute(function () {
1152
+ $Jssor$.$Attribute(_SlideContainer.$Elmt, "debug-id", "slide_container");
1153
+ });
1154
+ }
1155
+ }
1156
+ //Slideshow
1157
+
1158
+ //CarouselPlayer
1159
+ function CarouselPlayer(carousel, slideshow) {
1160
+ var _SelfCarouselPlayer = this;
1161
+ var _FromPosition;
1162
+ var _ToPosition;
1163
+ var _Duration;
1164
+ var _StandBy;
1165
+ var _StandByPosition;
1166
+
1167
+ $JssorAnimator$.call(_SelfCarouselPlayer, -100000000, 200000000, { $IntervalMax: 100 });
1168
+
1169
+ _SelfCarouselPlayer.$OnStart = function () {
1170
+ _IsSliding = true;
1171
+ _LoadingTicket = null;
1172
+
1173
+ //EVT_SWIPE_START
1174
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_SWIPE_START, GetRealIndex(_Conveyor.$GetPosition()), _Conveyor.$GetPosition());
1175
+ };
1176
+
1177
+ _SelfCarouselPlayer.$OnStop = function () {
1178
+
1179
+ _IsSliding = false;
1180
+ _StandBy = false;
1181
+
1182
+ var currentSlideInfo = _Conveyor.$GetCurrentSlideInfo();
1183
+
1184
+ //EVT_SWIPE_END
1185
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_SWIPE_END, GetRealIndex(_Conveyor.$GetPosition()), _Conveyor.$GetPosition());
1186
+
1187
+ if (!currentSlideInfo.$Position) {
1188
+ OnPark(currentSlideInfo.$VirtualIndex, _CurrentSlideIndex);
1189
+ }
1190
+ };
1191
+
1192
+ _SelfCarouselPlayer.$OnPositionChange = function (oldPosition, newPosition) {
1193
+
1194
+ var toPosition;
1195
+
1196
+ if (_StandBy)
1197
+ toPosition = _StandByPosition;
1198
+ else {
1199
+ toPosition = _ToPosition;
1200
+
1201
+ if (_Duration) {
1202
+ var interPosition = newPosition / _Duration;
1203
+ //if ($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserFireFox()) {
1204
+ // Math.round(interPosition * 8 / _Duration) / 8 * _Duration;
1205
+
1206
+ // if ($Jssor$.$BrowserVersion() < 38)
1207
+ // interPosition = parseFloat(interPosition.toFixed(4));
1208
+ //}
1209
+ toPosition = _Options.$SlideEasing(interPosition) * (_ToPosition - _FromPosition) + _FromPosition;
1210
+ }
1211
+ }
1212
+
1213
+ _Conveyor.$GoToPosition(toPosition);
1214
+ };
1215
+
1216
+ _SelfCarouselPlayer.$PlayCarousel = function (fromPosition, toPosition, duration, callback) {
1217
+ $JssorDebug$.$Execute(function () {
1218
+ if (_SelfCarouselPlayer.$IsPlaying())
1219
+ $JssorDebug$.$Fail("The carousel is already playing.");
1220
+ });
1221
+
1222
+ _FromPosition = fromPosition;
1223
+ _ToPosition = toPosition;
1224
+ _Duration = duration;
1225
+
1226
+ _Conveyor.$GoToPosition(fromPosition);
1227
+ _SelfCarouselPlayer.$GoToPosition(0);
1228
+
1229
+ _SelfCarouselPlayer.$PlayToPosition(duration, callback);
1230
+ };
1231
+
1232
+ _SelfCarouselPlayer.$StandBy = function (standByPosition) {
1233
+ _StandBy = true;
1234
+ _StandByPosition = standByPosition;
1235
+ _SelfCarouselPlayer.$Play(standByPosition, null, true);
1236
+ };
1237
+
1238
+ _SelfCarouselPlayer.$SetStandByPosition = function (standByPosition) {
1239
+ _StandByPosition = standByPosition;
1240
+ };
1241
+
1242
+ _SelfCarouselPlayer.$MoveCarouselTo = function (position) {
1243
+ _Conveyor.$GoToPosition(position);
1244
+ };
1245
+
1246
+ //CarouselPlayer Constructor
1247
+ {
1248
+ _Conveyor = new Conveyor();
1249
+
1250
+ _Conveyor.$Combine(carousel);
1251
+ _Conveyor.$Combine(slideshow);
1252
+ }
1253
+ }
1254
+ //CarouselPlayer
1255
+
1256
+ //SlideContainer
1257
+ function SlideContainer() {
1258
+ var _Self = this;
1259
+ var elmt = CreatePanel();
1260
+
1261
+ $Jssor$.$CssZIndex(elmt, 0);
1262
+ $Jssor$.$Css(elmt, "pointerEvents", "none");
1263
+
1264
+ _Self.$Elmt = elmt;
1265
+
1266
+ _Self.$AddClipElement = function (clipElement) {
1267
+ $Jssor$.$AppendChild(elmt, clipElement);
1268
+ $Jssor$.$ShowElement(elmt);
1269
+ };
1270
+
1271
+ _Self.$Clear = function () {
1272
+ $Jssor$.$HideElement(elmt);
1273
+ $Jssor$.$ClearInnerHtml(elmt);
1274
+ };
1275
+ }
1276
+ //SlideContainer
1277
+
1278
+ //SlideItem
1279
+ function SlideItem(slideElmt, slideIndex) {
1280
+
1281
+ var _SelfSlideItem = this;
1282
+
1283
+ var _CaptionSliderIn;
1284
+ var _CaptionSliderOut;
1285
+ var _CaptionSliderCurrent;
1286
+ var _IsCaptionSliderPlayingWhenDragStart;
1287
+
1288
+ var _Wrapper;
1289
+ var _BaseElement = slideElmt;
1290
+
1291
+ var _LoadingScreen;
1292
+
1293
+ var _ImageItem;
1294
+ var _ImageElmts = [];
1295
+ var _LinkItemOrigin;
1296
+ var _LinkItem;
1297
+ var _ImageLoading;
1298
+ var _ImageLoaded;
1299
+ var _ImageLazyLoading;
1300
+ var _ContentRefreshed;
1301
+
1302
+ var _Processor;
1303
+
1304
+ var _PlayerInstanceElement;
1305
+ var _PlayerInstance;
1306
+
1307
+ var _SequenceNumber; //for debug only
1308
+
1309
+ $JssorAnimator$.call(_SelfSlideItem, -_DisplayPieces, _DisplayPieces + 1, { $SlideItemAnimator: true });
1310
+
1311
+ function ResetCaptionSlider(fresh) {
1312
+ _CaptionSliderOut && _CaptionSliderOut.$Revert();
1313
+ _CaptionSliderIn && _CaptionSliderIn.$Revert();
1314
+
1315
+ RefreshContent(slideElmt, fresh);
1316
+ _ContentRefreshed = true;
1317
+
1318
+ _CaptionSliderIn = new _CaptionSliderOptions.$Class(slideElmt, _CaptionSliderOptions, 1);
1319
+ $JssorDebug$.$LiveStamp(_CaptionSliderIn, "caption_slider_" + _CaptionSliderCount + "_in");
1320
+ _CaptionSliderOut = new _CaptionSliderOptions.$Class(slideElmt, _CaptionSliderOptions);
1321
+ $JssorDebug$.$LiveStamp(_CaptionSliderOut, "caption_slider_" + _CaptionSliderCount + "_out");
1322
+
1323
+ $JssorDebug$.$Execute(function () {
1324
+ _CaptionSliderCount++;
1325
+ });
1326
+
1327
+ _CaptionSliderOut.$GoToBegin();
1328
+ _CaptionSliderIn.$GoToBegin();
1329
+ }
1330
+
1331
+ function EnsureCaptionSliderVersion() {
1332
+ if (_CaptionSliderIn.$Version < _CaptionSliderOptions.$Version) {
1333
+ ResetCaptionSlider();
1334
+ }
1335
+ }
1336
+
1337
+ //event handling begin
1338
+ function LoadImageCompleteEventHandler(completeCallback, loadingScreen, image) {
1339
+ if (!_ImageLoaded) {
1340
+ _ImageLoaded = true;
1341
+
1342
+ if (_ImageItem && image) {
1343
+ var imageWidth = image.width;
1344
+ var imageHeight = image.height;
1345
+ var fillWidth = imageWidth;
1346
+ var fillHeight = imageHeight;
1347
+
1348
+ if (imageWidth && imageHeight && _Options.$FillMode) {
1349
+
1350
+ //0 stretch, 1 contain (keep aspect ratio and put all inside slide), 2 cover (keep aspect ratio and cover whole slide), 4 actual size, 5 contain for large image, actual size for small image, default value is 0
1351
+ if (_Options.$FillMode & 3 && (!(_Options.$FillMode & 4) || imageWidth > _SlideWidth || imageHeight > _SlideHeight)) {
1352
+ var fitHeight = false;
1353
+ var ratio = _SlideWidth / _SlideHeight * imageHeight / imageWidth;
1354
+
1355
+ if (_Options.$FillMode & 1) {
1356
+ fitHeight = (ratio > 1);
1357
+ }
1358
+ else if (_Options.$FillMode & 2) {
1359
+ fitHeight = (ratio < 1);
1360
+ }
1361
+ fillWidth = fitHeight ? imageWidth * _SlideHeight / imageHeight : _SlideWidth;
1362
+ fillHeight = fitHeight ? _SlideHeight : imageHeight * _SlideWidth / imageWidth;
1363
+ }
1364
+
1365
+ $Jssor$.$CssWidth(_ImageItem, fillWidth);
1366
+ $Jssor$.$CssHeight(_ImageItem, fillHeight);
1367
+ $Jssor$.$CssTop(_ImageItem, (_SlideHeight - fillHeight) / 2);
1368
+ $Jssor$.$CssLeft(_ImageItem, (_SlideWidth - fillWidth) / 2);
1369
+ }
1370
+
1371
+ $Jssor$.$CssPosition(_ImageItem, "absolute");
1372
+
1373
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_LOAD_END, slideItem);
1374
+ }
1375
+ }
1376
+
1377
+ $Jssor$.$HideElement(loadingScreen);
1378
+ completeCallback && completeCallback(_SelfSlideItem);
1379
+ }
1380
+
1381
+ function LoadSlideshowImageCompleteEventHandler(nextIndex, nextItem, slideshowTransition, loadingTicket) {
1382
+ if (loadingTicket == _LoadingTicket && _CurrentSlideIndex == slideIndex && _AutoPlay) {
1383
+ if (!_Frozen) {
1384
+ var nextRealIndex = GetRealIndex(nextIndex);
1385
+ _SlideshowRunner.$Initialize(nextRealIndex, slideIndex, nextItem, _SelfSlideItem, slideshowTransition);
1386
+ nextItem.$HideContentForSlideshow();
1387
+ _Slideshow.$Locate(nextRealIndex, 1);
1388
+ _Slideshow.$GoToPosition(nextRealIndex);
1389
+ _CarouselPlayer.$PlayCarousel(nextIndex, nextIndex, 0);
1390
+ }
1391
+ }
1392
+ }
1393
+
1394
+ function SlideReadyEventHandler(loadingTicket) {
1395
+ if (loadingTicket == _LoadingTicket && _CurrentSlideIndex == slideIndex) {
1396
+
1397
+ if (!_Processor) {
1398
+ var slideshowProcessor = null;
1399
+ if (_SlideshowRunner) {
1400
+ if (_SlideshowRunner.$Index == slideIndex)
1401
+ slideshowProcessor = _SlideshowRunner.$GetProcessor();
1402
+ else
1403
+ _SlideshowRunner.$Clear();
1404
+ }
1405
+
1406
+ EnsureCaptionSliderVersion();
1407
+
1408
+ _Processor = new Processor(slideElmt, slideIndex, slideshowProcessor, _SelfSlideItem.$GetCaptionSliderIn(), _SelfSlideItem.$GetCaptionSliderOut());
1409
+ _Processor.$SetPlayer(_PlayerInstance);
1410
+ }
1411
+
1412
+ !_Processor.$IsPlaying() && _Processor.$Replay();
1413
+ }
1414
+ }
1415
+
1416
+ function ParkEventHandler(currentIndex, previousIndex, manualActivate) {
1417
+ if (currentIndex == slideIndex) {
1418
+
1419
+ if (currentIndex != previousIndex)
1420
+ _SlideItems[previousIndex] && _SlideItems[previousIndex].$ParkOut();
1421
+ else
1422
+ !manualActivate && _Processor && _Processor.$AdjustIdleOnPark();
1423
+
1424
+ _PlayerInstance && _PlayerInstance.$Enable();
1425
+
1426
+ //park in
1427
+ var loadingTicket = _LoadingTicket = $Jssor$.$GetNow();
1428
+ _SelfSlideItem.$LoadImage($Jssor$.$CreateCallback(null, SlideReadyEventHandler, loadingTicket));
1429
+ }
1430
+ else {
1431
+ var distance = Math.abs(slideIndex - currentIndex);
1432
+ var loadRange = _DisplayPieces + _Options.$LazyLoading;
1433
+ if (!_ImageLazyLoading || distance <= loadRange || _SlideCount - distance <= loadRange) {
1434
+ _SelfSlideItem.$LoadImage();
1435
+ }
1436
+ }
1437
+ }
1438
+
1439
+ function SwipeStartEventHandler() {
1440
+ if (_CurrentSlideIndex == slideIndex && _Processor) {
1441
+ _Processor.$Stop();
1442
+ _PlayerInstance && _PlayerInstance.$Quit();
1443
+ _PlayerInstance && _PlayerInstance.$Disable();
1444
+ _Processor.$OpenSlideshowPanel();
1445
+ }
1446
+ }
1447
+
1448
+ function FreezeEventHandler() {
1449
+ if (_CurrentSlideIndex == slideIndex && _Processor) {
1450
+ _Processor.$Stop();
1451
+ }
1452
+ }
1453
+
1454
+ function LinkClickEventHandler(event) {
1455
+ if (_LastDragSucceded) {
1456
+ $Jssor$.$CancelEvent(event);
1457
+ }
1458
+ else {
1459
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_CLICK, slideIndex, event);
1460
+ }
1461
+ }
1462
+
1463
+ function PlayerAvailableEventHandler() {
1464
+ _PlayerInstance = _PlayerInstanceElement.pInstance;
1465
+ _Processor && _Processor.$SetPlayer(_PlayerInstance);
1466
+ }
1467
+
1468
+ _SelfSlideItem.$LoadImage = function (completeCallback, loadingScreen) {
1469
+ loadingScreen = loadingScreen || _LoadingScreen;
1470
+
1471
+ if (_ImageElmts.length && !_ImageLoaded) {
1472
+
1473
+ $Jssor$.$ShowElement(loadingScreen);
1474
+
1475
+ if (!_ImageLoading) {
1476
+ _ImageLoading = true;
1477
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_LOAD_START);
1478
+
1479
+ $Jssor$.$Each(_ImageElmts, function (imageElmt) {
1480
+
1481
+ if (!imageElmt.src) {
1482
+ imageElmt.src = $Jssor$.$AttributeEx(imageElmt, "src2");
1483
+ $Jssor$.$CssDisplay(imageElmt, imageElmt["display-origin"]);
1484
+ }
1485
+ });
1486
+ }
1487
+ $Jssor$.$LoadImages(_ImageElmts, _ImageItem, $Jssor$.$CreateCallback(null, LoadImageCompleteEventHandler, completeCallback, loadingScreen));
1488
+ }
1489
+ else {
1490
+ LoadImageCompleteEventHandler(completeCallback, loadingScreen);
1491
+ }
1492
+ };
1493
+
1494
+ _SelfSlideItem.$GoForNextSlide = function () {
1495
+ if (_SlideshowRunner) {
1496
+ var slideshowTransition = _SlideshowRunner.$GetTransition(_SlideCount);
1497
+
1498
+ if (slideshowTransition) {
1499
+ var loadingTicket = _LoadingTicket = $Jssor$.$GetNow();
1500
+
1501
+ var nextIndex = slideIndex + _PlayReverse;
1502
+ var nextItem = _SlideItems[GetRealIndex(nextIndex)];
1503
+ return nextItem.$LoadImage($Jssor$.$CreateCallback(null, LoadSlideshowImageCompleteEventHandler, nextIndex, nextItem, slideshowTransition, loadingTicket), _LoadingScreen);
1504
+ }
1505
+ }
1506
+
1507
+ PlayTo(_CurrentSlideIndex + _Options.$AutoPlaySteps * _PlayReverse);
1508
+ };
1509
+
1510
+ _SelfSlideItem.$TryActivate = function () {
1511
+ ParkEventHandler(slideIndex, slideIndex, true);
1512
+ };
1513
+
1514
+ _SelfSlideItem.$ParkOut = function () {
1515
+ //park out
1516
+ _PlayerInstance && _PlayerInstance.$Quit();
1517
+ _PlayerInstance && _PlayerInstance.$Disable();
1518
+ _SelfSlideItem.$UnhideContentForSlideshow();
1519
+ _Processor && _Processor.$Abort();
1520
+ _Processor = null;
1521
+ ResetCaptionSlider();
1522
+ };
1523
+
1524
+ //for debug only
1525
+ _SelfSlideItem.$StampSlideItemElements = function (stamp) {
1526
+ stamp = _SequenceNumber + "_" + stamp;
1527
+
1528
+ $JssorDebug$.$Execute(function () {
1529
+ if (_ImageItem)
1530
+ $Jssor$.$Attribute(_ImageItem, "debug-id", stamp + "_slide_item_image_id");
1531
+
1532
+ $Jssor$.$Attribute(slideElmt, "debug-id", stamp + "_slide_item_item_id");
1533
+ });
1534
+
1535
+ $JssorDebug$.$Execute(function () {
1536
+ $Jssor$.$Attribute(_Wrapper, "debug-id", stamp + "_slide_item_wrapper_id");
1537
+ });
1538
+
1539
+ $JssorDebug$.$Execute(function () {
1540
+ $Jssor$.$Attribute(_LoadingScreen, "debug-id", stamp + "_loading_container_id");
1541
+ });
1542
+ };
1543
+
1544
+ _SelfSlideItem.$HideContentForSlideshow = function () {
1545
+ $Jssor$.$HideElement(slideElmt);
1546
+ };
1547
+
1548
+ _SelfSlideItem.$UnhideContentForSlideshow = function () {
1549
+ $Jssor$.$ShowElement(slideElmt);
1550
+ };
1551
+
1552
+ _SelfSlideItem.$EnablePlayer = function () {
1553
+ _PlayerInstance && _PlayerInstance.$Enable();
1554
+ };
1555
+
1556
+ function RefreshContent(elmt, fresh, level) {
1557
+ if (elmt["jssor-slider"])
1558
+ return;
1559
+
1560
+ level = level || 0;
1561
+
1562
+ if (!_ContentRefreshed) {
1563
+ if (elmt.tagName == "IMG") {
1564
+ _ImageElmts.push(elmt);
1565
+
1566
+ if (!elmt.src) {
1567
+ _ImageLazyLoading = true;
1568
+ elmt["display-origin"] = $Jssor$.$CssDisplay(elmt);
1569
+ $Jssor$.$HideElement(elmt);
1570
+ }
1571
+ }
1572
+ if ($Jssor$.$IsBrowserIe9Earlier()) {
1573
+ $Jssor$.$CssZIndex(elmt, ($Jssor$.$CssZIndex(elmt) || 0) + 1);
1574
+ }
1575
+ if (_Options.$HWA && $Jssor$.$WebKitVersion()) {
1576
+ if (!_IsTouchDevice || $Jssor$.$WebKitVersion() < 534 || (!_SlideshowEnabled && !$Jssor$.$IsBrowserChrome())) {
1577
+ $Jssor$.$EnableHWA(elmt);
1578
+ }
1579
+ }
1580
+ }
1581
+
1582
+ var childElements = $Jssor$.$Children(elmt);
1583
+
1584
+ $Jssor$.$Each(childElements, function (childElement, i) {
1585
+
1586
+ var uAttribute = $Jssor$.$AttributeEx(childElement, "u");
1587
+ if (uAttribute == "player" && !_PlayerInstanceElement) {
1588
+ _PlayerInstanceElement = childElement;
1589
+ if (_PlayerInstanceElement.pInstance) {
1590
+ PlayerAvailableEventHandler();
1591
+ }
1592
+ else {
1593
+ $Jssor$.$AddEvent(_PlayerInstanceElement, "dataavailable", PlayerAvailableEventHandler);
1594
+ }
1595
+ }
1596
+
1597
+ if (uAttribute == "caption") {
1598
+ if (!$Jssor$.$IsBrowserIE() && !fresh) {
1599
+ var captionElement = $Jssor$.$CloneNode(childElement, false, true);
1600
+ $Jssor$.$InsertBefore(elmt, captionElement, childElement);
1601
+ $Jssor$.$RemoveChild(elmt, childElement);
1602
+ childElement = captionElement;
1603
+
1604
+ fresh = true;
1605
+ }
1606
+ }
1607
+ else if (!_ContentRefreshed && !level && !_ImageItem && $Jssor$.$AttributeEx(childElement, "u") == "image") {
1608
+ _ImageItem = childElement;
1609
+
1610
+ if (_ImageItem) {
1611
+ if (_ImageItem.tagName == "A") {
1612
+ _LinkItemOrigin = _ImageItem;
1613
+ $Jssor$.$SetStyles(_LinkItemOrigin, _StyleDef);
1614
+
1615
+ _LinkItem = $Jssor$.$CloneNode(_ImageItem, true);
1616
+ //cancel click event on <A> element when a drag of slide succeeded
1617
+ $Jssor$.$AddEvent(_LinkItem, "click", LinkClickEventHandler);
1618
+
1619
+ $Jssor$.$SetStyles(_LinkItem, _StyleDef);
1620
+ $Jssor$.$CssDisplay(_LinkItem, "block");
1621
+ $Jssor$.$CssOpacity(_LinkItem, 0);
1622
+ $Jssor$.$Css(_LinkItem, "backgroundColor", "#000");
1623
+
1624
+ _ImageItem = $Jssor$.$FindChildByTag(_ImageItem, "IMG");
1625
+
1626
+ $JssorDebug$.$Execute(function () {
1627
+ if (!_ImageItem) {
1628
+ $JssorDebug$.$Error("slide html code definition error, no 'IMG' found in a 'image with link' slide.\r\n" + elmt.outerHTML);
1629
+ }
1630
+ });
1631
+ }
1632
+ _ImageItem.border = 0;
1633
+
1634
+ $Jssor$.$SetStyles(_ImageItem, _StyleDef);
1635
+ }
1636
+ }
1637
+
1638
+ RefreshContent(childElement, fresh, level + 1);
1639
+ });
1640
+ }
1641
+
1642
+ _SelfSlideItem.$OnInnerOffsetChange = function (oldOffset, newOffset) {
1643
+ var slidePosition = _DisplayPieces - newOffset;
1644
+
1645
+ SetPosition(_Wrapper, slidePosition);
1646
+
1647
+ //following lines are for future usage, not ready yet
1648
+ //if (!_IsDragging || !_IsCaptionSliderPlayingWhenDragStart) {
1649
+ // var _DealWithParallax;
1650
+ // if (IsCurrentSlideIndex(slideIndex)) {
1651
+ // if (_CaptionSliderOptions.$PlayOutMode == 2)
1652
+ // _DealWithParallax = true;
1653
+ // }
1654
+ // else {
1655
+ // if (!_CaptionSliderOptions.$PlayInMode) {
1656
+ // //PlayInMode: 0 none
1657
+ // _CaptionSliderIn.$GoToEnd();
1658
+ // }
1659
+ // //else if (_CaptionSliderOptions.$PlayInMode == 1) {
1660
+ // // //PlayInMode: 1 chain
1661
+ // // _CaptionSliderIn.$GoToBegin();
1662
+ // //}
1663
+ // else if (_CaptionSliderOptions.$PlayInMode == 2) {
1664
+ // //PlayInMode: 2 parallel
1665
+ // _DealWithParallax = true;
1666
+ // }
1667
+ // }
1668
+
1669
+ // if (_DealWithParallax) {
1670
+ // _CaptionSliderIn.$GoToPosition((_CaptionSliderIn.$GetPosition_OuterEnd() - _CaptionSliderIn.$GetPosition_OuterBegin()) * Math.abs(newOffset - 1) * .8 + _CaptionSliderIn.$GetPosition_OuterBegin());
1671
+ // }
1672
+ //}
1673
+ };
1674
+
1675
+ _SelfSlideItem.$GetCaptionSliderIn = function () {
1676
+ return _CaptionSliderIn;
1677
+ };
1678
+
1679
+ _SelfSlideItem.$GetCaptionSliderOut = function () {
1680
+ return _CaptionSliderOut;
1681
+ };
1682
+
1683
+ _SelfSlideItem.$Index = slideIndex;
1684
+
1685
+ $JssorObject$.call(_SelfSlideItem);
1686
+
1687
+ //SlideItem Constructor
1688
+ {
1689
+
1690
+ var thumb = $Jssor$.$FindChild(slideElmt, "thumb", true);
1691
+ if (thumb) {
1692
+ _SelfSlideItem.$Thumb = $Jssor$.$CloneNode(thumb);
1693
+ $Jssor$.$RemoveAttribute(thumb, "id");
1694
+ $Jssor$.$HideElement(thumb);
1695
+ }
1696
+ $Jssor$.$ShowElement(slideElmt);
1697
+
1698
+ _LoadingScreen = $Jssor$.$CloneNode(_LoadingContainer);
1699
+ $Jssor$.$CssZIndex(_LoadingScreen, 1000);
1700
+
1701
+ //cancel click event on <A> element when a drag of slide succeeded
1702
+ $Jssor$.$AddEvent(slideElmt, "click", LinkClickEventHandler);
1703
+
1704
+ ResetCaptionSlider(true);
1705
+
1706
+ _SelfSlideItem.$Image = _ImageItem;
1707
+ _SelfSlideItem.$Link = _LinkItem;
1708
+
1709
+ _SelfSlideItem.$Item = slideElmt;
1710
+
1711
+ _SelfSlideItem.$Wrapper = _Wrapper = slideElmt;
1712
+ $Jssor$.$AppendChild(_Wrapper, _LoadingScreen);
1713
+
1714
+ _SelfSlider.$On(203, ParkEventHandler);
1715
+ _SelfSlider.$On(28, FreezeEventHandler);
1716
+ _SelfSlider.$On(24, SwipeStartEventHandler);
1717
+
1718
+ $JssorDebug$.$Execute(function () {
1719
+ _SequenceNumber = _SlideItemCreatedCount++;
1720
+ });
1721
+
1722
+ $JssorDebug$.$Execute(function () {
1723
+ $Jssor$.$Attribute(_Wrapper, "debug-id", "slide-" + slideIndex);
1724
+ });
1725
+ }
1726
+ }
1727
+ //SlideItem
1728
+
1729
+ //Processor
1730
+ function Processor(slideElmt, slideIndex, slideshowProcessor, captionSliderIn, captionSliderOut) {
1731
+
1732
+ var _SelfProcessor = this;
1733
+
1734
+ var _ProgressBegin = 0;
1735
+ var _SlideshowBegin = 0;
1736
+ var _SlideshowEnd;
1737
+ var _CaptionInBegin;
1738
+ var _IdleBegin;
1739
+ var _IdleEnd;
1740
+ var _ProgressEnd;
1741
+
1742
+ var _IsSlideshowRunning;
1743
+ var _IsRollingBack;
1744
+
1745
+ var _PlayerInstance;
1746
+ var _IsPlayerOnService;
1747
+
1748
+ var slideItem = _SlideItems[slideIndex];
1749
+
1750
+ $JssorAnimator$.call(_SelfProcessor, 0, 0);
1751
+
1752
+ function UpdateLink() {
1753
+
1754
+ $Jssor$.$ClearChildren(_LinkContainer);
1755
+
1756
+ if (_ShowLink && _IsSlideshowRunning && slideItem.$Link) {
1757
+ $Jssor$.$AppendChild(_LinkContainer, slideItem.$Link);
1758
+ }
1759
+
1760
+ $Jssor$.$ShowElement(_LinkContainer, !_IsSlideshowRunning && slideItem.$Image);
1761
+ }
1762
+
1763
+ function ProcessCompleteEventHandler() {
1764
+
1765
+ if (_IsRollingBack) {
1766
+ _IsRollingBack = false;
1767
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_ROLLBACK_END, slideIndex, _IdleEnd, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
1768
+ _SelfProcessor.$GoToPosition(_IdleBegin);
1769
+ }
1770
+
1771
+ _SelfProcessor.$Replay();
1772
+ }
1773
+
1774
+ function PlayerSwitchEventHandler(isOnService) {
1775
+ _IsPlayerOnService = isOnService;
1776
+
1777
+ _SelfProcessor.$Stop();
1778
+ _SelfProcessor.$Replay();
1779
+ }
1780
+
1781
+ _SelfProcessor.$Replay = function () {
1782
+
1783
+ var currentPosition = _SelfProcessor.$GetPosition_Display();
1784
+
1785
+ if (!_IsDragging && !_IsSliding && !_IsPlayerOnService && _CurrentSlideIndex == slideIndex) {
1786
+
1787
+ if (!currentPosition) {
1788
+ if (_SlideshowEnd && !_IsSlideshowRunning) {
1789
+ _IsSlideshowRunning = true;
1790
+
1791
+ _SelfProcessor.$OpenSlideshowPanel(true);
1792
+
1793
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_SLIDESHOW_START, slideIndex, _ProgressBegin, _SlideshowBegin, _SlideshowEnd, _ProgressEnd);
1794
+ }
1795
+
1796
+ UpdateLink();
1797
+ }
1798
+
1799
+ var toPosition;
1800
+ var stateEvent = JssorSlider.$EVT_STATE_CHANGE;
1801
+
1802
+ if (currentPosition != _ProgressEnd) {
1803
+ if (currentPosition == _IdleEnd) {
1804
+ toPosition = _ProgressEnd;
1805
+ }
1806
+ else if (currentPosition == _IdleBegin) {
1807
+ toPosition = _IdleEnd;
1808
+ }
1809
+ else if (!currentPosition) {
1810
+ toPosition = _IdleBegin;
1811
+ }
1812
+ else if (currentPosition > _IdleEnd) {
1813
+ _IsRollingBack = true;
1814
+ toPosition = _IdleEnd;
1815
+ stateEvent = JssorSlider.$EVT_ROLLBACK_START;
1816
+ }
1817
+ else {
1818
+ //continue from break (by drag or lock)
1819
+ toPosition = _SelfProcessor.$GetPlayToPosition();
1820
+ }
1821
+ }
1822
+
1823
+ //$JssorDebug$.$Execute(function () {
1824
+ // if (currentPosition == _ProgressEnd) {
1825
+ // debugger;
1826
+ // }
1827
+ //});
1828
+
1829
+ _SelfSlider.$TriggerEvent(stateEvent, slideIndex, currentPosition, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
1830
+
1831
+ var allowAutoPlay = _AutoPlay && (!_HoverToPause || _NotOnHover);
1832
+
1833
+ if (currentPosition == _ProgressEnd) {
1834
+ (_IdleEnd != _ProgressEnd && !(_HoverToPause & 12) || allowAutoPlay) && slideItem.$GoForNextSlide();
1835
+ }
1836
+ else if (allowAutoPlay || currentPosition != _IdleEnd) {
1837
+ _SelfProcessor.$PlayToPosition(toPosition, ProcessCompleteEventHandler);
1838
+ }
1839
+ }
1840
+ };
1841
+
1842
+ _SelfProcessor.$AdjustIdleOnPark = function () {
1843
+ if (_IdleEnd == _ProgressEnd && _IdleEnd == _SelfProcessor.$GetPosition_Display())
1844
+ _SelfProcessor.$GoToPosition(_IdleBegin);
1845
+ };
1846
+
1847
+ _SelfProcessor.$Abort = function () {
1848
+ _SlideshowRunner && _SlideshowRunner.$Index == slideIndex && _SlideshowRunner.$Clear();
1849
+
1850
+ var currentPosition = _SelfProcessor.$GetPosition_Display();
1851
+ if (currentPosition < _ProgressEnd) {
1852
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_STATE_CHANGE, slideIndex, -currentPosition -1, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
1853
+ }
1854
+ };
1855
+
1856
+ _SelfProcessor.$OpenSlideshowPanel = function (open) {
1857
+ if (slideshowProcessor) {
1858
+ $Jssor$.$CssOverflow(_SlideshowPanel, open && slideshowProcessor.$Transition.$Outside ? "" : "hidden");
1859
+ }
1860
+ };
1861
+
1862
+ _SelfProcessor.$OnInnerOffsetChange = function (oldPosition, newPosition) {
1863
+
1864
+ if (_IsSlideshowRunning && newPosition >= _SlideshowEnd) {
1865
+ _IsSlideshowRunning = false;
1866
+ UpdateLink();
1867
+ slideItem.$UnhideContentForSlideshow();
1868
+ _SlideshowRunner.$Clear();
1869
+
1870
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_SLIDESHOW_END, slideIndex, _ProgressBegin, _SlideshowBegin, _SlideshowEnd, _ProgressEnd);
1871
+ }
1872
+
1873
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_PROGRESS_CHANGE, slideIndex, newPosition, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
1874
+ };
1875
+
1876
+ _SelfProcessor.$SetPlayer = function (playerInstance) {
1877
+ if (playerInstance && !_PlayerInstance) {
1878
+ _PlayerInstance = playerInstance;
1879
+
1880
+ playerInstance.$On($JssorPlayer$.$EVT_SWITCH, PlayerSwitchEventHandler);
1881
+ }
1882
+ };
1883
+
1884
+ //Processor Constructor
1885
+ {
1886
+ if (slideshowProcessor) {
1887
+ _SelfProcessor.$Chain(slideshowProcessor);
1888
+ }
1889
+
1890
+ _SlideshowEnd = _SelfProcessor.$GetPosition_OuterEnd();
1891
+ _CaptionInBegin = _SelfProcessor.$GetPosition_OuterEnd();
1892
+ _SelfProcessor.$Chain(captionSliderIn);
1893
+ _IdleBegin = captionSliderIn.$GetPosition_OuterEnd();
1894
+ _IdleEnd = _IdleBegin + ($Jssor$.$ParseFloat($Jssor$.$AttributeEx(slideElmt, "idle")) || _Options.$AutoPlayInterval);
1895
+
1896
+ captionSliderOut.$Shift(_IdleEnd);
1897
+ _SelfProcessor.$Combine(captionSliderOut);
1898
+ _ProgressEnd = _SelfProcessor.$GetPosition_OuterEnd();
1899
+ }
1900
+ }
1901
+ //Processor
1902
+ //private classes
1903
+
1904
+ function SetPosition(elmt, position) {
1905
+ var orientation = _DragOrientation > 0 ? _DragOrientation : _PlayOrientation;
1906
+ var x = _StepLengthX * position * (orientation & 1);
1907
+ var y = _StepLengthY * position * ((orientation >> 1) & 1);
1908
+
1909
+ if ($Jssor$.$IsBrowserChrome() && $Jssor$.$BrowserVersion() < 38) {
1910
+ x = x.toFixed(3);
1911
+ y = y.toFixed(3);
1912
+ }
1913
+ else {
1914
+ x = Math.round(x);
1915
+ y = Math.round(y);
1916
+ }
1917
+
1918
+ if ($Jssor$.$IsBrowserIE() && $Jssor$.$BrowserVersion() >= 10 && $Jssor$.$BrowserVersion() < 11) {
1919
+ elmt.style.msTransform = "translate(" + x + "px, " + y + "px)";
1920
+ }
1921
+ else if ($Jssor$.$IsBrowserChrome() && $Jssor$.$BrowserVersion() >= 30 && $Jssor$.$BrowserVersion() < 34) {
1922
+ elmt.style.WebkitTransition = "transform 0s";
1923
+ elmt.style.WebkitTransform = "translate3d(" + x + "px, " + y + "px, 0px) perspective(2000px)";
1924
+ }
1925
+ else {
1926
+ $Jssor$.$CssLeft(elmt, x);
1927
+ $Jssor$.$CssTop(elmt, y);
1928
+ }
1929
+ }
1930
+
1931
+ //Event handling begin
1932
+
1933
+ function OnMouseDown(event) {
1934
+ var tagName = $Jssor$.$EventSrc(event).tagName;
1935
+ if (!_DragOrientationRegistered && tagName != "INPUT" && tagName != "TEXTAREA" && tagName != "SELECT" && RegisterDrag()) {
1936
+ OnDragStart(event);
1937
+ }
1938
+ }
1939
+
1940
+ function RecordFreezePoint() {
1941
+
1942
+ _CarouselPlaying_OnFreeze = _IsSliding;
1943
+ _PlayToPosition_OnFreeze = _CarouselPlayer.$GetPlayToPosition();
1944
+ _Position_OnFreeze = _Conveyor.$GetPosition();
1945
+
1946
+ }
1947
+
1948
+ function Freeze() {
1949
+
1950
+ RecordFreezePoint();
1951
+
1952
+ if (_IsDragging || !_NotOnHover && (_HoverToPause & 12)) {
1953
+ _CarouselPlayer.$Stop();
1954
+
1955
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_FREEZE);
1956
+ }
1957
+
1958
+ }
1959
+
1960
+ function Unfreeze(byDrag) {
1961
+
1962
+ byDrag && RecordFreezePoint();
1963
+
1964
+ if (!_IsDragging && (_NotOnHover || !(_HoverToPause & 12)) && !_CarouselPlayer.$IsPlaying()) {
1965
+
1966
+ var currentPosition = _Conveyor.$GetPosition();
1967
+ var toPosition = Math.ceil(_Position_OnFreeze);
1968
+
1969
+ if (byDrag && Math.abs(_DragOffsetTotal) >= _Options.$MinDragOffsetToSlide) {
1970
+ toPosition = Math.ceil(currentPosition);
1971
+ toPosition += _DragIndexAdjust;
1972
+ }
1973
+
1974
+ if (!(_Loop & 1)) {
1975
+ toPosition = Math.min(_SlideCount - _DisplayPieces, Math.max(toPosition, 0));
1976
+ }
1977
+
1978
+ var t = Math.abs(toPosition - currentPosition);
1979
+ t = 1 - Math.pow(1 - t, 5);
1980
+
1981
+ if (!_LastDragSucceded && _CarouselPlaying_OnFreeze) {
1982
+ _CarouselPlayer.$Continue(_PlayToPosition_OnFreeze);
1983
+ }
1984
+ else if (currentPosition == toPosition) {
1985
+ _CurrentSlideItem.$EnablePlayer();
1986
+ _CurrentSlideItem.$TryActivate();
1987
+ }
1988
+ else {
1989
+
1990
+ _CarouselPlayer.$PlayCarousel(currentPosition, toPosition, t * _SlideDuration);
1991
+ }
1992
+ }
1993
+ }
1994
+
1995
+ function OnDragStart(event) {
1996
+
1997
+ _IsDragging = true;
1998
+ _DragInvalid = false;
1999
+ _LoadingTicket = null;
2000
+
2001
+ $Jssor$.$AddEvent(document, _MoveEvent, OnDragMove);
2002
+
2003
+ _LastTimeMoveByDrag = $Jssor$.$GetNow() - 50;
2004
+
2005
+ _LastDragSucceded = 0;
2006
+ Freeze();
2007
+
2008
+ if (!_CarouselPlaying_OnFreeze)
2009
+ _DragOrientation = 0;
2010
+
2011
+ if (_HandleTouchEventOnly) {
2012
+ var touchPoint = event.touches[0];
2013
+ _DragStartMouseX = touchPoint.clientX;
2014
+ _DragStartMouseY = touchPoint.clientY;
2015
+ }
2016
+ else {
2017
+ var mousePoint = $Jssor$.$MousePosition(event);
2018
+
2019
+ _DragStartMouseX = mousePoint.x;
2020
+ _DragStartMouseY = mousePoint.y;
2021
+
2022
+ $Jssor$.$CancelEvent(event);
2023
+ }
2024
+
2025
+ _DragOffsetTotal = 0;
2026
+ _DragOffsetLastTime = 0;
2027
+ _DragIndexAdjust = 0;
2028
+
2029
+ //Trigger EVT_DRAGSTART
2030
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_DRAG_START, GetRealIndex(_Position_OnFreeze), _Position_OnFreeze, event);
2031
+ }
2032
+
2033
+ function OnDragMove(event) {
2034
+ if (_IsDragging && (!$Jssor$.$IsBrowserIe9Earlier() || event.button)) {
2035
+ var actionPoint;
2036
+
2037
+ if (_HandleTouchEventOnly) {
2038
+ var touches = event.touches;
2039
+ if (touches && touches.length > 0) {
2040
+ actionPoint = { x: touches[0].clientX, y: touches[0].clientY };
2041
+ }
2042
+ }
2043
+ else {
2044
+ actionPoint = $Jssor$.$MousePosition(event);
2045
+ }
2046
+
2047
+ if (actionPoint) {
2048
+ var distanceX = actionPoint.x - _DragStartMouseX;
2049
+ var distanceY = actionPoint.y - _DragStartMouseY;
2050
+
2051
+
2052
+ if (Math.floor(_Position_OnFreeze) != _Position_OnFreeze)
2053
+ _DragOrientation = _DragOrientation || (_PlayOrientation & _DragOrientationRegistered);
2054
+
2055
+ if ((distanceX || distanceY) && !_DragOrientation) {
2056
+ if (_DragOrientationRegistered == 3) {
2057
+ if (Math.abs(distanceY) > Math.abs(distanceX)) {
2058
+ _DragOrientation = 2;
2059
+ }
2060
+ else
2061
+ _DragOrientation = 1;
2062
+ }
2063
+ else {
2064
+ _DragOrientation = _DragOrientationRegistered;
2065
+ }
2066
+
2067
+ if (_IsTouchDevice && _DragOrientation == 1 && Math.abs(distanceY) - Math.abs(distanceX) > 3) {
2068
+ _DragInvalid = true;
2069
+ }
2070
+ }
2071
+
2072
+ if (_DragOrientation) {
2073
+ var distance = distanceY;
2074
+ var stepLength = _StepLengthY;
2075
+
2076
+ if (_DragOrientation == 1) {
2077
+ distance = distanceX;
2078
+ stepLength = _StepLengthX;
2079
+ }
2080
+
2081
+ if (!(_Loop & 1)) {
2082
+ if (distance > 0) {
2083
+ var normalDistance = stepLength * _CurrentSlideIndex;
2084
+ var sqrtDistance = distance - normalDistance;
2085
+ if (sqrtDistance > 0) {
2086
+ distance = normalDistance + Math.sqrt(sqrtDistance) * 5;
2087
+ }
2088
+ }
2089
+
2090
+ if (distance < 0) {
2091
+ var normalDistance = stepLength * (_SlideCount - _DisplayPieces - _CurrentSlideIndex);
2092
+ var sqrtDistance = -distance - normalDistance;
2093
+
2094
+ if (sqrtDistance > 0) {
2095
+ distance = -normalDistance - Math.sqrt(sqrtDistance) * 5;
2096
+ }
2097
+ }
2098
+ }
2099
+
2100
+ if (_DragOffsetTotal - _DragOffsetLastTime < -2) {
2101
+ _DragIndexAdjust = 0;
2102
+ }
2103
+ else if (_DragOffsetTotal - _DragOffsetLastTime > 2) {
2104
+ _DragIndexAdjust = -1;
2105
+ }
2106
+
2107
+ _DragOffsetLastTime = _DragOffsetTotal;
2108
+ _DragOffsetTotal = distance;
2109
+ _PositionToGoByDrag = _Position_OnFreeze - _DragOffsetTotal / stepLength / (_ScaleRatio || 1);
2110
+
2111
+ if (_DragOffsetTotal && _DragOrientation && !_DragInvalid) {
2112
+ $Jssor$.$CancelEvent(event);
2113
+ if (!_IsSliding) {
2114
+ _CarouselPlayer.$StandBy(_PositionToGoByDrag);
2115
+ }
2116
+ else
2117
+ _CarouselPlayer.$SetStandByPosition(_PositionToGoByDrag);
2118
+ }
2119
+ else if ($Jssor$.$IsBrowserIe9Earlier()) {
2120
+ $Jssor$.$CancelEvent(event);
2121
+ }
2122
+ }
2123
+ }
2124
+ }
2125
+ else {
2126
+ OnDragEnd(event);
2127
+ }
2128
+ }
2129
+
2130
+ function OnDragEnd(event) {
2131
+ UnregisterDrag();
2132
+
2133
+ if (_IsDragging) {
2134
+
2135
+ _IsDragging = false;
2136
+
2137
+ _LastTimeMoveByDrag = $Jssor$.$GetNow();
2138
+
2139
+ $Jssor$.$RemoveEvent(document, _MoveEvent, OnDragMove);
2140
+
2141
+ _LastDragSucceded = _DragOffsetTotal;
2142
+
2143
+ _LastDragSucceded && $Jssor$.$CancelEvent(event);
2144
+
2145
+ _CarouselPlayer.$Stop();
2146
+
2147
+ var currentPosition = _Conveyor.$GetPosition();
2148
+
2149
+ //Trigger EVT_DRAG_END
2150
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_DRAG_END, GetRealIndex(currentPosition), currentPosition, GetRealIndex(_Position_OnFreeze), _Position_OnFreeze, event);
2151
+
2152
+ Unfreeze(true);
2153
+ }
2154
+ }
2155
+ //Event handling end
2156
+
2157
+ function SetCurrentSlideIndex(index) {
2158
+ _PrevSlideItem = _SlideItems[_CurrentSlideIndex];
2159
+ _PreviousSlideIndex = _CurrentSlideIndex;
2160
+ _CurrentSlideIndex = GetRealIndex(index);
2161
+ _CurrentSlideItem = _SlideItems[_CurrentSlideIndex];
2162
+ ResetNavigator(index);
2163
+ return _CurrentSlideIndex;
2164
+ }
2165
+
2166
+ function OnPark(slideIndex, prevIndex) {
2167
+ _DragOrientation = 0;
2168
+
2169
+ SetCurrentSlideIndex(slideIndex);
2170
+
2171
+ //Trigger EVT_PARK
2172
+ _SelfSlider.$TriggerEvent(JssorSlider.$EVT_PARK, GetRealIndex(slideIndex), prevIndex);
2173
+ }
2174
+
2175
+ function ResetNavigator(index, temp) {
2176
+ _TempSlideIndex = index;
2177
+ $Jssor$.$Each(_Navigators, function (navigator) {
2178
+ navigator.$SetCurrentIndex(GetRealIndex(index), index, temp);
2179
+ });
2180
+ }
2181
+
2182
+ function RegisterDrag() {
2183
+ var dragRegistry = JssorSlider.$DragRegistry || 0;
2184
+ var dragOrientation = _DragEnabled;
2185
+ if (_IsTouchDevice)
2186
+ (dragOrientation & 1) && (dragOrientation &= 1);
2187
+ JssorSlider.$DragRegistry |= dragOrientation;
2188
+
2189
+ return (_DragOrientationRegistered = dragOrientation & ~dragRegistry);
2190
+ }
2191
+
2192
+ function UnregisterDrag() {
2193
+ if (_DragOrientationRegistered) {
2194
+ JssorSlider.$DragRegistry &= ~_DragEnabled;
2195
+ _DragOrientationRegistered = 0;
2196
+ }
2197
+ }
2198
+
2199
+ function CreatePanel() {
2200
+ var div = $Jssor$.$CreateDiv();
2201
+
2202
+ $Jssor$.$SetStyles(div, _StyleDef);
2203
+ $Jssor$.$CssPosition(div, "absolute");
2204
+
2205
+ return div;
2206
+ }
2207
+
2208
+ function GetRealIndex(index) {
2209
+ return (index % _SlideCount + _SlideCount) % _SlideCount;
2210
+ }
2211
+
2212
+ function IsCurrentSlideIndex(index) {
2213
+ return GetRealIndex(index) == _CurrentSlideIndex;
2214
+ }
2215
+
2216
+ function IsPreviousSlideIndex(index) {
2217
+ return GetRealIndex(index) == _PreviousSlideIndex;
2218
+ }
2219
+
2220
+ //Navigation Request Handler
2221
+ function NavigationClickHandler(index, relative) {
2222
+ if (relative) {
2223
+ if (!_Loop) {
2224
+ //Stop at threshold
2225
+ index = Math.min(Math.max(index + _TempSlideIndex, 0), _SlideCount - _DisplayPieces);
2226
+ relative = false;
2227
+ }
2228
+ else if (_Loop & 2) {
2229
+ //Rewind
2230
+ index = GetRealIndex(index + _TempSlideIndex);
2231
+ relative = false;
2232
+ }
2233
+ }
2234
+ PlayTo(index, _Options.$SlideDuration, relative);
2235
+ }
2236
+
2237
+ function ShowNavigators() {
2238
+ $Jssor$.$Each(_Navigators, function (navigator) {
2239
+ navigator.$Show(navigator.$Options.$ChanceToShow <= _NotOnHover);
2240
+ });
2241
+ }
2242
+
2243
+ function MainContainerMouseLeaveEventHandler() {
2244
+ if (!_NotOnHover) {
2245
+
2246
+ //$JssorDebug$.$Log("mouseleave");
2247
+
2248
+ _NotOnHover = 1;
2249
+
2250
+ ShowNavigators();
2251
+
2252
+ if (!_IsDragging) {
2253
+ (_HoverToPause & 12) && Unfreeze();
2254
+ (_HoverToPause & 3) && _SlideItems[_CurrentSlideIndex].$TryActivate();
2255
+ }
2256
+ }
2257
+ }
2258
+
2259
+ function MainContainerMouseEnterEventHandler() {
2260
+
2261
+ if (_NotOnHover) {
2262
+
2263
+ //$JssorDebug$.$Log("mouseenter");
2264
+
2265
+ _NotOnHover = 0;
2266
+
2267
+ ShowNavigators();
2268
+
2269
+ _IsDragging || !(_HoverToPause & 12) || Freeze();
2270
+ }
2271
+ }
2272
+
2273
+ function AdjustSlidesContainerSize() {
2274
+ _StyleDef = { $Width: _SlideWidth, $Height: _SlideHeight, $Top: 0, $Left: 0 };
2275
+
2276
+ $Jssor$.$Each(_SlideElmts, function (slideElmt, i) {
2277
+
2278
+ $Jssor$.$SetStyles(slideElmt, _StyleDef);
2279
+ $Jssor$.$CssPosition(slideElmt, "absolute");
2280
+ $Jssor$.$CssOverflow(slideElmt, "hidden");
2281
+
2282
+ $Jssor$.$HideElement(slideElmt);
2283
+ });
2284
+
2285
+ $Jssor$.$SetStyles(_LoadingContainer, _StyleDef);
2286
+ }
2287
+
2288
+ function PlayToOffset(offset, slideDuration) {
2289
+ PlayTo(offset, slideDuration, true);
2290
+ }
2291
+
2292
+ function PlayTo(slideIndex, slideDuration, relative) {
2293
+ /// <summary>
2294
+ /// PlayTo( slideIndex [, slideDuration] ); //Play slider to position 'slideIndex' within a period calculated base on 'slideDuration'.
2295
+ /// </summary>
2296
+ /// <param name="slideIndex" type="Number">
2297
+ /// slide slideIndex or position will be playing to
2298
+ /// </param>
2299
+ /// <param name="slideDuration" type="Number" optional="true">
2300
+ /// base slide duration in milliseconds to calculate the whole duration to complete this play request.
2301
+ /// default value is '$SlideDuration' value which is specified when initialize the slider.
2302
+ /// </param>
2303
+ /// http://msdn.microsoft.com/en-us/library/vstudio/bb385682.aspx
2304
+ /// http://msdn.microsoft.com/en-us/library/vstudio/hh542720.aspx
2305
+ if (_CarouselEnabled && (!_IsDragging || _Options.$NaviQuitDrag)) {
2306
+ _IsSliding = true;
2307
+ _IsDragging = false;
2308
+ _CarouselPlayer.$Stop();
2309
+
2310
+ {
2311
+ //Slide Duration
2312
+ if (slideDuration == undefined)
2313
+ slideDuration = _SlideDuration;
2314
+
2315
+ var positionDisplay = _Carousel.$GetPosition_Display();
2316
+ var positionTo = slideIndex;
2317
+ if (relative) {
2318
+ positionTo = positionDisplay + slideIndex;
2319
+ if (slideIndex > 0)
2320
+ positionTo = Math.ceil(positionTo);
2321
+ else
2322
+ positionTo = Math.floor(positionTo);
2323
+ }
2324
+
2325
+ if (!_Loop) {
2326
+ //Stop at threshold
2327
+ positionTo = Math.max(0, Math.min(positionTo, _SlideCount - _DisplayPieces));
2328
+ }
2329
+ else if (_Loop & 2) {
2330
+ //Rewind
2331
+ positionTo = GetRealIndex(positionTo);
2332
+ }
2333
+
2334
+ var positionOffset = (positionTo - positionDisplay) % _SlideCount;
2335
+ positionTo = positionDisplay + positionOffset;
2336
+
2337
+ var duration = positionDisplay == positionTo ? 0 : slideDuration * Math.abs(positionOffset);
2338
+ duration = Math.min(duration, slideDuration * _DisplayPieces * 1.5);
2339
+
2340
+ _CarouselPlayer.$PlayCarousel(positionDisplay, positionTo, duration || 1);
2341
+ }
2342
+ }
2343
+ }
2344
+
2345
+ //private functions
2346
+
2347
+ //member functions
2348
+
2349
+ _SelfSlider.$PlayTo = PlayTo;
2350
+
2351
+ _SelfSlider.$GoTo = function (slideIndex) {
2352
+ /// <summary>
2353
+ /// instance.$GoTo( slideIndex ); //Go to the specifed slide immediately with no play.
2354
+ /// </summary>
2355
+ PlayTo(slideIndex, 1);
2356
+ };
2357
+
2358
+ _SelfSlider.$Next = function () {
2359
+ /// <summary>
2360
+ /// instance.$Next(); //Play the slider to next slide.
2361
+ /// </summary>
2362
+ PlayToOffset(1);
2363
+ };
2364
+
2365
+ _SelfSlider.$Prev = function () {
2366
+ /// <summary>
2367
+ /// instance.$Prev(); //Play the slider to previous slide.
2368
+ /// </summary>
2369
+ PlayToOffset(-1);
2370
+ };
2371
+
2372
+ _SelfSlider.$Pause = function () {
2373
+ /// <summary>
2374
+ /// instance.$Pause(); //Pause the slider, prevent it from auto playing.
2375
+ /// </summary>
2376
+ _AutoPlay = false;
2377
+ };
2378
+
2379
+ _SelfSlider.$Play = function () {
2380
+ /// <summary>
2381
+ /// instance.$Play(); //Start auto play if the slider is currently paused.
2382
+ /// </summary>
2383
+ if (!_AutoPlay) {
2384
+ _AutoPlay = true;
2385
+ _SlideItems[_CurrentSlideIndex] && _SlideItems[_CurrentSlideIndex].$TryActivate();
2386
+ }
2387
+ };
2388
+
2389
+ _SelfSlider.$SetSlideshowTransitions = function (transitions) {
2390
+ /// <summary>
2391
+ /// instance.$SetSlideshowTransitions( transitions ); //Reset slideshow transitions for the slider.
2392
+ /// </summary>
2393
+ $JssorDebug$.$Execute(function () {
2394
+ if (!transitions || !transitions.length) {
2395
+ $JssorDebug$.$Error("Can not set slideshow transitions, no transitions specified.");
2396
+ }
2397
+ });
2398
+
2399
+ $Jssor$.$TranslateTransitions(transitions); //for old transition compatibility
2400
+ _Options.$SlideshowOptions.$Transitions = transitions;
2401
+ };
2402
+
2403
+ _SelfSlider.$SetCaptionTransitions = function (transitions) {
2404
+ /// <summary>
2405
+ /// instance.$SetCaptionTransitions( transitions ); //Reset caption transitions for the slider.
2406
+ /// </summary>
2407
+ $JssorDebug$.$Execute(function () {
2408
+ if (!transitions || !transitions.length) {
2409
+ $JssorDebug$.$Error("Can not set caption transitions, no transitions specified");
2410
+ }
2411
+ });
2412
+
2413
+ $Jssor$.$TranslateTransitions(transitions); //for old transition compatibility
2414
+ _CaptionSliderOptions.$CaptionTransitions = transitions;
2415
+ _CaptionSliderOptions.$Version = $Jssor$.$GetNow();
2416
+ };
2417
+
2418
+ _SelfSlider.$SlidesCount = function () {
2419
+ /// <summary>
2420
+ /// instance.$SlidesCount(); //Retrieve slides count of the slider.
2421
+ /// </summary>
2422
+ return _SlideElmts.length;
2423
+ };
2424
+
2425
+ _SelfSlider.$CurrentIndex = function () {
2426
+ /// <summary>
2427
+ /// instance.$CurrentIndex(); //Retrieve current slide index of the slider.
2428
+ /// </summary>
2429
+ return _CurrentSlideIndex;
2430
+ };
2431
+
2432
+ _SelfSlider.$IsAutoPlaying = function () {
2433
+ /// <summary>
2434
+ /// instance.$IsAutoPlaying(); //Retrieve auto play status of the slider.
2435
+ /// </summary>
2436
+ return _AutoPlay;
2437
+ };
2438
+
2439
+ _SelfSlider.$IsDragging = function () {
2440
+ /// <summary>
2441
+ /// instance.$IsDragging(); //Retrieve drag status of the slider.
2442
+ /// </summary>
2443
+ return _IsDragging;
2444
+ };
2445
+
2446
+ _SelfSlider.$IsSliding = function () {
2447
+ /// <summary>
2448
+ /// instance.$IsSliding(); //Retrieve right<-->left sliding status of the slider.
2449
+ /// </summary>
2450
+ return _IsSliding;
2451
+ };
2452
+
2453
+ _SelfSlider.$IsMouseOver = function () {
2454
+ /// <summary>
2455
+ /// instance.$IsMouseOver(); //Retrieve mouse over status of the slider.
2456
+ /// </summary>
2457
+ return !_NotOnHover;
2458
+ };
2459
+
2460
+ _SelfSlider.$LastDragSucceded = function () {
2461
+ /// <summary>
2462
+ /// instance.$IsLastDragSucceded(); //Retrieve last drag succeded status, returns 0 if failed, returns drag offset if succeded
2463
+ /// </summary>
2464
+ return _LastDragSucceded;
2465
+ };
2466
+
2467
+ function OriginalWidth() {
2468
+ /// <summary>
2469
+ /// instance.$OriginalWidth(); //Retrieve original width of the slider.
2470
+ /// </summary>
2471
+ return $Jssor$.$CssWidth(_ScaleWrapper || elmt);
2472
+ }
2473
+
2474
+ function OriginalHeight() {
2475
+ /// <summary>
2476
+ /// instance.$OriginalHeight(); //Retrieve original height of the slider.
2477
+ /// </summary>
2478
+ return $Jssor$.$CssHeight(_ScaleWrapper || elmt);
2479
+ }
2480
+
2481
+ _SelfSlider.$OriginalWidth = _SelfSlider.$GetOriginalWidth = OriginalWidth;
2482
+
2483
+ _SelfSlider.$OriginalHeight = _SelfSlider.$GetOriginalHeight = OriginalHeight;
2484
+
2485
+ function Scale(dimension, isHeight) {
2486
+ /// <summary>
2487
+ /// instance.$ScaleWidth(); //Retrieve scaled dimension the slider currently displays.
2488
+ /// instance.$ScaleWidth( dimension ); //Scale the slider to new width and keep aspect ratio.
2489
+ /// </summary>
2490
+
2491
+ if (dimension == undefined)
2492
+ return $Jssor$.$CssWidth(elmt);
2493
+
2494
+ $JssorDebug$.$Execute(function () {
2495
+ if (!dimension || dimension < 0) {
2496
+ $JssorDebug$.$Fail("'$ScaleWidth' error, 'dimension' should be positive value.");
2497
+ }
2498
+ });
2499
+
2500
+ if (!_ScaleWrapper) {
2501
+ $JssorDebug$.$Execute(function () {
2502
+ var originalWidthStr = $Jssor$.$Css(elmt, "width");
2503
+ var originalHeightStr = $Jssor$.$Css(elmt, "height");
2504
+ var originalWidth = $Jssor$.$CssP(elmt, "width");
2505
+ var originalHeight = $Jssor$.$CssP(elmt, "height");
2506
+
2507
+ if (!originalWidthStr) {
2508
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not specified. Please specify 'dimension' in pixel. e.g. 'dimension: 600px;'");
2509
+ }
2510
+
2511
+ if (!originalHeightStr) {
2512
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not specified. Please specify 'height' in pixel. e.g. 'height: 300px;'");
2513
+ }
2514
+
2515
+ if (originalWidthStr.indexOf('%') != -1) {
2516
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not valid. Please specify 'dimension' in pixel. e.g. 'dimension: 600px;'");
2517
+ }
2518
+
2519
+ if (originalHeightStr.indexOf('%') != -1) {
2520
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not valid. Please specify 'height' in pixel. e.g. 'height: 300px;'");
2521
+ }
2522
+
2523
+ if (!originalWidth) {
2524
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not valid. 'dimension' of 'outer container' should be positive number. e.g. 'dimension: 600px;'");
2525
+ }
2526
+
2527
+ if (!originalHeight) {
2528
+ $JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not valid. 'height' of 'outer container' should be positive number. e.g. 'height: 300px;'");
2529
+ }
2530
+ });
2531
+
2532
+ var innerWrapper = $Jssor$.$CreateDiv(document);
2533
+ $Jssor$.$ClassName(innerWrapper, $Jssor$.$ClassName(elmt));
2534
+ $Jssor$.$CssCssText(innerWrapper, $Jssor$.$CssCssText(elmt));
2535
+ $Jssor$.$CssDisplay(innerWrapper, "block");
2536
+
2537
+ $Jssor$.$CssPosition(innerWrapper, "relative");
2538
+ $Jssor$.$CssTop(innerWrapper, 0);
2539
+ $Jssor$.$CssLeft(innerWrapper, 0);
2540
+ $Jssor$.$CssOverflow(innerWrapper, "visible");
2541
+
2542
+ _ScaleWrapper = $Jssor$.$CreateDiv(document);
2543
+
2544
+ $Jssor$.$CssPosition(_ScaleWrapper, "absolute");
2545
+ $Jssor$.$CssTop(_ScaleWrapper, 0);
2546
+ $Jssor$.$CssLeft(_ScaleWrapper, 0);
2547
+ $Jssor$.$CssWidth(_ScaleWrapper, $Jssor$.$CssWidth(elmt));
2548
+ $Jssor$.$CssHeight(_ScaleWrapper, $Jssor$.$CssHeight(elmt));
2549
+ $Jssor$.$SetStyleTransformOrigin(_ScaleWrapper, "0 0");
2550
+
2551
+ $Jssor$.$AppendChild(_ScaleWrapper, innerWrapper);
2552
+
2553
+ var children = $Jssor$.$Children(elmt);
2554
+ $Jssor$.$AppendChild(elmt, _ScaleWrapper);
2555
+
2556
+ $Jssor$.$Css(elmt, "backgroundImage", "");
2557
+
2558
+ var noMoveElmts = {
2559
+ "navigator": _BulletNavigatorOptions && _BulletNavigatorOptions.$Scale == false,
2560
+ "arrowleft": _ArrowNavigatorOptions && _ArrowNavigatorOptions.$Scale == false,
2561
+ "arrowright": _ArrowNavigatorOptions && _ArrowNavigatorOptions.$Scale == false,
2562
+ "thumbnavigator": _ThumbnailNavigatorOptions && _ThumbnailNavigatorOptions.$Scale == false,
2563
+ "thumbwrapper": _ThumbnailNavigatorOptions && _ThumbnailNavigatorOptions.$Scale == false
2564
+ };
2565
+
2566
+ $Jssor$.$Each(children, function (child) {
2567
+ $Jssor$.$AppendChild(noMoveElmts[$Jssor$.$AttributeEx(child, "u")] ? elmt : innerWrapper, child);
2568
+ });
2569
+ }
2570
+
2571
+ $JssorDebug$.$Execute(function () {
2572
+ if (!_InitialScrollWidth) {
2573
+ _InitialScrollWidth = _SelfSlider.$Elmt.scrollWidth;
2574
+ }
2575
+ });
2576
+
2577
+ _ScaleRatio = dimension / (isHeight? $Jssor$.$CssHeight : $Jssor$.$CssWidth)(_ScaleWrapper);
2578
+ $Jssor$.$CssScale(_ScaleWrapper, _ScaleRatio);
2579
+
2580
+ var scaleWidth = isHeight ? (_ScaleRatio * OriginalWidth()) : dimension;
2581
+ var scaleHeight = isHeight ? dimension : (_ScaleRatio * OriginalHeight());
2582
+
2583
+ $Jssor$.$CssWidth(elmt, scaleWidth);
2584
+ $Jssor$.$CssHeight(elmt, scaleHeight);
2585
+
2586
+ $Jssor$.$Each(_Navigators, function (navigator) {
2587
+ navigator.$Relocate(scaleWidth, scaleHeight);
2588
+ });
2589
+ }
2590
+
2591
+ _SelfSlider.$ScaleHeight = _SelfSlider.$GetScaleHeight = function (height) {
2592
+ /// <summary>
2593
+ /// instance.$ScaleHeight(); //Retrieve scaled height the slider currently displays.
2594
+ /// instance.$ScaleHeight( dimension ); //Scale the slider to new height and keep aspect ratio.
2595
+ /// </summary>
2596
+
2597
+ if (height == undefined)
2598
+ return $Jssor$.$CssHeight(elmt);
2599
+
2600
+ Scale(height, true);
2601
+ };
2602
+
2603
+ _SelfSlider.$ScaleWidth = _SelfSlider.$SetScaleWidth = _SelfSlider.$GetScaleWidth = Scale;
2604
+
2605
+ _SelfSlider.$GetVirtualIndex = function (index) {
2606
+ var parkingIndex = Math.ceil(GetRealIndex(_ParkingPosition / _StepLength));
2607
+ var displayIndex = GetRealIndex(index - _CurrentSlideIndex + parkingIndex);
2608
+
2609
+ if (displayIndex > _DisplayPieces) {
2610
+ if (index - _CurrentSlideIndex > _SlideCount / 2)
2611
+ index -= _SlideCount;
2612
+ else if (index - _CurrentSlideIndex <= -_SlideCount / 2)
2613
+ index += _SlideCount;
2614
+ }
2615
+ else {
2616
+ index = _CurrentSlideIndex + displayIndex - parkingIndex;
2617
+ }
2618
+
2619
+ return index;
2620
+ };
2621
+
2622
+ //member functions
2623
+
2624
+ $JssorObject$.call(_SelfSlider);
2625
+
2626
+ $JssorDebug$.$Execute(function () {
2627
+ var outerContainerElmt = $Jssor$.$GetElement(elmt);
2628
+ if (!outerContainerElmt)
2629
+ $JssorDebug$.$Fail("Outer container '" + elmt + "' not found.");
2630
+ });
2631
+
2632
+ //initialize member variables
2633
+ _SelfSlider.$Elmt = elmt = $Jssor$.$GetElement(elmt);
2634
+ //initialize member variables
2635
+
2636
+ var _InitialScrollWidth; //for debug only
2637
+ var _CaptionSliderCount = 1; //for debug only
2638
+
2639
+ var _Options = $Jssor$.$Extend({
2640
+ $FillMode: 0, //[Optional] The way to fill image in slide, 0 stretch, 1 contain (keep aspect ratio and put all inside slide), 2 cover (keep aspect ratio and cover whole slide), 4 actual size, 5 contain for large image, actual size for small image, default value is 0
2641
+ $LazyLoading: 1, //[Optional] For image with lazy loading format (<IMG src2="url" .../>), by default it will be loaded only when the slide comes.
2642
+ //But an integer value (maybe 0, 1, 2 or 3) indicates that how far of nearby slides should be loaded immediately as well, default value is 1.
2643
+ $StartIndex: 0, //[Optional] Index of slide to display when initialize, default value is 0
2644
+ $AutoPlay: false, //[Optional] Whether to auto play, default value is false
2645
+ $Loop: 1, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
2646
+ $HWA: true, //[Optional] Enable hardware acceleration or not, default value is true
2647
+ $NaviQuitDrag: true,
2648
+ $AutoPlaySteps: 1, //[Optional] Steps to go of every play (this options applys only when slideshow disabled), default value is 1
2649
+ $AutoPlayInterval: 3000, //[Optional] Interval to play next slide since the previous stopped if a slideshow is auto playing, default value is 3000
2650
+ $PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
2651
+
2652
+ $SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 400
2653
+ $SlideEasing: $JssorEasing$.$EaseOutQuad, //[Optional] Specifies easing for right to left animation, default value is $JssorEasing$.$EaseOutQuad
2654
+ $MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset that trigger slide, default value is 20
2655
+ $SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
2656
+ $DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), default value is 1
2657
+ $ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
2658
+ $UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is recursive) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc.
2659
+ $PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
2660
+ $DragOrientation: 1 //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 both, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
2661
+
2662
+ }, options);
2663
+
2664
+ //Sodo statement for development time intellisence only
2665
+ $JssorDebug$.$Execute(function () {
2666
+ _Options = $Jssor$.$Extend({
2667
+ $ArrowKeyNavigation: undefined,
2668
+ $SlideWidth: undefined,
2669
+ $SlideHeight: undefined,
2670
+ $SlideshowOptions: undefined,
2671
+ $CaptionSliderOptions: undefined,
2672
+ $BulletNavigatorOptions: undefined,
2673
+ $ArrowNavigatorOptions: undefined,
2674
+ $ThumbnailNavigatorOptions: undefined
2675
+ },
2676
+ _Options);
2677
+ });
2678
+
2679
+ var _PlayOrientation = _Options.$PlayOrientation & 3;
2680
+ var _PlayReverse = (_Options.$PlayOrientation & 4) / -4 || 1;
2681
+
2682
+ var _SlideshowOptions = _Options.$SlideshowOptions;
2683
+ var _CaptionSliderOptions = $Jssor$.$Extend({ $Class: $JssorCaptionSliderBase$, $PlayInMode: 1, $PlayOutMode: 1 }, _Options.$CaptionSliderOptions);
2684
+ $Jssor$.$TranslateTransitions(_CaptionSliderOptions.$CaptionTransitions); //for old transition compatibility
2685
+ var _BulletNavigatorOptions = _Options.$BulletNavigatorOptions;
2686
+ var _ArrowNavigatorOptions = _Options.$ArrowNavigatorOptions;
2687
+ var _ThumbnailNavigatorOptions = _Options.$ThumbnailNavigatorOptions;
2688
+
2689
+ $JssorDebug$.$Execute(function () {
2690
+ if (_SlideshowOptions && !_SlideshowOptions.$Class) {
2691
+ $JssorDebug$.$Fail("Option $SlideshowOptions error, class not specified.");
2692
+ }
2693
+ });
2694
+
2695
+ $JssorDebug$.$Execute(function () {
2696
+ if (_Options.$CaptionSliderOptions && !_Options.$CaptionSliderOptions.$Class) {
2697
+ $JssorDebug$.$Fail("Option $CaptionSliderOptions error, class not specified.");
2698
+ }
2699
+ });
2700
+
2701
+ $JssorDebug$.$Execute(function () {
2702
+ if (_BulletNavigatorOptions && !_BulletNavigatorOptions.$Class) {
2703
+ $JssorDebug$.$Fail("Option $BulletNavigatorOptions error, class not specified.");
2704
+ }
2705
+ });
2706
+
2707
+ $JssorDebug$.$Execute(function () {
2708
+ if (_ArrowNavigatorOptions && !_ArrowNavigatorOptions.$Class) {
2709
+ $JssorDebug$.$Fail("Option $ArrowNavigatorOptions error, class not specified.");
2710
+ }
2711
+ });
2712
+
2713
+ $JssorDebug$.$Execute(function () {
2714
+ if (_ThumbnailNavigatorOptions && !_ThumbnailNavigatorOptions.$Class) {
2715
+ $JssorDebug$.$Fail("Option $ThumbnailNavigatorOptions error, class not specified.");
2716
+ }
2717
+ });
2718
+
2719
+ var _UISearchNoDeep = !_Options.$UISearchMode;
2720
+ var _ScaleWrapper;
2721
+ var _SlidesContainer = $Jssor$.$FindChild(elmt, "slides", _UISearchNoDeep);
2722
+ var _LoadingContainer = $Jssor$.$FindChild(elmt, "loading", _UISearchNoDeep) || $Jssor$.$CreateDiv(document);
2723
+
2724
+ var _BulletNavigatorContainer = $Jssor$.$FindChild(elmt, "navigator", _UISearchNoDeep);
2725
+
2726
+ var _ArrowLeft = $Jssor$.$FindChild(elmt, "arrowleft", _UISearchNoDeep);
2727
+ var _ArrowRight = $Jssor$.$FindChild(elmt, "arrowright", _UISearchNoDeep);
2728
+
2729
+ var _ThumbnailNavigatorContainer = $Jssor$.$FindChild(elmt, "thumbnavigator", _UISearchNoDeep);
2730
+
2731
+ $JssorDebug$.$Execute(function () {
2732
+ //if (_BulletNavigatorOptions && !_BulletNavigatorContainer) {
2733
+ // throw new Error("$BulletNavigatorOptions specified but bullet navigator container (<div u=\"navigator\" ...) not defined.");
2734
+ //}
2735
+ if (_BulletNavigatorContainer && !_BulletNavigatorOptions) {
2736
+ throw new Error("Bullet navigator container defined but $BulletNavigatorOptions not specified.");
2737
+ }
2738
+
2739
+ //if (_ArrowNavigatorOptions) {
2740
+ // if (!_ArrowLeft) {
2741
+ // throw new Error("$ArrowNavigatorOptions specified, but arrowleft (<span u=\"arrowleft\" ...) not defined.");
2742
+ // }
2743
+
2744
+ // if (!_ArrowRight) {
2745
+ // throw new Error("$ArrowNavigatorOptions specified, but arrowright (<span u=\"arrowright\" ...) not defined.");
2746
+ // }
2747
+ //}
2748
+
2749
+ if ((_ArrowLeft || _ArrowRight) && !_ArrowNavigatorOptions) {
2750
+ throw new Error("arrowleft or arrowright defined, but $ArrowNavigatorOptions not specified.");
2751
+ }
2752
+
2753
+ //if (_ThumbnailNavigatorOptions && !_ThumbnailNavigatorContainer) {
2754
+ // throw new Error("$ThumbnailNavigatorOptions specified, but thumbnail navigator container (<div u=\"thumbnavigator\" ...) not defined.");
2755
+ //}
2756
+
2757
+ if (_ThumbnailNavigatorContainer && !_ThumbnailNavigatorOptions) {
2758
+ throw new Error("Thumbnail navigator container defined, but $ThumbnailNavigatorOptions not specified.");
2759
+ }
2760
+ });
2761
+
2762
+ var _SlidesContainerWidth = $Jssor$.$CssWidth(_SlidesContainer);
2763
+ var _SlidesContainerHeight = $Jssor$.$CssHeight(_SlidesContainer);
2764
+
2765
+ $JssorDebug$.$Execute(function () {
2766
+ if (isNaN(_SlidesContainerWidth))
2767
+ $JssorDebug$.$Fail("Width of slides container wrong specification, it should be specified in pixel (like style='width: 600px;').");
2768
+
2769
+ if (_SlidesContainerWidth == undefined)
2770
+ $JssorDebug$.$Fail("Width of slides container not specified, it should be specified in pixel (like style='width: 600px;').");
2771
+
2772
+ if (isNaN(_SlidesContainerHeight))
2773
+ $JssorDebug$.$Fail("Height of slides container wrong specification, it should be specified in pixel (like style='height: 300px;').");
2774
+
2775
+ if (_SlidesContainerHeight == undefined)
2776
+ $JssorDebug$.$Fail("Height of slides container not specified, it should be specified in pixel (like style='height: 300px;').");
2777
+
2778
+ var slidesContainerOverflow = $Jssor$.$CssOverflow(_SlidesContainer);
2779
+ var slidesContainerOverflowX = $Jssor$.$Css(_SlidesContainer, "overflowX");
2780
+ var slidesContainerOverflowY = $Jssor$.$Css(_SlidesContainer, "overflowY");
2781
+ if (slidesContainerOverflow != "hidden" && (slidesContainerOverflowX != "hidden" || slidesContainerOverflowY != "hidden"))
2782
+ $JssorDebug$.$Fail("Overflow of slides container wrong specification, it should be specified as 'hidden' (style='overflow:hidden;').");
2783
+
2784
+ //var slidesContainerTop = $Jssor$.$CssTop(_SlidesContainer);
2785
+ //var slidesContainerLeft = $Jssor$.$CssLeft(_SlidesContainer);
2786
+
2787
+ //if (isNaN(slidesContainerTop))
2788
+ // $JssorDebug$.$Fail("Top of slides container wrong specification, it should be specified in pixel (like style='top: 0px;').");
2789
+
2790
+ //if (slidesContainerTop == undefined)
2791
+ // $JssorDebug$.$Fail("Top of slides container not specified, it should be specified in pixel (like style='top: 0px;').");
2792
+
2793
+ //if (isNaN(slidesContainerLeft))
2794
+ // $JssorDebug$.$Fail("Left of slides container wrong specification, it should be specified in pixel (like style='left: 0px;').");
2795
+
2796
+ //if (slidesContainerLeft == undefined)
2797
+ // $JssorDebug$.$Fail("Left of slides container not specified, it should be specified in pixel (like style='left: 0px;').");
2798
+ });
2799
+
2800
+ $JssorDebug$.$Execute(function () {
2801
+ if (!$Jssor$.$IsNumeric(_Options.$DisplayPieces))
2802
+ $JssorDebug$.$Fail("Option $DisplayPieces error, it should be a numeric value and greater than or equal to 1.");
2803
+
2804
+ if (_Options.$DisplayPieces < 1)
2805
+ $JssorDebug$.$Fail("Option $DisplayPieces error, it should be greater than or equal to 1.");
2806
+
2807
+ if (_Options.$DisplayPieces > 1 && _Options.$DragOrientation && _Options.$DragOrientation != _PlayOrientation)
2808
+ $JssorDebug$.$Fail("Option $DragOrientation error, it should be 0 or the same of $PlayOrientation when $DisplayPieces is greater than 1.");
2809
+
2810
+ if (!$Jssor$.$IsNumeric(_Options.$ParkingPosition))
2811
+ $JssorDebug$.$Fail("Option $ParkingPosition error, it should be a numeric value.");
2812
+
2813
+ if (_Options.$ParkingPosition && _Options.$DragOrientation && _Options.$DragOrientation != _PlayOrientation)
2814
+ $JssorDebug$.$Fail("Option $DragOrientation error, it should be 0 or the same of $PlayOrientation when $ParkingPosition is not equal to 0.");
2815
+ });
2816
+
2817
+ var _StyleDef;
2818
+
2819
+ var _SlideElmts = [];
2820
+
2821
+ {
2822
+ var slideElmts = $Jssor$.$Children(_SlidesContainer);
2823
+ $Jssor$.$Each(slideElmts, function (slideElmt) {
2824
+ if (slideElmt.tagName == "DIV" && !$Jssor$.$AttributeEx(slideElmt, "u")) {
2825
+ _SlideElmts.push(slideElmt);
2826
+ }
2827
+ });
2828
+ }
2829
+
2830
+ $JssorDebug$.$Execute(function () {
2831
+ if (_SlideElmts.length < 1) {
2832
+ $JssorDebug$.$Error("Slides html code definition error, there must be at least 1 slide to initialize a slider.");
2833
+ }
2834
+ });
2835
+
2836
+ var _SlideItemCreatedCount = 0; //for debug only
2837
+ var _SlideItemReleasedCount = 0; //for debug only
2838
+
2839
+ var _PreviousSlideIndex;
2840
+ var _CurrentSlideIndex = -1;
2841
+ var _TempSlideIndex;
2842
+ var _PrevSlideItem;
2843
+ var _CurrentSlideItem;
2844
+ var _SlideCount = _SlideElmts.length;
2845
+
2846
+ var _SlideWidth = _Options.$SlideWidth || _SlidesContainerWidth;
2847
+ var _SlideHeight = _Options.$SlideHeight || _SlidesContainerHeight;
2848
+
2849
+ var _SlideSpacing = _Options.$SlideSpacing;
2850
+ var _StepLengthX = _SlideWidth + _SlideSpacing;
2851
+ var _StepLengthY = _SlideHeight + _SlideSpacing;
2852
+ var _StepLength = (_PlayOrientation & 1) ? _StepLengthX : _StepLengthY;
2853
+ var _DisplayPieces = Math.min(_Options.$DisplayPieces, _SlideCount);
2854
+
2855
+ var _SlideshowPanel;
2856
+ var _CurrentBoardIndex = 0;
2857
+ var _DragOrientation;
2858
+ var _DragOrientationRegistered;
2859
+ var _DragInvalid;
2860
+
2861
+ var _HandleTouchEventOnly;
2862
+ var _IsTouchDevice;
2863
+
2864
+ var _Navigators = [];
2865
+ var _BulletNavigator;
2866
+ var _ArrowNavigator;
2867
+ var _ThumbnailNavigator;
2868
+
2869
+ var _ShowLink;
2870
+
2871
+ var _Frozen;
2872
+ var _AutoPlay;
2873
+ var _AutoPlaySteps = _Options.$AutoPlaySteps;
2874
+ var _HoverToPause = _Options.$PauseOnHover;
2875
+ var _AutoPlayInterval = _Options.$AutoPlayInterval;
2876
+ var _SlideDuration = _Options.$SlideDuration;
2877
+
2878
+ var _SlideshowRunnerClass;
2879
+ var _TransitionsOrder;
2880
+
2881
+ var _SlideshowEnabled;
2882
+ var _ParkingPosition;
2883
+ var _CarouselEnabled = _DisplayPieces < _SlideCount;
2884
+ var _Loop = _CarouselEnabled ? _Options.$Loop : 0;
2885
+
2886
+ var _DragEnabled;
2887
+ var _LastDragSucceded;
2888
+
2889
+ var _NotOnHover = 1; //0 Hovering, 1 Not hovering
2890
+
2891
+ //Variable Definition
2892
+ var _IsSliding;
2893
+ var _IsDragging;
2894
+ var _LoadingTicket;
2895
+
2896
+ //The X position of mouse/touch when a drag start
2897
+ var _DragStartMouseX = 0;
2898
+ //The Y position of mouse/touch when a drag start
2899
+ var _DragStartMouseY = 0;
2900
+ var _DragOffsetTotal;
2901
+ var _DragOffsetLastTime;
2902
+ var _DragIndexAdjust;
2903
+
2904
+ var _Carousel;
2905
+ var _Conveyor;
2906
+ var _Slideshow;
2907
+ var _CarouselPlayer;
2908
+ var _SlideContainer = new SlideContainer();
2909
+ var _ScaleRatio;
2910
+
2911
+ //$JssorSlider$ Constructor
2912
+ {
2913
+ _AutoPlay = _Options.$AutoPlay;
2914
+ _SelfSlider.$Options = options;
2915
+
2916
+ AdjustSlidesContainerSize();
2917
+
2918
+ elmt["jssor-slider"] = true;
2919
+
2920
+ //_SlideshowPanel = CreatePanel();
2921
+ //$Jssor$.$CssZIndex(elmt, $Jssor$.$CssZIndex(elmt));
2922
+ //$Jssor$.$CssLeft(_SlideshowPanel, $Jssor$.$CssLeft(_SlidesContainer));
2923
+ //$Jssor$.$CssZIndex(_SlidesContainer, $Jssor$.$CssZIndex(_SlidesContainer));
2924
+ //$Jssor$.$CssTop(_SlideshowPanel, $Jssor$.$CssTop(_SlidesContainer));
2925
+ $Jssor$.$CssZIndex(_SlidesContainer, $Jssor$.$CssZIndex(_SlidesContainer) || 0);
2926
+ $Jssor$.$CssPosition(_SlidesContainer, "absolute");
2927
+ _SlideshowPanel = $Jssor$.$CloneNode(_SlidesContainer, true);
2928
+ $Jssor$.$InsertBefore($Jssor$.$ParentNode(_SlidesContainer), _SlideshowPanel, _SlidesContainer);
2929
+
2930
+ if (_SlideshowOptions) {
2931
+ _ShowLink = _SlideshowOptions.$ShowLink;
2932
+ _SlideshowRunnerClass = _SlideshowOptions.$Class;
2933
+
2934
+ $JssorDebug$.$Execute(function () {
2935
+ if (!_SlideshowOptions.$Transitions || !_SlideshowOptions.$Transitions.length) {
2936
+ $JssorDebug$.$Error("Invalid '$SlideshowOptions', no '$Transitions' specified.");
2937
+ }
2938
+ });
2939
+
2940
+ $Jssor$.$TranslateTransitions(_SlideshowOptions.$Transitions); //for old transition compatibility
2941
+
2942
+ _SlideshowEnabled = _DisplayPieces == 1 && _SlideCount > 1 && _SlideshowRunnerClass && (!$Jssor$.$IsBrowserIE() || $Jssor$.$BrowserVersion() >= 8);
2943
+ }
2944
+
2945
+ _ParkingPosition = (_SlideshowEnabled || _DisplayPieces >= _SlideCount || !(_Loop & 1)) ? 0 : _Options.$ParkingPosition;
2946
+
2947
+ _DragEnabled = ((_DisplayPieces > 1 || _ParkingPosition) ? _PlayOrientation : -1) & _Options.$DragOrientation;
2948
+
2949
+ //SlideBoard
2950
+ var _SlideboardElmt = _SlidesContainer;
2951
+ var _SlideItems = [];
2952
+
2953
+ var _SlideshowRunner;
2954
+ var _LinkContainer;
2955
+
2956
+ var _DownEvent = "mousedown";
2957
+ var _MoveEvent = "mousemove";
2958
+ var _UpEvent = "mouseup";
2959
+ var _CancelEvent;
2960
+
2961
+ var _LastTimeMoveByDrag;
2962
+ var _Position_OnFreeze;
2963
+ var _CarouselPlaying_OnFreeze;
2964
+ var _PlayToPosition_OnFreeze;
2965
+ var _PositionToGoByDrag;
2966
+
2967
+ //SlideBoard Constructor
2968
+ {
2969
+ var msPrefix;
2970
+ if (window.navigator.pointerEnabled || (msPrefix = window.navigator.msPointerEnabled)) {
2971
+ _IsTouchDevice = true;
2972
+
2973
+ _DownEvent = msPrefix ? "MSPointerDown" : "pointerdown";
2974
+ _MoveEvent = msPrefix ? "MSPointerMove" : "pointermove";
2975
+ _UpEvent = msPrefix ? "MSPointerUp" : "pointerup";
2976
+ _CancelEvent = msPrefix ? "MSPointerCancel" : "pointercancel";
2977
+
2978
+ if (_DragEnabled) {
2979
+ var touchAction = "auto";
2980
+ if (_DragEnabled == 2) {
2981
+ touchAction = "pan-x";
2982
+ }
2983
+ else if (_DragEnabled) {
2984
+ touchAction = "pan-y";
2985
+ }
2986
+
2987
+ $Jssor$.$Css(_SlideboardElmt, msPrefix ? "msTouchAction" : "touchAction", touchAction);
2988
+ }
2989
+ }
2990
+ else if ("ontouchstart" in window || "createTouch" in document) {
2991
+ _HandleTouchEventOnly = true;
2992
+ _IsTouchDevice = true;
2993
+
2994
+ _DownEvent = "touchstart";
2995
+ _MoveEvent = "touchmove";
2996
+ _UpEvent = "touchend";
2997
+ _CancelEvent = "touchcancel";
2998
+ }
2999
+
3000
+ _Slideshow = new Slideshow();
3001
+
3002
+ if (_SlideshowEnabled)
3003
+ _SlideshowRunner = new _SlideshowRunnerClass(_SlideContainer, _SlideWidth, _SlideHeight, _SlideshowOptions, _HandleTouchEventOnly);
3004
+
3005
+ $Jssor$.$AppendChild(_SlideshowPanel, _Slideshow.$Wrapper);
3006
+ $Jssor$.$CssOverflow(_SlidesContainer, "hidden");
3007
+
3008
+ //link container
3009
+ {
3010
+ _LinkContainer = CreatePanel();
3011
+ $Jssor$.$Css(_LinkContainer, "backgroundColor", "#000");
3012
+ $Jssor$.$CssOpacity(_LinkContainer, 0);
3013
+ $Jssor$.$InsertBefore(_SlideboardElmt, _LinkContainer, _SlideboardElmt.firstChild);
3014
+ }
3015
+
3016
+ for (var i = 0; i < _SlideElmts.length; i++) {
3017
+ var slideElmt = _SlideElmts[i];
3018
+ var slideItem = new SlideItem(slideElmt, i);
3019
+ _SlideItems.push(slideItem);
3020
+ }
3021
+
3022
+ $Jssor$.$HideElement(_LoadingContainer);
3023
+
3024
+ $JssorDebug$.$Execute(function () {
3025
+ $Jssor$.$Attribute(_LoadingContainer, "debug-id", "loading-container");
3026
+ });
3027
+
3028
+ _Carousel = new Carousel()
3029
+ _CarouselPlayer = new CarouselPlayer(_Carousel, _Slideshow);
3030
+
3031
+ $JssorDebug$.$Execute(function () {
3032
+ $Jssor$.$Attribute(_SlideboardElmt, "debug-id", "slide-board");
3033
+ });
3034
+
3035
+ if (_DragEnabled) {
3036
+ $Jssor$.$AddEvent(_SlidesContainer, _DownEvent, OnMouseDown);
3037
+ $Jssor$.$AddEvent(document, _UpEvent, OnDragEnd);
3038
+ _CancelEvent && $Jssor$.$AddEvent(document, _CancelEvent, OnDragEnd);
3039
+ }
3040
+ }
3041
+ //SlideBoard
3042
+
3043
+ _HoverToPause &= (_IsTouchDevice ? 10 : 5);
3044
+
3045
+ //Bullet Navigator
3046
+ if (_BulletNavigatorContainer && _BulletNavigatorOptions) {
3047
+ _BulletNavigator = new _BulletNavigatorOptions.$Class(_BulletNavigatorContainer, _BulletNavigatorOptions, OriginalWidth(), OriginalHeight());
3048
+ _Navigators.push(_BulletNavigator);
3049
+ }
3050
+
3051
+ //Arrow Navigator
3052
+ if (_ArrowNavigatorOptions && _ArrowLeft && _ArrowRight) {
3053
+ _ArrowNavigator = new _ArrowNavigatorOptions.$Class(_ArrowLeft, _ArrowRight, _ArrowNavigatorOptions, OriginalWidth(), OriginalHeight());
3054
+ _Navigators.push(_ArrowNavigator);
3055
+ }
3056
+
3057
+ //Thumbnail Navigator
3058
+ if (_ThumbnailNavigatorContainer && _ThumbnailNavigatorOptions) {
3059
+ _ThumbnailNavigatorOptions.$StartIndex = _Options.$StartIndex;
3060
+ _ThumbnailNavigator = new _ThumbnailNavigatorOptions.$Class(_ThumbnailNavigatorContainer, _ThumbnailNavigatorOptions);
3061
+ _Navigators.push(_ThumbnailNavigator);
3062
+ }
3063
+
3064
+ $Jssor$.$Each(_Navigators, function (navigator) {
3065
+ navigator.$Reset(_SlideCount, _SlideItems, _LoadingContainer);
3066
+ navigator.$On($JssorNavigatorEvents$.$NAVIGATIONREQUEST, NavigationClickHandler);
3067
+ });
3068
+
3069
+ Scale(OriginalWidth());
3070
+
3071
+ $Jssor$.$AddEvent(elmt, "mouseout", $Jssor$.$MouseOverOutFilter(MainContainerMouseLeaveEventHandler, elmt));
3072
+ $Jssor$.$AddEvent(elmt, "mouseover", $Jssor$.$MouseOverOutFilter(MainContainerMouseEnterEventHandler, elmt));
3073
+
3074
+ ShowNavigators();
3075
+
3076
+ //Keyboard Navigation
3077
+ if (_Options.$ArrowKeyNavigation) {
3078
+ $Jssor$.$AddEvent(document, "keydown", function (e) {
3079
+ if (e.keyCode == $JssorKeyCode$.$LEFT) {
3080
+ //Arrow Left
3081
+ PlayToOffset(-1);
3082
+ }
3083
+ else if (e.keyCode == $JssorKeyCode$.$RIGHT) {
3084
+ //Arrow Right
3085
+ PlayToOffset(1);
3086
+ }
3087
+ });
3088
+ }
3089
+
3090
+ var startPosition = _Options.$StartIndex;
3091
+ if (!(_Loop & 1)) {
3092
+ startPosition = Math.max(0, Math.min(startPosition, _SlideCount - _DisplayPieces));
3093
+ }
3094
+ _CarouselPlayer.$PlayCarousel(startPosition, startPosition, 0);
3095
+ }
3096
+ }
3097
+ //Jssor Slider
3098
+
3099
+ //JssorSlider.$ASSEMBLY_BOTTOM_LEFT = ASSEMBLY_BOTTOM_LEFT;
3100
+ //JssorSlider.$ASSEMBLY_BOTTOM_RIGHT = ASSEMBLY_BOTTOM_RIGHT;
3101
+ //JssorSlider.$ASSEMBLY_TOP_LEFT = ASSEMBLY_TOP_LEFT;
3102
+ //JssorSlider.$ASSEMBLY_TOP_RIGHT = ASSEMBLY_TOP_RIGHT;
3103
+ //JssorSlider.$ASSEMBLY_LEFT_TOP = ASSEMBLY_LEFT_TOP;
3104
+ //JssorSlider.$ASSEMBLY_LEFT_BOTTOM = ASSEMBLY_LEFT_BOTTOM;
3105
+ //JssorSlider.$ASSEMBLY_RIGHT_TOP = ASSEMBLY_RIGHT_TOP;
3106
+ //JssorSlider.$ASSEMBLY_RIGHT_BOTTOM = ASSEMBLY_RIGHT_BOTTOM;
3107
+
3108
+ JssorSlider.$EVT_CLICK = 21;
3109
+ JssorSlider.$EVT_DRAG_START = 22;
3110
+ JssorSlider.$EVT_DRAG_END = 23;
3111
+ JssorSlider.$EVT_SWIPE_START = 24;
3112
+ JssorSlider.$EVT_SWIPE_END = 25;
3113
+
3114
+ JssorSlider.$EVT_LOAD_START = 26;
3115
+ JssorSlider.$EVT_LOAD_END = 27;
3116
+ JssorSlider.$EVT_FREEZE = 28;
3117
+
3118
+ JssorSlider.$EVT_POSITION_CHANGE = 202;
3119
+ JssorSlider.$EVT_PARK = 203;
3120
+
3121
+ JssorSlider.$EVT_SLIDESHOW_START = 206;
3122
+ JssorSlider.$EVT_SLIDESHOW_END = 207;
3123
+
3124
+ JssorSlider.$EVT_PROGRESS_CHANGE = 208;
3125
+ JssorSlider.$EVT_STATE_CHANGE = 209;
3126
+ JssorSlider.$EVT_ROLLBACK_START = 210;
3127
+ JssorSlider.$EVT_ROLLBACK_END = 211;
3128
+
3129
+ window.$JssorSlider$ = $JssorSlider$ = JssorSlider;
3130
+
3131
+ //(function ($) {
3132
+ // jQuery.fn.jssorSlider = function (options) {
3133
+ // return this.each(function () {
3134
+ // return $(this).data('jssorSlider') || $(this).data('jssorSlider', new JssorSlider(this, options));
3135
+ // });
3136
+ // };
3137
+ //})(jQuery);
3138
+
3139
+ //window.jQuery && (jQuery.fn.jssorSlider = function (options) {
3140
+ // return this.each(function () {
3141
+ // return jQuery(this).data('jssorSlider') || jQuery(this).data('jssorSlider', new JssorSlider(this, options));
3142
+ // });
3143
+ //});
3144
+ };
3145
+
3146
+ //$JssorBulletNavigator$
3147
+ var $JssorNavigatorEvents$ = {
3148
+ $NAVIGATIONREQUEST: 1,
3149
+ $INDEXCHANGE: 2,
3150
+ $RESET: 3
3151
+ };
3152
+
3153
+ var $JssorBulletNavigator$ = window.$JssorBulletNavigator$ = function (elmt, options, containerWidth, containerHeight) {
3154
+ var self = this;
3155
+ $JssorObject$.call(self);
3156
+
3157
+ elmt = $Jssor$.$GetElement(elmt);
3158
+
3159
+ var _Count;
3160
+ var _Length;
3161
+ var _Width;
3162
+ var _Height;
3163
+ var _CurrentIndex;
3164
+ var _CurrentInnerIndex = 0;
3165
+ var _Options;
3166
+ var _Steps;
3167
+ var _Lanes;
3168
+ var _SpacingX;
3169
+ var _SpacingY;
3170
+ var _Orientation;
3171
+ var _ItemPrototype;
3172
+ var _PrototypeWidth;
3173
+ var _PrototypeHeight;
3174
+
3175
+ var _ButtonElements = [];
3176
+ var _Buttons = [];
3177
+
3178
+ function Highlight(index) {
3179
+ if (index != -1)
3180
+ _Buttons[index].$Selected(index == _CurrentInnerIndex);
3181
+ }
3182
+
3183
+ function OnNavigationRequest(index) {
3184
+ self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, index * _Steps);
3185
+ }
3186
+
3187
+ self.$Elmt = elmt;
3188
+ self.$GetCurrentIndex = function () {
3189
+ return _CurrentIndex;
3190
+ };
3191
+
3192
+ self.$SetCurrentIndex = function (index) {
3193
+ if (index != _CurrentIndex) {
3194
+ var lastInnerIndex = _CurrentInnerIndex;
3195
+ var innerIndex = Math.floor(index / _Steps);
3196
+ _CurrentInnerIndex = innerIndex;
3197
+ _CurrentIndex = index;
3198
+
3199
+ Highlight(lastInnerIndex);
3200
+ Highlight(innerIndex);
3201
+
3202
+ //self.$TriggerEvent($JssorNavigatorEvents$.$INDEXCHANGE, index);
3203
+ }
3204
+ };
3205
+
3206
+ self.$Show = function (hide) {
3207
+ $Jssor$.$ShowElement(elmt, hide);
3208
+ };
3209
+
3210
+ var _Located;
3211
+ self.$Relocate = function (containerWidth, containerHeight) {
3212
+ if (!_Located || _Options.$Scale == false) {
3213
+ if (_Options.$AutoCenter & 1) {
3214
+ $Jssor$.$CssLeft(elmt, (containerWidth - _Width) / 2);
3215
+ }
3216
+ if (_Options.$AutoCenter & 2) {
3217
+ $Jssor$.$CssTop(elmt, (containerHeight - _Height) / 2);
3218
+ }
3219
+
3220
+ _Located = true;
3221
+ }
3222
+ };
3223
+
3224
+ var _Initialized;
3225
+ self.$Reset = function (length) {
3226
+ if (!_Initialized) {
3227
+ _Length = length;
3228
+ _Count = Math.ceil(length / _Steps);
3229
+ _CurrentInnerIndex = 0;
3230
+
3231
+ var itemOffsetX = _PrototypeWidth + _SpacingX;
3232
+ var itemOffsetY = _PrototypeHeight + _SpacingY;
3233
+
3234
+ var maxIndex = Math.ceil(_Count / _Lanes) - 1;
3235
+
3236
+ _Width = _PrototypeWidth + itemOffsetX * (!_Orientation ? maxIndex : _Lanes - 1);
3237
+ _Height = _PrototypeHeight + itemOffsetY * (_Orientation ? maxIndex : _Lanes - 1);
3238
+
3239
+ $Jssor$.$CssWidth(elmt, _Width);
3240
+ $Jssor$.$CssHeight(elmt, _Height);
3241
+
3242
+ for (var buttonIndex = 0; buttonIndex < _Count; buttonIndex++) {
3243
+
3244
+ var numberDiv = $Jssor$.$CreateSpan();
3245
+ $Jssor$.$InnerText(numberDiv, buttonIndex + 1);
3246
+
3247
+ var div = $Jssor$.$BuildElement(_ItemPrototype, "numbertemplate", numberDiv, true);
3248
+ $Jssor$.$CssPosition(div, "absolute");
3249
+
3250
+ var columnIndex = buttonIndex % (maxIndex + 1);
3251
+ $Jssor$.$CssLeft(div, !_Orientation ? itemOffsetX * columnIndex : buttonIndex % _Lanes * itemOffsetX);
3252
+ $Jssor$.$CssTop(div, _Orientation ? itemOffsetY * columnIndex : Math.floor(buttonIndex / (maxIndex + 1)) * itemOffsetY);
3253
+
3254
+ $Jssor$.$AppendChild(elmt, div);
3255
+ _ButtonElements[buttonIndex] = div;
3256
+
3257
+ if (_Options.$ActionMode & 1)
3258
+ $Jssor$.$AddEvent(div, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, buttonIndex));
3259
+
3260
+ if (_Options.$ActionMode & 2)
3261
+ $Jssor$.$AddEvent(div, "mouseover", $Jssor$.$MouseOverOutFilter($Jssor$.$CreateCallback(null, OnNavigationRequest, buttonIndex), div));
3262
+
3263
+ _Buttons[buttonIndex] = $Jssor$.$Buttonize(div);
3264
+ }
3265
+
3266
+ //self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
3267
+ _Initialized = true;
3268
+ }
3269
+ };
3270
+
3271
+ //JssorBulletNavigator Constructor
3272
+ {
3273
+ self.$Options = _Options = $Jssor$.$Extend({
3274
+ $SpacingX: 0,
3275
+ $SpacingY: 0,
3276
+ $Orientation: 1,
3277
+ $ActionMode: 1
3278
+ }, options);
3279
+
3280
+ //Sodo statement for development time intellisence only
3281
+ $JssorDebug$.$Execute(function () {
3282
+ _Options = $Jssor$.$Extend({
3283
+ $Steps: undefined,
3284
+ $Lanes: undefined
3285
+ }, _Options);
3286
+ });
3287
+
3288
+ _ItemPrototype = $Jssor$.$FindChild(elmt, "prototype");
3289
+
3290
+ $JssorDebug$.$Execute(function () {
3291
+ if (!_ItemPrototype)
3292
+ $JssorDebug$.$Fail("Navigator item prototype not defined.");
3293
+
3294
+ if (isNaN($Jssor$.$CssWidth(_ItemPrototype))) {
3295
+ $JssorDebug$.$Fail("Width of 'navigator item prototype' not specified.");
3296
+ }
3297
+
3298
+ if (isNaN($Jssor$.$CssHeight(_ItemPrototype))) {
3299
+ $JssorDebug$.$Fail("Height of 'navigator item prototype' not specified.");
3300
+ }
3301
+ });
3302
+
3303
+ _PrototypeWidth = $Jssor$.$CssWidth(_ItemPrototype);
3304
+ _PrototypeHeight = $Jssor$.$CssHeight(_ItemPrototype);
3305
+
3306
+ $Jssor$.$RemoveChild(elmt, _ItemPrototype);
3307
+
3308
+ _Steps = _Options.$Steps || 1;
3309
+ _Lanes = _Options.$Lanes || 1;
3310
+ _SpacingX = _Options.$SpacingX;
3311
+ _SpacingY = _Options.$SpacingY;
3312
+ _Orientation = _Options.$Orientation - 1;
3313
+ }
3314
+ };
3315
+
3316
+ var $JssorArrowNavigator$ = window.$JssorArrowNavigator$ = function (arrowLeft, arrowRight, options, containerWidth, containerHeight) {
3317
+ var self = this;
3318
+ $JssorObject$.call(self);
3319
+
3320
+ $JssorDebug$.$Execute(function () {
3321
+
3322
+ if (!arrowLeft)
3323
+ $JssorDebug$.$Fail("Option '$ArrowNavigatorOptions' spepcified, but UI 'arrowleft' not defined. Define 'arrowleft' to enable direct navigation, or remove option '$ArrowNavigatorOptions' to disable direct navigation.");
3324
+
3325
+ if (!arrowRight)
3326
+ $JssorDebug$.$Fail("Option '$ArrowNavigatorOptions' spepcified, but UI 'arrowright' not defined. Define 'arrowright' to enable direct navigation, or remove option '$ArrowNavigatorOptions' to disable direct navigation.");
3327
+
3328
+ if (isNaN($Jssor$.$CssWidth(arrowLeft))) {
3329
+ $JssorDebug$.$Fail("Width of 'arrow left' not specified.");
3330
+ }
3331
+
3332
+ if (isNaN($Jssor$.$CssWidth(arrowRight))) {
3333
+ $JssorDebug$.$Fail("Width of 'arrow right' not specified.");
3334
+ }
3335
+
3336
+ if (isNaN($Jssor$.$CssHeight(arrowLeft))) {
3337
+ $JssorDebug$.$Fail("Height of 'arrow left' not specified.");
3338
+ }
3339
+
3340
+ if (isNaN($Jssor$.$CssHeight(arrowRight))) {
3341
+ $JssorDebug$.$Fail("Height of 'arrow right' not specified.");
3342
+ }
3343
+ });
3344
+
3345
+ var _Length;
3346
+ var _CurrentIndex;
3347
+ var _Options;
3348
+ var _Steps;
3349
+ var _ArrowWidth = $Jssor$.$CssWidth(arrowLeft);
3350
+ var _ArrowHeight = $Jssor$.$CssHeight(arrowLeft);
3351
+
3352
+ function OnNavigationRequest(steps) {
3353
+ self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, steps, true);
3354
+ }
3355
+
3356
+ self.$GetCurrentIndex = function () {
3357
+ return _CurrentIndex;
3358
+ };
3359
+
3360
+ self.$SetCurrentIndex = function (index, virtualIndex, temp) {
3361
+ if (temp) {
3362
+ _CurrentIndex = virtualIndex;
3363
+ }
3364
+ else {
3365
+ _CurrentIndex = index;
3366
+ }
3367
+ //self.$TriggerEvent($JssorNavigatorEvents$.$INDEXCHANGE, index);
3368
+ };
3369
+
3370
+ self.$Show = function (hide) {
3371
+ $Jssor$.$ShowElement(arrowLeft, hide);
3372
+ $Jssor$.$ShowElement(arrowRight, hide);
3373
+ };
3374
+
3375
+ var _Located;
3376
+ self.$Relocate = function (conainerWidth, containerHeight) {
3377
+ if (!_Located || _Options.$Scale == false) {
3378
+
3379
+ if (_Options.$AutoCenter & 1) {
3380
+ $Jssor$.$CssLeft(arrowLeft, (containerWidth - _ArrowWidth) / 2);
3381
+ $Jssor$.$CssLeft(arrowRight, (containerWidth - _ArrowWidth) / 2);
3382
+ }
3383
+
3384
+ if (_Options.$AutoCenter & 2) {
3385
+ $Jssor$.$CssTop(arrowLeft, (containerHeight - _ArrowHeight) / 2);
3386
+ $Jssor$.$CssTop(arrowRight, (containerHeight - _ArrowHeight) / 2);
3387
+ }
3388
+
3389
+ _Located = true;
3390
+ }
3391
+ };
3392
+
3393
+ var _Initialized;
3394
+ self.$Reset = function (length) {
3395
+ _Length = length;
3396
+ _CurrentIndex = 0;
3397
+
3398
+ if (!_Initialized) {
3399
+
3400
+ $Jssor$.$AddEvent(arrowLeft, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, -_Steps));
3401
+ $Jssor$.$AddEvent(arrowRight, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, _Steps));
3402
+
3403
+ $Jssor$.$Buttonize(arrowLeft);
3404
+ $Jssor$.$Buttonize(arrowRight);
3405
+
3406
+ _Initialized = true;
3407
+ }
3408
+
3409
+ //self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
3410
+ };
3411
+
3412
+ //JssorArrowNavigator Constructor
3413
+ {
3414
+ self.$Options = _Options = $Jssor$.$Extend({
3415
+ $Steps: 1
3416
+ }, options);
3417
+
3418
+ _Steps = _Options.$Steps;
3419
+ }
3420
+ };
3421
+
3422
+ //$JssorThumbnailNavigator$
3423
+ var $JssorThumbnailNavigator$ = window.$JssorThumbnailNavigator$ = function (elmt, options) {
3424
+ var _Self = this;
3425
+ var _Length;
3426
+ var _Count;
3427
+ var _CurrentIndex;
3428
+ var _Options;
3429
+ var _NavigationItems = [];
3430
+
3431
+ var _Width;
3432
+ var _Height;
3433
+ var _Lanes;
3434
+ var _SpacingX;
3435
+ var _SpacingY;
3436
+ var _PrototypeWidth;
3437
+ var _PrototypeHeight;
3438
+ var _DisplayPieces;
3439
+
3440
+ var _Slider;
3441
+ var _CurrentMouseOverIndex = -1;
3442
+
3443
+ var _SlidesContainer;
3444
+ var _ThumbnailPrototype;
3445
+
3446
+ $JssorObject$.call(_Self);
3447
+ elmt = $Jssor$.$GetElement(elmt);
3448
+
3449
+ function NavigationItem(item, index) {
3450
+ var self = this;
3451
+ var _Wrapper;
3452
+ var _Button;
3453
+ var _Thumbnail;
3454
+
3455
+ function Highlight(mouseStatus) {
3456
+ _Button.$Selected(_CurrentIndex == index);
3457
+ }
3458
+
3459
+ function OnNavigationRequest(event) {
3460
+ if (!_Slider.$LastDragSucceded()) {
3461
+ var tail = _Lanes - index % _Lanes;
3462
+ var slideVirtualIndex = _Slider.$GetVirtualIndex((index + tail) / _Lanes - 1);
3463
+ var itemVirtualIndex = slideVirtualIndex * _Lanes + _Lanes - tail;
3464
+ _Self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, itemVirtualIndex);
3465
+ }
3466
+
3467
+ //$JssorDebug$.$Log("navigation request");
3468
+ }
3469
+
3470
+ $JssorDebug$.$Execute(function () {
3471
+ self.$Wrapper = undefined;
3472
+ });
3473
+
3474
+ self.$Index = index;
3475
+
3476
+ self.$Highlight = Highlight;
3477
+
3478
+ //NavigationItem Constructor
3479
+ {
3480
+ _Thumbnail = item.$Thumb || item.$Image || $Jssor$.$CreateDiv();
3481
+ self.$Wrapper = _Wrapper = $Jssor$.$BuildElement(_ThumbnailPrototype, "thumbnailtemplate", _Thumbnail, true);
3482
+
3483
+ _Button = $Jssor$.$Buttonize(_Wrapper);
3484
+ if (_Options.$ActionMode & 1)
3485
+ $Jssor$.$AddEvent(_Wrapper, "click", OnNavigationRequest);
3486
+ if (_Options.$ActionMode & 2)
3487
+ $Jssor$.$AddEvent(_Wrapper, "mouseover", $Jssor$.$MouseOverOutFilter(OnNavigationRequest, _Wrapper));
3488
+ }
3489
+ }
3490
+
3491
+ _Self.$GetCurrentIndex = function () {
3492
+ return _CurrentIndex;
3493
+ };
3494
+
3495
+ _Self.$SetCurrentIndex = function (index, virtualIndex, temp) {
3496
+ var oldIndex = _CurrentIndex;
3497
+ _CurrentIndex = index;
3498
+ if (oldIndex != -1)
3499
+ _NavigationItems[oldIndex].$Highlight();
3500
+ _NavigationItems[index].$Highlight();
3501
+
3502
+ if (!temp) {
3503
+ _Slider.$PlayTo(_Slider.$GetVirtualIndex(Math.floor(virtualIndex / _Lanes)));
3504
+ }
3505
+ };
3506
+
3507
+ _Self.$Show = function (hide) {
3508
+ $Jssor$.$ShowElement(elmt, hide);
3509
+ };
3510
+
3511
+ _Self.$Relocate = $Jssor$.$EmptyFunction;
3512
+
3513
+ var _Initialized;
3514
+ _Self.$Reset = function (length, items, loadingContainer) {
3515
+ if (!_Initialized) {
3516
+ _Length = length;
3517
+ _Count = Math.ceil(_Length / _Lanes);
3518
+ _CurrentIndex = -1;
3519
+ _DisplayPieces = Math.min(_DisplayPieces, items.length);
3520
+
3521
+ var horizontal = _Options.$Orientation & 1;
3522
+
3523
+ var slideWidth = _PrototypeWidth + (_PrototypeWidth + _SpacingX) * (_Lanes - 1) * (1 - horizontal);
3524
+ var slideHeight = _PrototypeHeight + (_PrototypeHeight + _SpacingY) * (_Lanes - 1) * horizontal;
3525
+
3526
+ var slidesContainerWidth = slideWidth + (slideWidth + _SpacingX) * (_DisplayPieces - 1) * horizontal;
3527
+ var slidesContainerHeight = slideHeight + (slideHeight + _SpacingY) * (_DisplayPieces - 1) * (1 - horizontal);
3528
+
3529
+ $Jssor$.$CssPosition(_SlidesContainer, "absolute");
3530
+ $Jssor$.$CssOverflow(_SlidesContainer, "hidden");
3531
+ if (_Options.$AutoCenter & 1) {
3532
+ $Jssor$.$CssLeft(_SlidesContainer, (_Width - slidesContainerWidth) / 2);
3533
+ }
3534
+ if (_Options.$AutoCenter & 2) {
3535
+ $Jssor$.$CssTop(_SlidesContainer, (_Height - slidesContainerHeight) / 2);
3536
+ }
3537
+ //$JssorDebug$.$Execute(function () {
3538
+ // if (!_Options.$AutoCenter) {
3539
+ // var slidesContainerTop = $Jssor$.$CssTop(_SlidesContainer);
3540
+ // var slidesContainerLeft = $Jssor$.$CssLeft(_SlidesContainer);
3541
+
3542
+ // if (isNaN(slidesContainerTop)) {
3543
+ // $JssorDebug$.$Fail("Position 'top' wrong specification of thumbnail navigator slides container (<div u=\"thumbnavigator\">...<div u=\"slides\">), \r\nwhen option $ThumbnailNavigatorOptions.$AutoCenter set to 0, it should be specified in pixel (like <div u=\"slides\" style=\"top: 0px;\">)");
3544
+ // }
3545
+
3546
+ // if (isNaN(slidesContainerLeft)) {
3547
+ // $JssorDebug$.$Fail("Position 'left' wrong specification of thumbnail navigator slides container (<div u=\"thumbnavigator\">...<div u=\"slides\">), \r\nwhen option $ThumbnailNavigatorOptions.$AutoCenter set to 0, it should be specified in pixel (like <div u=\"slides\" style=\"left: 0px;\">)");
3548
+ // }
3549
+ // }
3550
+ //});
3551
+ $Jssor$.$CssWidth(_SlidesContainer, slidesContainerWidth);
3552
+ $Jssor$.$CssHeight(_SlidesContainer, slidesContainerHeight);
3553
+
3554
+ var slideItemElmts = [];
3555
+ $Jssor$.$Each(items, function (item, index) {
3556
+ var navigationItem = new NavigationItem(item, index);
3557
+ var navigationItemWrapper = navigationItem.$Wrapper;
3558
+
3559
+ var columnIndex = Math.floor(index / _Lanes);
3560
+ var laneIndex = index % _Lanes;
3561
+
3562
+ $Jssor$.$CssLeft(navigationItemWrapper, (_PrototypeWidth + _SpacingX) * laneIndex * (1 - horizontal));
3563
+ $Jssor$.$CssTop(navigationItemWrapper, (_PrototypeHeight + _SpacingY) * laneIndex * horizontal);
3564
+
3565
+ if (!slideItemElmts[columnIndex]) {
3566
+ slideItemElmts[columnIndex] = $Jssor$.$CreateDiv();
3567
+ $Jssor$.$AppendChild(_SlidesContainer, slideItemElmts[columnIndex]);
3568
+ }
3569
+
3570
+ $Jssor$.$AppendChild(slideItemElmts[columnIndex], navigationItemWrapper);
3571
+
3572
+ _NavigationItems.push(navigationItem);
3573
+ });
3574
+
3575
+ var thumbnailSliderOptions = $Jssor$.$Extend({
3576
+ $HWA: false,
3577
+ $AutoPlay: false,
3578
+ $NaviQuitDrag: false,
3579
+ $SlideWidth: slideWidth,
3580
+ $SlideHeight: slideHeight,
3581
+ $SlideSpacing: _SpacingX * horizontal + _SpacingY * (1 - horizontal),
3582
+ $MinDragOffsetToSlide: 12,
3583
+ $SlideDuration: 200,
3584
+ $PauseOnHover: 1,
3585
+ $PlayOrientation: _Options.$Orientation,
3586
+ $DragOrientation: _Options.$DisableDrag ? 0 : _Options.$Orientation
3587
+ }, _Options);
3588
+
3589
+ _Slider = new $JssorSlider$(elmt, thumbnailSliderOptions);
3590
+
3591
+ _Initialized = true;
3592
+ }
3593
+
3594
+ //_Self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
3595
+ };
3596
+
3597
+ //JssorThumbnailNavigator Constructor
3598
+ {
3599
+ _Self.$Options = _Options = $Jssor$.$Extend({
3600
+ $SpacingX: 3,
3601
+ $SpacingY: 3,
3602
+ $DisplayPieces: 1,
3603
+ $Orientation: 1,
3604
+ $AutoCenter: 3,
3605
+ $ActionMode: 1
3606
+ }, options);
3607
+
3608
+ //Sodo statement for development time intellisence only
3609
+ $JssorDebug$.$Execute(function () {
3610
+ _Options = $Jssor$.$Extend({
3611
+ $Lanes: undefined,
3612
+ $Width: undefined,
3613
+ $Height: undefined
3614
+ }, _Options);
3615
+ });
3616
+
3617
+ _Width = $Jssor$.$CssWidth(elmt);
3618
+ _Height = $Jssor$.$CssHeight(elmt);
3619
+
3620
+ $JssorDebug$.$Execute(function () {
3621
+ if (!_Width)
3622
+ $JssorDebug$.$Fail("width of 'thumbnavigator' container not specified.");
3623
+ if (!_Height)
3624
+ $JssorDebug$.$Fail("height of 'thumbnavigator' container not specified.");
3625
+ });
3626
+
3627
+ _SlidesContainer = $Jssor$.$FindChild(elmt, "slides", true);
3628
+ _ThumbnailPrototype = $Jssor$.$FindChild(_SlidesContainer, "prototype");
3629
+
3630
+ $JssorDebug$.$Execute(function () {
3631
+ if (!_ThumbnailPrototype)
3632
+ $JssorDebug$.$Fail("prototype of 'thumbnavigator' not defined.");
3633
+ });
3634
+
3635
+ _PrototypeWidth = $Jssor$.$CssWidth(_ThumbnailPrototype);
3636
+ _PrototypeHeight = $Jssor$.$CssHeight(_ThumbnailPrototype);
3637
+
3638
+ $Jssor$.$RemoveChild(_SlidesContainer, _ThumbnailPrototype);
3639
+
3640
+ _Lanes = _Options.$Lanes || 1;
3641
+ _SpacingX = _Options.$SpacingX;
3642
+ _SpacingY = _Options.$SpacingY;
3643
+ _DisplayPieces = _Options.$DisplayPieces;
3644
+ }
3645
+ };
3646
+
3647
+ //$JssorCaptionSliderBase$
3648
+ function $JssorCaptionSliderBase$() {
3649
+ $JssorAnimator$.call(this, 0, 0);
3650
+ this.$Revert = $Jssor$.$EmptyFunction;
3651
+ }
3652
+
3653
+ var $JssorCaptionSlider$ = window.$JssorCaptionSlider$ = function (container, captionSlideOptions, playIn) {
3654
+ $JssorDebug$.$Execute(function () {
3655
+ if (!captionSlideOptions.$CaptionTransitions) {
3656
+ $JssorDebug$.$Error("'$CaptionSliderOptions' option error, '$CaptionSliderOptions.$CaptionTransitions' not specified.");
3657
+ }
3658
+ //else if (!$Jssor$.$IsArray(captionSlideOptions.$CaptionTransitions)) {
3659
+ // $JssorDebug$.$Error("'$CaptionSliderOptions' option error, '$CaptionSliderOptions.$CaptionTransitions' is not an array.");
3660
+ //}
3661
+ });
3662
+
3663
+ var _Self = this;
3664
+ var _ImmediateOutCaptionHanger;
3665
+ var _PlayMode = playIn ? captionSlideOptions.$PlayInMode : captionSlideOptions.$PlayOutMode;
3666
+
3667
+ var _CaptionTransitions = captionSlideOptions.$CaptionTransitions;
3668
+ var _CaptionTuningFetcher = { $Transition: "t", $Delay: "d", $Duration: "du", x: "x", y: "y", $Rotate: "r", $Zoom: "z", $Opacity: "f", $BeginTime: "b" };
3669
+ var _CaptionTuningTransfer = {
3670
+ $Default: function (value, tuningValue) {
3671
+ if (!isNaN(tuningValue.$Value))
3672
+ value = tuningValue.$Value;
3673
+ else
3674
+ value *= tuningValue.$Percent;
3675
+
3676
+ return value;
3677
+ },
3678
+ $Opacity: function (value, tuningValue) {
3679
+ return this.$Default(value - 1, tuningValue);
3680
+ }
3681
+ };
3682
+ _CaptionTuningTransfer.$Zoom = _CaptionTuningTransfer.$Opacity;
3683
+
3684
+ $JssorAnimator$.call(_Self, 0, 0);
3685
+
3686
+ function GetCaptionItems(element, level) {
3687
+
3688
+ var itemsToPlay = [];
3689
+ var lastTransitionName;
3690
+ var namedTransitions = [];
3691
+ var namedTransitionOrders = [];
3692
+
3693
+ //$JssorDebug$.$Execute(function () {
3694
+
3695
+ // var debugInfoElement = $Jssor$.$GetElement("debugInfo");
3696
+
3697
+ // if (debugInfoElement && playIn) {
3698
+
3699
+ // var text = $Jssor.$InnerHtml(debugInfoElement) + "<br>";
3700
+
3701
+ // $Jssor$.$InnerHtml(debugInfoElement, text);
3702
+ // }
3703
+ //});
3704
+
3705
+ function FetchRawTransition(captionElmt, index) {
3706
+ var rawTransition = {};
3707
+
3708
+ $Jssor$.$Each(_CaptionTuningFetcher, function (fetchAttribute, fetchProperty) {
3709
+ var attributeValue = $Jssor$.$AttributeEx(captionElmt, fetchAttribute + (index || ""));
3710
+ if (attributeValue) {
3711
+ var propertyValue = {};
3712
+
3713
+ if (fetchAttribute == "t") {
3714
+ //if (($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserSafari() || $Jssor$.$IsBrowserFireFox()) && attributeValue == "*") {
3715
+ // attributeValue = Math.floor(Math.random() * captionSlideOptions.$CaptionTransitions.length);
3716
+ // $Jssor$.$Attribute(captionElmt, fetchAttribute + (index || ""), attributeValue);
3717
+ //}
3718
+
3719
+ propertyValue.$Value = attributeValue;
3720
+ }
3721
+ else if (attributeValue.indexOf("%") + 1)
3722
+ propertyValue.$Percent = $Jssor$.$ParseFloat(attributeValue) / 100;
3723
+ else
3724
+ propertyValue.$Value = $Jssor$.$ParseFloat(attributeValue);
3725
+
3726
+ rawTransition[fetchProperty] = propertyValue;
3727
+ }
3728
+ });
3729
+
3730
+ return rawTransition;
3731
+ }
3732
+
3733
+ function GetRandomTransition() {
3734
+ return _CaptionTransitions[Math.floor(Math.random() * _CaptionTransitions.length)];
3735
+ }
3736
+
3737
+ function EvaluateCaptionTransition(transitionName) {
3738
+
3739
+ var transition;
3740
+
3741
+ if (transitionName == "*") {
3742
+ transition = GetRandomTransition();
3743
+ }
3744
+ else if (transitionName) {
3745
+
3746
+ //indexed transition allowed, just the same as named transition
3747
+ var tempTransition = _CaptionTransitions[$Jssor$.$ParseInt(transitionName)] || _CaptionTransitions[transitionName];
3748
+
3749
+ if ($Jssor$.$IsArray(tempTransition)) {
3750
+ if (transitionName != lastTransitionName) {
3751
+ lastTransitionName = transitionName;
3752
+ namedTransitionOrders[transitionName] = 0;
3753
+
3754
+ namedTransitions[transitionName] = tempTransition[Math.floor(Math.random() * tempTransition.length)];
3755
+ }
3756
+ else {
3757
+ namedTransitionOrders[transitionName]++;
3758
+ }
3759
+
3760
+ tempTransition = namedTransitions[transitionName];
3761
+
3762
+ if ($Jssor$.$IsArray(tempTransition)) {
3763
+ tempTransition = tempTransition.length && tempTransition[namedTransitionOrders[transitionName] % tempTransition.length];
3764
+
3765
+ if ($Jssor$.$IsArray(tempTransition)) {
3766
+ //got transition from array level 3, random for all captions
3767
+ tempTransition = tempTransition[Math.floor(Math.random() * tempTransition.length)];
3768
+ }
3769
+ //else {
3770
+ // //got transition from array level 2, in sequence for all adjacent captions with same name specified
3771
+ // transition = tempTransition;
3772
+ //}
3773
+ }
3774
+ //else {
3775
+ // //got transition from array level 1, random but same for all adjacent captions with same name specified
3776
+ // transition = tempTransition;
3777
+ //}
3778
+ }
3779
+ //else {
3780
+ // //got transition directly from a simple transition object
3781
+ // transition = tempTransition;
3782
+ //}
3783
+
3784
+ transition = tempTransition;
3785
+
3786
+ if ($Jssor$.$IsString(transition))
3787
+ transition = EvaluateCaptionTransition(transition);
3788
+ }
3789
+
3790
+ return transition;
3791
+ }
3792
+
3793
+ var captionElmts = $Jssor$.$Children(element);
3794
+ $Jssor$.$Each(captionElmts, function (captionElmt, i) {
3795
+
3796
+ var transitionsWithTuning = [];
3797
+ transitionsWithTuning.$Elmt = captionElmt;
3798
+ var isCaption = $Jssor$.$AttributeEx(captionElmt, "u") == "caption";
3799
+
3800
+ $Jssor$.$Each(playIn ? [0, 3] : [2], function (j, k) {
3801
+
3802
+ if (isCaption) {
3803
+ var transition;
3804
+ var rawTransition;
3805
+
3806
+ if (j != 2 || !$Jssor$.$AttributeEx(captionElmt, "t3")) {
3807
+ rawTransition = FetchRawTransition(captionElmt, j);
3808
+
3809
+ if (j == 2 && !rawTransition.$Transition) {
3810
+ rawTransition.$Delay = rawTransition.$Delay || { $Value: 0 };
3811
+ rawTransition = $Jssor$.$Extend(FetchRawTransition(captionElmt, 0), rawTransition);
3812
+ }
3813
+ }
3814
+
3815
+ if (rawTransition && rawTransition.$Transition) {
3816
+
3817
+ transition = EvaluateCaptionTransition(rawTransition.$Transition.$Value);
3818
+
3819
+ if (transition) {
3820
+
3821
+ //var transitionWithTuning = $Jssor$.$Extend({ $Delay: 0, $ScaleHorizontal: 1, $ScaleVertical: 1 }, transition);
3822
+ var transitionWithTuning = $Jssor$.$Extend({ $Delay: 0 }, transition);
3823
+
3824
+ $Jssor$.$Each(rawTransition, function (rawPropertyValue, propertyName) {
3825
+ var tuningPropertyValue = (_CaptionTuningTransfer[propertyName] || _CaptionTuningTransfer.$Default).apply(_CaptionTuningTransfer, [transitionWithTuning[propertyName], rawTransition[propertyName]]);
3826
+ if (!isNaN(tuningPropertyValue))
3827
+ transitionWithTuning[propertyName] = tuningPropertyValue;
3828
+ });
3829
+
3830
+ if (!k) {
3831
+ if (rawTransition.$BeginTime)
3832
+ transitionWithTuning.$BeginTime = rawTransition.$BeginTime.$Value || 0;
3833
+ else if ((_PlayMode) & 2)
3834
+ transitionWithTuning.$BeginTime = 0;
3835
+ }
3836
+ }
3837
+ }
3838
+
3839
+ transitionsWithTuning.push(transitionWithTuning);
3840
+ }
3841
+
3842
+ if ((level % 2) && !k) {
3843
+ //transitionsWithTuning.$Children = GetCaptionItems(captionElmt, lastTransitionName, [].concat(namedTransitions), [].concat(namedTransitionOrders), level + 1);
3844
+ transitionsWithTuning.$Children = GetCaptionItems(captionElmt, level + 1);
3845
+ }
3846
+ });
3847
+
3848
+ itemsToPlay.push(transitionsWithTuning);
3849
+ });
3850
+
3851
+ return itemsToPlay;
3852
+ }
3853
+
3854
+ function CreateAnimator(item, transition, immediateOut) {
3855
+
3856
+ var animatorOptions = {
3857
+ $Easing: transition.$Easing,
3858
+ $Round: transition.$Round,
3859
+ $During: transition.$During,
3860
+ $Reverse: playIn && !immediateOut,
3861
+ $Optimize: true
3862
+ };
3863
+
3864
+ $JssorDebug$.$Execute(function () {
3865
+ animatorOptions.$CaptionAnimator = true;
3866
+ });
3867
+
3868
+ var captionItem = item;
3869
+ var captionParent = $Jssor$.$ParentNode(item);
3870
+
3871
+ var captionItemWidth = $Jssor$.$CssWidth(captionItem);
3872
+ var captionItemHeight = $Jssor$.$CssHeight(captionItem);
3873
+ var captionParentWidth = $Jssor$.$CssWidth(captionParent);
3874
+ var captionParentHeight = $Jssor$.$CssHeight(captionParent);
3875
+
3876
+ var toStyles = {};
3877
+ var fromStyles = {};
3878
+ var scaleClip = transition.$ScaleClip || 1;
3879
+
3880
+ //Opacity
3881
+ if (transition.$Opacity) {
3882
+ toStyles.$Opacity = 2 - transition.$Opacity;
3883
+ }
3884
+
3885
+ animatorOptions.$OriginalWidth = captionItemWidth;
3886
+ animatorOptions.$OriginalHeight = captionItemHeight;
3887
+
3888
+ //Transform
3889
+ if (transition.$Zoom || transition.$Rotate) {
3890
+ toStyles.$Zoom = transition.$Zoom ? transition.$Zoom - 1 : 1;
3891
+
3892
+ if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera())
3893
+ toStyles.$Zoom = Math.min(toStyles.$Zoom, 2);
3894
+
3895
+ fromStyles.$Zoom = 1;
3896
+
3897
+ var rotate = transition.$Rotate || 0;
3898
+
3899
+ toStyles.$Rotate = rotate * 360;
3900
+ fromStyles.$Rotate = 0;
3901
+ }
3902
+ //Clip
3903
+ else if (transition.$Clip) {
3904
+ var fromStyleClip = { $Top: 0, $Right: captionItemWidth, $Bottom: captionItemHeight, $Left: 0 };
3905
+ var toStyleClip = $Jssor$.$Extend({}, fromStyleClip);
3906
+
3907
+ var blockOffset = toStyleClip.$Offset = {};
3908
+
3909
+ var topBenchmark = transition.$Clip & 4;
3910
+ var bottomBenchmark = transition.$Clip & 8;
3911
+ var leftBenchmark = transition.$Clip & 1;
3912
+ var rightBenchmark = transition.$Clip & 2;
3913
+
3914
+ if (topBenchmark && bottomBenchmark) {
3915
+ blockOffset.$Top = captionItemHeight / 2 * scaleClip;
3916
+ blockOffset.$Bottom = -blockOffset.$Top;
3917
+ }
3918
+ else if (topBenchmark)
3919
+ blockOffset.$Bottom = -captionItemHeight * scaleClip;
3920
+ else if (bottomBenchmark)
3921
+ blockOffset.$Top = captionItemHeight * scaleClip;
3922
+
3923
+ if (leftBenchmark && rightBenchmark) {
3924
+ blockOffset.$Left = captionItemWidth / 2 * scaleClip;
3925
+ blockOffset.$Right = -blockOffset.$Left;
3926
+ }
3927
+ else if (leftBenchmark)
3928
+ blockOffset.$Right = -captionItemWidth * scaleClip;
3929
+ else if (rightBenchmark)
3930
+ blockOffset.$Left = captionItemWidth * scaleClip;
3931
+
3932
+ animatorOptions.$Move = transition.$Move;
3933
+ toStyles.$Clip = toStyleClip;
3934
+ fromStyles.$Clip = fromStyleClip;
3935
+ }
3936
+
3937
+ //Fly
3938
+ {
3939
+ var toLeft = 0;
3940
+ var toTop = 0;
3941
+
3942
+ if (transition.x)
3943
+ toLeft -= captionParentWidth * transition.x;
3944
+
3945
+ if (transition.y)
3946
+ toTop -= captionParentHeight * transition.y;
3947
+
3948
+ if (toLeft || toTop || animatorOptions.$Move) {
3949
+ toStyles.$Left = toLeft + $Jssor$.$CssLeft(captionItem);
3950
+ toStyles.$Top = toTop + $Jssor$.$CssTop(captionItem);
3951
+ }
3952
+ }
3953
+
3954
+ //duration
3955
+ var duration = transition.$Duration;
3956
+
3957
+ fromStyles = $Jssor$.$Extend(fromStyles, $Jssor$.$GetStyles(captionItem, toStyles));
3958
+
3959
+ animatorOptions.$Setter = $Jssor$.$StyleSetterEx();
3960
+
3961
+ return new $JssorAnimator$(transition.$Delay, duration, animatorOptions, captionItem, fromStyles, toStyles);
3962
+ }
3963
+
3964
+ function CreateAnimators(streamLineLength, captionItems) {
3965
+
3966
+ $Jssor$.$Each(captionItems, function (captionItem, i) {
3967
+
3968
+ $JssorDebug$.$Execute(function () {
3969
+ if (captionItem.length) {
3970
+ var top = $Jssor$.$CssTop(captionItem.$Elmt);
3971
+ var left = $Jssor$.$CssLeft(captionItem.$Elmt);
3972
+ var width = $Jssor$.$CssWidth(captionItem.$Elmt);
3973
+ var height = $Jssor$.$CssHeight(captionItem.$Elmt);
3974
+
3975
+ var error = null;
3976
+
3977
+ if (isNaN(top))
3978
+ error = "Style 'top' for caption not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
3979
+ else if (isNaN(left))
3980
+ error = "Style 'left' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
3981
+ else if (isNaN(width))
3982
+ error = "Style 'width' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
3983
+ else if (isNaN(height))
3984
+ error = "Style 'height' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
3985
+
3986
+ if (error)
3987
+ $JssorDebug$.$Error("Caption " + (i + 1) + " definition error, \r\n" + error + "\r\n" + captionItem.$Elmt.outerHTML);
3988
+ }
3989
+ });
3990
+
3991
+ var animator;
3992
+ var captionElmt = captionItem.$Elmt;
3993
+ var transition = captionItem[0];
3994
+ var transition3 = captionItem[1];
3995
+
3996
+ if (transition) {
3997
+
3998
+ animator = CreateAnimator(captionElmt, transition);
3999
+ streamLineLength = animator.$Locate(transition.$BeginTime == undefined ? streamLineLength : transition.$BeginTime, 1);
4000
+ }
4001
+
4002
+ streamLineLength = CreateAnimators(streamLineLength, captionItem.$Children);
4003
+
4004
+ if (transition3) {
4005
+ var animator3 = CreateAnimator(captionElmt, transition3, 1);
4006
+ animator3.$Locate(streamLineLength, 1);
4007
+ _Self.$Combine(animator3);
4008
+ _ImmediateOutCaptionHanger.$Combine(animator3);
4009
+ }
4010
+
4011
+ if (animator)
4012
+ _Self.$Combine(animator);
4013
+ });
4014
+
4015
+ return streamLineLength;
4016
+ }
4017
+
4018
+ _Self.$Revert = function () {
4019
+ _Self.$GoToPosition(_Self.$GetPosition_OuterEnd() * (playIn || 0));
4020
+ _ImmediateOutCaptionHanger.$GoToBegin();
4021
+ };
4022
+
4023
+ //Constructor
4024
+ {
4025
+ _ImmediateOutCaptionHanger = new $JssorAnimator$(0, 0);
4026
+
4027
+ //var streamLineLength = 0;
4028
+ //var captionItems = GetCaptionItems(container, null, [], [], 1);
4029
+
4030
+ CreateAnimators(0, _PlayMode ? GetCaptionItems(container, 1) : []);
4031
+ }
4032
+ };
4033
+
4034
+ //Event Table
4035
+
4036
+ //$EVT_CLICK = 21; function(slideIndex[, event])
4037
+ //$EVT_DRAG_START = 22; function(position[, virtualPosition, event])
4038
+ //$EVT_DRAG_END = 23; function(position, startPosition[, virtualPosition, virtualStartPosition, event])
4039
+ //$EVT_SWIPE_START = 24; function(position[, virtualPosition])
4040
+ //$EVT_SWIPE_END = 25; function(position[, virtualPosition])
4041
+
4042
+ //$EVT_LOAD_START = 26; function(slideIndex)
4043
+ //$EVT_LOAD_END = 27; function(slideIndex)
4044
+
4045
+ //$EVT_POSITION_CHANGE = 202; function(position, fromPosition[, virtualPosition, virtualFromPosition])
4046
+ //$EVT_PARK = 203; function(slideIndex, fromIndex)
4047
+
4048
+ //$EVT_PROGRESS_CHANGE = 208; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
4049
+ //$EVT_STATE_CHANGE = 209; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
4050
+
4051
+ //$EVT_ROLLBACK_START = 210; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
4052
+ //$EVT_ROLLBACK_END = 211; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
4053
+
4054
+ //$EVT_SLIDESHOW_START = 206; function(slideIndex[, progressBegin, slideshowBegin, slideshowEnd, progressEnd])
4055
+ //$EVT_SLIDESHOW_END = 207; function(slideIndex[, progressBegin, slideshowBegin, slideshowEnd, progressEnd])
4056
+
4057
+ //http://www.jssor.com/development/reference-api.html
skin/frontend/makgento/default/js/slider.js ADDED
@@ -0,0 +1,2831 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var $JssorDebug$ = new function () {
2
+
3
+ this.$DebugMode = true;
4
+
5
+ // Methods
6
+
7
+ this.$Log = function (msg, important) {
8
+ var console = window.console || {};
9
+ var debug = this.$DebugMode;
10
+
11
+ if (debug && console.log) {
12
+ console.log(msg);
13
+ } else if (debug && important) {
14
+ alert(msg);
15
+ }
16
+ };
17
+
18
+ this.$Error = function (msg, e) {
19
+ var console = window.console || {};
20
+ var debug = this.$DebugMode;
21
+
22
+ if (debug && console.error) {
23
+ console.error(msg);
24
+ } else if (debug) {
25
+ alert(msg);
26
+ }
27
+
28
+ if (debug) {
29
+ // since we're debugging, fail fast by crashing
30
+ throw e || new Error(msg);
31
+ }
32
+ };
33
+
34
+ this.$Fail = function (msg) {
35
+ throw new Error(msg);
36
+ };
37
+
38
+ this.$Assert = function (value, msg) {
39
+ var debug = this.$DebugMode;
40
+ if (debug) {
41
+ if (!value)
42
+ throw new Error("Assert failed " + msg || "");
43
+ }
44
+ };
45
+
46
+ this.$Trace = function (msg) {
47
+ var console = window.console || {};
48
+ var debug = this.$DebugMode;
49
+
50
+ if (debug && console.log) {
51
+ console.log(msg);
52
+ }
53
+ };
54
+
55
+ this.$Execute = function (func) {
56
+ var debug = this.$DebugMode;
57
+ if (debug)
58
+ func();
59
+ };
60
+
61
+ this.$LiveStamp = function (obj, id) {
62
+ var debug = this.$DebugMode;
63
+ if (debug) {
64
+ var stamp = document.createElement("DIV");
65
+ stamp.setAttribute("id", id);
66
+
67
+ obj.$Live = stamp;
68
+ }
69
+ };
70
+
71
+ this.$C_AbstractMethod = function () {
72
+ /// <summary>
73
+ /// Tells compiler the method is abstract, it should be implemented by subclass.
74
+ /// </summary>
75
+
76
+ throw new Error("The method is abstract, it should be implemented by subclass.");
77
+ };
78
+
79
+ function C_AbstractClass(instance) {
80
+ /// <summary>
81
+ /// Tells compiler the class is abstract, it should be implemented by subclass.
82
+ /// </summary>
83
+
84
+ if (instance.constructor === C_AbstractClass.caller)
85
+ throw new Error("Cannot create instance of an abstract class.");
86
+ }
87
+
88
+ this.$C_AbstractClass = C_AbstractClass;
89
+ };
90
+
91
+ //$JssorEasing$
92
+ var $JssorEasing$ = window.$JssorEasing$ = {
93
+ $EaseLinear: function (t) {
94
+ return t;
95
+ },
96
+ $EaseGoBack: function (t) {
97
+ return 1 - Math.abs((t *= 2) - 1);
98
+ },
99
+ $EaseSwing: function (t) {
100
+ return -Math.cos(t * Math.PI) / 2 + .5;
101
+ },
102
+ $EaseInQuad: function (t) {
103
+ return t * t;
104
+ },
105
+ $EaseOutQuad: function (t) {
106
+ return -t * (t - 2);
107
+ },
108
+ $EaseInOutQuad: function (t) {
109
+ return (t *= 2) < 1 ? 1 / 2 * t * t : -1 / 2 * (--t * (t - 2) - 1);
110
+ },
111
+ $EaseInCubic: function (t) {
112
+ return t * t * t;
113
+ },
114
+ $EaseOutCubic: function (t) {
115
+ return (t -= 1) * t * t + 1;
116
+ },
117
+ $EaseInOutCubic: function (t) {
118
+ return (t *= 2) < 1 ? 1 / 2 * t * t * t : 1 / 2 * ((t -= 2) * t * t + 2);
119
+ },
120
+ $EaseInQuart: function (t) {
121
+ return t * t * t * t;
122
+ },
123
+ $EaseOutQuart: function (t) {
124
+ return -((t -= 1) * t * t * t - 1);
125
+ },
126
+ $EaseInOutQuart: function (t) {
127
+ return (t *= 2) < 1 ? 1 / 2 * t * t * t * t : -1 / 2 * ((t -= 2) * t * t * t - 2);
128
+ },
129
+ $EaseInQuint: function (t) {
130
+ return t * t * t * t * t;
131
+ },
132
+ $EaseOutQuint: function (t) {
133
+ return (t -= 1) * t * t * t * t + 1;
134
+ },
135
+ $EaseInOutQuint: function (t) {
136
+ return (t *= 2) < 1 ? 1 / 2 * t * t * t * t * t : 1 / 2 * ((t -= 2) * t * t * t * t + 2);
137
+ },
138
+ $EaseInSine: function (t) {
139
+ return 1 - Math.cos(t * Math.PI / 2);
140
+ },
141
+ $EaseOutSine: function (t) {
142
+ return Math.sin(t * Math.PI / 2);
143
+ },
144
+ $EaseInOutSine: function (t) {
145
+ return -1 / 2 * (Math.cos(Math.PI * t) - 1);
146
+ },
147
+ $EaseInExpo: function (t) {
148
+ return t == 0 ? 0 : Math.pow(2, 10 * (t - 1));
149
+ },
150
+ $EaseOutExpo: function (t) {
151
+ return t == 1 ? 1 : -Math.pow(2, -10 * t) + 1;
152
+ },
153
+ $EaseInOutExpo: function (t) {
154
+ return t == 0 || t == 1 ? t : (t *= 2) < 1 ? 1 / 2 * Math.pow(2, 10 * (t - 1)) : 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
155
+ },
156
+ $EaseInCirc: function (t) {
157
+ return -(Math.sqrt(1 - t * t) - 1);
158
+ },
159
+ $EaseOutCirc: function (t) {
160
+ return Math.sqrt(1 - (t -= 1) * t);
161
+ },
162
+ $EaseInOutCirc: function (t) {
163
+ return (t *= 2) < 1 ? -1 / 2 * (Math.sqrt(1 - t * t) - 1) : 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
164
+ },
165
+ $EaseInElastic: function (t) {
166
+ if (!t || t == 1)
167
+ return t;
168
+ var p = .3, s = .075;
169
+ return -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p));
170
+ },
171
+ $EaseOutElastic: function (t) {
172
+ if (!t || t == 1)
173
+ return t;
174
+ var p = .3, s = .075;
175
+ return Math.pow(2, -10 * t) * Math.sin((t - s) * 2 * Math.PI / p) + 1;
176
+ },
177
+ $EaseInOutElastic: function (t) {
178
+ if (!t || t == 1)
179
+ return t;
180
+ var p = .45, s = .1125;
181
+ return (t *= 2) < 1 ? -.5 * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) : Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) * .5 + 1;
182
+ },
183
+ $EaseInBack: function (t) {
184
+ var s = 1.70158;
185
+ return t * t * ((s + 1) * t - s);
186
+ },
187
+ $EaseOutBack: function (t) {
188
+ var s = 1.70158;
189
+ return (t -= 1) * t * ((s + 1) * t + s) + 1;
190
+ },
191
+ $EaseInOutBack: function (t) {
192
+ var s = 1.70158;
193
+ return (t *= 2) < 1 ? 1 / 2 * t * t * (((s *= 1.525) + 1) * t - s) : 1 / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);
194
+ },
195
+ $EaseInBounce: function (t) {
196
+ return 1 - $JssorEasing$.$EaseOutBounce(1 - t)
197
+ },
198
+ $EaseOutBounce: function (t) {
199
+ return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
200
+ },
201
+ $EaseInOutBounce: function (t) {
202
+ return t < 1 / 2 ? $JssorEasing$.$EaseInBounce(t * 2) * .5 : $JssorEasing$.$EaseOutBounce(t * 2 - 1) * .5 + .5;
203
+ },
204
+ $EaseInWave: function (t) {
205
+ return 1 - Math.cos(t * Math.PI * 2)
206
+ },
207
+ $EaseOutWave: function (t) {
208
+ return Math.sin(t * Math.PI * 2);
209
+ },
210
+ $EaseOutJump: function (t) {
211
+ return 1 - (((t *= 2) < 1) ? (t = 1 - t) * t * t : (t -= 1) * t * t);
212
+ },
213
+ $EaseInJump: function (t) {
214
+ return ((t *= 2) < 1) ? t * t * t : (t = 2 - t) * t * t;
215
+ }
216
+ };
217
+
218
+ var $JssorDirection$ = window.$JssorDirection$ = {
219
+ $TO_LEFT: 0x0001,
220
+ $TO_RIGHT: 0x0002,
221
+ $TO_TOP: 0x0004,
222
+ $TO_BOTTOM: 0x0008,
223
+ $HORIZONTAL: 0x0003,
224
+ $VERTICAL: 0x000C,
225
+ $LEFTRIGHT: 0x0003,
226
+ $TOPBOTOM: 0x000C,
227
+ $TOPLEFT: 0x0005,
228
+ $TOPRIGHT: 0x0006,
229
+ $BOTTOMLEFT: 0x0009,
230
+ $BOTTOMRIGHT: 0x000A,
231
+ $AROUND: 0x000F,
232
+
233
+ $GetDirectionHorizontal: function (direction) {
234
+ return direction & 0x0003;
235
+ },
236
+ $GetDirectionVertical: function (direction) {
237
+ return direction & 0x000C;
238
+ },
239
+ $ChessHorizontal: function (direction) {
240
+ return (~direction & 0x0003) + (direction & 0x000C);
241
+ },
242
+ $ChessVertical: function (direction) {
243
+ return (~direction & 0x000C) + (direction & 0x0003);
244
+ },
245
+ $IsToLeft: function (direction) {
246
+ return (direction & 0x0003) == 0x0001;
247
+ },
248
+ $IsToRight: function (direction) {
249
+ return (direction & 0x0003) == 0x0002;
250
+ },
251
+ $IsToTop: function (direction) {
252
+ return (direction & 0x000C) == 0x0004;
253
+ },
254
+ $IsToBottom: function (direction) {
255
+ return (direction & 0x000C) == 0x0008;
256
+ },
257
+ $IsHorizontal: function (direction) {
258
+ return (direction & 0x0003) > 0;
259
+ },
260
+ $IsVertical: function (direction) {
261
+ return (direction & 0x000C) > 0;
262
+ }
263
+ };
264
+
265
+ var $JssorKeyCode$ = {
266
+ $BACKSPACE: 8,
267
+ $COMMA: 188,
268
+ $DELETE: 46,
269
+ $DOWN: 40,
270
+ $END: 35,
271
+ $ENTER: 13,
272
+ $ESCAPE: 27,
273
+ $HOME: 36,
274
+ $LEFT: 37,
275
+ $NUMPAD_ADD: 107,
276
+ $NUMPAD_DECIMAL: 110,
277
+ $NUMPAD_DIVIDE: 111,
278
+ $NUMPAD_ENTER: 108,
279
+ $NUMPAD_MULTIPLY: 106,
280
+ $NUMPAD_SUBTRACT: 109,
281
+ $PAGE_DOWN: 34,
282
+ $PAGE_UP: 33,
283
+ $PERIOD: 190,
284
+ $RIGHT: 39,
285
+ $SPACE: 32,
286
+ $TAB: 9,
287
+ $UP: 38
288
+ };
289
+
290
+ var $JssorAlignment$ = {
291
+ $TopLeft: 0x11,
292
+ $TopCenter: 0x12,
293
+ $TopRight: 0x14,
294
+ $MiddleLeft: 0x21,
295
+ $MiddleCenter: 0x22,
296
+ $MiddleRight: 0x24,
297
+ $BottomLeft: 0x41,
298
+ $BottomCenter: 0x42,
299
+ $BottomRight: 0x44,
300
+
301
+ $IsTop: function (aligment) {
302
+ return aligment & 0x10 > 0;
303
+ },
304
+ $IsMiddle: function (alignment) {
305
+ return alignment & 0x20 > 0;
306
+ },
307
+ $IsBottom: function (alignment) {
308
+ return alignment & 0x40 > 0;
309
+ },
310
+ $IsLeft: function (alignment) {
311
+ return alignment & 0x01 > 0;
312
+ },
313
+ $IsCenter: function (alignment) {
314
+ return alignment & 0x02 > 0;
315
+ },
316
+ $IsRight: function (alignment) {
317
+ return alignment & 0x04 > 0;
318
+ }
319
+ };
320
+
321
+ var $JssorMatrix$;
322
+
323
+ var $JssorAnimator$;
324
+
325
+ // $Jssor$ is a static class, so make it singleton instance
326
+ var $Jssor$ = window.$Jssor$ = new function () {
327
+ // Fields
328
+ var _This = this;
329
+
330
+ var REGEX_WHITESPACE_GLOBAL = /\S+/g;
331
+
332
+ var ROWSER_UNKNOWN = 0;
333
+ var BROWSER_IE = 1;
334
+ var BROWSER_FIREFOX = 2;
335
+ var BROWSER_FIREFOX = 3;
336
+ var BROWSER_CHROME = 4;
337
+ var BROWSER_OPERA = 5;
338
+
339
+ //var arrActiveX = ["Msxml2.XMLHTTP", "Msxml3.XMLHTTP", "Microsoft.XMLHTTP"];
340
+
341
+ var browser = 0;
342
+ var browserRuntimeVersion = 0;
343
+ var browserEngineVersion = 0;
344
+ var browserJavascriptVersion = 0;
345
+ var webkitVersion = 0;
346
+
347
+ var app = navigator.appName;
348
+ var ver = navigator.appVersion;
349
+ var ua = navigator.userAgent;
350
+
351
+ var _DocElmt = document.documentElement;
352
+ var _TransformProperty;
353
+
354
+ function DetectBrowser() {
355
+ if (!browser) {
356
+ if (app == "Microsoft Internet Explorer" &&
357
+ !!window.attachEvent && !!window.ActiveXObject) {
358
+
359
+ var ieOffset = ua.indexOf("MSIE");
360
+ browser = BROWSER_IE;
361
+ browserEngineVersion = ParseFloat(ua.substring(ieOffset + 5, ua.indexOf(";", ieOffset)));
362
+
363
+ //check IE javascript version
364
+ /*@cc_on
365
+ browserJavascriptVersion = @_jscript_version;
366
+ @*/
367
+
368
+ // update: for intranet sites and compat view list sites, IE sends
369
+ // an IE7 User-Agent to the server to be interoperable, and even if
370
+ // the page requests a later IE version, IE will still report the
371
+ // IE7 UA to JS. we should be robust to self
372
+ //var docMode = document.documentMode;
373
+ //if (typeof docMode !== "undefined") {
374
+ // browserRuntimeVersion = docMode;
375
+ //}
376
+
377
+ browserRuntimeVersion = document.documentMode || browserEngineVersion;
378
+
379
+ }
380
+ else if (app == "Netscape" && !!window.addEventListener) {
381
+
382
+ var ffOffset = ua.indexOf("Firefox");
383
+ var saOffset = ua.indexOf("Safari");
384
+ var chOffset = ua.indexOf("Chrome");
385
+ var webkitOffset = ua.indexOf("AppleWebKit");
386
+
387
+ if (ffOffset >= 0) {
388
+ browser = BROWSER_FIREFOX;
389
+ browserRuntimeVersion = ParseFloat(ua.substring(ffOffset + 8));
390
+ }
391
+ else if (saOffset >= 0) {
392
+ var slash = ua.substring(0, saOffset).lastIndexOf("/");
393
+ browser = (chOffset >= 0) ? BROWSER_CHROME : BROWSER_FIREFOX;
394
+ browserRuntimeVersion = ParseFloat(ua.substring(slash + 1, saOffset));
395
+ }
396
+
397
+ if (webkitOffset >= 0)
398
+ webkitVersion = ParseFloat(ua.substring(webkitOffset + 12));
399
+ }
400
+ else {
401
+ var match = /(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(ua);
402
+ if (match) {
403
+ browser = BROWSER_OPERA;
404
+ browserRuntimeVersion = ParseFloat(match[2]);
405
+ }
406
+ }
407
+ }
408
+ }
409
+
410
+ function IsBrowserIE() {
411
+ DetectBrowser();
412
+ return browser == BROWSER_IE;
413
+ }
414
+
415
+ function IsBrowserIeQuirks() {
416
+ return IsBrowserIE() && (browserRuntimeVersion < 6 || document.compatMode == "BackCompat"); //Composite to "CSS1Compat"
417
+ }
418
+
419
+ function IsBrowserFireFox() {
420
+ DetectBrowser();
421
+ return browser == BROWSER_FIREFOX;
422
+ }
423
+
424
+ function IsBrowserSafari() {
425
+ DetectBrowser();
426
+ return browser == BROWSER_FIREFOX;
427
+ }
428
+
429
+ function IsBrowserChrome() {
430
+ DetectBrowser();
431
+ return browser == BROWSER_CHROME;
432
+ }
433
+
434
+ function IsBrowserOpera() {
435
+ DetectBrowser();
436
+ return browser == BROWSER_OPERA;
437
+ }
438
+
439
+ function IsBrowserBadTransform() {
440
+ return IsBrowserSafari() && (webkitVersion > 534) && (webkitVersion < 535);
441
+ }
442
+
443
+ function IsBrowserIe9Earlier() {
444
+ return IsBrowserIE() && browserRuntimeVersion < 9;
445
+ }
446
+
447
+ function GetTransformProperty(elmt) {
448
+
449
+ if (!_TransformProperty) {
450
+ // Note that in some versions of IE9 it is critical that
451
+ // msTransform appear in this list before MozTransform
452
+
453
+ each(['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'], function (property) {
454
+ if (elmt.style[property] != undefined) {
455
+ _TransformProperty = property;
456
+ return true;
457
+ }
458
+ });
459
+
460
+ _TransformProperty = _TransformProperty || "transform";
461
+ }
462
+
463
+ return _TransformProperty;
464
+ }
465
+
466
+ // Helpers
467
+ function getOffsetParent(elmt, isFixed) {
468
+ // IE and Opera "fixed" position elements don't have offset parents.
469
+ // regardless, if it's fixed, its offset parent is the body.
470
+ if (isFixed && elmt != document.body) {
471
+ return document.body;
472
+ } else {
473
+ return elmt.offsetParent;
474
+ }
475
+ }
476
+
477
+ function toString(obj) {
478
+ return Object.prototype.toString.call(obj);
479
+ }
480
+
481
+ // [[Class]] -> type pairs
482
+ var class2type;
483
+
484
+ function each(object, callback) {
485
+ if (toString(object) == "[object Array]") {
486
+ for (var i = 0; i < object.length; i++) {
487
+ if (callback(object[i], i, object)) {
488
+ return true;
489
+ }
490
+ }
491
+ }
492
+ else {
493
+ for (var name in object) {
494
+ if (callback(object[name], name, object)) {
495
+ return true;
496
+ }
497
+ }
498
+ }
499
+ }
500
+
501
+ function GetClass2Type() {
502
+ if (!class2type) {
503
+ class2type = {};
504
+ each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object"], function (name) {
505
+ class2type["[object " + name + "]"] = name.toLowerCase();
506
+ });
507
+ }
508
+
509
+ return class2type;
510
+ }
511
+
512
+ function type(obj) {
513
+ return obj == null ? String(obj) : GetClass2Type()[toString(obj)] || "object";
514
+ }
515
+
516
+ function isPlainObject(obj) {
517
+ // Must be an Object.
518
+ // Because of IE, we also have to check the presence of the constructor property.
519
+ // Make sure that DOM nodes and window objects don't pass through, as well
520
+ if (!obj || type(obj) !== "object" || obj.nodeType || _This.$IsWindow(obj)) {
521
+ return false;
522
+ }
523
+
524
+ var hasOwn = Object.prototype.hasOwnProperty;
525
+
526
+ try {
527
+ // Not own constructor property must be Object
528
+ if (obj.constructor &&
529
+ !hasOwn.call(obj, "constructor") &&
530
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
531
+ return false;
532
+ }
533
+ } catch (e) {
534
+ // IE8,9 Will throw exceptions on certain host objects #9897
535
+ return false;
536
+ }
537
+
538
+ // Own properties are enumerated firstly, so to speed up,
539
+ // if last one is own, then all properties are own.
540
+
541
+ var key;
542
+ for (key in obj) { }
543
+
544
+ return key === undefined || hasOwn.call(obj, key);
545
+ }
546
+
547
+ function Point(x, y) {
548
+ return { x: x, y: y };
549
+ }
550
+
551
+ function Delay(code, delay) {
552
+ setTimeout(code, delay || 0);
553
+ }
554
+
555
+ function RemoveByReg(str, reg) {
556
+ var m = reg.exec(str);
557
+
558
+ if (m) {
559
+ var header = str.substr(0, m.index);
560
+ var tailer = str.substr(m.lastIndex + 1, str.length - (m.lastIndex + 1));
561
+ str = header + tailer;
562
+ }
563
+
564
+ return str;
565
+ }
566
+
567
+ function BuildNewCss(oldCss, removeRegs, replaceValue) {
568
+ var css = (!oldCss || oldCss == "inherit") ? "" : oldCss;
569
+
570
+ each(removeRegs, function (removeReg) {
571
+ var m = removeReg.exec(css);
572
+
573
+ if (m) {
574
+ var header = css.substr(0, m.index);
575
+ var tailer = css.substr(m.lastIndex + 1, css.length - (m.lastIndex + 1));
576
+ css = header + tailer;
577
+ }
578
+ });
579
+
580
+ css = replaceValue + (css.indexOf(" ") != 0 ? " " : "") + css;
581
+
582
+ return css;
583
+ }
584
+
585
+ function SetStyleFilterIE(elmt, value) {
586
+ if (browserRuntimeVersion < 9) {
587
+ elmt.style.filter = value;
588
+ }
589
+ }
590
+
591
+ function SetStyleMatrixIE(elmt, matrix, offset) {
592
+ //matrix is not for ie9+ running in ie8- mode
593
+ if (browserJavascriptVersion < 9) {
594
+ var oldFilterValue = elmt.style.filter;
595
+ var matrixReg = new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g);
596
+ var matrixValue = matrix ? "progid:DXImageTransform.Microsoft.Matrix(" + "M11=" + matrix[0][0] + ", M12=" + matrix[0][1] + ", M21=" + matrix[1][0] + ", M22=" + matrix[1][1] + ", SizingMethod='auto expand')" : "";
597
+
598
+ var newFilterValue = BuildNewCss(oldFilterValue, [matrixReg], matrixValue);
599
+
600
+ SetStyleFilterIE(elmt, newFilterValue);
601
+
602
+ _This.$CssMarginTop(elmt, offset.y);
603
+ _This.$CssMarginLeft(elmt, offset.x);
604
+ }
605
+ }
606
+
607
+ // Methods
608
+
609
+ //_This.$IsTouchDevice = function () {
610
+ // return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua);
611
+ //};
612
+
613
+ _This.$IsBrowserIE = IsBrowserIE;
614
+
615
+ _This.$IsBrowserIeQuirks = IsBrowserIeQuirks;
616
+
617
+ _This.$IsBrowserFireFox = IsBrowserFireFox;
618
+
619
+ _This.$IsBrowserSafari = IsBrowserSafari;
620
+
621
+ _This.$IsBrowserChrome = IsBrowserChrome;
622
+
623
+ _This.$IsBrowserOpera = IsBrowserOpera;
624
+
625
+ _This.$IsBrowserBadTransform = IsBrowserBadTransform;
626
+
627
+ _This.$IsBrowserIe9Earlier = IsBrowserIe9Earlier;
628
+
629
+ _This.$BrowserVersion = function () {
630
+ return browserRuntimeVersion;
631
+ };
632
+
633
+ _This.$BrowserEngineVersion = function () {
634
+ return browserEngineVersion || browserRuntimeVersion;
635
+ };
636
+
637
+ _This.$WebKitVersion = function () {
638
+ DetectBrowser();
639
+
640
+ return webkitVersion;
641
+ };
642
+
643
+ _This.$Delay = Delay;
644
+
645
+ _This.$Inherit = function (instance, baseClass) {
646
+ baseClass.apply(instance, [].slice.call(arguments, 2));
647
+ return Extend({}, instance);
648
+ };
649
+
650
+ function Construct(instance) {
651
+ instance.constructor === Construct.caller && instance.$Construct && instance.$Construct();
652
+ }
653
+
654
+ _This.$Construct = Construct;
655
+
656
+ _This.$GetElement = function (elmt) {
657
+ if (_This.$IsString(elmt)) {
658
+ elmt = document.getElementById(elmt);
659
+ }
660
+
661
+ return elmt;
662
+ };
663
+
664
+ function GetEvent(event) {
665
+ return event || window.event;
666
+ }
667
+
668
+ _This.$GetEvent = GetEvent;
669
+
670
+ _This.$EventSrc = function (event) {
671
+ event = GetEvent(event);
672
+ return event.target || event.srcElement || document;
673
+ };
674
+
675
+ _This.$EventDst = function (event) {
676
+ event = GetEvent(event);
677
+ return event.relatedTarget || event.toElement;
678
+ };
679
+
680
+ _This.$MousePosition = function (event) {
681
+ event = GetEvent(event);
682
+ var body = document.body;
683
+
684
+ return {
685
+ x: event.pageX || event.clientX + (_DocElmt.scrollLeft || body.scrollLeft || 0) - (_DocElmt.clientLeft || body.clientLeft || 0) || 0,
686
+ y: event.pageY || event.clientY + (_DocElmt.scrollTop || body.scrollTop || 0) - (_DocElmt.clientTop || body.clientTop || 0) || 0
687
+ };
688
+ };
689
+
690
+ _This.$PageScroll = function () {
691
+ var body = document.body;
692
+
693
+ return {
694
+ x: (window.pageXOffset || _DocElmt.scrollLeft || body.scrollLeft || 0) - (_DocElmt.clientLeft || body.clientLeft || 0),
695
+ y: (window.pageYOffset || _DocElmt.scrollTop || body.scrollTop || 0) - (_DocElmt.clientTop || body.clientTop || 0)
696
+ };
697
+ };
698
+
699
+ _This.$WindowSize = function () {
700
+ var body = document.body;
701
+
702
+ return {
703
+ x: body.clientWidth || _DocElmt.clientWidth,
704
+ y: body.clientHeight || _DocElmt.clientHeight
705
+ };
706
+ };
707
+
708
+ //_This.$GetElementPosition = function (elmt) {
709
+ // elmt = _This.$GetElement(elmt);
710
+ // var result = Point();
711
+
712
+ // // technique from:
713
+ // // http://www.quirksmode.org/js/findpos.html
714
+ // // with special check for "fixed" elements.
715
+
716
+ // while (elmt) {
717
+ // result.x += elmt.offsetLeft;
718
+ // result.y += elmt.offsetTop;
719
+
720
+ // var isFixed = _This.$GetElementStyle(elmt).position == "fixed";
721
+
722
+ // if (isFixed) {
723
+ // result = result.$Plus(_This.$PageScroll(window));
724
+ // }
725
+
726
+ // elmt = getOffsetParent(elmt, isFixed);
727
+ // }
728
+
729
+ // return result;
730
+ //};
731
+
732
+ //_This.$GetMouseScroll = function (event) {
733
+ // event = GetEvent(event);
734
+ // var delta = 0; // default value
735
+
736
+ // // technique from:
737
+ // // http://blog.paranoidferret.com/index.php/2007/10/31/javascript-tutorial-the-scroll-wheel/
738
+
739
+ // if (typeof (event.wheelDelta) == "number") {
740
+ // delta = event.wheelDelta;
741
+ // } else if (typeof (event.detail) == "number") {
742
+ // delta = event.detail * -1;
743
+ // } else {
744
+ // $JssorDebug$.$Fail("Unknown event mouse scroll, no known technique.");
745
+ // }
746
+
747
+ // // normalize value to [-1, 1]
748
+ // return delta ? delta / Math.abs(delta) : 0;
749
+ //};
750
+
751
+ //_This.$MakeAjaxRequest = function (url, callback) {
752
+ // var async = typeof (callback) == "function";
753
+ // var req = null;
754
+
755
+ // if (async) {
756
+ // var actual = callback;
757
+ // var callback = function () {
758
+ // Delay($Jssor$.$CreateCallback(null, actual, req), 1);
759
+ // };
760
+ // }
761
+
762
+ // if (window.ActiveXObject) {
763
+ // for (var i = 0; i < arrActiveX.length; i++) {
764
+ // try {
765
+ // req = new ActiveXObject(arrActiveX[i]);
766
+ // break;
767
+ // } catch (e) {
768
+ // continue;
769
+ // }
770
+ // }
771
+ // } else if (window.XMLHttpRequest) {
772
+ // req = new XMLHttpRequest();
773
+ // }
774
+
775
+ // if (!req) {
776
+ // $JssorDebug$.$Fail("Browser doesn't support XMLHttpRequest.");
777
+ // }
778
+
779
+ // if (async) {
780
+ // req.onreadystatechange = function () {
781
+ // if (req.readyState == 4) {
782
+ // // prevent memory leaks by breaking circular reference now
783
+ // req.onreadystatechange = new Function();
784
+ // callback();
785
+ // }
786
+ // };
787
+ // }
788
+
789
+ // try {
790
+ // req.open("GET", url, async);
791
+ // req.send(null);
792
+ // } catch (e) {
793
+ // $JssorDebug$.$Log(e.name + " while making AJAX request: " + e.message);
794
+
795
+ // req.onreadystatechange = null;
796
+ // req = null;
797
+
798
+ // if (async) {
799
+ // callback();
800
+ // }
801
+ // }
802
+
803
+ // return async ? null : req;
804
+ //};
805
+
806
+ //_This.$ParseXml = function (string) {
807
+ // var xmlDoc = null;
808
+
809
+ // if (window.ActiveXObject) {
810
+ // try {
811
+ // xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
812
+ // xmlDoc.async = false;
813
+ // xmlDoc.loadXML(string);
814
+ // } catch (e) {
815
+ // $JssorDebug$.$Log(e.name + " while parsing XML (ActiveX): " + e.message);
816
+ // }
817
+ // } else if (window.DOMParser) {
818
+ // try {
819
+ // var parser = new DOMParser();
820
+ // xmlDoc = parser.parseFromString(string, "text/xml");
821
+ // } catch (e) {
822
+ // $JssorDebug$.$Log(e.name + " while parsing XML (DOMParser): " + e.message);
823
+ // }
824
+ // } else {
825
+ // $JssorDebug$.$Fail("Browser doesn't support XML DOM.");
826
+ // }
827
+
828
+ // return xmlDoc;
829
+ //};
830
+
831
+ function Css(elmt, name, value) {
832
+ /// <summary>
833
+ /// access css
834
+ /// $Jssor$.$Css(elmt, name); //get css value
835
+ /// $Jssor$.$Css(elmt, name, value); //set css value
836
+ /// </summary>
837
+ /// <param name="elmt" type="HTMLElement">
838
+ /// the element to access css
839
+ /// </param>
840
+ /// <param name="name" type="String">
841
+ /// the name of css property
842
+ /// </param>
843
+ /// <param name="value" optional="true">
844
+ /// the value to set
845
+ /// </param>
846
+ if (value != undefined) {
847
+ elmt.style[name] = value;
848
+ }
849
+ else {
850
+ var style = elmt.currentStyle || elmt.style;
851
+ value = style[name];
852
+
853
+ if (value == "" && window.getComputedStyle) {
854
+ style = elmt.ownerDocument.defaultView.getComputedStyle(elmt, null);
855
+
856
+ style && (value = style.getPropertyValue(name) || style[name]);
857
+ }
858
+
859
+ return value;
860
+ }
861
+ }
862
+
863
+ function CssN(elmt, name, value, isDimensional) {
864
+ /// <summary>
865
+ /// access css as numeric
866
+ /// $Jssor$.$CssN(elmt, name); //get css value
867
+ /// $Jssor$.$CssN(elmt, name, value); //set css value
868
+ /// </summary>
869
+ /// <param name="elmt" type="HTMLElement">
870
+ /// the element to access css
871
+ /// </param>
872
+ /// <param name="name" type="String">
873
+ /// the name of css property
874
+ /// </param>
875
+ /// <param name="value" type="Number" optional="true">
876
+ /// the value to set
877
+ /// </param>
878
+ if (value != undefined) {
879
+ isDimensional && (value += "px");
880
+ Css(elmt, name, value);
881
+ }
882
+ else {
883
+ return ParseFloat(Css(elmt, name));
884
+ }
885
+ }
886
+
887
+ function CssP(elmt, name, value) {
888
+ /// <summary>
889
+ /// access css in pixel as numeric, like 'top', 'left', 'width', 'height'
890
+ /// $Jssor$.$CssP(elmt, name); //get css value
891
+ /// $Jssor$.$CssP(elmt, name, value); //set css value
892
+ /// </summary>
893
+ /// <param name="elmt" type="HTMLElement">
894
+ /// the element to access css
895
+ /// </param>
896
+ /// <param name="name" type="String">
897
+ /// the name of css property
898
+ /// </param>
899
+ /// <param name="value" type="Number" optional="true">
900
+ /// the value to set
901
+ /// </param>
902
+ return CssN(elmt, name, value, true);
903
+ }
904
+
905
+ function CssProxy(name, numericOrDimension) {
906
+ /// <summary>
907
+ /// create proxy to access css, CssProxy(name[, numericOrDimension]);
908
+ /// </summary>
909
+ /// <param name="elmt" type="HTMLElement">
910
+ /// the element to access css
911
+ /// </param>
912
+ /// <param name="numericOrDimension" type="Number" optional="true">
913
+ /// not set: access original css, 1: access css as numeric, 2: access css in pixel as numeric
914
+ /// </param>
915
+ var isDimensional = numericOrDimension & 2;
916
+ var cssAccessor = numericOrDimension ? CssN : Css;
917
+ return function (elmt, value) {
918
+ return cssAccessor(elmt, name, value, isDimensional);
919
+ };
920
+ }
921
+
922
+ function GetStyleOpacity(elmt) {
923
+ if (IsBrowserIE() && browserEngineVersion < 9) {
924
+ var match = /opacity=([^)]*)/.exec(elmt.style.filter || "");
925
+ return match ? (ParseFloat(match[1]) / 100) : 1;
926
+ }
927
+ else
928
+ return ParseFloat(elmt.style.opacity || "1");
929
+ }
930
+
931
+ function SetStyleOpacity(elmt, opacity, ie9EarlierForce) {
932
+
933
+ if (IsBrowserIE() && browserEngineVersion < 9) {
934
+ //var filterName = "filter"; // browserEngineVersion < 8 ? "filter" : "-ms-filter";
935
+ var finalFilter = elmt.style.filter || "";
936
+
937
+ // for CSS filter browsers (IE), remove alpha filter if it's unnecessary.
938
+ // update: doing _This always since IE9 beta seems to have broken the
939
+ // behavior if we rely on the programmatic filters collection.
940
+ var alphaReg = new RegExp(/[\s]*alpha\([^\)]*\)/g);
941
+
942
+ // important: note the lazy star! _This protects against
943
+ // multiple filters; we don't want to delete the other ones.
944
+ // update: also trimming extra whitespace around filter.
945
+
946
+ var ieOpacity = Math.round(100 * opacity);
947
+ var alphaFilter = "";
948
+ if (ieOpacity < 100 || ie9EarlierForce) {
949
+ alphaFilter = "alpha(opacity=" + ieOpacity + ") ";
950
+ //elmt.style["-ms-filter"] = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + ieOpacity + ") ";
951
+ }
952
+
953
+ var newFilterValue = BuildNewCss(finalFilter, [alphaReg], alphaFilter);
954
+
955
+ SetStyleFilterIE(elmt, newFilterValue);
956
+ }
957
+
958
+ //if (!IsBrowserIE() || browserEngineVersion >= 9)
959
+ else {
960
+ elmt.style.opacity = opacity == 1 ? "" : Math.round(opacity * 100) / 100;
961
+ }
962
+ }
963
+
964
+ function SetStyleTransformInternal(elmt, transform) {
965
+ var rotate = transform.$Rotate || 0;
966
+ var scale = transform.$Scale == undefined ? 1 : transform.$Scale;
967
+
968
+ if (IsBrowserIe9Earlier()) {
969
+ var matrix = _This.$CreateMatrix(rotate / 180 * Math.PI, scale, scale);
970
+ SetStyleMatrixIE(elmt, (!rotate && scale == 1) ? null : matrix, _This.$GetMatrixOffset(matrix, transform.$OriginalWidth, transform.$OriginalHeight));
971
+ }
972
+ else {
973
+ //rotate(15deg) scale(.5) translateZ(0)
974
+ var transformProperty = GetTransformProperty(elmt);
975
+ if (transformProperty) {
976
+ var transformValue = "rotate(" + rotate % 360 + "deg) scale(" + scale + ")";
977
+
978
+ //needed for touch device, no need for desktop device
979
+ if (IsBrowserChrome() && webkitVersion > 535 && "ontouchstart" in window)
980
+ transformValue += " perspective(2000px)";
981
+
982
+ elmt.style[transformProperty] = transformValue;
983
+ }
984
+ }
985
+ }
986
+
987
+ _This.$SetStyleTransform = function (elmt, transform) {
988
+ if (IsBrowserBadTransform()) {
989
+ Delay(_This.$CreateCallback(null, SetStyleTransformInternal, elmt, transform));
990
+ }
991
+ else {
992
+ SetStyleTransformInternal(elmt, transform);
993
+ }
994
+ };
995
+
996
+ _This.$SetStyleTransformOrigin = function (elmt, transformOrigin) {
997
+ var transformProperty = GetTransformProperty(elmt);
998
+
999
+ if (transformProperty)
1000
+ elmt.style[transformProperty + "Origin"] = transformOrigin;
1001
+ };
1002
+
1003
+ _This.$CssScale = function (elmt, scale) {
1004
+
1005
+ if (IsBrowserIE() && browserEngineVersion < 9 || (browserEngineVersion < 10 && IsBrowserIeQuirks())) {
1006
+ elmt.style.zoom = (scale == 1) ? "" : scale;
1007
+ }
1008
+ else {
1009
+ var transformProperty = GetTransformProperty(elmt);
1010
+
1011
+ if (transformProperty) {
1012
+ //rotate(15deg) scale(.5)
1013
+ var transformValue = "scale(" + scale + ")";
1014
+
1015
+ var oldTransformValue = elmt.style[transformProperty];
1016
+ var scaleReg = new RegExp(/[\s]*scale\(.*?\)/g);
1017
+
1018
+ var newTransformValue = BuildNewCss(oldTransformValue, [scaleReg], transformValue);
1019
+
1020
+ elmt.style[transformProperty] = newTransformValue;
1021
+ }
1022
+ }
1023
+ };
1024
+
1025
+ _This.$EnableHWA = function (elmt) {
1026
+ if (!elmt.style[GetTransformProperty(elmt)] || elmt.style[GetTransformProperty(elmt)] == "none")
1027
+ elmt.style[GetTransformProperty(elmt)] = "perspective(2000px)";
1028
+ };
1029
+
1030
+ _This.$DisableHWA = function (elmt) {
1031
+ //if (force || elmt.style[GetTransformProperty(elmt)] == "perspective(2000px)")
1032
+ elmt.style[GetTransformProperty(elmt)] = "none";
1033
+ };
1034
+
1035
+ var ie8OffsetWidth = 0;
1036
+ var ie8OffsetHeight = 0;
1037
+ //var ie8WindowResizeCallbackHandlers;
1038
+ //var ie8LastVerticalScrollbar;
1039
+ //var toggleInfo = "";
1040
+
1041
+ //function Ie8WindowResizeFilter(window, handler) {
1042
+
1043
+ // var trigger = true;
1044
+
1045
+ // var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement);
1046
+ // if (checkElement) {
1047
+ // //check vertical bar
1048
+ // //var hasVerticalBar = checkElement.scrollHeight > checkElement.clientHeight;
1049
+ // //var verticalBarToggle = hasVerticalBar != ie8LastVerticalScrollbar;
1050
+ // //ie8LastVerticalScrollbar = hasVerticalBar;
1051
+
1052
+ // var widthChange = checkElement.offsetWidth - ie8OffsetWidth;
1053
+ // var heightChange = checkElement.offsetHeight - ie8OffsetHeight;
1054
+ // if (widthChange || heightChange) {
1055
+
1056
+ // ie8OffsetWidth += widthChange;
1057
+ // ie8OffsetHeight += heightChange;
1058
+ // }
1059
+ // else
1060
+ // trigger = false;
1061
+ // }
1062
+
1063
+ // trigger && handler();
1064
+ //}
1065
+
1066
+ //_This.$OnWindowResize = function (window, handler) {
1067
+
1068
+ // if (IsBrowserIE() && browserEngineVersion < 9) {
1069
+ // if (!ie8WindowResizeCallbackHandlers) {
1070
+ // ie8WindowResizeCallbackHandlers = [handler];
1071
+ // handler = _This.$CreateCallback(null, Ie8WindowResizeFilter, window);
1072
+ // }
1073
+ // else {
1074
+ // ie8WindowResizeCallbackHandlers.push(handler);
1075
+ // return;
1076
+ // }
1077
+ // }
1078
+
1079
+ // _This.$AddEvent(window, "resize", handler);
1080
+ //};
1081
+
1082
+ _This.$WindowResizeFilter = function (window, handler) {
1083
+ return IsBrowserIe9Earlier() ? function () {
1084
+
1085
+ var trigger = true;
1086
+
1087
+ var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement);
1088
+ if (checkElement) {
1089
+ //check vertical bar
1090
+ //var hasVerticalBar = checkElement.scrollHeight > checkElement.clientHeight;
1091
+ //var verticalBarToggle = hasVerticalBar != ie8LastVerticalScrollbar;
1092
+ //ie8LastVerticalScrollbar = hasVerticalBar;
1093
+
1094
+ var widthChange = checkElement.offsetWidth - ie8OffsetWidth;
1095
+ var heightChange = checkElement.offsetHeight - ie8OffsetHeight;
1096
+ if (widthChange || heightChange) {
1097
+ ie8OffsetWidth += widthChange;
1098
+ ie8OffsetHeight += heightChange;
1099
+ }
1100
+ else
1101
+ trigger = false;
1102
+ }
1103
+
1104
+ trigger && handler();
1105
+
1106
+ } : handler;
1107
+ };
1108
+
1109
+ _This.$MouseOverOutFilter = function (handler, target) {
1110
+ /// <param name="target" type="HTMLDomElement">
1111
+ /// The target element to detect mouse over/out events. (for ie < 9 compatibility)
1112
+ /// </param>
1113
+
1114
+ $JssorDebug$.$Execute(function () {
1115
+ if (!target) {
1116
+ throw new Error("Null reference, parameter \"target\".");
1117
+ }
1118
+ });
1119
+
1120
+ return function (event) {
1121
+ event = GetEvent(event);
1122
+
1123
+ var eventName = event.type;
1124
+ var related = event.relatedTarget || (eventName == "mouseout" ? event.toElement : event.fromElement);
1125
+
1126
+ if (!related || (related !== target && !_This.$IsChild(target, related))) {
1127
+ handler(event);
1128
+ }
1129
+ };
1130
+ };
1131
+
1132
+ _This.$AddEvent = function (elmt, eventName, handler, useCapture) {
1133
+ elmt = _This.$GetElement(elmt);
1134
+
1135
+ // technique from:
1136
+ // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
1137
+
1138
+ if (elmt.addEventListener) {
1139
+ if (eventName == "mousewheel") {
1140
+ elmt.addEventListener("DOMMouseScroll", handler, useCapture);
1141
+ }
1142
+ // we are still going to add the mousewheel -- not a mistake!
1143
+ // _This is for opera, since it uses onmousewheel but needs addEventListener.
1144
+ elmt.addEventListener(eventName, handler, useCapture);
1145
+ }
1146
+ else if (elmt.attachEvent) {
1147
+ elmt.attachEvent("on" + eventName, handler);
1148
+ if (useCapture && elmt.setCapture) {
1149
+ elmt.setCapture();
1150
+ }
1151
+ }
1152
+
1153
+ $JssorDebug$.$Execute(function () {
1154
+ if (!elmt.addEventListener && !elmt.attachEvent) {
1155
+ $JssorDebug$.$Fail("Unable to attach event handler, no known technique.");
1156
+ }
1157
+ });
1158
+
1159
+ };
1160
+
1161
+ _This.$RemoveEvent = function (elmt, eventName, handler, useCapture) {
1162
+ elmt = _This.$GetElement(elmt);
1163
+
1164
+ // technique from:
1165
+ // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
1166
+
1167
+ if (elmt.removeEventListener) {
1168
+ if (eventName == "mousewheel") {
1169
+ elmt.removeEventListener("DOMMouseScroll", handler, useCapture);
1170
+ }
1171
+ // we are still going to remove the mousewheel -- not a mistake!
1172
+ // _This is for opera, since it uses onmousewheel but needs removeEventListener.
1173
+ elmt.removeEventListener(eventName, handler, useCapture);
1174
+ }
1175
+ else if (elmt.detachEvent) {
1176
+ elmt.detachEvent("on" + eventName, handler);
1177
+ if (useCapture && elmt.releaseCapture) {
1178
+ elmt.releaseCapture();
1179
+ }
1180
+ }
1181
+ };
1182
+
1183
+ _This.$FireEvent = function (elmt, eventName) {
1184
+ //var document = elmt.document;
1185
+
1186
+ $JssorDebug$.$Execute(function () {
1187
+ if (!document.createEvent && !document.createEventObject) {
1188
+ $JssorDebug$.$Fail("Unable to fire event, no known technique.");
1189
+ }
1190
+
1191
+ if (!elmt.dispatchEvent && !elmt.fireEvent) {
1192
+ $JssorDebug$.$Fail("Unable to fire event, no known technique.");
1193
+ }
1194
+ });
1195
+
1196
+ var evento;
1197
+
1198
+ if (document.createEvent) {
1199
+ evento = document.createEvent("HTMLEvents");
1200
+ evento.initEvent(eventName, false, false);
1201
+ elmt.dispatchEvent(evento);
1202
+ }
1203
+ else {
1204
+ var ieEventName = "on" + eventName;
1205
+ evento = document.createEventObject();
1206
+ //event.eventType = ieEventName;
1207
+ //event.eventName = ieEventName;
1208
+
1209
+ elmt.fireEvent(ieEventName, evento);
1210
+ }
1211
+ };
1212
+
1213
+ _This.$AddEventBrowserMouseUp = function (handler, userCapture) {
1214
+ _This.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture);
1215
+ };
1216
+
1217
+ _This.$RemoveEventBrowserMouseUp = function (handler, userCapture) {
1218
+ _This.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture);
1219
+ };
1220
+
1221
+ //_This.$AddEventBrowserMouseDown = function (handler, userCapture) {
1222
+ // _This.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture);
1223
+ //};
1224
+
1225
+ //_This.$RemoveEventBrowserMouseDown = function (handler, userCapture) {
1226
+ // _This.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture);
1227
+ //};
1228
+
1229
+ _This.$CancelEvent = function (event) {
1230
+ event = GetEvent(event);
1231
+
1232
+ // technique from:
1233
+ // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
1234
+
1235
+ if (event.preventDefault) {
1236
+ event.preventDefault(); // W3C for preventing default
1237
+ }
1238
+
1239
+ event.cancel = true; // legacy for preventing default
1240
+ event.returnValue = false; // IE for preventing default
1241
+ };
1242
+
1243
+ _This.$StopEvent = function (event) {
1244
+ event = GetEvent(event);
1245
+
1246
+ // technique from:
1247
+ // http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
1248
+
1249
+ if (event.stopPropagation) {
1250
+ event.stopPropagation(); // W3C for stopping propagation
1251
+ }
1252
+
1253
+ event.cancelBubble = true; // IE for stopping propagation
1254
+ };
1255
+
1256
+ _This.$CreateCallback = function (object, method) {
1257
+ // create callback args
1258
+ var initialArgs = [].slice.call(arguments, 2);
1259
+
1260
+ // create closure to apply method
1261
+ var callback = function () {
1262
+ // concatenate new args, but make a copy of initialArgs first
1263
+ var args = initialArgs.concat([].slice.call(arguments, 0));
1264
+
1265
+ return method.apply(object, args);
1266
+ };
1267
+
1268
+ //$JssorDebug$.$LiveStamp(callback, "callback_" + ($Jssor$.$GetNow() & 0xFFFFFF));
1269
+
1270
+ return callback;
1271
+ };
1272
+
1273
+ var _Freeer;
1274
+ _This.$FreeElement = function (elmt) {
1275
+ if (!_Freeer)
1276
+ _Freeer = _This.$CreateDiv();
1277
+
1278
+ if (elmt) {
1279
+ $Jssor$.$AppendChild(_Freeer, elmt);
1280
+ $Jssor$.$ClearInnerHtml(_Freeer);
1281
+ }
1282
+ };
1283
+
1284
+ _This.$InnerText = function (elmt, text) {
1285
+ if (text == undefined)
1286
+ return elmt.textContent || elmt.innerText;
1287
+
1288
+ var textNode = document.createTextNode(text);
1289
+ _This.$ClearInnerHtml(elmt);
1290
+ elmt.appendChild(textNode);
1291
+ };
1292
+
1293
+ _This.$InnerHtml = function (elmt, html) {
1294
+ if (html == undefined)
1295
+ return elmt.innerHTML;
1296
+
1297
+ elmt.innerHTML = html;
1298
+ };
1299
+
1300
+ _This.$GetClientRect = function (elmt) {
1301
+ var rect = elmt.getBoundingClientRect();
1302
+
1303
+ return { x: rect.left, y: rect.top, w: rect.right - rect.left, h: rect.bottom - rect.top };
1304
+ };
1305
+
1306
+ _This.$ClearInnerHtml = function (elmt) {
1307
+ elmt.innerHTML = "";
1308
+ };
1309
+
1310
+ _This.$EncodeHtml = function (text) {
1311
+ var div = _This.$CreateDiv();
1312
+ _This.$InnerText(div, text);
1313
+ return _This.$InnerHtml(div);
1314
+ };
1315
+
1316
+ _This.$DecodeHtml = function (html) {
1317
+ var div = _This.$CreateDiv();
1318
+ _This.$InnerHtml(div, html);
1319
+ return _This.$InnerText(div);
1320
+ };
1321
+
1322
+ _This.$SelectElement = function (elmt) {
1323
+ var userSelection;
1324
+ if (window.getSelection) {
1325
+ //W3C default
1326
+ userSelection = window.getSelection();
1327
+ }
1328
+ var theRange = null;
1329
+ if (document.createRange) {
1330
+ theRange = document.createRange();
1331
+ theRange.selectNode(elmt);
1332
+ }
1333
+ else {
1334
+ theRange = document.body.createTextRange();
1335
+ theRange.moveToElementText(elmt);
1336
+ theRange.select();
1337
+ }
1338
+ //set user selection
1339
+ if (userSelection)
1340
+ userSelection.addRange(theRange);
1341
+ };
1342
+
1343
+ _This.$DeselectElements = function () {
1344
+ if (document.selection) {
1345
+ document.selection.empty();
1346
+ } else if (window.getSelection) {
1347
+ window.getSelection().removeAllRanges();
1348
+ }
1349
+ };
1350
+
1351
+ _This.$Children = function (elmt) {
1352
+ var children = [];
1353
+
1354
+ for (var tmpEl = elmt.firstChild; tmpEl; tmpEl = tmpEl.nextSibling) {
1355
+ if (tmpEl.nodeType == 1) {
1356
+ children.push(tmpEl);
1357
+ }
1358
+ }
1359
+
1360
+ return children;
1361
+ };
1362
+
1363
+ function FindChild(elmt, attrValue, noDeep, attrName) {
1364
+ attrName = attrName || "u";
1365
+
1366
+ for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
1367
+ if (elmt.nodeType == 1) {
1368
+ if (AttributeEx(elmt, attrName) == attrValue)
1369
+ return elmt;
1370
+
1371
+ if (!noDeep) {
1372
+ var childRet = FindChild(elmt, attrValue, noDeep, attrName);
1373
+ if (childRet)
1374
+ return childRet;
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+
1380
+ _This.$FindChild = FindChild;
1381
+
1382
+ function FindChildren(elmt, attrValue, noDeep, attrName) {
1383
+ attrName = attrName || "u";
1384
+
1385
+ var ret = [];
1386
+
1387
+ for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
1388
+ if (elmt.nodeType == 1) {
1389
+ if (AttributeEx(elmt, attrName) == attrValue)
1390
+ ret.push(elmt);
1391
+
1392
+ if (!noDeep) {
1393
+ var childRet = FindChildren(elmt, attrValue, noDeep, attrName);
1394
+ if (childRet.length)
1395
+ ret = ret.concat(childRet);
1396
+ }
1397
+ }
1398
+ }
1399
+
1400
+ return ret;
1401
+ }
1402
+
1403
+ _This.$FindChildren = FindChildren;
1404
+
1405
+ function FindChildByTag(elmt, tagName, noDeep) {
1406
+
1407
+ for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
1408
+ if (elmt.nodeType == 1) {
1409
+ if (elmt.tagName == tagName)
1410
+ return elmt;
1411
+
1412
+ if (!noDeep) {
1413
+ var childRet = FindChildByTag(elmt, tagName, noDeep);
1414
+ if (childRet)
1415
+ return childRet;
1416
+ }
1417
+ }
1418
+ }
1419
+ }
1420
+
1421
+ _This.$FindChildByTag = FindChildByTag;
1422
+
1423
+ function FindChildrenByTag(elmt, tagName, noDeep) {
1424
+ var ret = [];
1425
+
1426
+ for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
1427
+ if (elmt.nodeType == 1) {
1428
+ if (!tagName || elmt.tagName == tagName)
1429
+ ret.push(elmt);
1430
+
1431
+ if (!noDeep) {
1432
+ var childRet = FindChildrenByTag(elmt, tagName, noDeep);
1433
+ if (childRet.length)
1434
+ ret = ret.concat(childRet);
1435
+ }
1436
+ }
1437
+ }
1438
+
1439
+ return ret;
1440
+ }
1441
+
1442
+ _This.$FindChildrenByTag = FindChildrenByTag;
1443
+
1444
+ _This.$GetElementsByTag = function (elmt, tagName) {
1445
+ return elmt.getElementsByTagName(tagName);
1446
+ };
1447
+
1448
+ function Extend(target) {
1449
+ for (var i = 1; i < arguments.length; i++) {
1450
+
1451
+ var options = arguments[i];
1452
+
1453
+ // Only deal with non-null/undefined values
1454
+ if (options) {
1455
+ // Extend the base object
1456
+ for (var name in options) {
1457
+ target[name] = options[name];
1458
+ }
1459
+ }
1460
+ }
1461
+
1462
+ // Return the modified object
1463
+ return target;
1464
+ }
1465
+
1466
+ _This.$Extend = Extend;
1467
+
1468
+ function Unextend(target, options) {
1469
+ $JssorDebug$.$Assert(options);
1470
+
1471
+ var unextended = {};
1472
+
1473
+ // Extend the base object
1474
+ for (var name in target) {
1475
+ if (target[name] !== options[name]) {
1476
+ unextended[name] = target[name];
1477
+ }
1478
+ }
1479
+
1480
+ // Return the modified object
1481
+ return unextended;
1482
+ }
1483
+
1484
+ _This.$Unextend = Unextend;
1485
+
1486
+ _This.$IsUndefined = function (obj) {
1487
+ return type(obj) == "undefined";
1488
+ };
1489
+
1490
+ _This.$IsFunction = function (obj) {
1491
+ return type(obj) == "function";
1492
+ };
1493
+
1494
+ _This.$IsArray = function (obj) {
1495
+ return type(obj) == "array";
1496
+ };
1497
+
1498
+ _This.$IsString = function (obj) {
1499
+ return type(obj) == "string";
1500
+ };
1501
+
1502
+ _This.$IsNumeric = function (obj) {
1503
+ return !isNaN(ParseFloat(obj)) && isFinite(obj);
1504
+ };
1505
+
1506
+ _This.$IsWindow = function (obj) {
1507
+ return obj && obj == obj.window;
1508
+ };
1509
+
1510
+ _This.$Type = type;
1511
+
1512
+ // args is for internal usage only
1513
+ _This.$Each = each;
1514
+
1515
+ _This.$IsPlainObject = isPlainObject;
1516
+
1517
+ function CreateElement(tagName) {
1518
+ return document.createElement(tagName);
1519
+ }
1520
+
1521
+ _This.$CreateElement = CreateElement;
1522
+
1523
+ _This.$CreateDiv = function () {
1524
+ return CreateElement("DIV", document);
1525
+ };
1526
+
1527
+ _This.$CreateSpan = function () {
1528
+ return CreateElement("SPAN", document);
1529
+ };
1530
+
1531
+ _This.$EmptyFunction = function () { };
1532
+
1533
+ function Attribute(elmt, name, value) {
1534
+ if (value == undefined)
1535
+ return elmt.getAttribute(name);
1536
+
1537
+ elmt.setAttribute(name, value);
1538
+ }
1539
+
1540
+ function AttributeEx(elmt, name) {
1541
+ return Attribute(elmt, name) || Attribute(elmt, "data-" + name);
1542
+ }
1543
+
1544
+ _This.$Attribute = Attribute;
1545
+ _This.$AttributeEx = AttributeEx;
1546
+
1547
+ function ClassName(elmt, className) {
1548
+ if (className == undefined)
1549
+ return elmt.className;
1550
+
1551
+ elmt.className = className;
1552
+ }
1553
+
1554
+ _This.$ClassName = ClassName;
1555
+
1556
+ function ToHash(array) {
1557
+ var hash = {};
1558
+
1559
+ each(array, function (item) {
1560
+ hash[item] = item;
1561
+ });
1562
+
1563
+ return hash;
1564
+ }
1565
+
1566
+ _This.$ToHash = ToHash;
1567
+
1568
+ function Join(separator, strings) {
1569
+ /// <param name="separator" type="String">
1570
+ /// The element to show the dialog around
1571
+ /// </param>
1572
+ /// <param name="strings" type="Array" value="['1']">
1573
+ /// The element to show the dialog around
1574
+ /// </param>
1575
+
1576
+ var joined = "";
1577
+
1578
+ each(strings, function (str) {
1579
+ joined && (joined += separator);
1580
+ joined += str;
1581
+ });
1582
+
1583
+ return joined;
1584
+ }
1585
+
1586
+ _This.$Join = Join;
1587
+
1588
+ _This.$AddClass = function (elmt, className) {
1589
+ var newClassName = ClassName(elmt) + " " + className;
1590
+ ClassName(elmt, Join(" ", ToHash(newClassName.match(REGEX_WHITESPACE_GLOBAL))));
1591
+ };
1592
+
1593
+ _This.$RemoveClass = function (elmt, className) {
1594
+ ClassName(elmt, Join(" ", _This.$Unextend(ToHash(ClassName(elmt).match(REGEX_WHITESPACE_GLOBAL)), ToHash(className.match(REGEX_WHITESPACE_GLOBAL)))));
1595
+ };
1596
+
1597
+ _This.$ParentNode = function (elmt) {
1598
+ return elmt.parentNode;
1599
+ };
1600
+
1601
+ _This.$HideElement = function (elmt) {
1602
+ _This.$CssDisplay(elmt, "none");
1603
+ };
1604
+
1605
+ _This.$EnableElement = function (elmt, notEnable) {
1606
+ if (notEnable) {
1607
+ _This.$Attribute(elmt, "disabled", true);
1608
+ }
1609
+ else {
1610
+ _This.$RemoveAttribute(elmt, "disabled");
1611
+ }
1612
+ };
1613
+
1614
+ _This.$HideElements = function (elmts) {
1615
+ for (var i = 0; i < elmts.length; i++) {
1616
+ _This.$HideElement(elmts[i]);
1617
+ }
1618
+ };
1619
+
1620
+ _This.$ShowElement = function (elmt, hide) {
1621
+ _This.$CssDisplay(elmt, hide ? "none" : "");
1622
+ };
1623
+
1624
+ _This.$ShowElements = function (elmts, hide) {
1625
+ for (var i = 0; i < elmts.length; i++) {
1626
+ _This.$ShowElement(elmts[i], hide);
1627
+ }
1628
+ };
1629
+
1630
+ _This.$RemoveAttribute = function (elmt, attrbuteName) {
1631
+ elmt.removeAttribute(attrbuteName);
1632
+ };
1633
+
1634
+ _This.$CanClearClip = function () {
1635
+ return IsBrowserIE() && browserRuntimeVersion < 10;
1636
+ };
1637
+
1638
+ _This.$SetStyleClip = function (elmt, clip) {
1639
+ if (clip) {
1640
+ elmt.style.clip = "rect(" + Math.round(clip.$Top) + "px " + Math.round(clip.$Right) + "px " + Math.round(clip.$Bottom) + "px " + Math.round(clip.$Left) + "px)";
1641
+ }
1642
+ else {
1643
+ var cssText = elmt.style.cssText;
1644
+ var clipRegs = [
1645
+ new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),
1646
+ new RegExp(/[\s]*cliptop: .*?[;]?/i),
1647
+ new RegExp(/[\s]*clipright: .*?[;]?/i),
1648
+ new RegExp(/[\s]*clipbottom: .*?[;]?/i),
1649
+ new RegExp(/[\s]*clipleft: .*?[;]?/i)
1650
+ ];
1651
+
1652
+ var newCssText = BuildNewCss(cssText, clipRegs, "");
1653
+
1654
+ $Jssor$.$CssCssText(elmt, newCssText);
1655
+ }
1656
+ };
1657
+
1658
+ _This.$GetNow = function () {
1659
+ return new Date().getTime();
1660
+ };
1661
+
1662
+ _This.$AppendChild = function (elmt, child) {
1663
+ elmt.appendChild(child);
1664
+ };
1665
+
1666
+ _This.$AppendChildren = function (elmt, children) {
1667
+ each(children, function (child) {
1668
+ _This.$AppendChild(elmt, child);
1669
+ });
1670
+ };
1671
+
1672
+ _This.$InsertBefore = function (elmt, child, refObject) {
1673
+ elmt.insertBefore(child, refObject);
1674
+ };
1675
+
1676
+ _This.$InsertAdjacentHtml = function (elmt, where, text) {
1677
+ elmt.insertAdjacentHTML(where, text);
1678
+ };
1679
+
1680
+ _This.$RemoveChild = function (elmt, child) {
1681
+ elmt.removeChild(child);
1682
+ };
1683
+
1684
+ _This.$RemoveChildren = function (elmt, children) {
1685
+ each(children, function (child) {
1686
+ _This.$RemoveChild(elmt, child);
1687
+ });
1688
+ };
1689
+
1690
+ _This.$ClearChildren = function (elmt) {
1691
+ _This.$RemoveChildren(elmt, _This.$Children(elmt));
1692
+ };
1693
+
1694
+ _This.$ParseInt = function (str, radix) {
1695
+ return parseInt(str, radix || 10);
1696
+ };
1697
+
1698
+ function ParseFloat(str) {
1699
+ return parseFloat(str);
1700
+ }
1701
+
1702
+ _This.$ParseFloat = ParseFloat;
1703
+
1704
+ _This.$IsChild = function (elmtA, elmtB) {
1705
+ var body = document.body;
1706
+ while (elmtB && elmtA != elmtB && body != elmtB) {
1707
+ try {
1708
+ elmtB = elmtB.parentNode;
1709
+ } catch (e) {
1710
+ // Firefox sometimes fires events for XUL elements, which throws
1711
+ // a "permission denied" error. so this is not a child.
1712
+ return false;
1713
+ }
1714
+ }
1715
+ return elmtA == elmtB;
1716
+ };
1717
+
1718
+ function CloneNode(elmt, noDeep, keepId) {
1719
+ var clone = elmt.cloneNode(!noDeep);
1720
+ if (!keepId) {
1721
+ _This.$RemoveAttribute(clone, "id");
1722
+ }
1723
+
1724
+ return clone;
1725
+ }
1726
+
1727
+ _This.$CloneNode = CloneNode;
1728
+
1729
+ function TranslateTransition(transition) {
1730
+ if (transition) {
1731
+ var flyDirection = transition.$FlyDirection;
1732
+
1733
+ if (flyDirection & 1) {
1734
+ transition.x = transition.$ScaleHorizontal || 1;
1735
+ }
1736
+ if (flyDirection & 2) {
1737
+ transition.x = -transition.$ScaleHorizontal || -1;
1738
+ }
1739
+ if (flyDirection & 4) {
1740
+ transition.y = transition.$ScaleVertical || 1;
1741
+ }
1742
+ if (flyDirection & 8) {
1743
+ transition.y = -transition.$ScaleVertical || -1;
1744
+ }
1745
+
1746
+ if (transition.$Rotate == true)
1747
+ transition.$Rotate = 1;
1748
+
1749
+ TranslateTransition(transition.$Brother);
1750
+ }
1751
+ }
1752
+
1753
+ _This.$TranslateTransitions = function (transitions) {
1754
+ /// <summary>
1755
+ /// For backward compatibility only.
1756
+ /// </summary>
1757
+ if (transitions) {
1758
+ for (var i = 0; i < transitions.length; i++) {
1759
+ TranslateTransition(transitions[i]);
1760
+ }
1761
+ for (var name in transitions) {
1762
+ TranslateTransition(transitions[name]);
1763
+ }
1764
+ }
1765
+ };
1766
+
1767
+ //function ImageLoader() {
1768
+ // var _ThisImageLoader = this;
1769
+ // var _BaseImageLoader = _This.$Inherit(_ThisImageLoader, $JssorObject$);
1770
+
1771
+ // var _ImageLoading = 1;
1772
+ // var _MainImageSrc;
1773
+ // var _MainImage;
1774
+ // var _CompleteCallback;
1775
+ // var _MainImageAbort;
1776
+
1777
+ // function LoadCompleteCallback(image, abort) {
1778
+ // _ImageLoading--;
1779
+
1780
+ // if (image) {
1781
+ // _This.$RemoveEvent(image, "load");
1782
+ // _This.$RemoveEvent(image, "abort");
1783
+ // _This.$RemoveEvent(image, "error");
1784
+
1785
+ // if (_MainImageSrc == image.src) {
1786
+ // _MainImage = image;
1787
+ // _MainImageAbort = abort;
1788
+ // }
1789
+ // }
1790
+
1791
+ // _CompleteCallback && _CompleteCallback(_MainImage, _MainImageAbort);
1792
+ // }
1793
+
1794
+ // function LoadImage(src) {
1795
+ // _ImageLoading++;
1796
+
1797
+ // if (IsBrowserOpera() && browserRuntimeVersion < 11.6 || !src) {
1798
+ // LoadImageCallback(callback, null, !src);
1799
+ // }
1800
+ // else {
1801
+ // var image = new Image();
1802
+
1803
+ // _This.$AddEvent(image, "load", _This.$CreateCallback(null, LoadImageCallback, image, false));
1804
+
1805
+ // var abortHandler = _This.$CreateCallback(null, LoadImageCallback, image, true);
1806
+ // _This.$AddEvent(image, "abort", abortHandler);
1807
+ // _This.$AddEvent(image, "error", abortHandler);
1808
+
1809
+ // image.src = src;
1810
+ // }
1811
+ // }
1812
+
1813
+ // _ThisImageLoader.$LoadImage = function (src, callback) {
1814
+ // _MainImageSrc = src;
1815
+ // _CompleteCallback = callback;
1816
+
1817
+ // LoadImage(src);
1818
+ // LoadComplete();
1819
+ // };
1820
+
1821
+ // _ThisImageLoader.$LoadImages = function (imageElmts, mainImageElmt, callback) {
1822
+ // mainImageElmt && (_MainImageSrc = mainImageElmt.src);
1823
+ // _CompleteCallback = callback;
1824
+
1825
+ // each(imageElmts, function (imageElmt) {
1826
+ // LoadImage(imageElmt.src);
1827
+ // });
1828
+ // LoadComplete();
1829
+ // };
1830
+ //}
1831
+
1832
+ _This.$LoadImage = function (src, callback) {
1833
+ var image = new Image();
1834
+
1835
+ function LoadImageCompleteHandler(abort) {
1836
+ _This.$RemoveEvent(image, "load", LoadImageCompleteHandler);
1837
+ _This.$RemoveEvent(image, "abort", ErrorOrAbortHandler);
1838
+ _This.$RemoveEvent(image, "error", ErrorOrAbortHandler);
1839
+
1840
+ if (callback)
1841
+ callback(image, abort);
1842
+ }
1843
+
1844
+ function ErrorOrAbortHandler() {
1845
+ LoadImageCompleteHandler(true);
1846
+ }
1847
+
1848
+ if (IsBrowserOpera() && browserRuntimeVersion < 11.6 || !src) {
1849
+ LoadImageCompleteHandler(!src);
1850
+ }
1851
+ else {
1852
+
1853
+ _This.$AddEvent(image, "load", LoadImageCompleteHandler);
1854
+ _This.$AddEvent(image, "abort", ErrorOrAbortHandler);
1855
+ _This.$AddEvent(image, "error", ErrorOrAbortHandler);
1856
+
1857
+ image.src = src;
1858
+ }
1859
+ };
1860
+
1861
+ _This.$LoadImages = function (imageElmts, mainImageElmt, callback) {
1862
+
1863
+ var _ImageLoading = imageElmts.length + 1;
1864
+
1865
+ function LoadImageCompleteEventHandler(image, abort) {
1866
+ _ImageLoading--;
1867
+ if (mainImageElmt && image && image.src == mainImageElmt.src)
1868
+ mainImageElmt = image;
1869
+ !_ImageLoading && callback && callback(mainImageElmt);
1870
+ }
1871
+
1872
+ each(imageElmts, function (imageElmt) {
1873
+ _This.$LoadImage(imageElmt.src, LoadImageCompleteEventHandler);
1874
+ });
1875
+
1876
+ LoadImageCompleteEventHandler();
1877
+ };
1878
+
1879
+ _This.$BuildElement = function (template, tagName, replacer, createCopy) {
1880
+ if (createCopy)
1881
+ template = CloneNode(template);
1882
+
1883
+ var templateHolders = FindChildren(template, tagName);
1884
+ if (!templateHolders.length)
1885
+ templateHolders = $Jssor$.$GetElementsByTag(template, tagName);
1886
+
1887
+ for (var j = templateHolders.length - 1; j > -1; j--) {
1888
+ var templateHolder = templateHolders[j];
1889
+ var replaceItem = CloneNode(replacer);
1890
+ ClassName(replaceItem, ClassName(templateHolder));
1891
+ $Jssor$.$CssCssText(replaceItem, templateHolder.style.cssText);
1892
+
1893
+ var thumbnailPlaceHolderParent = $Jssor$.$ParentNode(templateHolder);
1894
+ $Jssor$.$InsertBefore(thumbnailPlaceHolderParent, replaceItem, templateHolder);
1895
+ $Jssor$.$RemoveChild(thumbnailPlaceHolderParent, templateHolder);
1896
+ }
1897
+
1898
+ return template;
1899
+ };
1900
+
1901
+ var _MouseDownButtons;
1902
+ function JssorButtonEx(elmt) {
1903
+ var _Self = this;
1904
+
1905
+ var _OriginClassName;
1906
+
1907
+ var _IsMouseDown; //class name 'dn'
1908
+ var _IsSelected; //class name 1(active): 'av', 2(passive): 'pv'
1909
+ var _IsDisabled; //class name 'ds'
1910
+
1911
+ function Highlight() {
1912
+ var className = _OriginClassName;
1913
+
1914
+ if (_IsDisabled) {
1915
+ className += 'ds';
1916
+ }
1917
+ else if (_IsMouseDown) {
1918
+ className += 'dn';
1919
+ }
1920
+ else if (_IsSelected == 2) {
1921
+ className += "pv";
1922
+ }
1923
+ else if (_IsSelected) {
1924
+ className += "av";
1925
+ }
1926
+
1927
+ ClassName(elmt, className);
1928
+ }
1929
+
1930
+ function OnMouseDown(event) {
1931
+ if (_IsDisabled) {
1932
+ _This.$CancelEvent(event);
1933
+ }
1934
+ else {
1935
+ _MouseDownButtons.push(_Self);
1936
+
1937
+ _IsMouseDown = true;
1938
+
1939
+ Highlight();
1940
+ }
1941
+ }
1942
+
1943
+ _Self.$MouseUp = function () {
1944
+ /// <summary>
1945
+ /// Internal member function, do not use it.
1946
+ /// </summary>
1947
+ /// <private />
1948
+
1949
+ _IsMouseDown = false;
1950
+
1951
+ Highlight();
1952
+ };
1953
+
1954
+ _Self.$Selected = function (activate) {
1955
+ if (activate != undefined) {
1956
+ _IsSelected = activate;
1957
+
1958
+ Highlight();
1959
+ }
1960
+ else {
1961
+ return _IsSelected;
1962
+ }
1963
+ };
1964
+
1965
+ _Self.$Enable = function (enable) {
1966
+ if (enable != undefined) {
1967
+ _IsDisabled = !enable;
1968
+
1969
+ Highlight();
1970
+ }
1971
+ else {
1972
+ return !_IsDisabled;
1973
+ }
1974
+ };
1975
+
1976
+ //JssorButtonEx Constructor
1977
+ {
1978
+ elmt = _This.$GetElement(elmt);
1979
+
1980
+ if (!_MouseDownButtons) {
1981
+ _This.$AddEventBrowserMouseUp(function () {
1982
+ var oldMouseDownButtons = _MouseDownButtons;
1983
+ _MouseDownButtons = [];
1984
+
1985
+ each(oldMouseDownButtons, function (button) {
1986
+ button.$MouseUp();
1987
+ });
1988
+ });
1989
+
1990
+ _MouseDownButtons = [];
1991
+ }
1992
+
1993
+ _OriginClassName = ClassName(elmt);
1994
+
1995
+ $Jssor$.$AddEvent(elmt, "mousedown", OnMouseDown);
1996
+ }
1997
+ }
1998
+
1999
+ _This.$Buttonize = function (elmt) {
2000
+ return new JssorButtonEx(elmt);
2001
+ };
2002
+
2003
+ _This.$Css = Css;
2004
+ _This.$CssN = CssN;
2005
+ _This.$CssP = CssP;
2006
+
2007
+ _This.$CssOverflow = CssProxy("overflow");
2008
+
2009
+ _This.$CssTop = CssProxy("top", 2);
2010
+ _This.$CssLeft = CssProxy("left", 2);
2011
+ _This.$CssWidth = CssProxy("width", 2);
2012
+ _This.$CssHeight = CssProxy("height", 2);
2013
+ _This.$CssMarginLeft = CssProxy("marginLeft", 2);
2014
+ _This.$CssMarginTop = CssProxy("marginTop", 2);
2015
+ _This.$CssPosition = CssProxy("position");
2016
+ _This.$CssDisplay = CssProxy("display");
2017
+ _This.$CssZIndex = CssProxy("zIndex", 1);
2018
+ _This.$CssFloat = function (elmt, floatValue) {
2019
+ return Css(elmt, IsBrowserIE() ? "styleFloat" : "cssFloat", floatValue);
2020
+ };
2021
+ _This.$CssOpacity = function (elmt, opacity, ie9EarlierForce) {
2022
+ if (opacity != undefined) {
2023
+ SetStyleOpacity(elmt, opacity, ie9EarlierForce);
2024
+ }
2025
+ else {
2026
+ return GetStyleOpacity(elmt);
2027
+ }
2028
+ };
2029
+
2030
+ _This.$CssCssText = function (elmt, text) {
2031
+ if (text != undefined) {
2032
+ elmt.style.cssText = text;
2033
+ }
2034
+ else {
2035
+ return elmt.style.cssText;
2036
+ }
2037
+ };
2038
+
2039
+ var _StyleGetter = {
2040
+ $Opacity: _This.$CssOpacity,
2041
+ $Top: _This.$CssTop,
2042
+ $Left: _This.$CssLeft,
2043
+ $Width: _This.$CssWidth,
2044
+ $Height: _This.$CssHeight,
2045
+ $Position: _This.$CssPosition,
2046
+ $Display: _This.$CssDisplay,
2047
+ $ZIndex: _This.$CssZIndex
2048
+ };
2049
+
2050
+ var _StyleSetterReserved;
2051
+
2052
+ function StyleSetter() {
2053
+ if (!_StyleSetterReserved) {
2054
+ _StyleSetterReserved = Extend({
2055
+ $MarginTop: _This.$CssMarginTop,
2056
+ $MarginLeft: _This.$CssMarginLeft,
2057
+ $Clip: _This.$SetStyleClip,
2058
+ $Transform: _This.$SetStyleTransform
2059
+ }, _StyleGetter);
2060
+ }
2061
+ return _StyleSetterReserved;
2062
+ }
2063
+
2064
+ function StyleSetterEx() {
2065
+ StyleSetter();
2066
+
2067
+ //For Compression Only
2068
+ _StyleSetterReserved.$Transform = _StyleSetterReserved.$Transform;
2069
+
2070
+ return _StyleSetterReserved;
2071
+ }
2072
+
2073
+ _This.$StyleSetter = StyleSetter;
2074
+
2075
+ _This.$StyleSetterEx = StyleSetterEx;
2076
+
2077
+ _This.$GetStyles = function (elmt, originStyles) {
2078
+ StyleSetter();
2079
+
2080
+ var styles = {};
2081
+
2082
+ each(originStyles, function (value, key) {
2083
+ if (_StyleGetter[key]) {
2084
+ styles[key] = _StyleGetter[key](elmt);
2085
+ }
2086
+ });
2087
+
2088
+ return styles;
2089
+ };
2090
+
2091
+ _This.$SetStyles = function (elmt, styles) {
2092
+ var styleSetter = StyleSetter();
2093
+
2094
+ each(styles, function (value, key) {
2095
+ styleSetter[key] && styleSetter[key](elmt, value);
2096
+ });
2097
+ };
2098
+
2099
+ _This.$SetStylesEx = function (elmt, styles) {
2100
+ StyleSetterEx();
2101
+
2102
+ _This.$SetStyles(elmt, styles);
2103
+ };
2104
+
2105
+ $JssorMatrix$ = new function () {
2106
+ var _ThisMatrix = this;
2107
+
2108
+ function Multiply(ma, mb) {
2109
+ var acs = ma[0].length;
2110
+ var rows = ma.length;
2111
+ var cols = mb[0].length;
2112
+
2113
+ var matrix = [];
2114
+
2115
+ for (var r = 0; r < rows; r++) {
2116
+ var row = matrix[r] = [];
2117
+ for (var c = 0; c < cols; c++) {
2118
+ var unitValue = 0;
2119
+
2120
+ for (var ac = 0; ac < acs; ac++) {
2121
+ unitValue += ma[r][ac] * mb[ac][c];
2122
+ }
2123
+
2124
+ row[c] = unitValue;
2125
+ }
2126
+ }
2127
+
2128
+ return matrix;
2129
+ }
2130
+
2131
+ _ThisMatrix.$ScaleX = function (matrix, sx) {
2132
+ return _ThisMatrix.$ScaleXY(matrix, sx, 0);
2133
+ };
2134
+
2135
+ _ThisMatrix.$ScaleY = function (matrix, sy) {
2136
+ return _ThisMatrix.$ScaleXY(matrix, 0, sy);
2137
+ };
2138
+
2139
+ _ThisMatrix.$ScaleXY = function (matrix, sx, sy) {
2140
+ return Multiply(matrix, [[sx, 0], [0, sy]]);
2141
+ };
2142
+
2143
+ _ThisMatrix.$TransformPoint = function (matrix, p) {
2144
+ var pMatrix = Multiply(matrix, [[p.x], [p.y]]);
2145
+
2146
+ return Point(pMatrix[0][0], pMatrix[1][0]);
2147
+ };
2148
+ };
2149
+
2150
+ _This.$CreateMatrix = function (alpha, scaleX, scaleY) {
2151
+ var cos = Math.cos(alpha);
2152
+ var sin = Math.sin(alpha);
2153
+ //var r11 = cos;
2154
+ //var r21 = sin;
2155
+ //var r12 = -sin;
2156
+ //var r22 = cos;
2157
+
2158
+ //var m11 = cos * scaleX;
2159
+ //var m12 = -sin * scaleY;
2160
+ //var m21 = sin * scaleX;
2161
+ //var m22 = cos * scaleY;
2162
+
2163
+ return [[cos * scaleX, -sin * scaleY], [sin * scaleX, cos * scaleY]];
2164
+ };
2165
+
2166
+ _This.$GetMatrixOffset = function (matrix, width, height) {
2167
+ var p1 = $JssorMatrix$.$TransformPoint(matrix, Point(-width / 2, -height / 2));
2168
+ var p2 = $JssorMatrix$.$TransformPoint(matrix, Point(width / 2, -height / 2));
2169
+ var p3 = $JssorMatrix$.$TransformPoint(matrix, Point(width / 2, height / 2));
2170
+ var p4 = $JssorMatrix$.$TransformPoint(matrix, Point(-width / 2, height / 2));
2171
+
2172
+ return Point(Math.min(p1.x, p2.x, p3.x, p4.x) + width / 2, Math.min(p1.y, p2.y, p3.y, p4.y) + height / 2);
2173
+ };
2174
+
2175
+ _This.$Transform = function (fromStyles, toStyles, interPosition, easings, durings, rounds, options) {
2176
+
2177
+ var currentStyles = toStyles;
2178
+
2179
+ if (fromStyles) {
2180
+ currentStyles = {};
2181
+
2182
+ for (var key in toStyles) {
2183
+ var round = rounds[key] || 1;
2184
+ var during = durings[key] || [0, 1];
2185
+ var propertyInterPosition = (interPosition - during[0]) / during[1];
2186
+ propertyInterPosition = Math.min(Math.max(propertyInterPosition, 0), 1);
2187
+ propertyInterPosition = propertyInterPosition * round;
2188
+ var floorPosition = Math.floor(propertyInterPosition);
2189
+ if (propertyInterPosition != floorPosition)
2190
+ propertyInterPosition -= floorPosition;
2191
+
2192
+ var easing = easings[key] || easings.$Default;
2193
+ var easingValue = easing(propertyInterPosition);
2194
+ var currentPropertyValue;
2195
+ var value = fromStyles[key];
2196
+ var toValue = toStyles[key];
2197
+
2198
+ if ($Jssor$.$IsNumeric(toValue)) {
2199
+ currentPropertyValue = value + (toValue - value) * easingValue;
2200
+ }
2201
+ else {
2202
+ currentPropertyValue = $Jssor$.$Extend({ $Offset: {} }, fromStyles[key]);
2203
+
2204
+ $Jssor$.$Each(toValue.$Offset, function (rectX, n) {
2205
+ var offsetValue = rectX * easingValue;
2206
+ currentPropertyValue.$Offset[n] = offsetValue;
2207
+ currentPropertyValue[n] += offsetValue;
2208
+ });
2209
+ }
2210
+ currentStyles[key] = currentPropertyValue;
2211
+ }
2212
+
2213
+ if (fromStyles.$Zoom) {
2214
+ currentStyles.$Transform = { $Rotate: currentStyles.$Rotate || 0, $Scale: currentStyles.$Zoom, $OriginalWidth: options.$OriginalWidth, $OriginalHeight: options.$OriginalHeight };
2215
+ }
2216
+ }
2217
+
2218
+ if (toStyles.$Clip && options.$Move) {
2219
+ var styleFrameNClipOffset = currentStyles.$Clip.$Offset;
2220
+
2221
+ var offsetY = (styleFrameNClipOffset.$Top || 0) + (styleFrameNClipOffset.$Bottom || 0);
2222
+ var offsetX = (styleFrameNClipOffset.$Left || 0) + (styleFrameNClipOffset.$Right || 0);
2223
+
2224
+ currentStyles.$Left = (currentStyles.$Left || 0) + offsetX;
2225
+ currentStyles.$Top = (currentStyles.$Top || 0) + offsetY;
2226
+ currentStyles.$Clip.$Left -= offsetX;
2227
+ currentStyles.$Clip.$Right -= offsetX;
2228
+ currentStyles.$Clip.$Top -= offsetY;
2229
+ currentStyles.$Clip.$Bottom -= offsetY;
2230
+ }
2231
+
2232
+ if (currentStyles.$Clip && $Jssor$.$CanClearClip() && !currentStyles.$Clip.$Top && !currentStyles.$Clip.$Left && (currentStyles.$Clip.$Right == options.$OriginalWidth) && (currentStyles.$Clip.$Bottom == options.$OriginalHeight))
2233
+ currentStyles.$Clip = null;
2234
+
2235
+ return currentStyles;
2236
+ };
2237
+ };
2238
+
2239
+ //$JssorObject$
2240
+ var $JssorObject$ = window.$JssorObject$ = function () {
2241
+ var _ThisObject = this;
2242
+ // Fields
2243
+
2244
+ var _Listeners = []; // dictionary of eventName --> array of handlers
2245
+ var _Listenees = [];
2246
+
2247
+ // Private Methods
2248
+ function AddListener(eventName, handler) {
2249
+
2250
+ $JssorDebug$.$Execute(function () {
2251
+ if (eventName == undefined || eventName == null)
2252
+ throw new Error("param 'eventName' is null or empty.");
2253
+
2254
+ if (typeof (handler) != "function") {
2255
+ throw "param 'handler' must be a function.";
2256
+ }
2257
+
2258
+ $Jssor$.$Each(_Listeners, function (listener) {
2259
+ if (listener.$EventName == eventName && listener.$Handler === handler) {
2260
+ throw new Error("The handler listened to the event already, cannot listen to the same event of the same object with the same handler twice.");
2261
+ }
2262
+ });
2263
+ });
2264
+
2265
+ _Listeners.push({ $EventName: eventName, $Handler: handler });
2266
+ }
2267
+
2268
+ function RemoveListener(eventName, handler) {
2269
+
2270
+ $JssorDebug$.$Execute(function () {
2271
+ if (eventName == undefined || eventName == null)
2272
+ throw new Error("param 'eventName' is null or empty.");
2273
+
2274
+ if (typeof (handler) != "function") {
2275
+ throw "param 'handler' must be a function.";
2276
+ }
2277
+ });
2278
+
2279
+ $Jssor$.$Each(_Listeners, function (listener, index) {
2280
+ if (listener.$EventName == eventName && listener.$Handler === handler) {
2281
+ _Listeners.splice(index, 1);
2282
+ }
2283
+ });
2284
+ }
2285
+
2286
+ function ClearListeners() {
2287
+ _Listeners = [];
2288
+ }
2289
+
2290
+ function ClearListenees() {
2291
+
2292
+ $Jssor$.$Each(_Listenees, function (listenee) {
2293
+ $Jssor$.$RemoveEvent(listenee.$Obj, listenee.$EventName, listenee.$Handler);
2294
+ });
2295
+
2296
+ _Listenees = [];
2297
+ }
2298
+
2299
+ //Protected Methods
2300
+ _ThisObject.$Listen = function (obj, eventName, handler, useCapture) {
2301
+
2302
+ $JssorDebug$.$Execute(function () {
2303
+ if (!obj)
2304
+ throw new Error("param 'obj' is null or empty.");
2305
+
2306
+ if (eventName == undefined || eventName == null)
2307
+ throw new Error("param 'eventName' is null or empty.");
2308
+
2309
+ if (typeof (handler) != "function") {
2310
+ throw "param 'handler' must be a function.";
2311
+ }
2312
+
2313
+ $Jssor$.$Each(_Listenees, function (listenee) {
2314
+ if (listenee.$Obj === obj && listenee.$EventName == eventName && listenee.$Handler === handler) {
2315
+ throw new Error("The handler listened to the event already, cannot listen to the same event of the same object with the same handler twice.");
2316
+ }
2317
+ });
2318
+ });
2319
+
2320
+ $Jssor$.$AddEvent(obj, eventName, handler, useCapture);
2321
+ _Listenees.push({ $Obj: obj, $EventName: eventName, $Handler: handler });
2322
+ };
2323
+
2324
+ _ThisObject.$Unlisten = function (obj, eventName, handler) {
2325
+
2326
+ $JssorDebug$.$Execute(function () {
2327
+ if (!obj)
2328
+ throw new Error("param 'obj' is null or empty.");
2329
+
2330
+ if (eventName == undefined || eventName == null)
2331
+ throw new Error("param 'eventName' is null or empty.");
2332
+
2333
+ if (typeof (handler) != "function") {
2334
+ throw "param 'handler' must be a function.";
2335
+ }
2336
+ });
2337
+
2338
+ $Jssor$.$Each(_Listenees, function (listenee, index) {
2339
+ if (listenee.$Obj === obj && listenee.$EventName == eventName && listenee.$Handler === handler) {
2340
+ $Jssor$.$RemoveEvent(obj, eventName, handler);
2341
+ _Listenees.splice(index, 1);
2342
+ }
2343
+ });
2344
+ };
2345
+
2346
+ _ThisObject.$UnlistenAll = ClearListenees;
2347
+
2348
+ // Public Methods
2349
+ _ThisObject.$On = _ThisObject.addEventListener = AddListener;
2350
+
2351
+ _ThisObject.$Off = _ThisObject.removeEventListener = RemoveListener;
2352
+
2353
+ _ThisObject.$TriggerEvent = function (eventName) {
2354
+
2355
+ var args = [].slice.call(arguments, 1);
2356
+
2357
+ $Jssor$.$Each(_Listeners, function (listener) {
2358
+ try {
2359
+ listener.$EventName == eventName && listener.$Handler.apply(window, args);
2360
+ } catch (e) {
2361
+ // handler threw an error, ignore, go on to next one
2362
+ $JssorDebug$.$Error(e.name + " while executing " + eventName +
2363
+ " handler: " + e.message, e);
2364
+ }
2365
+ });
2366
+ };
2367
+
2368
+ _ThisObject.$Destroy = function () {
2369
+ ClearListenees();
2370
+ ClearListeners();
2371
+
2372
+ for (var name in _ThisObject)
2373
+ delete _ThisObject[name];
2374
+ };
2375
+
2376
+ $JssorDebug$.$C_AbstractClass(_ThisObject);
2377
+ };
2378
+
2379
+ $JssorAnimator$ = function (delay, duration, options, elmt, fromStyles, toStyles) {
2380
+ delay = delay || 0;
2381
+
2382
+ var _ThisAnimator = this;
2383
+ var _AutoPlay;
2384
+ var _Hiden;
2385
+ var _CombineMode;
2386
+ var _PlayToPosition;
2387
+ var _PlayDirection;
2388
+ var _NoStop;
2389
+ var _TimeStampLastFrame = 0;
2390
+
2391
+ var _SubEasings;
2392
+ var _SubRounds;
2393
+ var _SubDurings;
2394
+ var _Callback;
2395
+
2396
+ var _Shift = 0;
2397
+ var _Position_Current = 0;
2398
+ var _Position_Display = 0;
2399
+ var _Hooked;
2400
+
2401
+ var _Position_InnerBegin = delay;
2402
+ var _Position_InnerEnd = delay + duration;
2403
+ var _Position_OuterBegin;
2404
+ var _Position_OuterEnd;
2405
+ var _LoopLength;
2406
+
2407
+ var _NestedAnimators = [];
2408
+ var _StyleSetter;
2409
+
2410
+ function GetPositionRange(position, begin, end) {
2411
+ var range = 0;
2412
+
2413
+ if (position < begin)
2414
+ range = -1;
2415
+
2416
+ else if (position > end)
2417
+ range = 1;
2418
+
2419
+ return range;
2420
+ }
2421
+
2422
+ function GetInnerPositionRange(position) {
2423
+ return GetPositionRange(position, _Position_InnerBegin, _Position_InnerEnd);
2424
+ }
2425
+
2426
+ function GetOuterPositionRange(position) {
2427
+ return GetPositionRange(position, _Position_OuterBegin, _Position_OuterEnd);
2428
+ }
2429
+
2430
+ function Shift(offset) {
2431
+ _Position_OuterBegin += offset;
2432
+ _Position_OuterEnd += offset;
2433
+ _Position_InnerBegin += offset;
2434
+ _Position_InnerEnd += offset;
2435
+
2436
+ _Position_Current += offset;
2437
+ _Position_Display += offset;
2438
+
2439
+ _Shift = offset;
2440
+
2441
+ //$Jssor$.$Each(_NestedAnimators, function (animator) {
2442
+ // animator, animator.$Shift(offset);
2443
+ //});
2444
+ }
2445
+
2446
+ function Locate(position, relative) {
2447
+ var offset = position - _Position_OuterBegin + delay * relative;
2448
+
2449
+ Shift(offset);
2450
+
2451
+ //$JssorDebug$.$Execute(function () {
2452
+ // _ThisAnimator.$Position_InnerBegin = _Position_InnerBegin;
2453
+ // _ThisAnimator.$Position_InnerEnd = _Position_InnerEnd;
2454
+ // _ThisAnimator.$Position_OuterBegin = _Position_OuterBegin;
2455
+ // _ThisAnimator.$Position_OuterEnd = _Position_OuterEnd;
2456
+ //});
2457
+
2458
+ return _Position_OuterEnd;
2459
+ }
2460
+
2461
+ function GoToPosition(positionOuter, force) {
2462
+ var trimedPositionOuter = positionOuter;
2463
+
2464
+ if (_LoopLength && (trimedPositionOuter >= _Position_OuterEnd || trimedPositionOuter <= _Position_OuterBegin)) {
2465
+ trimedPositionOuter = ((trimedPositionOuter - _Position_OuterBegin) % _LoopLength + _LoopLength) % _LoopLength + _Position_OuterBegin;
2466
+ }
2467
+
2468
+ if (!_Hooked || _NoStop || force || _Position_Current != trimedPositionOuter) {
2469
+
2470
+ var positionToDisplay = Math.min(trimedPositionOuter, _Position_OuterEnd);
2471
+ positionToDisplay = Math.max(positionToDisplay, _Position_OuterBegin);
2472
+
2473
+ if (!_Hooked || _NoStop || force || positionToDisplay != _Position_Display) {
2474
+ if (toStyles) {
2475
+
2476
+ var interPosition = (positionToDisplay - _Position_InnerBegin) / (duration || 1);
2477
+
2478
+ //if (options.$Optimize && $Jssor$.$IsBrowserChrome() && duration) {
2479
+ // interPosition = Math.round(interPosition / 8 * duration) * 8 / duration;
2480
+ //}
2481
+
2482
+ if (options.$Reverse)
2483
+ interPosition = 1 - interPosition;
2484
+
2485
+ var currentStyles = $Jssor$.$Transform(fromStyles, toStyles, interPosition, _SubEasings, _SubDurings, _SubRounds, options);
2486
+
2487
+ $Jssor$.$Each(currentStyles, function (value, key) {
2488
+ _StyleSetter[key] && _StyleSetter[key](elmt, value);
2489
+ });
2490
+ }
2491
+
2492
+ _ThisAnimator.$OnInnerOffsetChange(_Position_Display - _Position_InnerBegin, positionToDisplay - _Position_InnerBegin);
2493
+ }
2494
+
2495
+ _Position_Display = positionToDisplay;
2496
+
2497
+ $Jssor$.$Each(_NestedAnimators, function (animator, i) {
2498
+ var nestedAnimator = positionOuter < _Position_Current ? _NestedAnimators[_NestedAnimators.length - i - 1] : animator;
2499
+ nestedAnimator.$GoToPosition(positionOuter - _Shift, force);
2500
+ });
2501
+
2502
+ var positionOld = _Position_Current;
2503
+ var positionNew = positionOuter;
2504
+
2505
+ _Position_Current = trimedPositionOuter;
2506
+ _Hooked = true;
2507
+
2508
+ _ThisAnimator.$OnPositionChange(positionOld, positionNew);
2509
+ }
2510
+ }
2511
+
2512
+ function Join(animator, combineMode, noExpand) {
2513
+ /// <summary>
2514
+ /// Combine another animator as nested animator
2515
+ /// </summary>
2516
+ /// <param name="animator" type="$JssorAnimator$">
2517
+ /// An instance of $JssorAnimator$
2518
+ /// </param>
2519
+ /// <param name="combineMode" type="int">
2520
+ /// 0: parallel - place the animator parallel to this animator.
2521
+ /// 1: chain - chain the animator at the _Position_InnerEnd of this animator.
2522
+ /// </param>
2523
+ $JssorDebug$.$Execute(function () {
2524
+ if (combineMode !== 0 && combineMode !== 1)
2525
+ $JssorDebug$.$Fail("Argument out of range, the value of 'combineMode' should be either 0 or 1.");
2526
+ });
2527
+
2528
+ if (combineMode)
2529
+ animator.$Locate(_Position_OuterEnd, 1);
2530
+
2531
+ !noExpand && (_Position_OuterEnd = Math.max(_Position_OuterEnd, animator.$GetPosition_OuterEnd() + _Shift));
2532
+ _NestedAnimators.push(animator);
2533
+ }
2534
+
2535
+ var RequestAnimationFrame = window.requestAnimationFrame
2536
+ || window.webkitRequestAnimationFrame
2537
+ || window.mozRequestAnimationFrame
2538
+ || window.msRequestAnimationFrame;
2539
+
2540
+ if ($Jssor$.$IsBrowserSafari() && $Jssor$.$BrowserVersion() < 7) {
2541
+ RequestAnimationFrame = null;
2542
+
2543
+ $JssorDebug$.$Log("Custom animation frame for safari before 7.");
2544
+ }
2545
+
2546
+ RequestAnimationFrame = RequestAnimationFrame || function (callback) {
2547
+ $Jssor$.$Delay(callback, options.$Interval);
2548
+ };
2549
+
2550
+ function ShowFrame() {
2551
+ if (_AutoPlay) {
2552
+ var now = $Jssor$.$GetNow();
2553
+ var timeOffset = Math.min(now - _TimeStampLastFrame, options.$IntervalMax);
2554
+ var timePosition = _Position_Current + timeOffset * _PlayDirection;
2555
+ _TimeStampLastFrame = now;
2556
+
2557
+ if (timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection)
2558
+ timePosition = _PlayToPosition;
2559
+
2560
+ GoToPosition(timePosition);
2561
+
2562
+ if (!_NoStop && timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection) {
2563
+ Stop(_Callback);
2564
+ }
2565
+ else {
2566
+ RequestAnimationFrame(ShowFrame);
2567
+ }
2568
+ }
2569
+ }
2570
+
2571
+ function PlayToPosition(toPosition, callback, noStop) {
2572
+ if (!_AutoPlay) {
2573
+ _AutoPlay = true;
2574
+ _NoStop = noStop
2575
+ _Callback = callback;
2576
+ toPosition = Math.max(toPosition, _Position_OuterBegin);
2577
+ toPosition = Math.min(toPosition, _Position_OuterEnd);
2578
+ _PlayToPosition = toPosition;
2579
+ _PlayDirection = _PlayToPosition < _Position_Current ? -1 : 1;
2580
+ _ThisAnimator.$OnStart();
2581
+ _TimeStampLastFrame = $Jssor$.$GetNow();
2582
+ RequestAnimationFrame(ShowFrame);
2583
+ }
2584
+ }
2585
+
2586
+ function Stop(callback) {
2587
+ if (_AutoPlay) {
2588
+ _NoStop = _AutoPlay = _Callback = false;
2589
+ _ThisAnimator.$OnStop();
2590
+
2591
+ if (callback)
2592
+ callback();
2593
+ }
2594
+ }
2595
+
2596
+ _ThisAnimator.$Play = function (positionLength, callback, noStop) {
2597
+ PlayToPosition(positionLength ? _Position_Current + positionLength : _Position_OuterEnd, callback, noStop);
2598
+ };
2599
+
2600
+ _ThisAnimator.$PlayToPosition = PlayToPosition;
2601
+
2602
+ _ThisAnimator.$PlayToBegin = function (callback, noStop) {
2603
+ PlayToPosition(_Position_OuterBegin, callback, noStop);
2604
+ };
2605
+
2606
+ _ThisAnimator.$PlayToEnd = function (callback, noStop) {
2607
+ PlayToPosition(_Position_OuterEnd, callback, noStop);
2608
+ };
2609
+
2610
+ _ThisAnimator.$Stop = Stop;
2611
+
2612
+ _ThisAnimator.$Continue = function (toPosition) {
2613
+ PlayToPosition(toPosition);
2614
+ };
2615
+
2616
+ _ThisAnimator.$GetPosition = function () {
2617
+ return _Position_Current;
2618
+ };
2619
+
2620
+ _ThisAnimator.$GetPlayToPosition = function () {
2621
+ return _PlayToPosition;
2622
+ };
2623
+
2624
+ _ThisAnimator.$GetPosition_Display = function () {
2625
+ return _Position_Display;
2626
+ };
2627
+
2628
+ _ThisAnimator.$GoToPosition = GoToPosition;
2629
+
2630
+ _ThisAnimator.$GoToBegin = function () {
2631
+ GoToPosition(_Position_OuterBegin, true);
2632
+ };
2633
+
2634
+ _ThisAnimator.$GoToEnd = function () {
2635
+ GoToPosition(_Position_OuterEnd, true);
2636
+ };
2637
+
2638
+ _ThisAnimator.$Move = function (offset) {
2639
+ GoToPosition(_Position_Current + offset);
2640
+ };
2641
+
2642
+ _ThisAnimator.$CombineMode = function () {
2643
+ return _CombineMode;
2644
+ };
2645
+
2646
+ _ThisAnimator.$GetDuration = function () {
2647
+ return duration;
2648
+ };
2649
+
2650
+ _ThisAnimator.$IsPlaying = function () {
2651
+ return _AutoPlay;
2652
+ };
2653
+
2654
+ _ThisAnimator.$IsOnTheWay = function () {
2655
+ return _Position_Current > _Position_InnerBegin && _Position_Current <= _Position_InnerEnd;
2656
+ };
2657
+
2658
+ _ThisAnimator.$SetLoopLength = function (length) {
2659
+ _LoopLength = length;
2660
+ };
2661
+
2662
+ _ThisAnimator.$Locate = Locate;
2663
+
2664
+ _ThisAnimator.$Shift = Shift;
2665
+
2666
+ _ThisAnimator.$Join = Join;
2667
+
2668
+ _ThisAnimator.$Combine = function (animator) {
2669
+ /// <summary>
2670
+ /// Combine another animator parallel to this animator
2671
+ /// </summary>
2672
+ /// <param name="animator" type="$JssorAnimator$">
2673
+ /// An instance of $JssorAnimator$
2674
+ /// </param>
2675
+ Join(animator, 0);
2676
+ };
2677
+
2678
+ _ThisAnimator.$Chain = function (animator) {
2679
+ /// <summary>
2680
+ /// Chain another animator at the _Position_InnerEnd of this animator
2681
+ /// </summary>
2682
+ /// <param name="animator" type="$JssorAnimator$">
2683
+ /// An instance of $JssorAnimator$
2684
+ /// </param>
2685
+ Join(animator, 1);
2686
+ };
2687
+
2688
+ _ThisAnimator.$GetPosition_InnerBegin = function () {
2689
+ /// <summary>
2690
+ /// Internal member function, do not use it.
2691
+ /// </summary>
2692
+ /// <private />
2693
+ /// <returns type="int" />
2694
+ return _Position_InnerBegin;
2695
+ };
2696
+
2697
+ _ThisAnimator.$GetPosition_InnerEnd = function () {
2698
+ /// <summary>
2699
+ /// Internal member function, do not use it.
2700
+ /// </summary>
2701
+ /// <private />
2702
+ /// <returns type="int" />
2703
+ return _Position_InnerEnd;
2704
+ };
2705
+
2706
+ _ThisAnimator.$GetPosition_OuterBegin = function () {
2707
+ /// <summary>
2708
+ /// Internal member function, do not use it.
2709
+ /// </summary>
2710
+ /// <private />
2711
+ /// <returns type="int" />
2712
+ return _Position_OuterBegin;
2713
+ };
2714
+
2715
+ _ThisAnimator.$GetPosition_OuterEnd = function () {
2716
+ /// <summary>
2717
+ /// Internal member function, do not use it.
2718
+ /// </summary>
2719
+ /// <private />
2720
+ /// <returns type="int" />
2721
+ return _Position_OuterEnd;
2722
+ };
2723
+
2724
+ _ThisAnimator.$OnPositionChange = _ThisAnimator.$OnStart = _ThisAnimator.$OnStop = _ThisAnimator.$OnInnerOffsetChange = $Jssor$.$EmptyFunction;
2725
+ _ThisAnimator.$Version = $Jssor$.$GetNow();
2726
+
2727
+ //Constructor 1
2728
+ {
2729
+ options = $Jssor$.$Extend({
2730
+ $Interval: 16,
2731
+ $IntervalMax: 50
2732
+ }, options);
2733
+
2734
+ //Sodo statement, for development time intellisence only
2735
+ $JssorDebug$.$Execute(function () {
2736
+ options = $Jssor$.$Extend({
2737
+ $LoopLength: undefined,
2738
+ $Setter: undefined,
2739
+ $Easing: undefined
2740
+ }, options);
2741
+ });
2742
+
2743
+ _LoopLength = options.$LoopLength;
2744
+
2745
+ _StyleSetter = $Jssor$.$Extend({}, $Jssor$.$StyleSetter(), options.$Setter);
2746
+
2747
+ _Position_OuterBegin = _Position_InnerBegin = delay;
2748
+ _Position_OuterEnd = _Position_InnerEnd = delay + duration;
2749
+
2750
+ _SubRounds = options.$Round || {};
2751
+ _SubDurings = options.$During || {};
2752
+ _SubEasings = $Jssor$.$Extend({ $Default: $Jssor$.$IsFunction(options.$Easing) && options.$Easing || $JssorEasing$.$EaseSwing }, options.$Easing);
2753
+ }
2754
+ };
2755
+
2756
+ function $JssorPlayerClass$() {
2757
+
2758
+ var _ThisPlayer = this;
2759
+ var _PlayerControllers = [];
2760
+
2761
+ function PlayerController(playerElement) {
2762
+ var _SelfPlayerController = this;
2763
+ var _PlayerInstance;
2764
+ var _PlayerInstantces = [];
2765
+
2766
+ function OnPlayerInstanceDataAvailable(event) {
2767
+ var srcElement = $Jssor$.$EventSrc(event);
2768
+ _PlayerInstance = srcElement.pInstance;
2769
+
2770
+ $Jssor$.$RemoveEvent(srcElement, "dataavailable", OnPlayerInstanceDataAvailable);
2771
+ $Jssor$.$Each(_PlayerInstantces, function (playerInstance) {
2772
+ if (playerInstance != _PlayerInstance) {
2773
+ playerInstance.$Remove();
2774
+ }
2775
+ });
2776
+
2777
+ playerElement.pTagName = _PlayerInstance.tagName;
2778
+ _PlayerInstantces = null;
2779
+ }
2780
+
2781
+ function HandlePlayerInstance(playerInstanceElement) {
2782
+ var playerHandler;
2783
+
2784
+ if (!playerInstanceElement.pInstance) {
2785
+ var playerHandlerAttribute = $Jssor$.$AttributeEx(playerInstanceElement, "pHandler");
2786
+
2787
+ if ($JssorPlayer$[playerHandlerAttribute]) {
2788
+ $Jssor$.$AddEvent(playerInstanceElement, "dataavailable", OnPlayerInstanceDataAvailable);
2789
+ playerHandler = new $JssorPlayer$[playerHandlerAttribute](playerElement, playerInstanceElement);
2790
+ _PlayerInstantces.push(playerHandler);
2791
+
2792
+ $JssorDebug$.$Execute(function () {
2793
+ if ($Jssor$.$Type(playerHandler.$Remove) != "function") {
2794
+ $JssorDebug$.$Fail("'pRemove' interface not implemented for player handler '" + playerHandlerAttribute + "'.");
2795
+ }
2796
+ });
2797
+ }
2798
+ }
2799
+
2800
+ return playerHandler;
2801
+ }
2802
+
2803
+ _SelfPlayerController.$InitPlayerController = function () {
2804
+ if (!playerElement.pInstance && !HandlePlayerInstance(playerElement)) {
2805
+
2806
+ var playerInstanceElements = $Jssor$.$Children(playerElement);
2807
+
2808
+ $Jssor$.$Each(playerInstanceElements, function (playerInstanceElement) {
2809
+ HandlePlayerInstance(playerInstanceElement);
2810
+ });
2811
+ }
2812
+ };
2813
+ }
2814
+
2815
+ _ThisPlayer.$EVT_SWITCH = 21;
2816
+
2817
+ _ThisPlayer.$FetchPlayers = function (elmt) {
2818
+ elmt = elmt || document.body;
2819
+
2820
+ var playerElements = $Jssor$.$FindChildren(elmt, "player");
2821
+
2822
+ $Jssor$.$Each(playerElements, function (playerElement) {
2823
+ if (!_PlayerControllers[playerElement.pId]) {
2824
+ playerElement.pId = _PlayerControllers.length;
2825
+ _PlayerControllers.push(new PlayerController(playerElement));
2826
+ }
2827
+ var playerController = _PlayerControllers[playerElement.pId];
2828
+ playerController.$InitPlayerController();
2829
+ });
2830
+ };
2831
+ }