padoo_faq - Version 1.0.4

Version Notes

Allow Admin create topics answers. And allow your customers submit and search question.

Download this release

Release Info

Developer Padoosoft
Extension padoo_faq
Version 1.0.4
Comparing to
See all releases


Version 1.0.4

Files changed (76) hide show
  1. app/code/local/Padoo/Faq/Block/Adminhtml/Faq.php +28 -0
  2. app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit.php +44 -0
  3. app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Form.php +27 -0
  4. app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Tab/Form.php +106 -0
  5. app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Tabs.php +35 -0
  6. app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Grid.php +118 -0
  7. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup.php +28 -0
  8. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit.php +45 -0
  9. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Form.php +37 -0
  10. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Faq.php +101 -0
  11. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Form.php +98 -0
  12. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Gridfaq.php +29 -0
  13. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/_Gridfaq.php +29 -0
  14. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tabs.php +40 -0
  15. app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Grid.php +117 -0
  16. app/code/local/Padoo/Faq/Block/Adminhtml/Widget/Grid.php +32 -0
  17. app/code/local/Padoo/Faq/Block/Adminhtml/Widget/Grid/Column.php +23 -0
  18. app/code/local/Padoo/Faq/Block/Faq.php +116 -0
  19. app/code/local/Padoo/Faq/Block/Searchfaq.php +35 -0
  20. app/code/local/Padoo/Faq/Helper/Data.php +77 -0
  21. app/code/local/Padoo/Faq/Model/Faq.php +56 -0
  22. app/code/local/Padoo/Faq/Model/Faqgroup.php +39 -0
  23. app/code/local/Padoo/Faq/Model/Mysql4/Faq.php +24 -0
  24. app/code/local/Padoo/Faq/Model/Mysql4/Faq/Collection.php +25 -0
  25. app/code/local/Padoo/Faq/Model/Mysql4/Faqgroup.php +43 -0
  26. app/code/local/Padoo/Faq/Model/Mysql4/Faqgroup/Collection.php +32 -0
  27. app/code/local/Padoo/Faq/Model/Status.php +29 -0
  28. app/code/local/Padoo/Faq/Model/Wysiwyg/Config.php +49 -0
  29. app/code/local/Padoo/Faq/controllers/Adminhtml/FaqController.php +200 -0
  30. app/code/local/Padoo/Faq/controllers/Adminhtml/FaqgroupController.php +200 -0
  31. app/code/local/Padoo/Faq/controllers/IndexController.php +26 -0
  32. app/code/local/Padoo/Faq/controllers/SearchController.php +28 -0
  33. app/code/local/Padoo/Faq/controllers/SubmitController.php +101 -0
  34. app/code/local/Padoo/Faq/etc/adminhtml.xml +23 -0
  35. app/code/local/Padoo/Faq/etc/config.xml +180 -0
  36. app/code/local/Padoo/Faq/etc/system.xml +125 -0
  37. app/code/local/Padoo/Faq/sql/faq_setup/mysql4-install-1.0.0.php +29 -0
  38. app/code/local/Padoo/Faq/sql/faq_setup/mysql4-upgrade-1.0.1-1.0.2.php +21 -0
  39. app/code/local/Padoo/Faq/sql/faq_setup/mysql4-upgrade-1.0.3-1.0.4.php +16 -0
  40. app/design/frontend/default/default/layout/padoo_faq.xml +83 -0
  41. app/design/frontend/default/default/template/padoofaq/faq.phtml +113 -0
  42. app/design/frontend/default/default/template/padoofaq/faq_group.phtml +50 -0
  43. app/design/frontend/default/default/template/padoofaq/js.phtml +7 -0
  44. app/design/frontend/default/default/template/padoofaq/search.phtml +15 -0
  45. app/design/frontend/default/default/template/padoofaq/searchresult.phtml +75 -0
  46. app/design/frontend/default/default/template/padoofaq/submit.phtml +62 -0
  47. app/etc/modules/Padoo_Faq.xml +12 -0
  48. app/locale/en_US/Padoo_Faq.csv +12 -0
  49. js/padoo/checkValue.js +10 -0
  50. js/padoo/jquery.js +2 -0
  51. js/padoo/jquery_noconflict.js +1 -0
  52. js/padoo/scriptaculous.js +58 -0
  53. js/padoo/simplecheckout.js +360 -0
  54. js/padoo/storelocator.js +239 -0
  55. js/padoo/tinybox.js +124 -0
  56. package.xml +68 -0
  57. skin/frontend/default/default/css/faq/faq.css +122 -0
  58. skin/frontend/default/default/css/faq/label.css +238 -0
  59. skin/frontend/default/default/css/padoo/jquery-ui.css +1225 -0
  60. skin/frontend/default/default/css/padoo/jquery.bxslider.css +204 -0
  61. skin/frontend/default/default/css/padoo/onecheckout.css +452 -0
  62. skin/frontend/default/default/css/padoo/storelocator.css +529 -0
  63. skin/frontend/default/default/css/padoo/storelocator/navigation.png +0 -0
  64. skin/frontend/default/default/css/padoo/storelocator/navigation1.png +0 -0
  65. skin/frontend/default/default/css/padoo/storelocator/tag-bg.png +0 -0
  66. skin/frontend/default/default/css/padoo/storelocator/vssver2.scc +0 -0
  67. skin/frontend/default/default/css/padoo/testimonial.css +83 -0
  68. skin/frontend/default/default/css/padoo/tinybox.css +3 -0
  69. skin/frontend/default/default/images/faq/bg-answer.gif +0 -0
  70. skin/frontend/default/default/images/faq/bg-question.gif +0 -0
  71. skin/frontend/default/default/images/faq/vbulletin_sprites.png +0 -0
  72. skin/frontend/default/default/js/faq/faq.js +8 -0
  73. skin/frontend/default/default/js/faq/jquery-1.3.2.min.js +19 -0
  74. skin/frontend/default/default/js/faq/jquery.js +11 -0
  75. skin/frontend/default/default/js/padoo/jquery.bxslider.js +1343 -0
  76. skin/frontend/default/default/js/padoo/jquery.cycle.js +1548 -0
app/code/local/Padoo/Faq/Block/Adminhtml/Faq.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq extends Mage_Adminhtml_Block_Widget_Grid_Container {
21
+ public function __construct() {
22
+ $this->_controller = 'adminhtml_faq';
23
+ $this->_blockGroup = 'faq';
24
+ $this->_headerText = Mage::helper('faq')->__('FAQ Manager');
25
+ $this->_addButtonLabel = Mage::helper('faq')->__('Add FAQ');
26
+ parent::__construct();
27
+ }
28
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->_objectId = 'id';
24
+ $this->_blockGroup = 'faq';
25
+ $this->_controller = 'adminhtml_faq';
26
+ $this->_updateButton('save', 'label', Mage::helper('faq')->__('Save Item'));
27
+ $this->_updateButton('delete', 'label', Mage::helper('faq')->__('Delete Item'));
28
+ $this->_addButton('saveandcontinue', array(
29
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
30
+ 'onclick' => 'saveAndContinueEdit()',
31
+ 'class' => 'save',
32
+ ), -100);
33
+ $this->_formScripts[] = "
34
+ function saveAndContinueEdit(){
35
+ editForm.submit($('edit_form').action+'back/edit/');
36
+ }";
37
+ }
38
+ public function getHeaderText() {
39
+ if (Mage::registry('faq_data') && Mage::registry('faq_data')->getId())
40
+ return Mage::helper('faq')->__("Edit Question");
41
+ else
42
+ return Mage::helper('faq')->__('Add Question');
43
+ }
44
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Form.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
21
+ protected function _prepareForm() {
22
+ $form = new Varien_Data_Form(array( 'id' => 'edit_form','action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),'method' => 'post', 'enctype' => 'multipart/form-data'));
23
+ $form->setUseContainer(true);
24
+ $this->setForm($form);
25
+ return parent::_prepareForm();
26
+ }
27
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Tab/Form.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
21
+ protected function _prepareForm() {
22
+ $form = new Varien_Data_Form();
23
+ $this->setForm($form);
24
+ $fieldset = $form->addFieldset('faq_form', array('legend' => Mage::helper('faq')->__('Item information')));
25
+ $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('add_variables' => false, 'add_widgets' => false,'files_browser_window_url'=>$this->getBaseUrl().'admin/cms_wysiwyg_images/index/'));
26
+ $version = substr(Mage::getVersion(), 0, 3);
27
+ $groups = array(array('value' => '', 'label' => 'Select an Group'));
28
+ $collection = Mage::getModel('faq/faqgroup')->getCollection();
29
+ foreach ($collection as $group) {
30
+ $groups[] = array('value' => $group->getGroupId(), 'label' => $group->getGroupName());
31
+ }
32
+
33
+
34
+ $fieldset->addField('group_id', 'multiselect', array(
35
+ 'label' => Mage::helper('faq')->__('Groups'),
36
+ 'name' => 'groups[]',
37
+ 'required' => true,
38
+ 'values' => $groups,
39
+ ));
40
+
41
+ if (!Mage::app()->isSingleStoreMode()) {
42
+ $fieldset->addField('store_id', 'multiselect', array(
43
+ 'name' => 'stores[]',
44
+ 'label' => Mage::helper('faq')->__('Store View'),
45
+ 'title' => Mage::helper('faq')->__('Store View'),
46
+ 'required' => true,
47
+ 'values' => Mage::getSingleton('adminhtml/system_store')
48
+ ->getStoreValuesForForm(false, true),
49
+ ));
50
+ }
51
+ else {
52
+ $fieldset->addField('store_id', 'hidden', array(
53
+ 'name' => 'stores[]',
54
+ 'value' => Mage::app()->getStore(true)->getId()
55
+ ));
56
+ }
57
+
58
+ $fieldset->addField('faq', 'editor', array(
59
+ 'name' => 'faq',
60
+ 'label' => Mage::helper('faq')->__('Question'),
61
+ 'title' => Mage::helper('faq')->__('Question'),
62
+ 'style' => 'width:500px; height:300px;',
63
+ 'state' => 'html',
64
+ 'wysiwyg' => false,
65
+ 'required' => true,
66
+ ));
67
+
68
+ $fieldset->addField('body', 'editor', array(
69
+ 'name' => 'body',
70
+ 'label' => Mage::helper('faq')->__('Answer'),
71
+ 'title' => Mage::helper('faq')->__('Answer'),
72
+ 'style' => 'width:500px; height:300px;',
73
+ 'state' => 'html',
74
+ 'wysiwyg' => true,
75
+ 'required' => true,
76
+ ));
77
+ $fieldset->addField('sort_order', 'text', array(
78
+ 'label' => Mage::helper('faq')->__('Sort Order'),
79
+ 'style' => 'width:600px;',
80
+ 'name' => 'sort_order',
81
+ ));
82
+ $fieldset->addField('status', 'select', array(
83
+ 'label' => Mage::helper('faq')->__('Status'),
84
+ 'class' => 'required-entry',
85
+ 'name' => 'status',
86
+ 'style' => 'width:600px;',
87
+ 'values' => array(
88
+ array(
89
+ 'value' => 1,
90
+ 'label' => Mage::helper('faq')->__('Enabled'),
91
+ ),
92
+ array(
93
+ 'value' => 2,
94
+ 'label' => Mage::helper('faq')->__('Disabled'),
95
+ ),
96
+ ),
97
+ ));
98
+ if (Mage::getSingleton('adminhtml/session')->getBannerData()) {
99
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getBannerData());
100
+ Mage::getSingleton('adminhtml/session')->setBannerData(null);
101
+ } else if (Mage::registry('faq_data')) {
102
+ $form->setValues(Mage::registry('faq_data')->getData());
103
+ }
104
+ return parent::_prepareForm();
105
+ }
106
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Edit/Tabs.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->setId('faq_tabs');
24
+ $this->setDestElementId('edit_form');
25
+ $this->setTitle(Mage::helper('faq')->__('FAQ Information'));
26
+ }
27
+ protected function _beforeToHtml() {
28
+ $this->addTab('form_section', array(
29
+ 'label' => Mage::helper('faq')->__('Add FAQ'),
30
+ 'alt' => Mage::helper('faq')->__('Add FAQ'),
31
+ 'content' => $this->getLayout()->createBlock('faq/adminhtml_faq_edit_tab_form')->toHtml(),
32
+ ));
33
+ return parent::_beforeToHtml();
34
+ }
35
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faq/Grid.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faq_Grid extends Padoo_Faq_Block_Adminhtml_Widget_Grid {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->setId('bannerGrid');
24
+ $this->setDefaultSort('banner_id');
25
+ $this->setDefaultDir('ASC');
26
+ $this->setSaveParametersInSession(true);
27
+ }
28
+ protected function _prepareCollection() {
29
+ $collection = Mage::getModel('faq/faq')->getCollection();
30
+ $this->setCollection($collection);
31
+ return parent::_prepareCollection();
32
+ }
33
+ protected function _prepareColumns() {
34
+ $this->addColumn('banner_id', array(
35
+ 'header' => Mage::helper('faq')->__('ID'),
36
+ 'align' => 'center',
37
+ 'width' => '30px',
38
+ 'index' => 'banner_id',
39
+ ));
40
+ $this->addColumn('faq', array(
41
+ 'header' => Mage::helper('faq')->__('FAQ'),
42
+ 'index' => 'faq',
43
+ 'align' => 'center',
44
+ ));
45
+ $this->addColumn('body', array(
46
+ 'header' => Mage::helper('faq')->__('Content'),
47
+ 'index' => 'body',
48
+ 'width' => '750px',
49
+ 'align' => 'center',
50
+ ));
51
+ $this->addColumn('sort_order', array(
52
+ 'header' => Mage::helper('faq')->__('Sort Order'),
53
+ 'index' => 'sort_order',
54
+ 'width' => '100px',
55
+ 'align' => 'center',
56
+ ));
57
+ $this->addColumn('status', array(
58
+ 'header' => Mage::helper('faq')->__('Status'),
59
+ 'align' => 'left',
60
+ 'width' => '80px',
61
+ 'index' => 'status',
62
+ 'type' => 'options',
63
+ 'options' => array(
64
+ 1 => 'Enabled',
65
+ 2 => 'Disabled',
66
+ ),
67
+ ));
68
+ $this->addColumn('action',
69
+ array(
70
+ 'header' => Mage::helper('faq')->__('Action'),
71
+ 'width' => '80',
72
+ 'type' => 'action',
73
+ 'getter' => 'getId',
74
+ 'actions' => array(
75
+ array(
76
+ 'caption' => Mage::helper('faq')->__('Edit'),
77
+ 'url' => array('base' => '*/*/edit'),
78
+ 'field' => 'id'
79
+ )
80
+ ),
81
+ 'filter' => false,
82
+ 'sortable' => false,
83
+ 'index' => 'stores',
84
+ 'is_system' => true,
85
+ ));
86
+ $this->addExportType('*/*/exportCsv', Mage::helper('faq')->__('CSV'));
87
+ $this->addExportType('*/*/exportXml', Mage::helper('faq')->__('XML'));
88
+ return parent::_prepareColumns();
89
+ }
90
+ protected function _prepareMassaction() {
91
+ $this->setMassactionIdField('banner_id');
92
+ $this->getMassactionBlock()->setFormFieldName('faq');
93
+ $this->getMassactionBlock()->addItem('delete', array(
94
+ 'label' => Mage::helper('faq')->__('Delete'),
95
+ 'url' => $this->getUrl('*/*/massDelete'),
96
+ 'confirm' => Mage::helper('faq')->__('Are you sure?')
97
+ ));
98
+ $statuses = Mage::getSingleton('faq/status')->getOptionArray();
99
+ array_unshift($statuses, array('label' => '', 'value' => ''));
100
+ $this->getMassactionBlock()->addItem('status', array(
101
+ 'label' => Mage::helper('faq')->__('Change status'),
102
+ 'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
103
+ 'additional' => array(
104
+ 'visibility' => array(
105
+ 'name' => 'status',
106
+ 'type' => 'select',
107
+ 'class' => 'required-entry',
108
+ 'label' => Mage::helper('faq')->__('Status'),
109
+ 'values' => $statuses
110
+ )
111
+ )
112
+ ));
113
+ return $this;
114
+ }
115
+ public function getRowUrl($row) {
116
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
117
+ }
118
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup extends Mage_Adminhtml_Block_Widget_Grid_Container {
21
+ public function __construct() {
22
+ $this->_controller = 'adminhtml_faqgroup';
23
+ $this->_blockGroup = 'faq';
24
+ $this->_headerText = Mage::helper('faq')->__('Add/Manage FAQ Group');
25
+ $this->_addButtonLabel = Mage::helper('faq')->__('Add FAQ Group');
26
+ parent::__construct();
27
+ }
28
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->_objectId = 'id';
24
+ $this->_blockGroup = 'faq';
25
+ $this->_controller = 'adminhtml_faqgroup';
26
+ $this->_updateButton('save', 'label', Mage::helper('faq')->__('Save Item'));
27
+ $this->_updateButton('delete', 'label', Mage::helper('faq')->__('Delete Item'));
28
+ $this->_addButton('saveandcontinue', array(
29
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
30
+ 'onclick' => 'saveAndContinueEdit()',
31
+ 'class' => 'save',
32
+ ), -100);
33
+ $this->_formScripts[] = "
34
+ function saveAndContinueEdit(){
35
+ editForm.submit($('edit_form').action+'back/edit/');
36
+ }";
37
+ }
38
+ public function getHeaderText() {
39
+ if (Mage::registry('faqgroup_data') && Mage::registry('faqgroup_data')->getId()) {
40
+ return Mage::helper('faq')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('faqgroup_data')->getGroupName()));
41
+ } else {
42
+ return Mage::helper('faq')->__('Add Item');
43
+ }
44
+ }
45
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Form.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
21
+ protected function _prepareForm() {
22
+ $form = new Varien_Data_Form(array(
23
+ 'id' => 'edit_form',
24
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
25
+ 'method' => 'post',
26
+ 'enctype' => 'multipart/form-data'
27
+ )
28
+ );
29
+ $form->setUseContainer(true);
30
+ $this->setForm($form);
31
+ $form->addField('in_faqgroup_faqs', 'hidden', array(
32
+ 'name' => 'faqgroup_faqs',
33
+ 'required' => false,
34
+ ));
35
+ return parent::_prepareForm();
36
+ }
37
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Faq.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Tab_Faq extends Padoo_Faq_Block_Adminhtml_Widget_Grid {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->setId('faqLeftGrid');
24
+ $this->setDefaultSort('banner_id');
25
+ $this->setUseAjax(true);
26
+ }
27
+ public function getBannergroupData() {
28
+ return Mage::registry('faqgroup_data');
29
+ }
30
+ protected function _prepareCollection() {
31
+ $collection = Mage::getModel('faq/faq')->getCollection();
32
+ $collection->getSelect()->order('banner_id');
33
+ $this->setCollection($collection);
34
+ return parent::_prepareCollection();
35
+ }
36
+ protected function _addColumnFilterToCollection($column) {
37
+ if ($this->getCollection()) {
38
+ if ($column->getId() == 'faq_triggers') {
39
+ $bannerIds = $this->_getSelectedBanners();
40
+ if (empty($bannerIds)) {
41
+ $bannerIds = 0;
42
+ }
43
+ if ($column->getFilter()->getValue()) {
44
+ $this->getCollection()->addFieldToFilter('banner_id', array('in' => $bannerIds));
45
+ } else {
46
+ if ($bannerIds) {
47
+ $this->getCollection()->addFieldToFilter('banner_id', array('in' => $bannerIds));
48
+ }
49
+ }
50
+ } else {
51
+ parent::_addColumnFilterToCollection($column);
52
+ }
53
+ }
54
+ return $this;;
55
+ }
56
+ protected function _prepareColumns() {
57
+ $this->addColumn('faq_triggers', array(
58
+ 'header_css_class' => 'a-center',
59
+ 'type' => 'checkbox',
60
+ 'values' => $this->_getSelectedBanners(),
61
+ 'align' => 'center',
62
+ 'index' => 'banner_id'
63
+ ));
64
+ $this->addColumn('banner_id', array(
65
+ 'header' => Mage::helper('catalog')->__('ID'),
66
+ 'sortable' => true,
67
+ 'width' => '50px',
68
+ 'align' => 'center',
69
+ 'index' => 'banner_id'
70
+ ));
71
+ $this->addColumn('faq', array(
72
+ 'header' => Mage::helper('faq')->__('FAQ'),
73
+ 'index' => 'faq',
74
+ 'align' => 'center',
75
+ ));
76
+ $this->addColumn('body', array(
77
+ 'header' => Mage::helper('faq')->__('Content'),
78
+ 'index' => 'body',
79
+ 'width' => '700px',
80
+ 'align' => 'center',
81
+ ));
82
+ $this->addColumn('sort_order', array(
83
+ 'header' => Mage::helper('faq')->__('Sort Order'),
84
+ 'width' => '80px',
85
+ 'index' => 'sort_order',
86
+ 'align' => 'center',
87
+ ));
88
+ return parent::_prepareColumns();
89
+ }
90
+ public function getGridUrl() {
91
+ return $this->getUrl('*/*/bannergrid', array('_current' => true));
92
+ }
93
+ protected function _getSelectedBanners() {
94
+ $banners = $this->getRequest()->getPost('selected_faqs');
95
+ if (is_null($banners)) {
96
+ $banners = explode(',', $this->getBannergroupData()->getBannerIds());
97
+ return (sizeof($banners) > 0 ? $banners : 0);
98
+ }
99
+ return $banners;
100
+ }
101
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Form.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
21
+ protected function _prepareForm() {
22
+ $form = new Varien_Data_Form();
23
+ $this->setForm($form);
24
+ $fieldset = $form->addFieldset('faqgroup_form', array('legend' => Mage::helper('faq')->__('Item information')));
25
+ $fieldset->addField('group_name', 'text', array(
26
+ 'label' => Mage::helper('faq')->__('FAQ Group Name'),
27
+ 'class' => 'required-entry',
28
+ 'required' => true,
29
+ 'name' => 'group_name',
30
+ ));
31
+ if (!Mage::app()->isSingleStoreMode()) {
32
+ $fieldset->addField('store_id', 'multiselect', array(
33
+ 'name' => 'stores[]',
34
+ 'label' => Mage::helper('faq')->__('Store View'),
35
+ 'title' => Mage::helper('faq')->__('Store View'),
36
+ 'required' => true,
37
+ 'values' => Mage::getSingleton('adminhtml/system_store')
38
+ ->getStoreValuesForForm(false, true),
39
+ ));
40
+ }
41
+ else {
42
+ $fieldset->addField('store_id', 'hidden', array(
43
+ 'name' => 'stores[]',
44
+ 'value' => Mage::app()->getStore(true)->getId()
45
+ ));
46
+ }
47
+ /* $fieldset->addField('group_code', 'text', array(
48
+ 'label' => Mage::helper('faq')->__('FAQ Group Code'),
49
+ 'class' => 'required-entry',
50
+ 'name' => 'group_code',
51
+ 'required' => true,
52
+ )); */
53
+ $fieldset->addField('status', 'select', array(
54
+ 'label' => Mage::helper('faq')->__('Status'),
55
+ 'class' => 'required-entry',
56
+ 'name' => 'status',
57
+ 'values' => array(
58
+ array(
59
+ 'value' => 1,
60
+ 'label' => Mage::helper('faq')->__('Enabled'),
61
+ ),
62
+ array(
63
+ 'value' => 2,
64
+ 'label' => Mage::helper('faq')->__('Disabled'),
65
+ ),
66
+ ),
67
+ ));
68
+
69
+ /* $fieldset->addField('cms_pages', 'multiselect', array(
70
+ 'label' => Mage::helper('faq')->__('Add to Pages'),
71
+ 'name' => 'cms_pages[]',
72
+ 'values' => $this->fetchCMS(),
73
+ )); */
74
+
75
+ if (Mage::getSingleton('adminhtml/session')->getBannergroupData()) {
76
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getBannergroupData());
77
+ Mage::getSingleton('adminhtml/session')->setBannergroupData(null);
78
+ } elseif (Mage::registry('faqgroup_data')) {
79
+ $form->setValues(Mage::registry('faqgroup_data')->getData());
80
+ }
81
+ return parent::_prepareForm();
82
+ }
83
+ public function fetchCMS()
84
+ {
85
+ $cms=array();
86
+ $cms_pages = Mage::getModel('cms/page')->getCollection();
87
+ $cms_pages->load();
88
+ foreach($cms_pages as $one_row) {
89
+ array_push($cms,
90
+ array(
91
+ 'value' => $one_row->getPageId(),
92
+ 'label'=>Mage::helper('adminhtml')->__($one_row->getTitle()),
93
+ )
94
+ );
95
+ }
96
+ return $cms;
97
+ }
98
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/Gridfaq.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Tab_Gridfaq extends Mage_Adminhtml_Block_Widget_Container {
3
+ public function __construct() {
4
+ parent::__construct();
5
+ $this->setTemplate('padoofaq/faqs.phtml');
6
+ }
7
+ public function getTabsHtml() {
8
+ return $this->getChildHtml('faqs');
9
+ }
10
+ protected function _prepareLayout() {
11
+ $this->setChild('faqs', $this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tab_faq', 'faqgroup.grid.faq'));
12
+ return parent::_prepareLayout();
13
+ }
14
+ public function getBannergroupData() {
15
+ return Mage::registry('faqgroup_data');
16
+ }
17
+ public function getBannersJson() {
18
+ $banners = explode(',', $this->getBannergroupData()->getBannerIds());
19
+ if (!empty($banners) && isset($banners[0]) && $banners[0] != '') {
20
+ $data = array();
21
+ foreach ($banners as $element) {
22
+ $data[$element] = $element;
23
+ }
24
+ return Zend_Json::encode($data);
25
+ }
26
+ return '{}';
27
+ }
28
+ }
29
+ ?>
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tab/_Gridfaq.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Tab_Gridfaq extends Mage_Adminhtml_Block_Widget_Container {
3
+ public function __construct() {
4
+ parent::__construct();
5
+ $this->setTemplate('padoofaq/faqs.phtml');
6
+ }
7
+ public function getTabsHtml() {
8
+ return $this->getChildHtml('faqs');
9
+ }
10
+ protected function _prepareLayout() {
11
+ $this->setChild('faqs', $this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tab_faq', 'faqgroup.grid.faq'));
12
+ return parent::_prepareLayout();
13
+ }
14
+ public function getBannergroupData() {
15
+ return Mage::registry('faqgroup_data');
16
+ }
17
+ public function getBannersJson() {
18
+ $banners = explode(',', $this->getBannergroupData()->getBannerIds());
19
+ if (!empty($banners) && isset($banners[0]) && $banners[0] != '') {
20
+ $data = array();
21
+ foreach ($banners as $element) {
22
+ $data[$element] = $element;
23
+ }
24
+ return Zend_Json::encode($data);
25
+ }
26
+ return '{}';
27
+ }
28
+ }
29
+ ?>
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Edit/Tabs.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->setId('faqgroup_tabs');
24
+ $this->setDestElementId('edit_form');
25
+ $this->setTitle(Mage::helper('faq')->__('FAQ Group Information'));
26
+ }
27
+ protected function _beforeToHtml() {
28
+ $this->addTab('form_section', array(
29
+ 'label' => Mage::helper('faq')->__('FAQ Group'),
30
+ 'alt' => Mage::helper('faq')->__('FAQ Group'),
31
+ 'content' => $this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tab_form')->toHtml(),
32
+ ));
33
+ /* $this->addTab('grid_section', array(
34
+ 'label' => Mage::helper('faq')->__('FAQ\'s'),
35
+ 'alt' => Mage::helper('faq')->__('FAQ\'s'),
36
+ 'content' => $this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tab_gridfaq')->toHtml(),
37
+ )); */
38
+ return parent::_beforeToHtml();
39
+ }
40
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Faqgroup/Grid.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Adminhtml_Faqgroup_Grid extends Mage_Adminhtml_Block_Widget_Grid {
21
+ public function __construct() {
22
+ parent::__construct();
23
+ $this->setId('faqgroupGrid');
24
+ $this->setDefaultSort('group_id');
25
+ $this->setDefaultDir('ASC');
26
+ $this->setSaveParametersInSession(true);
27
+ }
28
+ protected function _prepareCollection() {
29
+ $collection = Mage::getModel('faq/faqgroup')->getCollection();
30
+ $this->setCollection($collection);
31
+ return parent::_prepareCollection();
32
+ }
33
+ protected function _prepareColumns() {
34
+ $this->addColumn('group_id', array(
35
+ 'header' => Mage::helper('faq')->__('ID'),
36
+ 'align' => 'right',
37
+ 'width' => '50px',
38
+ 'index' => 'group_id',
39
+ ));
40
+ $this->addColumn('group_name', array(
41
+ 'header' => Mage::helper('faq')->__('Group name'),
42
+ 'index' => 'group_name',
43
+ 'align' => 'center',
44
+ ));
45
+ /* $this->addColumn('group_code', array(
46
+ 'header' => Mage::helper('faq')->__('Group code'),
47
+ 'index' => 'group_code',
48
+ 'align' => 'center',
49
+ )); */
50
+ /* $this->addColumn('banner_ids', array(
51
+ 'header' => Mage::helper('faq')->__('Faqs'),
52
+ 'width' => '150px',
53
+ 'align' =>'center',
54
+ 'index' => 'banner_ids',
55
+ )); */
56
+ $this->addColumn('status', array(
57
+ 'header' => Mage::helper('faq')->__('Status'),
58
+ 'align' => 'left',
59
+ 'width' => '100px',
60
+ 'index' => 'status',
61
+ 'type' => 'options',
62
+ 'options' => array(
63
+ 1 => 'Enabled',
64
+ 2 => 'Disabled',
65
+ ),
66
+ ));
67
+ $this->addColumn('action',
68
+ array(
69
+ 'header' => Mage::helper('faq')->__('Action'),
70
+ 'width' => '50',
71
+ 'type' => 'action',
72
+ 'getter' => 'getId',
73
+ 'actions' => array(
74
+ array(
75
+ 'caption' => Mage::helper('faq')->__('Edit'),
76
+ 'url' => array('base' => '*/*/edit'),
77
+ 'field' => 'id'
78
+ )
79
+ ),
80
+ 'filter' => false,
81
+ 'sortable' => false,
82
+ 'index' => 'stores',
83
+ 'is_system' => true,
84
+ ));
85
+ $this->addExportType('*/*/exportCsv', Mage::helper('faq')->__('CSV'));
86
+ $this->addExportType('*/*/exportXml', Mage::helper('faq')->__('XML'));
87
+ return parent::_prepareColumns();
88
+ }
89
+ protected function _prepareMassaction() {
90
+ $this->setMassactionIdField('group_id');
91
+ $this->getMassactionBlock()->setFormFieldName('faq');
92
+ $this->getMassactionBlock()->addItem('delete', array(
93
+ 'label' => Mage::helper('faq')->__('Delete'),
94
+ 'url' => $this->getUrl('*/*/massDelete'),
95
+ 'confirm' => Mage::helper('faq')->__('Are you sure?')
96
+ ));
97
+ $statuses = Mage::getSingleton('faq/status')->getOptionArray();
98
+ array_unshift($statuses, array('label' => '', 'value' => ''));
99
+ $this->getMassactionBlock()->addItem('status', array(
100
+ 'label' => Mage::helper('faq')->__('Change status'),
101
+ 'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
102
+ 'additional' => array(
103
+ 'visibility' => array(
104
+ 'name' => 'status',
105
+ 'type' => 'select',
106
+ 'class' => 'required-entry',
107
+ 'label' => Mage::helper('faq')->__('Status'),
108
+ 'values' => $statuses
109
+ )
110
+ )
111
+ ));
112
+ return $this;
113
+ }
114
+ public function getRowUrl($row) {
115
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
116
+ }
117
+ }
app/code/local/Padoo/Faq/Block/Adminhtml/Widget/Grid.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ require_once 'Mage/Adminhtml/Block/Widget/Grid.php';
21
+ class Padoo_Faq_Block_Adminhtml_Widget_Grid extends Mage_Adminhtml_Block_Widget_Grid {
22
+ public function addColumn($columnId, $column) {
23
+ if (is_array($column))
24
+ $this->_columns[$columnId] = $this->getLayout()->createBlock('faq/adminhtml_widget_grid_column')->setData($column)->setGrid($this);
25
+ else
26
+ throw new Exception(Mage::helper('adminhtml')->__('Wrong column format'));
27
+ $this->_columns[$columnId]->setId($columnId);
28
+ $this->_lastColumnId = $columnId;
29
+ return $this;
30
+ }
31
+ }
32
+
app/code/local/Padoo/Faq/Block/Adminhtml/Widget/Grid/Column.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ require_once 'Mage/Adminhtml/Block/Widget/Grid/Column.php';
21
+ class Padoo_Faq_Block_Adminhtml_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column {
22
+
23
+ }
app/code/local/Padoo/Faq/Block/Faq.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Faq extends Mage_Core_Block_Template {
21
+ public $_groupId;
22
+ public function _prepareLayout() {
23
+ if($this->getRequest()->getParam('id')){
24
+ $this->_groupId = $this->getRequest()->getParam('id');
25
+ }else{
26
+ $groups = $this->getGroups();
27
+ foreach($groups as $group){
28
+ if($this->groupHasData($group->getGroupId())){
29
+ $this->_groupId = $group->getGroupId();
30
+ break;
31
+ }
32
+ }
33
+ }
34
+
35
+ return parent::_prepareLayout();
36
+ }
37
+
38
+
39
+ public function getWkfaq() {
40
+ if (!$this->hasData('faq')) {
41
+ $this->setData('faq', Mage::registry('faq'));
42
+ }
43
+ return $this->getData('faq');
44
+ }
45
+
46
+ public function getGroups(){
47
+ $storeId = Mage::app()->getStore(true)->getId();
48
+ $collection = Mage::getModel('faq/faqgroup')->getCollection()->setOrder('group_name','ASC');
49
+ $collection->getSelect()->where('status = ?',1);
50
+ $data = array();
51
+ foreach ($collection as $record) {
52
+ $stores = $record->getStoreId();
53
+ if(strpos($stores,$storeId) !== false || strpos($stores,0) !== false || $stores == 0 ){
54
+ $data[$record->getId()] = $record;
55
+ }
56
+ }
57
+ return $data;
58
+ }
59
+
60
+ public function getDataByGroup(){
61
+ $storeId = Mage::app()->getStore(true)->getId();
62
+ $collection = Mage::getModel('faq/faqgroup')->getCollection()->setOrder('group_name','ASC');
63
+ $collection->getSelect()->where('status = ?',1);
64
+ if($this->_groupId){
65
+ $collection->getSelect()->where('group_id = ?',$this->_groupId);
66
+ }
67
+ $data = array();
68
+ foreach ($collection as $record) {
69
+ $stores = $record->getStoreId();
70
+ if(strpos($stores,$storeId) !== false || strpos($stores,0) !== false || $stores == 0 ){
71
+ $data[$record->getId()] = $record;
72
+ }
73
+ }
74
+ return $data;
75
+ }
76
+
77
+ public function groupHasData($groupId = 0){
78
+ $checked = false;
79
+ $storeId = Mage::app()->getStore(true)->getId();
80
+ $collection = Mage::getModel('faq/faq')->getCollection();
81
+ $collection->getSelect()->where('status = ?',1);
82
+ $data = array();
83
+ foreach ($collection as $record) {
84
+ $stores = $record->getStoreId();
85
+ if(strpos($stores,$storeId) !== false || strpos($stores,0) !== false || $stores == 0 ){
86
+ $arrGroups = explode(',',$record->getGroupId());
87
+ if(in_array($groupId,$arrGroups)){
88
+ $checked = true;
89
+ break;
90
+ }
91
+ }
92
+ }
93
+ return $checked;
94
+ }
95
+
96
+ public function getFaqs(){
97
+ $storeId = Mage::app()->getStore(true)->getId();
98
+ $collection = Mage::getModel('faq/faq')->getCollection()->setOrder('sort_order','ASC');
99
+ $collection->getSelect()->where('status = ?',1);
100
+ $data = array();
101
+ foreach ($collection as $record) {
102
+ $stores = $record->getStoreId();
103
+ if(strpos($stores,$storeId) !== false || strpos($stores,0) !== false || $stores == 0 ){
104
+ $data[$record->getId()] = $record;
105
+ }
106
+ }
107
+ return $data;
108
+ }
109
+ protected function checkDir($directory) {
110
+ if (!is_dir($directory)) {
111
+ umask(0);
112
+ mkdir($directory, 0777,true);
113
+ return true;
114
+ }
115
+ }
116
+ }
app/code/local/Padoo/Faq/Block/Searchfaq.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Block_Searchfaq extends Mage_Core_Block_Template
21
+ {
22
+ public function _prepareLayout()
23
+ {
24
+ return parent::_prepareLayout();
25
+ }
26
+
27
+ public function getFaqitem()
28
+ {
29
+ if (!$this->hasData('faq')) {
30
+ $this->setData('faq', Mage::registry('faq'));
31
+ }
32
+ return $this->getData('faq');
33
+
34
+ }
35
+ }
app/code/local/Padoo/Faq/Helper/Data.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Helper_Data extends Mage_Core_Helper_Abstract {
21
+ protected static $egridImgDir = null;
22
+ protected static $egridImgURL = null;
23
+ protected static $egridImgThumb = null;
24
+ protected static $egridImgThumbWidth = null;
25
+ protected $_allowedExtensions = Array();
26
+ public function __construct() {
27
+ self::$egridImgDir = Mage::getBaseDir('media') . DS;
28
+ self::$egridImgURL = Mage::getBaseUrl('media');
29
+ self::$egridImgThumb = "thumb/";
30
+ self::$egridImgThumbWidth = 100;
31
+ }
32
+
33
+
34
+ public function sendMailToStore($itemId){
35
+ $object = Mage::getModel('faq/faq')->load($itemId);
36
+ $customer_email = 'services@padoosoft.com';
37
+ $customer_name = 'Guest';
38
+ $message = $object->getFaq();
39
+ $templateId = Mage::getStoreConfig('faq/options/mail_to_store_template');
40
+
41
+ $mailSubject = $this->__('Faq Notification !');
42
+
43
+
44
+ // $sender can be of type string or array. You can set identity of
45
+ // diffrent Store emails (like 'support', 'sales', etc.) found
46
+ // in "System->Configuration->General->Store Email Addresses"
47
+
48
+ $sender = Array(
49
+ 'name' => $customer_name,
50
+ 'email' => $customer_email
51
+ );
52
+
53
+
54
+ // In case of multiple recipient use array here.
55
+
56
+ $email = Mage::getStoreConfig('faq/options/recipient_email');
57
+
58
+ $vars = Array(
59
+ 'subject' => 'New Faq was sended.',
60
+ 'customer_name' => $customer_name,
61
+ 'message' => $message,
62
+ );
63
+
64
+ // This is optional
65
+ $storeId = Mage::app()->getStore()->getId();
66
+
67
+ $translate = Mage::getSingleton('core/translate');
68
+ Mage::getModel('core/email_template')
69
+ ->setTemplateSubject($mailSubject)
70
+ ->sendTransactional($templateId, $sender, $email, null, $vars, $storeId);
71
+ $translate->setTranslateInline(true);
72
+ }
73
+
74
+ public function getFaqUrl(){
75
+ return $this->_getUrl('faq');
76
+ }
77
+ }
app/code/local/Padoo/Faq/Model/Faq.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Faq extends Mage_Core_Model_Abstract {
21
+ public function _construct() {
22
+ parent::_construct();
23
+ $this->_init('faq/faq');
24
+ }
25
+ public function getAllAvailBannerIds(){
26
+ $collection = Mage::getResourceModel('faq/faq_collection')->getAllIds();
27
+ return $collection;
28
+ }
29
+ public function getAllBanners() {
30
+ $collection = Mage::getResourceModel('faq/faq_collection');
31
+ $collection->getSelect()->where('status = ?', 1);
32
+ $data = array();
33
+ foreach ($collection as $record) {
34
+ $data[$record->getId()] = array('value' => $record->getId(), 'label' => $record->getfilename());
35
+ }
36
+ return $data;
37
+ }
38
+
39
+ public function validate()
40
+ {
41
+ $_category= $_POST['category'];
42
+ $data = $_POST['faq'];
43
+ $errors = array();
44
+ $helper = Mage::helper('faq');
45
+ if($_category =='---Select one---'){
46
+ $errors[] = $helper->__('Grooup Name is a required field');
47
+ }
48
+ if (!Zend_Validate::is($data['question'], 'NotEmpty')) {
49
+ $errors[] = $helper->__('Question is a required field');
50
+ }
51
+ if (empty($errors)) {
52
+ return true;
53
+ }
54
+ return $errors;
55
+ }
56
+ }
app/code/local/Padoo/Faq/Model/Faqgroup.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Faqgroup extends Mage_Core_Model_Abstract {
21
+ public function _construct() {
22
+ parent::_construct();
23
+ $this->_init('faq/faqgroup');
24
+ }
25
+ public function getDataByGroup() {
26
+ $groupData = array();
27
+ $bannerData = array();
28
+ $result = array('group_data'=>$groupData,'faq_data'=>$bannerData);
29
+ $collection = Mage::getResourceModel('faq/faqgroup_collection');
30
+ $collection->getSelect()->where('status = 1');
31
+ /* foreach ($collection as $record) {
32
+ $bannerIds = $record->getBannerIds();
33
+ $bannerModel = Mage::getModel('faq/faq');
34
+ $bannerData = $bannerModel->getDataByBannerIds($bannerIds);
35
+ $result = array('group_data' => $record, 'faq_data' => $bannerData);
36
+ } */
37
+ return $collection;
38
+ }
39
+ }
app/code/local/Padoo/Faq/Model/Mysql4/Faq.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Mysql4_Faq extends Mage_Core_Model_Mysql4_Abstract {
21
+ public function _construct() {
22
+ $this->_init('faq/faq', 'banner_id');
23
+ }
24
+ }
app/code/local/Padoo/Faq/Model/Mysql4/Faq/Collection.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Mysql4_Faq_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
21
+ public function _construct() {
22
+ parent::_construct();
23
+ $this->_init('faq/faq');
24
+ }
25
+ }
app/code/local/Padoo/Faq/Model/Mysql4/Faqgroup.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Mysql4_Faqgroup extends Mage_Core_Model_Mysql4_Abstract {
21
+ public function _construct() {
22
+ $this->_init('faq/faqgroup', 'group_id');
23
+ }
24
+ public function _beforeSave(Mage_Core_Model_Abstract $object) {
25
+ $isDataValid = true;
26
+ $id = $object->getId();
27
+ //$groupCode = $object->getGroupCode();
28
+ $groupCollection = Mage::getModel('faq/faqgroup')->getCollection();
29
+ /* if ($id == '' || $id == 0) {
30
+ if ($groupCode == '') {
31
+ throw new Exception('Banner Group code can\'t be blank !!');
32
+ } else {
33
+ $groupInfo = $groupCollection->getDuplicateGroupCode($groupCode);
34
+ if ($groupInfo->count() > 0) {
35
+ $isDataValid = false;
36
+ }
37
+ if ($isDataValid === false) {
38
+ throw new Exception("Banner Group Code already exists !!");
39
+ }
40
+ }
41
+ } */
42
+ }
43
+ }
app/code/local/Padoo/Faq/Model/Mysql4/Faqgroup/Collection.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Mysql4_Faqgroup_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
21
+ public function _construct() {
22
+ parent::_construct();
23
+ $this->_init('faq/faqgroup');
24
+ }
25
+ public function getDuplicateGroupCode($groupCode) {
26
+ $this->setConnection($this->getResource()->getReadConnection());
27
+ $table = $this->getTable('faq/faqgroup');
28
+ $select = $this->getSelect();
29
+ $select->from(array('main_table' => $table), 'group_id')->where('group_code = ?', $groupCode);
30
+ return $this;
31
+ }
32
+ }
app/code/local/Padoo/Faq/Model/Status.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Model_Status extends Varien_Object {
21
+ const STATUS_ENABLED = 1;
22
+ const STATUS_DISABLED = 2;
23
+ static public function getOptionArray() {
24
+ return array(
25
+ self::STATUS_ENABLED => Mage::helper('faq')->__('Enabled'),
26
+ self::STATUS_DISABLED => Mage::helper('faq')->__('Disabled')
27
+ );
28
+ }
29
+ }
app/code/local/Padoo/Faq/Model/Wysiwyg/Config.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ require_once 'Mage/Cms/Model/Wysiwyg/Config.php';
21
+ class Padoo_Faq_Model_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config {
22
+ public function getConfig($data = array()) {
23
+ $config = new Varien_Object();
24
+ $config->setData(array(
25
+ 'enabled' => $this->isEnabled(),
26
+ 'hidden' => $this->isHidden(),
27
+ 'use_container' => false,
28
+ 'add_variables' => false,
29
+ 'add_widgets' => false,
30
+ 'no_display' => false,
31
+ 'translator' => Mage::helper('faq'),
32
+ 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
33
+ 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'),
34
+ 'files_browser_window_height' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height'),
35
+ 'encode_directives' => true,
36
+ 'directives_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'),
37
+ 'popup_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css',
38
+ 'content_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css',
39
+ 'width' => '100%',
40
+ 'plugins' => array()
41
+ ));
42
+ $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
43
+ if (is_array($data)) {
44
+ $config->addData($data);
45
+ }
46
+ Mage::dispatchEvent('cms_wysiwyg_config_prepare', array('config' => $config));
47
+ return $config;
48
+ }
49
+ }
app/code/local/Padoo/Faq/controllers/Adminhtml/FaqController.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Adminhtml_FaqController extends Mage_Adminhtml_Controller_Action {
21
+
22
+ protected function _isAllowed()
23
+ {
24
+ return Mage::getSingleton('admin/session')->isAllowed('faq/faq');
25
+ }
26
+
27
+ protected function _initAction() {
28
+ $this->loadLayout()->_setActiveMenu('faq/items')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
29
+ return $this;
30
+ }
31
+ public function indexAction() {
32
+ $this->_initAction()->renderLayout();
33
+ }
34
+ public function editAction() {
35
+ $id = $this->getRequest()->getParam('id');
36
+ $model = Mage::getModel('faq/faq')->load($id);
37
+ if ($model->getId() || $id == 0) {
38
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
39
+ if (!empty($data)) {
40
+ $model->setData($data);
41
+ }
42
+ Mage::register('faq_data', $model);
43
+ $this->loadLayout();
44
+ $this->_setActiveMenu('faq/items');
45
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
46
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
47
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
48
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()){
49
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
50
+ }
51
+ $this->_addContent($this->getLayout()->createBlock('faq/adminhtml_faq_edit'))
52
+ ->_addLeft($this->getLayout()->createBlock('faq/adminhtml_faq_edit_tabs'));
53
+ $version = substr(Mage::getVersion(), 0, 3);
54
+ if (($version=='1.4' || $version=='1.5') && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
55
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
56
+ }
57
+ $this->renderLayout();
58
+ } else {
59
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Item does not exist'));
60
+ $this->_redirect('*/*/');
61
+ }
62
+ }
63
+ public function newAction() {
64
+ $this->_forward('edit');
65
+ }
66
+ public function saveAction() {
67
+ $imagedata = array();
68
+ if ($data = $this->getRequest()->getPost()) {
69
+ $model = Mage::getModel('faq/faq');
70
+ $faqGroups = $data['groups'];
71
+ // save storeview
72
+ $storeView = $data['stores'];
73
+ $dataStore = "";
74
+ foreach($storeView as $store){
75
+ if($dataStore != "") $dataStore .=", ";
76
+ $dataStore .= $store;
77
+ }
78
+ $data['store_id'] = $dataStore;
79
+
80
+ //save Groups
81
+ $dataGroup = "";
82
+ foreach($faqGroups as $group){
83
+ if(!empty($dataGroup)) $dataGroup .=", ";
84
+ $dataGroup .= $group;
85
+ }
86
+ $data['group_id'] = $dataGroup;
87
+ $model->setData($data)->setId($this->getRequest()->getParam('id'));
88
+ try {
89
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
90
+ $model->setCreatedTime(now())->setUpdateTime(now());
91
+ } else {
92
+ $model->setUpdateTime(now());
93
+ }
94
+ $model->save();
95
+
96
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('faq')->__('Item was successfully saved'));
97
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
98
+ if ($this->getRequest()->getParam('back')) {
99
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
100
+ return;
101
+ }
102
+ $this->_redirect('*/*/');
103
+ return;
104
+ } catch (Exception $e) {
105
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
106
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
107
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
108
+ return;
109
+ }
110
+ }
111
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Unable to find item to save'));
112
+ $this->_redirect('*/*/');
113
+ }
114
+ public function deleteAction() {
115
+ if ($this->getRequest()->getParam('id') > 0) {
116
+ try {
117
+ $model = Mage::getModel('faq/faq')->load($this->getRequest()->getParam('id'));
118
+ $_helper = Mage::helper('faq');
119
+ //$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
120
+ $model->delete();
121
+ //$this->removeFile($filePath);
122
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
123
+ $this->_redirect('*/*/');
124
+ } catch (Exception $e) {
125
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
126
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
127
+ }
128
+ }
129
+ $this->_redirect('*/*/');
130
+ }
131
+ public function massDeleteAction() {
132
+ $bannerIds = $this->getRequest()->getParam('faq');
133
+ if (!is_array($bannerIds)) {
134
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
135
+ } else {
136
+ try {
137
+ foreach ($bannerIds as $bannerId) {
138
+ $model = Mage::getModel('faq/faq')->load($bannerId);
139
+ $_helper = Mage::helper('faq');
140
+ //$filePath = Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($model->getFilename());
141
+ $model->delete();
142
+ //$this->removeFile($filePath);
143
+ }
144
+ Mage::getSingleton('adminhtml/session')->addSuccess(
145
+ Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($bannerIds)));
146
+ } catch (Exception $e) {
147
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
148
+ }
149
+ }
150
+ $this->_redirect('*/*/index');
151
+ }
152
+ public function massStatusAction() {
153
+ $bannerIds = $this->getRequest()->getParam('faq');
154
+ if (!is_array($bannerIds)) {
155
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
156
+ } else {
157
+ try {
158
+ foreach ($bannerIds as $bannerId) {
159
+ $banner = Mage::getSingleton('faq/faq')->load($bannerId)->setStatus($this->getRequest()->getParam('status'))->setIsMassupdate(true)->save();
160
+ }
161
+ $this->_getSession()->addSuccess(
162
+ $this->__('Total of %d record(s) were successfully updated', count($bannerIds))
163
+ );
164
+ } catch (Exception $e) {
165
+ $this->_getSession()->addError($e->getMessage());
166
+ }
167
+ }
168
+ $this->_redirect('*/*/index');
169
+ }
170
+ public function exportCsvAction() {
171
+ $fileName = 'faq.csv';
172
+ $content = $this->getLayout()->createBlock('faq/adminhtml_faq_grid')->getCsv();
173
+ $this->_sendUploadResponse($fileName, $content);
174
+ }
175
+ public function exportXmlAction() {
176
+ $fileName = 'faq.xml';
177
+ $content = $this->getLayout()->createBlock('faq/adminhtml_faq_grid')->getXml();
178
+ $this->_sendUploadResponse($fileName, $content);
179
+ }
180
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
181
+ $response = $this->getResponse();
182
+ $response->setHeader('HTTP/1.1 200 OK', '');
183
+ $response->setHeader('Pragma', 'public', true);
184
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
185
+ $response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
186
+ $response->setHeader('Last-Modified', date('r'));
187
+ $response->setHeader('Accept-Ranges', 'bytes');
188
+ $response->setHeader('Content-Length', strlen($content));
189
+ $response->setHeader('Content-type', $contentType);
190
+ $response->setBody($content);
191
+ $response->sendResponse();
192
+ die;
193
+ }
194
+ protected function removeFile($file) {
195
+ try {
196
+ $io = new Varien_Io_File();
197
+ $result = $io->rmdir($file, true);
198
+ } catch (Exception $e) {}
199
+ }
200
+ }
app/code/local/Padoo/Faq/controllers/Adminhtml/FaqgroupController.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_Adminhtml_FaqgroupController extends Mage_Adminhtml_Controller_Action {
21
+ protected function _isAllowed()
22
+ {
23
+ return Mage::getSingleton('admin/session')->isAllowed('faq/faqgroup');
24
+ }
25
+ protected function _initAction() {
26
+ $this->loadLayout()->_setActiveMenu('faq/items')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
27
+ $id = $this->getRequest()->getParam('id');
28
+ $model = Mage::getModel('faq/faqgroup')->load($id);
29
+ if ($model->getId() || $id == 0) {
30
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
31
+ if (!empty($data)) {
32
+ $model->setData($data);
33
+ }
34
+ }
35
+ Mage::register('faqgroup_data', $model);
36
+ return $this;
37
+ }
38
+ public function indexAction() {
39
+ $this->_initAction()->renderLayout();
40
+ }
41
+ public function bannergridAction() {
42
+ $this->_initAction();
43
+ $this->getResponse()->setBody($this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tab_faq')->toHtml());
44
+ }
45
+ public function editAction() {
46
+ $id = $this->getRequest()->getParam('id');
47
+ $model = Mage::getModel('faq/faqgroup')->load($id);
48
+ if ($model->getId() || $id == 0) {
49
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
50
+ if (!empty($data)) {
51
+ $model->setData($data);
52
+ }
53
+ Mage::register('faqgroup_data', $model);
54
+ $this->loadLayout();
55
+ $this->_setActiveMenu('faq/items');
56
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
57
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
58
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
59
+ $this->_addContent($this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit'))
60
+ ->_addLeft($this->getLayout()->createBlock('faq/adminhtml_faqgroup_edit_tabs'));
61
+ $this->renderLayout();
62
+ } else {
63
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Item does not exist'));
64
+ $this->_redirect('*/*/');
65
+ }
66
+ }
67
+ public function newAction() {
68
+ $this->_forward('edit');
69
+ }
70
+ public function saveAction() {
71
+ $group_id = $this->getRequest()->getParam('id');
72
+ if ($data = $this->getRequest()->getPost()) {
73
+ //save store view
74
+ $storeView = $data['stores'];
75
+ $dataStore = "";
76
+ foreach($storeView as $store){
77
+ if($dataStore != "") $dataStore .=",";
78
+ $dataStore .= $store;
79
+ }
80
+ $data['store_id'] = $dataStore;
81
+ $model = Mage::getModel('faq/faqgroup');
82
+ $model->setData($data)->setId($this->getRequest()->getParam('id'));
83
+ try {
84
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
85
+ $model->setCreatedTime(now())
86
+ ->setUpdateTime(now());
87
+ } else {
88
+ $model->setUpdateTime(now());
89
+ }
90
+ $model->save();
91
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('faq')->__('Item was successfully saved'));
92
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
93
+ if ($this->getRequest()->getParam('back')) {
94
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
95
+ return;
96
+ }
97
+ $this->_redirect('*/*/');
98
+ return;
99
+ } catch (Exception $e) {
100
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
101
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
102
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
103
+ return;
104
+ }
105
+ }
106
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('faq')->__('Unable to find item to save'));
107
+ $this->_redirect('*/*/');
108
+ }
109
+ public function deleteAction() {
110
+ if ($this->getRequest()->getParam('id') > 0) {
111
+ try {
112
+ $model = Mage::getModel('faq/faqgroup')->load($this->getRequest()->getParam('id'));
113
+ $filePath = Mage::getBaseDir('media') . DS . 'custom' . DS . 'banners' . DS . 'resize' . DS . $model->getGroupCode();
114
+ $model->delete();
115
+ $this->removeFile($filePath);
116
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
117
+ $this->_redirect('*/*/');
118
+ } catch (Exception $e) {
119
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
120
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
121
+ }
122
+ }
123
+ $this->_redirect('*/*/');
124
+ }
125
+ public function massDeleteAction() {
126
+ $bannerIds = $this->getRequest()->getParam('faq');
127
+ if (!is_array($bannerIds)) {
128
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
129
+ } else {
130
+ try {
131
+ foreach ($bannerIds as $bannerId) {
132
+ $banner = Mage::getModel('faq/faqgroup')->load($bannerId);
133
+ $filePath = Mage::getBaseDir('media') . DS . 'custom' . DS . 'banners' . DS . 'resize' . DS . $banner->getGroupCode();
134
+ $banner->delete();
135
+ $this->removeFile($filePath);
136
+ }
137
+ Mage::getSingleton('adminhtml/session')->addSuccess(
138
+ Mage::helper('adminhtml')->__(
139
+ 'Total of %d record(s) were successfully deleted', count($bannerIds)
140
+ )
141
+ );
142
+ } catch (Exception $e) {
143
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
144
+ }
145
+ }
146
+ $this->_redirect('*/*/index');
147
+ }
148
+ public function massStatusAction() {
149
+ $bannerIds = $this->getRequest()->getParam('faq');
150
+ if (!is_array($bannerIds)) {
151
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
152
+ } else {
153
+ try {
154
+ foreach ($bannerIds as $bannerId) {
155
+ $banner = Mage::getSingleton('faq/faqgroup')
156
+ ->load($bannerId)
157
+ ->setStatus($this->getRequest()->getParam('status'))
158
+ ->setIsMassupdate(true)
159
+ ->save();
160
+ }
161
+ $this->_getSession()->addSuccess(
162
+ $this->__('Total of %d record(s) were successfully updated', count($bannerIds))
163
+ );
164
+ } catch (Exception $e) {
165
+ $this->_getSession()->addError($e->getMessage());
166
+ }
167
+ }
168
+ $this->_redirect('*/*/index');
169
+ }
170
+ public function exportCsvAction() {
171
+ $fileName = 'faq.csv';
172
+ $content = $this->getLayout()->createBlock('faq/adminhtml_faq_grid')->getCsv();
173
+ $this->_sendUploadResponse($fileName, $content);
174
+ }
175
+ public function exportXmlAction() {
176
+ $fileName = 'faq.xml';
177
+ $content = $this->getLayout()->createBlock('faq/adminhtml_faq_grid')->getXml();
178
+ $this->_sendUploadResponse($fileName, $content);
179
+ }
180
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
181
+ $response = $this->getResponse();
182
+ $response->setHeader('HTTP/1.1 200 OK', '');
183
+ $response->setHeader('Pragma', 'public', true);
184
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
185
+ $response->setHeader('Content-Disposition', 'attachment; filename=' . $fileName);
186
+ $response->setHeader('Last-Modified', date('r'));
187
+ $response->setHeader('Accept-Ranges', 'bytes');
188
+ $response->setHeader('Content-Length', strlen($content));
189
+ $response->setHeader('Content-type', $contentType);
190
+ $response->setBody($content);
191
+ $response->sendResponse();
192
+ die;
193
+ }
194
+ protected function removeFile($file) {
195
+ try {
196
+ $io = new Varien_Io_File();
197
+ $result = $io->rmdir($file, true);
198
+ } catch (Exception $e) {}
199
+ }
200
+ }
app/code/local/Padoo/Faq/controllers/IndexController.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_IndexController extends Mage_Core_Controller_Front_Action {
21
+ public function indexAction() {
22
+ if (!Mage::getStoreConfig('faq/general/enable')) $this->_redirect('no-route');
23
+ $this->loadLayout();
24
+ $this->renderLayout();
25
+ }
26
+ }
app/code/local/Padoo/Faq/controllers/SearchController.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_SearchController extends Mage_Core_Controller_Front_Action
21
+ {
22
+ public function indexAction()
23
+ {
24
+ if (!Mage::getStoreConfig('faq/general/enable')) $this->_redirect('no-route');
25
+ $this->loadLayout();
26
+ $this->renderLayout();
27
+ }
28
+ }
app/code/local/Padoo/Faq/controllers/SubmitController.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoosoft Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to support@mage-addons.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @author PadooSoft Team
16
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://mage-addons.com)
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Padoo_Faq_SubmitController extends Mage_Core_Controller_Front_Action
21
+ {
22
+ public function indexAction()
23
+ {
24
+ if (!Mage::getStoreConfig('faq/general/enable')) $this->_redirect('no-route');
25
+ $this->loadLayout();
26
+ $this->renderLayout();
27
+ }
28
+ public function saveAction() {
29
+ if (!Mage::getStoreConfig('faq/general/enable')) $this->_redirect('no-route');
30
+ $faq_disable = 2;
31
+ $storeId = Mage::app()->getStore(true)->getId();
32
+ $data = $this->getRequest()->getPost();
33
+ $faqData = $_POST['faq'];
34
+ $_category= $faqData['category'];
35
+ if (!empty($data)) {
36
+ $session = Mage::getSingleton('core/session', array('name'=>'faq_frontend'));
37
+ /* @var $session Mage_Core_Model_Session */
38
+ $faqitem = Mage::getModel('faq/faq');
39
+ $validate = $faqitem->validate();
40
+ $formId = 'padoo_faq';
41
+ if ($validate === true) {
42
+ $captchaModel = Mage::helper('captcha')->getCaptcha($formId);
43
+ if ($captchaModel->isRequired()) {
44
+ $word = $this->_getCaptchaString($this->getRequest(), $formId);
45
+ if (!$captchaModel->isCorrect($word)) {
46
+ Mage::getSingleton('core/session')->addError(Mage::helper('captcha')->__('Incorrect CAPTCHA.'));
47
+ $this->_redirectReferer('');
48
+ return;
49
+ }
50
+ }
51
+
52
+ try {
53
+ $faqitem->setGroupId($faqData['category']);
54
+ $faqitem->setFaq($faqData['question']);
55
+ $faqitem->setStatus($faq_disable);
56
+ $faqitem->setStoreId($storeId);
57
+ $faqitem->setCreatedTime(now());
58
+ $faqitem->setUpdateTime(now());
59
+ $faqitem->save();
60
+
61
+ $itemId = $faqitem->getBannerId();
62
+ //send email to store
63
+ if(Mage::getStoreConfig('faq/options/enable_notification')){
64
+ Mage::helper('faq')->sendMailToStore($itemId);
65
+ }
66
+
67
+ $session->addSuccess($this->__('Your question has been accepted'));
68
+ }catch (Exception $e) {
69
+ $session->setFormData($faqData);
70
+ $session->addError($this->__('Unable to post question. Please, try again later !'));
71
+ }
72
+ }else {
73
+ try{
74
+ $session->setFormData($faqData);
75
+ }catch(Exception $e){
76
+ Mage::log($e->getMessage());
77
+ }
78
+ if (is_array($validate)) {
79
+ foreach ($validate as $errorMessage) {
80
+ $session->addError($errorMessage);
81
+ }
82
+ }
83
+ else {
84
+ $session->addError($this->__('Unable to post question. Please, try again later !'));
85
+ }
86
+ }
87
+ }
88
+
89
+ if ($redirectUrl = Mage::getSingleton('core/session')->getRedirectUrl(true)) {
90
+ $this->_redirectUrl($redirectUrl);
91
+ return;
92
+ }
93
+ $this->_redirectReferer();
94
+ }
95
+
96
+ protected function _getCaptchaString($request, $formId)
97
+ {
98
+ $captchaParams = $request->getPost(Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE);
99
+ return $captchaParams[$formId];
100
+ }
101
+ }
app/code/local/Padoo/Faq/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <faq translate="title" module="faq">
12
+ <title>Padoosoft Faqs</title>
13
+ <sort_order>20</sort_order>
14
+ </faq>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/local/Padoo/Faq/etc/config.xml ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Padoo_Faq>
5
+ <version>1.0.4</version>
6
+ </Padoo_Faq>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <faq>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Padoo_Faq</module>
14
+ <frontName>faq</frontName>
15
+ </args>
16
+ </faq>
17
+ </routers>
18
+ <translate>
19
+ <modules>
20
+ <Padoo_Faq>
21
+ <files>
22
+ <default>Padoo_Faq.csv</default>
23
+ </files>
24
+ </Padoo_Faq>
25
+ </modules>
26
+ </translate>
27
+ <layout>
28
+ <updates>
29
+ <faq>
30
+ <file>padoo_faq.xml</file>
31
+ </faq>
32
+ </updates>
33
+ </layout>
34
+ </frontend>
35
+ <default>
36
+ <faq>
37
+ <general>
38
+ <responsive>1</responsive>
39
+ </general>
40
+ </faq>
41
+ <captcha>
42
+ <frontend>
43
+ <areas>
44
+ <faq>
45
+ <label>Faq Page</label>
46
+ </faq>
47
+ </areas>
48
+ </frontend>
49
+ </captcha>
50
+ <customer>
51
+ <captcha>
52
+ <enable>1</enable>
53
+ <always_for>
54
+ <faq>1</faq>
55
+ </always_for>
56
+ <forms>padoo_faq</forms>
57
+ </captcha>
58
+ </customer>
59
+ </default>
60
+ <admin>
61
+ <routers>
62
+ <faq>
63
+ <use>admin</use>
64
+ <args>
65
+ <module>Padoo_Faq</module>
66
+ <frontName>faq</frontName>
67
+ </args>
68
+ </faq>
69
+ </routers>
70
+ </admin>
71
+ <adminhtml>
72
+ <menu>
73
+ <faq>
74
+ <title>FAQ</title>
75
+ <sort_order>75</sort_order>
76
+ <children>
77
+ <faq>
78
+ <title>Manage FAQ</title>
79
+ <sort_order>0</sort_order>
80
+ <action>faq/adminhtml_faq</action>
81
+ </faq>
82
+ <faqgroup>
83
+ <title>Manage FAQ Group</title>
84
+ <sort_order>1</sort_order>
85
+ <action>faq/adminhtml_faqgroup</action>
86
+ </faqgroup>
87
+ </children>
88
+ </faq>
89
+ </menu>
90
+ <acl>
91
+ <resources>
92
+ <admin>
93
+ <children>
94
+ <faq>
95
+ <title>FAQ</title>
96
+ <sort_order>75</sort_order>
97
+ <children>
98
+ <faq>
99
+ <title>Manage FAQ</title>
100
+ <sort_order>0</sort_order>
101
+ <action>faq/adminhtml_faq</action>
102
+ </faq>
103
+ <faqgroup>
104
+ <title>Manage FAQ Group</title>
105
+ <sort_order>1</sort_order>
106
+ <action>faq/adminhtml_faqgroup</action>
107
+ </faqgroup>
108
+ </children>
109
+ </faq>
110
+ </children>
111
+ </admin>
112
+ </resources>
113
+ </acl>
114
+ <layout>
115
+ <updates>
116
+ <faq>
117
+ <file>padoo_faq.xml</file>
118
+ </faq>
119
+ </updates>
120
+ </layout>
121
+ </adminhtml>
122
+ <global>
123
+ <models>
124
+ <faq>
125
+ <class>Padoo_Faq_Model</class>
126
+ <resourceModel>faq_mysql4</resourceModel>
127
+ </faq>
128
+ <faq_mysql4>
129
+ <class>Padoo_Faq_Model_Mysql4</class>
130
+ <entities>
131
+ <faq>
132
+ <table>padoo_faq</table>
133
+ </faq>
134
+ <faqgroup>
135
+ <table>padoo_faqgroup</table>
136
+ </faqgroup>
137
+ </entities>
138
+ </faq_mysql4>
139
+ </models>
140
+ <blocks>
141
+ <faq>
142
+ <class>Padoo_Faq_Block</class>
143
+ </faq>
144
+ </blocks>
145
+ <helpers>
146
+ <faq>
147
+ <class>Padoo_Faq_Helper</class>
148
+ </faq>
149
+ </helpers>
150
+ <resources>
151
+ <faq_setup>
152
+ <setup>
153
+ <module>Padoo_Faq</module>
154
+ </setup>
155
+ <connection>
156
+ <use>core_setup</use>
157
+ </connection>
158
+ </faq_setup>
159
+ <faq_write>
160
+ <connection>
161
+ <use>core_write</use>
162
+ </connection>
163
+ </faq_write>
164
+ <faq_read>
165
+ <connection>
166
+ <use>core_read</use>
167
+ </connection>
168
+ </faq_read>
169
+ </resources>
170
+ <template>
171
+ <email>
172
+ <faq_options_mail_to_store_template translate="label">
173
+ <label>Notification Faq</label>
174
+ <file>faq_options_mail_to_store_template.html</file>
175
+ <type>html</type>
176
+ </faq_options_mail_to_store_template>
177
+ </email>
178
+ </template>
179
+ </global>
180
+ </config>
app/code/local/Padoo/Faq/etc/system.xml ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <padoo_templates translate="label" module="faq">
5
+ <label>Padoosoft extension</label>
6
+ <!-- it relation to diplaying position on left menu -->
7
+ <sort_order>198</sort_order>
8
+ </padoo_templates>
9
+ </tabs>
10
+ <sections>
11
+ <faq translate="label" module="faq">
12
+ <label>FAQ</label>
13
+ <tab>padoo_templates</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>5</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
+ <groups>
20
+ <general translate="label" module="faq">
21
+ <label>General Configs</label>
22
+ <sort_order>1</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <enable translate="label">
28
+ <label>Enabled</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>0</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </enable>
36
+ <toplink translate="label">
37
+ <label>Show Top Links</label>
38
+ <frontend_type>select</frontend_type>
39
+ <source_model>adminhtml/system_config_source_yesno</source_model>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <depends><enable>1</enable></depends>
45
+ </toplink>
46
+ <enable_search translate="label">
47
+ <label>Enabled Search</label>
48
+ <frontend_type>select</frontend_type>
49
+ <source_model>adminhtml/system_config_source_yesno</source_model>
50
+ <sort_order>2</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </enable_search>
55
+ <enable_submit translate="label">
56
+ <label>Enabled Client Submit Question</label>
57
+ <frontend_type>select</frontend_type>
58
+ <source_model>adminhtml/system_config_source_yesno</source_model>
59
+ <sort_order>3</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </enable_submit>
64
+ <enable_group_left translate="label">
65
+ <label>Enabled Group search in left</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>4</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </enable_group_left>
73
+ <enable_capcha translate="label">
74
+ <label>Enable Captcha in submit question form</label>
75
+ <frontend_type>select</frontend_type>
76
+ <source_model>adminhtml/system_config_source_yesno</source_model>
77
+ <config_path>customer/captcha/enable</config_path>
78
+ <sort_order>7</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ </enable_capcha>
83
+ </fields>
84
+ </general>
85
+ <options>
86
+ <label>Email Notifications</label>
87
+ <sort_order>2</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>1</show_in_store>
91
+ <fields>
92
+ <enable_notification translate="label">
93
+ <label>Enable Email Notification</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>1</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ </enable_notification>
101
+ <mail_to_store_template translate="label">
102
+ <label>Email to Store Template</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>adminhtml/system_config_source_email_template</source_model>
105
+ <sort_order>1</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ <depends><enable_notification>1</enable_notification></depends>
110
+ </mail_to_store_template>
111
+ <recipient_email translate="label">
112
+ <label>Recipient's Email</label>
113
+ <frontend_type>text</frontend_type>
114
+ <sort_order>4</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>1</show_in_store>
118
+ <depends><enable_notification>1</enable_notification></depends>
119
+ </recipient_email>
120
+ </fields>
121
+ </options>
122
+ </groups>
123
+ </faq>
124
+ </sections>
125
+ </config>
app/code/local/Padoo/Faq/sql/faq_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("
5
+ DROP TABLE IF EXISTS {$this->getTable('padoo_faq')};
6
+ CREATE TABLE {$this->getTable('padoo_faq')} (
7
+ `banner_id` int(11) unsigned NOT NULL auto_increment,
8
+ `faq` varchar(255) NOT NULL default '',
9
+ `body` text NOT NULL,
10
+ `status` smallint(6) NOT NULL default '2',
11
+ `sort_order` int(11) NOT NULL default '0',
12
+ `created_time` DATETIME NULL,
13
+ `update_time` DATETIME NULL,
14
+ PRIMARY KEY (`banner_id`)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
+
17
+ DROP TABLE IF EXISTS {$this->getTable('padoo_faqgroup')};
18
+ CREATE TABLE {$this->getTable('padoo_faqgroup')} (
19
+ `group_id` int(11) unsigned NOT NULL auto_increment,
20
+ `group_name` varchar(225) NOT NULL default '',
21
+ `status` smallint(6) NOT NULL default '2',
22
+ `cms_pages` varchar(255) NOT NULL,
23
+ `created_time` DATETIME NULL,
24
+ `update_time` DATETIME NULL,
25
+ PRIMARY KEY (`group_id`)
26
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27
+ ");
28
+ $installer->endSetup();
29
+ ?>
app/code/local/Padoo/Faq/sql/faq_setup/mysql4-upgrade-1.0.1-1.0.2.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Faq - Magento Extension
5
+ *
6
+ * @package Faq
7
+ * @category Padoo
8
+ * @copyright Copyright 2015 Padoo.
9
+ */
10
+
11
+ $installer = $this;
12
+ /* @var $installer Mage_Core_Model_Resource_Setup */
13
+
14
+ $configValuesMap = array(
15
+ 'faq/options/mail_to_store_template' => 'faq_options_mail_to_store_template',
16
+ );
17
+
18
+ foreach ($configValuesMap as $configPath=>$configValue) {
19
+ $installer->setConfigData($configPath, $configValue);
20
+ }
21
+
app/code/local/Padoo/Faq/sql/faq_setup/mysql4-upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->getConnection()->addColumn($installer->getTable('padoo_faq'), 'group_id',
8
+ 'varchar(255) NOT NULL AFTER banner_id'
9
+ );
10
+ $installer->getConnection()->addColumn($installer->getTable('padoo_faq'), 'store_id',
11
+ 'varchar(255) NOT NULL AFTER sort_order'
12
+ );
13
+ $installer->getConnection()->addColumn($installer->getTable('padoo_faqgroup'), 'store_id',
14
+ 'varchar(255) NOT NULL AFTER cms_pages'
15
+ );
16
+ $installer->endSetup();
app/design/frontend/default/default/layout/padoo_faq.xml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>css/faq/faq.css</stylesheet></action>
6
+ <action method="addItem"><type>js</type><name>padoo/jquery.js</name></action>
7
+ <action method="addItem"><type>js</type><name>padoo/jquery_noconflict.js</name></action>
8
+ <action method="addItem"><type>skin_js</type><name>js/padoo/jquery.cycle.js</name></action>
9
+ <action method="addItem"><type>skin_js</type><name>js/faq/faq.js</name></action>
10
+ </reference>
11
+ <reference name="top.links">
12
+ <action ifconfig="faq/general/toplink" method="addLink" translate="label title" module="faq"><label>FAQs</label><url helper="faq/getFaqUrl" /><title>FAQs</title><prepare/><urlParams/><position>10</position><aParams> <target>_blank</target> </aParams></action>
13
+ </reference>
14
+ </default>
15
+
16
+ <faq_index_index>
17
+ <reference name="head">
18
+ <action method="setTitle"><title>FAQs</title></action>
19
+ <action method="addCss"><stylesheet>css/faq/faq.css</stylesheet></action>
20
+ <action method="addItem"><type>js</type><name>padoo/jquery.js</name></action>
21
+ <action method="addItem"><type>js</type><name>padoo/jquery_noconflict.js</name></action>
22
+ <action method="addItem"><type>skin_js</type><name>js/padoo/jquery.cycle.js</name></action>
23
+ <action method="addItem"><type>skin_js</type><name>js/faq/faq.js</name></action>
24
+ </reference>
25
+ <reference name="root">
26
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
27
+ </reference>
28
+ <reference name="content">
29
+ <block type="faq/faq" name="faq" template="padoofaq/faq.phtml">
30
+ <block type="faq/faq" name ="faq.group" >
31
+ <action method="setTemplate" ifconfig="faq/general/enable_group_left">
32
+ <template>padoofaq/faq_group.phtml</template>
33
+ </action>
34
+ </block>
35
+ </block>
36
+ </reference>
37
+ </faq_index_index>
38
+
39
+ <faq_search_index>
40
+ <reference name="head">
41
+ <action method="setTitle"><title>FAQs</title></action>
42
+ <action method="addCss"><stylesheet>css/faq/faq.css</stylesheet></action>
43
+ <action method="addItem"><type>js</type><name>padoo/jquery.js</name></action>
44
+ <action method="addItem"><type>js</type><name>padoo/jquery_noconflict.js</name></action>
45
+ <action method="addItem"><type>skin_js</type><name>js/padoo/jquery.cycle.js</name></action>
46
+ <action method="addItem"><type>skin_js</type><name>js/faq/faq.js</name></action>
47
+ </reference>
48
+ <reference name="root">
49
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
50
+ </reference>
51
+ <reference name="content">
52
+ <block type="faq/searchfaq" name="searchfaq" template="padoofaq/searchresult.phtml" />
53
+ </reference>
54
+ </faq_search_index>
55
+
56
+ <faq_submit_index>
57
+ <reference name="head">
58
+ <action method="setTitle"><title>Submit Faq</title></action>
59
+ <action method="addCss"><stylesheet>css/faq/faq.css</stylesheet></action>
60
+ <action method="addItem"><type>js</type><name>padoo/jquery.js</name></action>
61
+ <action method="addItem"><type>js</type><name>padoo/jquery_noconflict.js</name></action>
62
+ <action method="addItem"><type>skin_js</type><name>js/padoo/jquery.cycle.js</name></action>
63
+ <action method="addItem"><type>skin_js</type><name>js/faq/faq.js</name></action>
64
+ </reference>
65
+ <reference name="root">
66
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
67
+ </reference>
68
+ <reference name="content">
69
+ <block type="faq/faq" name="faq.submit" template="padoofaq/submit.phtml" >
70
+ <!-- Code Start For Display Captcha on Register page -->
71
+ <block type="captcha/captcha" name="captcha">
72
+ <reference name="head">
73
+ <action method="addJs"><file>mage/captcha.js</file></action>
74
+ </reference>
75
+ <action method="setFormId"><formId>padoo_faq</formId></action>
76
+ <action method="setImgWidth"><width>230</width></action>
77
+ <action method="setImgHeight"><width>50</width></action>
78
+ </block>
79
+ <!-- Code End For Display Captcha on Register page-->
80
+ </block>
81
+ </reference>
82
+ </faq_submit_index>
83
+ </layout>
app/design/frontend/default/default/template/padoofaq/faq.phtml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ if (typeof jQuery == 'undefined')
3
+ {
4
+ document.write(unescape("%3Cscript src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
5
+ }
6
+ </script>
7
+ <?php
8
+ $data = $this->getDataByGroup();
9
+ ?>
10
+ <div class="pd_formsearch" style="display:inline-block">
11
+ <?php if(Mage::getStoreConfig('faq/general/enable_search')): ?>
12
+ <form method="get" action="<?php echo $this->getUrl('faq/search/index')?>" name="faqsearch">
13
+ <div id="searchform">
14
+ <label for="keyword" class="">
15
+ <?php echo Mage::Helper('faq')->__('Search FAQ')?>
16
+ </label>
17
+ <input class="input_text" type="text" name="keyword" size="20" maxlength="150" onfocus="this.value='';"/>
18
+ <button type="submit" class="button" ><span><span><?php echo Mage::helper('faq')->__(' Search ') ?></span></span></button>
19
+ </div>
20
+ </form>
21
+ <?php endif; ?>
22
+ <?php if(Mage::getStoreConfig('faq/general/enable_submit')): ?>
23
+ <a href="<?php echo $this->getUrl('faq/submit/index')?>"><?php echo Mage::Helper('faq')->__('Submit Question')?></a>
24
+ <?php endif; ?>
25
+ </div>
26
+ <?php if(Mage::getStoreConfig('faq/general/enable_group_left')): ?>
27
+ <div class="col-main-faq">
28
+ <div class="faqs">
29
+ <?php foreach ($data as $record): ?>
30
+ <?php $groupId = $record->getGroupId(); ?>
31
+ <?php if(!empty($groupId)): ?>
32
+ <?php if($this->groupHasData($groupId)): ?>
33
+ <div class="box">
34
+ <div class="faq-content-group">
35
+ <hr class="solid">
36
+ <ul>
37
+ <?php
38
+ $faqs = $this->getFaqs();
39
+ $totalItem = count($faqs);
40
+ $i=1;
41
+ foreach($faqs as $faq) :
42
+ $arrGroups = explode(',',$faq->getGroupId());
43
+ if(in_array($groupId,$arrGroups)){
44
+ ?>
45
+ <li class="<?php echo $i % 2 == 0 ? 'even' : 'odd' ?>">
46
+ <div class="faqq"> </div>
47
+ <div class="faqopenindicator"> </div>
48
+ <p><?php echo $this->stripTags($faq->getFaq(), null, true) ?></p>
49
+ <div class="faq-content">
50
+ <?php echo $faq->getBody() ?>
51
+ </div>
52
+ <?php if($i < $totalItem): ?>
53
+ <hr class="dash">
54
+ <?php endif; ?>
55
+ </li>
56
+ <?php } ?>
57
+ <?php $i++;endforeach; ?>
58
+ </ul>
59
+ <hr class="solid">
60
+ </div>
61
+ </div>
62
+ <?php endif; ?>
63
+ <?php endif; ?>
64
+ <?php endforeach; ?>
65
+ </div>
66
+ </div>
67
+ <div class="col-left-faq sidebar">
68
+ <?php echo $this->getChildHtml('faq.group') ?>
69
+ </div>
70
+ <?php else: ?>
71
+ <h3 class="faq-title"><?php echo Mage::Helper('faq')->__('Frequently Asked Questions')?></h3>
72
+ <div class="faqs">
73
+ <?php foreach ($data as $record): ?>
74
+ <?php $groupId = $record->getGroupId(); ?>
75
+ <?php if(!empty($groupId)): ?>
76
+ <?php if($this->groupHasData($groupId)): ?>
77
+ <div class="box">
78
+ <div class="faq-question-group">
79
+ <span class="faq-question"><?php echo $record->getGroupName() ?></span>
80
+ </div>
81
+ <div class="faq-content-group">
82
+ <hr class="solid">
83
+ <ul>
84
+ <?php
85
+ $faqs = $this->getFaqs();
86
+ $totalItem = count($faqs);
87
+ $i=1;
88
+ foreach($faqs as $faq) :
89
+ $arrGroups = explode(',',$faq->getGroupId());
90
+ if(in_array($groupId,$arrGroups)){
91
+ ?>
92
+ <li class="<?php echo $i % 2 == 0 ? 'even' : 'odd' ?>">
93
+ <div class="faqq"> </div>
94
+ <div class="faqopenindicator"> </div>
95
+ <p><?php echo $this->stripTags($faq->getFaq(), null, true) ?></p>
96
+ <div class="faq-content">
97
+ <?php echo $faq->getBody() ?>
98
+ </div>
99
+ <?php if($i < $totalItem): ?>
100
+ <hr class="dash">
101
+ <?php endif; ?>
102
+ </li>
103
+ <?php } ?>
104
+ <?php $i++;endforeach; ?>
105
+ </ul>
106
+ <hr class="solid">
107
+ </div>
108
+ </div>
109
+ <?php endif; ?>
110
+ <?php endif; ?>
111
+ <?php endforeach; ?>
112
+ </div>
113
+ <?php endif; ?>
app/design/frontend/default/default/template/padoofaq/faq_group.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Padoo Co.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0).
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you are unable to obtain it through the world-wide-web, please send
11
+ * an email to info@padoo.com so we can send you a copy immediately.
12
+ *
13
+ * @category Padoo
14
+ * @package Padoo_FAQ
15
+ * @copyright Copyright (c) 2010-2012 Padoo Co. (http://padoo.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ /**
20
+ * side box template of faq
21
+ */
22
+ ?>
23
+ <?php
24
+ $groups = $this->getGroups();
25
+ $defaultGroup = $this->_groupId;
26
+ ?>
27
+ <?php if (Mage::getStoreConfig('faq/general/enable')): ?>
28
+ <div class="block block-account faq-sidebar">
29
+ <div class="block-title">
30
+ <strong><span><?php echo $this->__('FAQ Topics') ?></span></strong>
31
+ </div>
32
+ <div class="block-content">
33
+ <ul>
34
+ <?php $i=0;foreach ($groups as $group): ?>
35
+ <?php if($this->groupHasData($group->getGroupId())): ?>
36
+ <?php if($group->getGroupId() == $defaultGroup): ?>
37
+ <li class="current">
38
+ <strong><?php echo $group->getGroupName() ?></strong>
39
+ </li>
40
+ <?php else: ?>
41
+ <li>
42
+ <a href="<?php echo $this->getUrl('faq',array('id' => $group->getGroupId())); ?>"><?php echo $group->getGroupName() ?></a>
43
+ </li>
44
+ <?php endif; ?>
45
+ <?php endif; ?>
46
+ <?php $i++;endforeach; ?>
47
+ </ul>
48
+ </div>
49
+ </div>
50
+ <?php endif; ?>
app/design/frontend/default/default/template/padoofaq/js.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <script>
2
+ jQuery(".faq-content-group li").each(function(){
3
+ jQuery(this).find('p').click(function(){
4
+ jQuery(this).parent().find(".faq-content").slideToggle().parent().toggleClass( "active" );
5
+ });
6
+ });
7
+ </script>
app/design/frontend/default/default/template/padoofaq/search.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="pd_formsearch" style="display:inline-block">
3
+ <?php if(Mage::getStoreConfig('faq/general/enable_search')): ?>
4
+ <form method="get" action="<?php echo $this->getUrl('faq/search/index')?>" name="faqsearch">
5
+ <div id="searchform">
6
+ <label for="keyword" class="">
7
+ <?php echo Mage::Helper('faq')->__('Search FAQ')?>
8
+ </label>
9
+ <input class="input_text" type="text" name="keyword" size="20" maxlength="150" onfocus="this.value='';"/>
10
+ <button type="submit" class="button" ><span><span><?php echo Mage::helper('faq')->__(' Search ') ?></span></span></button>
11
+ </div>
12
+ </form>
13
+ <?php endif; ?>
14
+ <a href="<?php echo $this->getUrl('faq/submit/index')?>">Submit Question</a>
15
+ </div>
app/design/frontend/default/default/template/padoofaq/searchresult.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="pd_formsearch" style="display:inline-block">
3
+ <?php if(Mage::getStoreConfig('faq/general/enable_search')): ?>
4
+ <form method="get" action="<?php echo $this->getUrl('faq/search/index')?>" name="faqsearch">
5
+ <div id="searchform">
6
+ <label for="keyword" class="">
7
+ <?php echo Mage::Helper('faq')->__('Search FAQ')?>
8
+ </label>
9
+ <input class="input_text" type="text" name="keyword" size="20" maxlength="150" value="<?php echo @$_GET['keyword'] ?>" />
10
+ <button type="submit" class="button" ><span><span><?php echo Mage::helper('faq')->__(' Search ') ?></span></span></button>
11
+ </div>
12
+ </form>
13
+ <?php endif; ?>
14
+ <a href="<?php echo $this->getUrl('faq/submit/index')?>"><?php echo Mage::Helper('faq')->__('Submit Question')?></a>
15
+ </div>
16
+ <?php
17
+ $_keyword= $_GET['keyword'];
18
+ $exceptstrangesign = preg_replace('#[^0-9a-z]+#i', ' ', $_keyword);
19
+ $inputarrayword= array();
20
+ $inputarrayword=explode(' ',$exceptstrangesign);
21
+
22
+ $faqs= Mage::getResourceModel('faq/faq_collection');
23
+ if($_keyword!=''){
24
+ $where ="";
25
+ $where1 ="";
26
+ for($i=0;$i<count($inputarrayword);$i++)
27
+ {
28
+ $where .= "faq like '%".$inputarrayword[$i]."%' OR body like '%".$inputarrayword[$i]."%' OR ";
29
+ }
30
+ $where = substr($where,0,strlen($where)-4);
31
+ $faqs->getSelect()->where($where)->where('status = ?', 1);
32
+ // Search in faq with faqname
33
+ }
34
+ ?>
35
+
36
+ <?php if(count($faqs)): ?>
37
+ <div class="faqs result-search">
38
+ <div class="box">
39
+ <div class="faq-question-group">
40
+ <span class="faq-question"><?php echo "<h3>". Mage::Helper('faq')->__('Result for search : %s', $_keyword)." </h3>"; ?></span>
41
+ </div>
42
+ <?php
43
+ $totalItem = count($bannerData);
44
+ $i=1;
45
+ foreach ($faqs as $record): ?>
46
+ <div class="faq-content-group">
47
+ <?php if($i == 1): ?>
48
+ <hr class="solid">
49
+ <?php endif; ?>
50
+ <ul>
51
+ <li class="<?php echo $i % 2 == 0 ? 'even' : 'odd' ?>">
52
+ <div class="faqq"> </div>
53
+ <div class="faqopenindicator"> </div>
54
+ <p><?php echo $this->stripTags($record->getFaq(), null, true) ?></p>
55
+ <div class="faq-content">
56
+ <?php
57
+ $des = $record->getBody();
58
+ /* for($i=0;$i<count($inputarrayword);$i++){
59
+ $des = str_replace($inputarrayword[$i],"<b>". $inputarrayword[$i] ."</b>" ,$des);
60
+ } */
61
+ echo $des;
62
+ ?>
63
+ </div>
64
+ </li>
65
+ </ul>
66
+ <hr class="solid">
67
+ </div>
68
+ <?php $i++;endforeach; ?>
69
+ </div>
70
+ </div>
71
+ <?php else: ?>
72
+ <br/>
73
+ <br/>
74
+ <h3><?php echo Mage::Helper('faq')->__('No result for : %s', $_keyword) ?></h3>
75
+ <?php endif; ?>
app/design/frontend/default/default/template/padoofaq/submit.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $data = $this->getDataByGroup();
3
+ ?>
4
+ <div class="pd_formsearch" style="display:inline-block">
5
+ <?php if(Mage::getStoreConfig('faq/general/enable_search')): ?>
6
+ <form method="get" action="<?php echo $this->getUrl('faq/search/index')?>" name="faqsearch">
7
+ <div id="searchform">
8
+ <label for="keyword" class="">
9
+ <?php echo Mage::Helper('faq')->__('Search FAQ')?>
10
+ </label>
11
+ <input class="input_text" type="text" name="keyword" size="20" maxlength="150" onfocus="this.value='';"/>
12
+ <button type="submit" class="button" ><span><span><?php echo Mage::helper('faq')->__(' Search ') ?></span></span></button>
13
+ </div>
14
+ </form>
15
+ <?php endif; ?>
16
+ <a href="<?php echo $this->getUrl('faq/submit/index')?>"><?php echo Mage::Helper('faq')->__('Submit Question')?></a>
17
+ </div>
18
+ <div class="submit-form faq-form">
19
+ <h4 class="title"><?php echo $this->__('Write your Faq') ?>:</h4>
20
+ <form id="faq-form" action="<?php echo $this->getUrl('faq/submit/save/')?>" method="post" enctype="multipart/form-data">
21
+ <ul class="form-list">
22
+ <li class="wide">
23
+ <label class="required" for="name"><em>*</em><?php echo $this->__('Category') ?></label>
24
+ <div class="input-box">
25
+ <select class="validate-select required-entry" name="faq[category]">
26
+ <option class="">---Select one---</option>
27
+ <?php
28
+ foreach ($data as $record){
29
+ echo '<option value="'. $record->getGroupId() .'" >';
30
+ echo $record->getGroupName();
31
+ echo '</option>';
32
+ }
33
+ ?>
34
+ </select>
35
+ </div>
36
+ </li>
37
+ <li class="wide">
38
+ <label class="required"><em>*</em><?php echo Mage::Helper('faq')->__('Question') ?>:</label>
39
+ <div class="input-box">
40
+ <textarea name="faq[question]" class="required-entry input-text" rows="10" cols="80"></textarea>
41
+ </div>
42
+ </li>
43
+ <li class="wide">
44
+ <?php echo $this->getChildHtml('captcha'); ?>
45
+ </li>
46
+ </ul>
47
+ <div class="box-actions">
48
+ <button class="button" title="Send" type="submit" >
49
+ <span><span><?php echo Mage::Helper('faq')->__('Send') ?></span></span>
50
+ </button>
51
+ <button class="button" title="Reset" type="reset">
52
+ <span><span><?php echo Mage::Helper('faq')->__('Reset') ?></span></span>
53
+ </button>
54
+ </div>
55
+ </form>
56
+ </div>
57
+ <script type="text/javascript">
58
+
59
+ //<![CDATA[
60
+ var contactForm = new VarienForm('faq-form', true);
61
+ //]]>
62
+ </script>
app/etc/modules/Padoo_Faq.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Padoo_Faq>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Padoo_Pcore/>
9
+ </depends>
10
+ </Padoo_Faq>
11
+ </modules>
12
+ </config>
app/locale/en_US/Padoo_Faq.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Search","Search"
2
+ "Submit Question","Submit Question"
3
+ "Frequently Asked Questions","Frequently Asked Questions"
4
+ "Faq","Faq"
5
+ "All Faqs","All Faqs"
6
+ "Search FAQ","Search FAQ"
7
+ "Result for search : %s","Result for search : %s"
8
+ "No result for : %s","No result for : %s"
9
+ "Category","Category"
10
+ "Question","Question"
11
+ "Send","Send"
12
+ "Reset","Reset"
js/padoo/checkValue.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ function checkValue(el){
2
+ for (var k=1; k<9; k++){
3
+ if((el.value == $("onepagecheckout_positions_position"+k).value) && (el.id != "onepagecheckout_positions_position"+k) && (el.value!="")){
4
+ el.value = "";
5
+ alert("This field already exists. Please choose other field !");
6
+ break;
7
+ }
8
+ }
9
+
10
+ }
js/padoo/jquery.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! jQuery v@1.8.1 jquery.com | jquery.org/license */
2
+ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(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 cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.1",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&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 p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n=(p._data(this,"events")||{})[c.type]||[],o=n.delegateCount,q=[].slice.call(arguments),r=!c.exclusive&&!c.namespace,s=p.event.special[c.type]||{},t=[];q[0]=c,c.delegateTarget=this;if(s.preDispatch&&s.preDispatch.call(this,c)===!1)return;if(o&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<o;d++)k=n[d],l=k.selector,h[l]===b&&(h[l]=p(l,this).index(f)>=0),h[l]&&j.push(k);j.length&&t.push({elem:f,matches:j})}n.length>o&&t.push({elem:this,matches:n.slice(o)});for(d=0;d<t.length&&!c.isPropagationStopped();d++){i=t[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){k=i.matches[e];if(r||!c.namespace&&!k.namespace||c.namespace_re&&c.namespace_re.test(k.namespace))c.data=k.data,c.handleObj=k,g=((p.event.special[k.origType]||{}).handle||k.handler).apply(i.elem,q),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return s.postDispatch&&s.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.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){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function $(a,b,c,d){c=c||[],b=b||q;var e,f,g,j,k=b.nodeType;if(k!==1&&k!==9)return[];if(!a||typeof a!="string")return c;g=h(b);if(!g&&!d)if(e=L.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&i(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return u.apply(c,t.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&X&&b.getElementsByClassName)return u.apply(c,t.call(b.getElementsByClassName(j),0)),c}return bk(a,b,c,d,g)}function _(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function ba(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bb(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bc(a,b,c,d){var e,g,h,i,j,k,l,m,n,p,r=!c&&b!==q,s=(r?"<s>":"")+a.replace(H,"$1<s>"),u=y[o][s];if(u)return d?0:t.call(u,0);j=a,k=[],m=0,n=f.preFilter,p=f.filter;while(j){if(!e||(g=I.exec(j)))g&&(j=j.slice(g[0].length),h.selector=l),k.push(h=[]),l="",r&&(j=" "+j);e=!1;if(g=J.exec(j))l+=g[0],j=j.slice(g[0].length),e=h.push({part:g.pop().replace(H," "),string:g[0],captures:g});for(i in p)(g=S[i].exec(j))&&(!n[i]||(g=n[i](g,b,c)))&&(l+=g[0],j=j.slice(g[0].length),e=h.push({part:i,string:g.shift(),captures:g}));if(!e)break}return l&&(h.selector=l),d?j.length:j?$.error(a):t.call(y(s,k),0)}function bd(a,b,e,f){var g=b.dir,h=s++;return a||(a=function(a){return a===e}),b.first?function(b){while(b=b[g])if(b.nodeType===1)return a(b)&&b}:f?function(b){while(b=b[g])if(b.nodeType===1&&a(b))return b}:function(b){var e,f=h+"."+c,i=f+"."+d;while(b=b[g])if(b.nodeType===1){if((e=b[o])===i)return b.sizset;if(typeof e=="string"&&e.indexOf(f)===0){if(b.sizset)return b}else{b[o]=i;if(a(b))return b.sizset=!0,b;b.sizset=!1}}}}function be(a,b){return a?function(c){var d=b(c);return d&&a(d===!0?c:d)}:b}function bf(a,b,c){var d,e,g=0;for(;d=a[g];g++)f.relative[d.part]?e=bd(e,f.relative[d.part],b,c):e=be(e,f.filter[d.part].apply(null,d.captures.concat(b,c)));return e}function bg(a){return function(b){var c,d=0;for(;c=a[d];d++)if(c(b))return!0;return!1}}function bh(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)$(a,b[e],c,d)}function bi(a,b,c,d,e,g){var h,i=f.setFilters[b.toLowerCase()];return i||$.error(b),(a||!(h=e))&&bh(a||"*",d,h=[],e),h.length>0?i(h,c,g):[]}function bj(a,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s=0,t=a.length,v=S.POS,w=new RegExp("^"+v.source+"(?!"+A+")","i"),x=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(n[a]=b)};for(;s<t;s++){f=a[s],g="",m=e;for(h=0,i=f.length;h<i;h++){j=f[h],k=j.string;if(j.part==="PSEUDO"){v.exec(""),l=0;while(n=v.exec(k)){o=!0,p=v.lastIndex=n.index+n[0].length;if(p>l){g+=k.slice(l,n.index),l=p,q=[c],J.test(g)&&(m&&(q=m),m=e);if(r=O.test(g))g=g.slice(0,-5).replace(J,"$&*"),l++;n.length>1&&n[0].replace(w,x),m=bi(g,n[1],n[2],q,m,r)}g=""}}o||(g+=k),o=!1}g?J.test(g)?bh(g,m||[c],d,e):$(g,c,d,e?e.concat(m):m):u.apply(d,m)}return t===1?d:$.uniqueSort(d)}function bk(a,b,e,g,h){a=a.replace(H,"$1");var i,k,l,m,n,o,p,q,r,s,v=bc(a,b,h),w=b.nodeType;if(S.POS.test(a))return bj(v,b,e,g);if(g)i=t.call(g,0);else if(v.length===1){if((o=t.call(v[0],0)).length>2&&(p=o[0]).part==="ID"&&w===9&&!h&&f.relative[o[1].part]){b=f.find.ID(p.captures[0].replace(R,""),b,h)[0];if(!b)return e;a=a.slice(o.shift().string.length)}r=(v=N.exec(o[0].string))&&!v.index&&b.parentNode||b,q="";for(n=o.length-1;n>=0;n--){p=o[n],s=p.part,q=p.string+q;if(f.relative[s])break;if(f.order.test(s)){i=f.find[s](p.captures[0].replace(R,""),r,h);if(i==null)continue;a=a.slice(0,a.length-q.length)+q.replace(S[s],""),a||u.apply(e,t.call(i,0));break}}}if(a){k=j(a,b,h),c=k.dirruns++,i==null&&(i=f.find.TAG("*",N.test(a)&&b.parentNode||b));for(n=0;m=i[n];n++)d=k.runs++,k(m)&&e.push(m)}return e}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=a.document,r=q.documentElement,s=0,t=[].slice,u=[].push,v=function(a,b){return a[o]=b||!0,a},w=function(){var a={},b=[];return v(function(c,d){return b.push(c)>f.cacheLength&&delete a[b.shift()],a[c]=d},a)},x=w(),y=w(),z=w(),A="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",C=B.replace("w","w#"),D="([*^$|!~]?=)",E="\\["+A+"*("+B+")"+A+"*(?:"+D+A+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+C+")|)|)"+A+"*\\]",F=":("+B+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+E+")|[^:]|\\\\.)*|.*))\\)|)",G=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",H=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g"),I=new RegExp("^"+A+"*,"+A+"*"),J=new RegExp("^"+A+"*([\\x20\\t\\r\\n\\f>+~])"+A+"*"),K=new RegExp(F),L=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,M=/^:not/,N=/[\x20\t\r\n\f]*[+~]/,O=/:not\($/,P=/h\d/i,Q=/input|select|textarea|button/i,R=/\\(?!\\)/g,S={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),NAME:new RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:new RegExp("^("+B.replace("w","w*")+")"),ATTR:new RegExp("^"+E),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),POS:new RegExp(G,"ig"),needsContext:new RegExp("^"+A+"*[>+~]|"+G,"i")},T=function(a){var b=q.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},U=T(function(a){return a.appendChild(q.createComment("")),!a.getElementsByTagName("*").length}),V=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),W=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),X=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),Y=T(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",r.insertBefore(a,r.firstChild);var b=q.getElementsByName&&q.getElementsByName(o).length===2+q.getElementsByName(o+0).length;return e=!q.getElementById(o),r.removeChild(a),b});try{t.call(r.childNodes,0)[0].nodeType}catch(Z){t=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}$.matches=function(a,b){return $(a,null,null,b)},$.matchesSelector=function(a,b){return $(b,null,null,[a]).length>0},g=$.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=g(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=g(b);return c},h=$.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},i=$.contains=r.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:r.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},$.attr=function(a,b){var c,d=h(a);return d||(b=b.toLowerCase()),f.attrHandle[b]?f.attrHandle[b](a):W||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},f=$.selectors={cacheLength:50,createPseudo:v,match:S,order:new RegExp("ID|TAG"+(Y?"|NAME":"")+(X?"|CLASS":"")),attrHandle:V?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:e?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:U?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(R,""),a[3]=(a[4]||a[5]||"").replace(R,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||$.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&$.error(a[0]),a},PSEUDO:function(a,b,c){var d,e;if(S.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(d=a[4])K.test(d)&&(e=bc(d,b,c,!0))&&(e=d.indexOf(")",d.length-e)-d.length)&&(d=d.slice(0,e),a[0]=a[0].slice(0,e)),a[2]=d;return a.slice(0,3)}},filter:{ID:e?function(a){return a=a.replace(R,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(R,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(R,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=x[o][a];return b||(b=x(a,new RegExp("(^|"+A+")"+a+"("+A+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=$.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return $.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=s++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[o]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[o]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e,g=f.pseudos[a]||f.pseudos[a.toLowerCase()];return g||$.error("unsupported pseudo: "+a),g[o]?g(b,c,d):g.length>1?(e=[a,a,"",b],function(a){return g(a,0,e)}):g}},pseudos:{not:v(function(a,b,c){var d=j(a.replace(H,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!f.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:v(function(a){return function(b){return(b.textContent||b.innerText||g(b)).indexOf(a)>-1}}),has:v(function(a){return function(b){return $(a,b).length>0}}),header:function(a){return P.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:_("radio"),checkbox:_("checkbox"),file:_("file"),password:_("password"),image:_("image"),submit:ba("submit"),reset:ba("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return Q.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}},k=r.compareDocumentPosition?function(a,b){return a===b?(l=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return l=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bb(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bb(e[j],f[j]);return j===c?bb(a,f[j],-1):bb(e[j],b,1)},[0,0].sort(k),m=!l,$.uniqueSort=function(a){var b,c=1;l=m,a.sort(k);if(l)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},$.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},j=$.compile=function(a,b,c){var d,e,f,g=z[o][a];if(g&&g.context===b)return g;d=bc(a,b,c);for(e=0,f=d.length;e<f;e++)d[e]=bf(d[e],b,c);return g=z(a,bg(d)),g.context=b,g.runs=g.dirruns=0,g},q.querySelectorAll&&function(){var a,b=bk,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=r.matchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||r.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+A+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+A+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bk=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return u.apply(f,t.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j,k,l,m=d.getAttribute("id"),n=m||o,p=N.test(a)&&d.parentNode||d;m?n=n.replace(c,"\\$&"):d.setAttribute("id",n),j=bc(a,d,h),n="[id='"+n+"']";for(k=0,l=j.length;k<l;k++)j[k]=n+j[k].selector;try{return u.apply(f,t.call(p.querySelectorAll(j.join(",")),0)),f}catch(i){}finally{m||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push(S.PSEUDO.source,S.POS.source,"!=")}catch(c){}}),f=new RegExp(f.join("|")),$.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!h(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=g.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return $(c,null,null,[b]).length>0})}(),f.setFilters.nth=f.setFilters.eq,f.filters=f.pseudos,$.attr=p.attr,p.find=$,p.expr=$.selectors,p.expr[":"]=p.expr.pseudos,p.unique=$.uniqueSort,p.text=$.getText,p.isXMLDoc=$.isXML,p.contains=$.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{cj=f.href}catch(cy){cj=e.createElement("a"),cj.href="",cj=cj.href}ck=ct.exec(cj.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:cj,isLocal:cn.test(ck[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,ck[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==ck[1]&&i[2]==ck[2]&&(i[3]||(i[1]==="http:"?80:443))==(ck[3]||(ck[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cQ.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,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||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=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):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=da(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
js/padoo/jquery_noconflict.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery.noConflict();
js/padoo/scriptaculous.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // script.aculo.us scriptaculous.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2
+
3
+ // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining
6
+ // a copy of this software and associated documentation files (the
7
+ // "Software"), to deal in the Software without restriction, including
8
+ // without limitation the rights to use, copy, modify, merge, publish,
9
+ // distribute, sublicense, and/or sell copies of the Software, and to
10
+ // permit persons to whom the Software is furnished to do so, subject to
11
+ // the following conditions:
12
+ //
13
+ // The above copyright notice and this permission notice shall be
14
+ // included in all copies or substantial portions of the Software.
15
+ //
16
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ //
24
+ // For details, see the script.aculo.us web site: http://script.aculo.us/
25
+
26
+ var Scriptaculous = {
27
+ Version: '1.8.1',
28
+ require: function(libraryName) {
29
+ // inserting via DOM fails in Safari 2.0, so brute force approach
30
+ document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
31
+ },
32
+ REQUIRED_PROTOTYPE: '1.6.0',
33
+ load: function() {
34
+ function convertVersionString(versionString){
35
+ var r = versionString.split('.');
36
+ return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
37
+ }
38
+
39
+ if((typeof Prototype=='undefined') ||
40
+ (typeof Element == 'undefined') ||
41
+ (typeof Element.Methods=='undefined') ||
42
+ (convertVersionString(Prototype.Version) <
43
+ convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
44
+ throw("script.aculo.us requires the Prototype JavaScript framework >= " +
45
+ Scriptaculous.REQUIRED_PROTOTYPE);
46
+
47
+ $A(document.getElementsByTagName("script")).findAll( function(s) {
48
+ return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
49
+ }).each( function(s) {
50
+ var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
51
+ var includes = s.src.match(/\?.*load=([a-z,]*)/);
52
+ (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
53
+ function(include) { Scriptaculous.require(path+include+'.js') });
54
+ });
55
+ }
56
+ }
57
+
58
+ Scriptaculous.load();
js/padoo/simplecheckout.js ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Magento SimpleCheckout Extension
3
+ *
4
+ * @copyright: PadoosoftTeam (http://www.padoosoft.com)
5
+ * @version: 1.0
6
+ *
7
+ */
8
+
9
+ function startLoadingData(only_review_block){
10
+ if(only_review_block){
11
+ checkoutoverlay.createOverlay('review', $('onecheckout-review'));
12
+ }else{
13
+ if(update_shipping > 0)checkoutoverlay.createOverlay('shipping_methods', $('onecheckout_shipping_method'));
14
+ if(update_payment > 0)checkoutoverlay.createOverlay('payment_methods', $('onecheckout_payment_method'));
15
+ if(update_review > 0)checkoutoverlay.createOverlay('review', $('onecheckout-review'));
16
+ }
17
+ }
18
+
19
+ function stopLoadingData(){
20
+ checkoutoverlay.hideOverlay();
21
+ }
22
+
23
+
24
+ function shippingAddressChanged(){
25
+
26
+ if(!$('billing_use_for_shipping_yes').checked){
27
+ sendShippingAddress();
28
+ }
29
+ }
30
+
31
+ function billingAddressChanged(){
32
+ sendBillingAddress();
33
+ }
34
+
35
+ function changeShippingAddressMode(){
36
+
37
+ $flag = this.checked;
38
+
39
+ if($flag){
40
+ $('shipping-address-form').style.display = 'none';
41
+ sendBillingAddress();
42
+ }else{
43
+ $('shipping-address-form').style.display = 'block';
44
+ sendShippingAddress();
45
+ };
46
+
47
+ }
48
+
49
+ function buildQueryString(elements){
50
+
51
+ var q = '';
52
+
53
+ for(var i = 0;i < elements.length;i++){
54
+ if((elements[i].type == 'checkbox' || elements[i].type == 'radio') && !elements[i].checked){
55
+ continue;
56
+ }
57
+ q += elements[i].name + '=' + elements[i].value;
58
+
59
+ if(i+1 < elements.length){
60
+ q += '&';
61
+ }
62
+
63
+ }
64
+ return q;
65
+ }
66
+ function updateShopping(container){
67
+ startLoadingData();
68
+ var editItemUrl = checkoutUpdateUrl;
69
+ var q = prepairParams(container);
70
+ updateFormData(editItemUrl, q);
71
+ }
72
+ function deleteShopping(id){
73
+ startLoadingData();
74
+ var url=checkoutDeleteUrl+'id/'+id;
75
+ updateFormData(url, '');
76
+ }
77
+ function prepairParams(container) {
78
+ var params = {};
79
+ var fields = $(container).select('input', 'select', 'textarea');
80
+ var data = Form.serializeElements(fields, true);
81
+ data = $H(data);
82
+ var query ="";
83
+ if (data) {
84
+ data.each(function(value) {
85
+ if(query !="")
86
+ query +="&"
87
+ query +=value[0] + "=" + value[1];
88
+
89
+ });
90
+ }
91
+ return query;
92
+ }
93
+ function update_coupon(remove){
94
+ if($('coupon_code').value == ""){
95
+ alert('Please enter Coupon code !');
96
+ return;
97
+ }
98
+ startLoadingData();
99
+ if (remove){
100
+
101
+
102
+ $('remove-coupone').value = "1";
103
+ var q = buildQueryString($$('#coupon_code, #remove-coupone'));
104
+
105
+ return updateFormData(checkoutCouponUrl, q);
106
+ }
107
+ else{
108
+
109
+ $('remove-coupone').value = "0";
110
+ var q = buildQueryString($$('#coupon_code, #remove-coupone'));
111
+
112
+ return updateFormData(checkoutCouponUrl, q);
113
+ }
114
+ }
115
+
116
+ function elogin(e, p, url){
117
+
118
+ $('elogin-loading').style.display = 'block';
119
+ $('elogin-buttons').style.display = 'none';
120
+
121
+ var request = new Ajax.Request(url,
122
+ {
123
+ method:'post',
124
+ parameters:'username='+e+'&password='+p,
125
+ onSuccess: function(transport){ var response = eval('('+(transport.responseText || false)+')');
126
+
127
+ if(response.error){
128
+ $('elogin-message').innerHTML = response.message;
129
+ $('elogin-loading').style.display = 'none';
130
+ $('elogin-buttons').style.display = 'block';
131
+ }else{
132
+
133
+ location.reload();
134
+
135
+ }
136
+
137
+ },
138
+ onFailure: function(){ alert('Something went wrong...');stopLoadingData(); }
139
+ });
140
+ }
141
+
142
+ function updateFormData(url, q){
143
+
144
+ var request = new Ajax.Request(url,
145
+ {
146
+ method:'post',
147
+ parameters:q,
148
+ onSuccess: function(transport){ var response = eval('('+(transport.responseText || false)+')');
149
+
150
+ if(response.error){
151
+ if(response.review){
152
+ $('onecheckout-review-info').update(response.review);
153
+ }
154
+ stopLoadingData();
155
+ alert(response.message);
156
+ //coming soon...
157
+ }else{
158
+ if(response.shipping_rates && update_shipping > 0){
159
+ $('onecheckout-shippingmethod-available').update(response.shipping_rates);
160
+ }
161
+ if(response.payments && update_payment > 0){
162
+ $('onecheckout-paymentmethod-available').update(response.payments);
163
+ }
164
+ if(response.review && update_review >0){
165
+
166
+ var data = String(response.review)
167
+ if(data =="no_data"){
168
+ window.location = defaultCart;
169
+ return ;
170
+ }
171
+ $('onecheckout-review-info').update(response.review);
172
+ }
173
+
174
+ if(response.coupon){
175
+ $('onecheckout-coupon').update(response.coupon);
176
+ }
177
+ if(response.shippingMethods){
178
+ $('onecheckout_shipping_method').update(response.shippingMethods);
179
+ }
180
+
181
+ stopLoadingData();
182
+ }
183
+
184
+ },
185
+ onFailure: function(){ alert('Something went wrong...');stopLoadingData(); }
186
+ });
187
+
188
+ }
189
+
190
+
191
+ function sendBillingAddress(){
192
+
193
+ startLoadingData();
194
+
195
+ var q = buildQueryString($$('#onecheckout-addressbilling input, #onecheckout-addressbilling select, #onecheckout-addressbilling textarea, #billing_use_for_shipping_yes'));
196
+
197
+ if($('billing_use_for_shipping_yes') && $('billing_use_for_shipping_yes').checked){
198
+ return updateFormData(checkoutDefaultUrl, q);
199
+ }
200
+
201
+ return updateFormData(checkoutBillingUrl, q);
202
+
203
+
204
+ }
205
+
206
+ function sendShippingAddress(){
207
+
208
+ startLoadingData();
209
+
210
+ var q = buildQueryString($$('#shipping-address-form input, #shipping-address-form select, #shipping-address-form textarea'));
211
+
212
+ return updateFormData(checkoutShippingUrl, q);
213
+
214
+ }
215
+
216
+ function sendMethods(){
217
+
218
+ startLoadingData(true);
219
+
220
+ var q = '';
221
+
222
+ q += buildQueryString($$('#onecheckout-shippingmethod input, #onecheckout-shippingmethod select, #onecheckout-shippingmethod textarea'));
223
+ q += '&';
224
+ q += buildQueryString($$('#onecheckout-paymentmethod input, #onecheckout-paymentmethod select, #onecheckout-paymentmethod textarea'));
225
+
226
+ return updateFormData(checkoutTotalsUrl, q);
227
+
228
+ }
229
+
230
+ var checkoutoverlay = {
231
+ overlay:{},
232
+ hideOverlay:function(){
233
+ for(i in this.overlay){
234
+ this.overlay[i].style.display = 'none';
235
+ }
236
+ },
237
+ createOverlay:function(id, container){
238
+
239
+ if(this.overlay['sln-overlay-'+id]){
240
+
241
+ var overlay = this.overlay['sln-overlay-'+id];
242
+
243
+ }else{
244
+
245
+ var overlay = document.createElement('div');
246
+ overlay.id = 'sln-overlay-'+id;
247
+ var span = document.createElement('span');
248
+ span.className = "img-load";
249
+ overlay.appendChild(span);
250
+ container.appendChild(overlay);
251
+
252
+ this.overlay['sln-overlay-'+id] = overlay;
253
+ }
254
+
255
+ if(typeof SLN_IS_IE == 'boolean'){
256
+ container.style.position = 'relative';
257
+ }else{
258
+ SLN_IS_IE = false;
259
+ }
260
+
261
+ overlay.style.top = 0;
262
+ overlay.style.left = 0;
263
+ overlay.style.width = container.offsetWidth + (SLN_IS_IE ? 1 : 0) + 'px';
264
+ overlay.style.height = container.offsetHeight + 'px';
265
+ overlay.style.display = 'block';
266
+ overlay.style.background = '#ffffff';
267
+ overlay.style.position = 'absolute';
268
+ overlay.style.opacity = '0.7';
269
+ overlay.style.filter = 'alpha(opacity: 70)';
270
+
271
+ }
272
+ }
273
+
274
+
275
+
276
+
277
+ var paymentForm = Class.create();
278
+ paymentForm.prototype = {
279
+ beforeInitFunc:$H({}),
280
+ afterInitFunc:$H({}),
281
+ beforeValidateFunc:$H({}),
282
+ afterValidateFunc:$H({}),
283
+ initialize: function(formId){
284
+ this.form = $(this.formId = formId);
285
+ },
286
+ init : function () {
287
+ //var elements = Form.getElements(this.form);
288
+
289
+ var elements = $$('#onecheckout-paymentmethod-available input, #onecheckout-paymentmethod-available select, #onecheckout-paymentmethod-available textarea');
290
+
291
+ /*if ($(this.form)) {
292
+ $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
293
+ }*/
294
+ var method = null;
295
+ for (var i=0; i<elements.length; i++) {
296
+ if (elements[i].name=='payment[method]') {
297
+ if (elements[i].checked) {
298
+ method = elements[i].value;
299
+ }
300
+ }
301
+ elements[i].setAttribute('autocomplete','off');
302
+ }
303
+ if (method) this.switchMethod(method);
304
+ },
305
+
306
+ switchMethod: function(method){
307
+ if (this.currentMethod && $('payment_form_'+this.currentMethod)) {
308
+
309
+ var form = $('payment_form_'+this.currentMethod);
310
+ form.style.display = 'none';
311
+ var elements = form.getElementsByTagName('input');
312
+ for (var i=0; i<elements.length; i++) elements[i].disabled = true;
313
+ var elements = form.getElementsByTagName('select');
314
+ for (var i=0; i<elements.length; i++) elements[i].disabled = true;
315
+
316
+
317
+ }
318
+ if ($('payment_form_'+method)){
319
+ var form = $('payment_form_'+method);
320
+ form.style.display = '';
321
+ var elements = form.getElementsByTagName('input');
322
+ for (var i=0; i<elements.length; i++) elements[i].disabled = false;
323
+ var elements = form.getElementsByTagName('select');
324
+ for (var i=0; i<elements.length; i++) elements[i].disabled = false;
325
+ this.currentMethod = method;
326
+ }
327
+ }
328
+ }
329
+ var billing = Class.create();
330
+ billing = billing.prototype = {
331
+ newAddress: function(isNew){
332
+ if (isNew) {
333
+
334
+ $('billing-new-address-form').select('input[type=text], select, textarea').each(function(e){if(!e.getAttribute('disabled') && !e.getAttribute('readonly')){e.value = ''};});
335
+
336
+ Element.show('billing-new-address-form');
337
+ } else {
338
+ Element.hide('billing-new-address-form');
339
+ }
340
+
341
+ billingAddressChanged();
342
+ }
343
+ }
344
+ var shipping = Class.create();
345
+ shipping = billing.prototype = {
346
+ newAddress: function(isNew){
347
+ if (isNew) {
348
+
349
+ $('shipping-new-address-form').select('input[type=text], select, textarea').each(function(e){if(!e.getAttribute('disabled') && !e.getAttribute('readonly')){e.value = ''};});
350
+
351
+ Element.show('shipping-new-address-form');
352
+ } else {
353
+ Element.hide('shipping-new-address-form');
354
+ }
355
+
356
+ shippingAddressChanged();
357
+
358
+ //shipping.setSameAsBilling(false);
359
+ }
360
+ }
js/padoo/storelocator.js ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ var Storelocator = Class.create();
3
+ Storelocator.prototype = {
4
+ initialize: function(latitude, longtitude, zoom_value){
5
+
6
+ // latitude = parseFloat($('latitude').getValue());
7
+ // longtitude = parseFloat($('longtitude').getValue());
8
+ this.stockholm = new google.maps.LatLng(latitude, longtitude);
9
+ this.zoom_value = zoom_value;
10
+ this.marker = null;
11
+ this.map = null;
12
+ //var zoom_value = parseInt($('zoom_level').getValue());
13
+ google.maps.event.addDomListener(window, 'load', this.initGoogleMap.bind(this));
14
+
15
+
16
+ },
17
+ initGoogleMap: function(){
18
+ var mapOptions = {
19
+ zoom: this.zoom_value,
20
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
21
+ center: this.stockholm
22
+ };
23
+
24
+ this.map = new google.maps.Map($('googleMap'),
25
+ mapOptions);
26
+
27
+ this.marker = new google.maps.Marker({
28
+ map:this.map,
29
+ draggable:true,
30
+ position: this.stockholm
31
+ });
32
+ google.maps.event.addListener(this.marker, 'dragend', function(event) {
33
+ $('store_latitude_value').value = event.latLng.lat();
34
+ $('store_longtitude_value').value = event.latLng.lng();
35
+ $('latitude').value = event.latLng.lat();
36
+ $('longtitude').value = event.latLng.lng();
37
+ $('latitude').setStyle({
38
+ background: 'rgb(250, 230, 180)'
39
+ });
40
+ $('longtitude').setStyle({
41
+ background: 'rgb(250, 230, 180)'
42
+ });
43
+ }.bind(this));
44
+ google.maps.event.addListener(this.map, 'zoom_changed', function() {
45
+ var zoomLevel = this.map.getZoom();
46
+ $('zoom_level_value').value = zoomLevel;
47
+ $('zoom_level').value = zoomLevel;
48
+ $('zoom_level').setStyle({
49
+ background: 'rgb(250, 230, 180)'
50
+ });
51
+ }.bind(this));
52
+ },
53
+ reSizeMap: function (){
54
+ // map = this.map;
55
+
56
+ },
57
+ reLoadMap: function (){
58
+ // var service = new google.maps.places.PlacesService(map);
59
+ // service.textSearch(request, this.processSearchResults.bind(this));
60
+ }
61
+ }
62
+
63
+ var StorelocatorFrontEnd = Class.create();
64
+ StorelocatorFrontEnd.prototype = {
65
+ initialize: function(latitude, longtitude, zoom_value, idMap){
66
+ this.myLatlng = new google.maps.LatLng(latitude, longtitude);
67
+ this.markerArray = [];
68
+ this.markearryIdStore =[];
69
+ this.myOptions = {
70
+ zoom: zoom_value,
71
+ center: this.myLatlng,
72
+ mapTypeId: google.maps.MapTypeId.ROADMAP
73
+ };
74
+ this.map = new google.maps.Map(document.getElementById(idMap), this.myOptions);
75
+ this.bounds = new google.maps.LatLngBounds();
76
+ this.rendererOptions = {
77
+ map:this.map
78
+ };
79
+ this.directionsDisplay = new google.maps.DirectionsRenderer(this.rendererOptions);
80
+ this.directionsService = new google.maps.DirectionsService();
81
+ },
82
+
83
+ extendPoint: function(marker){
84
+ this.bounds.extend(marker);
85
+ },
86
+
87
+ placeMarker: function(point, store_info, storeId, image,zoomLevel, infoWindow, x, storeObject){
88
+ var marker;
89
+ if(image){
90
+ marker = new google.maps.Marker({
91
+ position: point,
92
+ map: this.map,
93
+ icon: image,
94
+ store_id :storeId
95
+ });
96
+ }
97
+ else {
98
+ marker = new google.maps.Marker({
99
+ position: point,
100
+ map: this.map,
101
+ store_id :storeId
102
+ });
103
+ }
104
+ storeObject.marker = marker;
105
+ this.markerArray.push(marker);
106
+ google.maps.event.addListener(marker, 'click', function(event) {
107
+ infoWindow.setContent(store_info);
108
+ infoWindow.setPosition(event.latLng);
109
+ infoWindow.open(this.map, marker);
110
+ if(zoomLevel!=0){
111
+ this.map.setZoom(zoomLevel);
112
+ }
113
+ this.setActiveForm(storeId, x);
114
+ }.bind(this));
115
+
116
+ //this.getPoupForm(store_info, point, marker, zoomLevel, storeId, infoWindow)
117
+ },
118
+ getPoupForm: function(store_info, point, zoomLevel, storeId, infoWindow){
119
+ $('id' + storeId).observe('click', function(event) {
120
+ infoWindow.setContent(store_info);
121
+ infoWindow.setPosition(point);
122
+ //marker_point = new google.maps.LatLng(setLat, setLon);
123
+ this.map.setCenter(point);
124
+ infoWindow.open(this.map);
125
+ if(zoomLevel!=0){
126
+ this.map.setZoom(zoomLevel);
127
+ }
128
+ }.bind(this));
129
+ },
130
+ setBoundFill: function (){
131
+ this.map.fitBounds(this.bounds);
132
+ this.map.setCenter(this.bounds.getCenter());
133
+ },
134
+
135
+ setActiveForm: function(id, x){
136
+ $$('.active').invoke('removeClassName', 'active');
137
+ $('id' + id).addClassName('active');
138
+ if(x){
139
+ for (i=0; i<=this.markearryIdStore.length-1; i++){
140
+ try{
141
+ if(this.markearryIdStore[i] == id){
142
+ $('padoo-storelocator-getdirection-'+id).show();
143
+ }else{
144
+ $('padoo-storelocator-getdirection-'+this.markearryIdStore[i]).hide();
145
+ }
146
+ }catch(err){
147
+
148
+ }
149
+ }
150
+ this.directionsDisplay.setPanel(document.getElementById('padoo-storelocator-directionsPanel-'+id));
151
+ this.calcRoute(id);
152
+ }
153
+ },
154
+
155
+ createMarker: function(marker_point){
156
+ //marker_point = new google.maps.LatLng(latitude, longitude);
157
+ image_icon = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|0099FF");
158
+ //shadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow");
159
+ marker = new google.maps.Marker({
160
+ position: marker_point,
161
+ map: this.map,
162
+ icon: image_icon
163
+ // shadow: shadow
164
+ });
165
+ this.markerArray.push(marker);
166
+ this.extendPoint(marker_point);
167
+ },
168
+
169
+ createRadius: function (radius){
170
+ var myCircle = new google.maps.Circle({
171
+ center: this.markerArray[this.markerArray.length - 1].getPosition(),
172
+ map: this.map,
173
+ radius: radius,
174
+ strokeColor: "#FF0000",
175
+ strokeOpacity: 0.8,
176
+ strokeWeight: 2,
177
+ fillColor: "#B9D3EE",
178
+ fillOpacity: 0.35
179
+ });
180
+ var myBounds = myCircle.getBounds();
181
+
182
+ //filters markers
183
+ for(var i=this.markerArray.length;i--;){
184
+ if(!myBounds.contains(this.markerArray[i].getPosition()))
185
+ {
186
+ this.markerArray[i].setMap(null);
187
+ $("id"+this.markerArray[i].store_id).hide();
188
+ }
189
+ }
190
+ this.map.setCenter(this.markerArray[this.markerArray.length - 1].getPosition());
191
+ this.map.setZoom(this.map.getZoom()+1);
192
+ },
193
+
194
+ calcRoute: function (idstore){
195
+ destination_lat = $('storelocator-lat-'+idstore).value;
196
+ destination_lng = $('storelocator-lng-'+idstore).value;
197
+ finalMarker = this.markerArray.length - 1;
198
+ // for(var i=0; i< finalMarker; i++){
199
+ var request = {
200
+ origin: this.markerArray[finalMarker].getPosition(),
201
+ destination: new google.maps.LatLng(destination_lat, destination_lng),
202
+ waypoints:[],
203
+ travelMode: google.maps.DirectionsTravelMode.DRIVING
204
+ };
205
+ this.directionsService.route(request, function(response, status) {
206
+ if (status === google.maps.DirectionsStatus.OK) {
207
+ this.directionsDisplay.setDirections(response);
208
+ }
209
+ }.bind(this));
210
+ // }
211
+ },
212
+ computeTotalDistance: function (result) {
213
+ var total = 0;
214
+ var myroute = result.routes[0];
215
+ for (var i = 0; i < myroute.legs.length; i++) {
216
+ total += myroute.legs[i].distance.value;
217
+ }
218
+ }
219
+ }
220
+
221
+ var StorelocatorObject = Class.create();
222
+ StorelocatorObject.prototype = {
223
+ initialize: function(html, distance, storeId, marker){
224
+ this.html = html;
225
+ this.distance = distance;
226
+ this.storeId = storeId;
227
+ this.marker = marker;
228
+ }
229
+ }
230
+
231
+ var InfoPopup = Class.create();
232
+ InfoPopup.prototype = {
233
+ initialize: function(storeId,html, zoom, point){
234
+ this.storeId = storeId;
235
+ this.html = html;
236
+ this.point = point;
237
+ this.zoom = zoom;
238
+ }
239
+ }
js/padoo/tinybox.js ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var TINY={};
2
+
3
+ function T$(i){return document.getElementById(i)}
4
+
5
+ TINY.box=function(){
6
+ var p,m,b,fn,ic,iu,iw,ih,ia,f=0;
7
+ return{
8
+ show:function(c,u,w,h,a,t){
9
+ if(!f){
10
+ p=document.createElement('div'); p.id='tinybox';
11
+ m=document.createElement('div'); m.id='tinymask';
12
+ b=document.createElement('div'); b.id='tinycontent';
13
+ document.body.appendChild(m); document.body.appendChild(p); p.appendChild(b);
14
+ m.onclick=TINY.box.hide; window.onresize=TINY.box.resize; f=1
15
+ }
16
+ if(!a&&!u){
17
+ p.style.width=w?w+'px':'auto'; p.style.height=h?h+'px':'auto';
18
+ p.style.backgroundImage='none'; b.innerHTML=c
19
+ }else{
20
+ b.style.display='none'; p.style.width=p.style.height='100px'
21
+ }
22
+ this.mask();
23
+ ic=c; iu=u; iw=w; ih=h; ia=a; this.alpha(m,1,80,3);
24
+ if(t){setTimeout(function(){TINY.box.hide()},1000*t)}
25
+ },
26
+ fill:function(c,u,w,h,a){
27
+ if(u){
28
+ p.style.backgroundImage='';
29
+ var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
30
+ x.onreadystatechange=function(){
31
+ if(x.readyState==4&&x.status==200){TINY.box.psh(x.responseText,w,h,a)}
32
+ };
33
+ x.open('GET',c,1); x.send(null)
34
+ }else{
35
+ this.psh(c,w,h,a)
36
+ }
37
+ },
38
+ psh:function(c,w,h,a){
39
+ if(a){
40
+ if(!w||!h){
41
+ var x=p.style.width, y=p.style.height; b.innerHTML=c;
42
+ p.style.width=w?w+'px':''; p.style.height=h?h+'px':'';
43
+ b.style.display='';
44
+ w=parseInt(b.offsetWidth); h=parseInt(b.offsetHeight);
45
+ b.style.display='none'; p.style.width=x; p.style.height=y;
46
+ }else{
47
+ b.innerHTML=c
48
+ }
49
+ this.size(p,w,h)
50
+ }else{
51
+ p.style.backgroundImage='none'
52
+ }
53
+ },
54
+ hide:function(){
55
+ TINY.box.alpha(p,-1,0,3)
56
+ },
57
+ resize:function(){
58
+ TINY.box.pos(); TINY.box.mask()
59
+ },
60
+ mask:function(){
61
+ m.style.height=TINY.page.total(1)+'px';
62
+ m.style.width=''; m.style.width=TINY.page.total(0)+'px'
63
+ },
64
+ pos:function(){
65
+ var t=(TINY.page.height()/2)-(p.offsetHeight/2); t=t<10?10:t;
66
+ //p.style.top=(t+TINY.page.top())+'px';
67
+ p.style.top=TINY.page.top()+'px';
68
+ p.style.left=(TINY.page.width()/2)-(p.offsetWidth/2)+'px'
69
+ },
70
+ alpha:function(e,d,a){
71
+ clearInterval(e.ai);
72
+ if(d==1){
73
+ e.style.opacity=0; e.style.filter='alpha(opacity=0)';
74
+ e.style.display='block'; this.pos()
75
+ }
76
+ e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)
77
+ },
78
+ ta:function(e,a,d){
79
+ var o=Math.round(e.style.opacity*100);
80
+ if(o==a){
81
+ clearInterval(e.ai);
82
+ if(d==-1){
83
+ e.style.display='none';
84
+ e==p?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''
85
+ }else{
86
+ e==m?this.alpha(p,1,100):TINY.box.fill(ic,iu,iw,ih,ia)
87
+ }
88
+ }else{
89
+ var n=Math.ceil((o+((a-o)*.5))); n=n==1?0:n;
90
+ e.style.opacity=n/100; e.style.filter='alpha(opacity='+n+')'
91
+ }
92
+ },
93
+ size:function(e,w,h){
94
+ e=typeof e=='object'?e:T$(e); clearInterval(e.si);
95
+ var ow=e.offsetWidth, oh=e.offsetHeight,
96
+ wo=ow-parseInt(e.style.width), ho=oh-parseInt(e.style.height);
97
+ var wd=ow-wo>w?0:1, hd=(oh-ho>h)?0:1;
98
+ e.si=setInterval(function(){TINY.box.ts(e,w,wo,wd,h,ho,hd)},20)
99
+ },
100
+ ts:function(e,w,wo,wd,h,ho,hd){
101
+ var ow=e.offsetWidth-wo, oh=e.offsetHeight-ho;
102
+ if(ow==w&&oh==h){
103
+ clearInterval(e.si); p.style.backgroundImage='none'; b.style.display='block'
104
+ }else{
105
+ if(ow!=w){var n=ow+((w-ow)*.5); e.style.width=wd?Math.ceil(n)+'px':Math.floor(n)+'px'}
106
+ if(oh!=h){var n=oh+((h-oh)*.5); e.style.height=hd?Math.ceil(n)+'px':Math.floor(n)+'px'}
107
+ this.pos()
108
+ }
109
+ }
110
+ }
111
+ }();
112
+
113
+ TINY.page=function(){
114
+ return{
115
+ top:function(){return document.documentElement.scrollTop||document.body.scrollTop},
116
+ width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
117
+ height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
118
+ total:function(d){
119
+ var b=document.body, e=document.documentElement;
120
+ return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
121
+ Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
122
+ }
123
+ }
124
+ }();
package.xml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>padoo_faq</name>
4
+ <version>1.0.4</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/gpl-license.php">GNU General Public License (GPL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Allow Admin create topics answers. And allow your customers submit and search question.</summary>
10
+ <description>&lt;div&gt;&#xD;
11
+ &lt;p&gt;Normally, Customers will always have some questions in mind before decision to purchase products. But ours are not always available online to answer to their questions, and more question is reduplicate, and Customers are not patient enough to wait through your site for answers.&lt;/p&gt;&#xD;
12
+ &lt;p&gt;And to increase sale chance and make satisfied to customers. You can install and use FAQs extension. The extension allow customers submit, search questions. It also allow you create group questions And display list answers by topic.&lt;/p&gt;&#xD;
13
+ &lt;/div&gt;&#xD;
14
+ &lt;div&gt;&#xD;
15
+ &lt;h3&gt;Features and benefits&lt;/h3&gt;&#xD;
16
+ &lt;ul&gt;&#xD;
17
+ &lt;li&gt;100% opensource&lt;/li&gt;&#xD;
18
+ &lt;li&gt;Very easy to install and use&lt;/li&gt;&#xD;
19
+ &lt;li&gt;Doesn&#x2019;t override core Magento ( core class or core template)&lt;/li&gt;&#xD;
20
+ &lt;li&gt;Support responsive for difference devices&lt;/li&gt;&#xD;
21
+ &lt;li&gt;Works perfectly with popular browsers including Firefox, Chrome, IE and Safari&lt;/li&gt;&#xD;
22
+ &lt;li&gt;Friendly and easy to configurable&lt;/li&gt;&#xD;
23
+ &lt;li&gt;Compatibility: Magento CE 1.4, 1.5, 1.6, 1.7, 1.8, 1.9&lt;/li&gt;&#xD;
24
+ &lt;/ul&gt;&#xD;
25
+ &lt;/div&gt;&#xD;
26
+ &lt;div&gt;&#xD;
27
+ &lt;h3&gt;How to use the our FAQs extension&lt;/h3&gt;&#xD;
28
+ &lt;ol&gt;&#xD;
29
+ &lt;li&gt;Install via Magentoconnect or get it from our site Mage-addons.com&lt;/li&gt;&#xD;
30
+ &lt;li&gt;Configuration FAQ options are available in administration panel: System --&amp;gt; Configuration --&amp;gt; Padoosoft extension --&amp;gt; FAQ&lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/settings.png" /&gt;&lt;/li&gt;&#xD;
31
+ &lt;li&gt;On the backend, go to FAQ =&amp;gt; Manage FAQ Group&lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/manage-faq-group.png" /&gt;&#xD;
32
+ To create a new group, click on the Add FAQ Group button:&#xD;
33
+ You can input the name, order and select the displaying store view, then enable the category.&#xD;
34
+ &lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/add-faq-group.png" /&gt;&#xD;
35
+ &lt;/li&gt;&#xD;
36
+ &lt;li&gt;On the backend, go to FAQ =&amp;gt; Manage FAQ&#xD;
37
+ &lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/manage-faq.png" /&gt;&#xD;
38
+ To create a new item, click on the Add FAQ button: &#xD;
39
+ You can input the order, question, answer and select the parent group, the displaying store view, then enable the FAQ items.&#xD;
40
+ &lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/add-faq.png" /&gt;&#xD;
41
+ &lt;/li&gt;&#xD;
42
+ &lt;li&gt;By default, you can find the link to FAQs page from the homepage or any page of the system.&#xD;
43
+ If you want display FAQs list on a static page, from the backend, go to CMS =&amp;gt; Static Pages and create a new static page, then insert the syntax code below into the Content section:&#xD;
44
+ {{block type=&amp;quot;faq/faq&amp;quot; name=&amp;quot;faq.list&amp;quot; template=&amp;quot;padoofaq/faq.phtml&amp;quot; }}&#xD;
45
+ &lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/faqs-page.png" /&gt;&#xD;
46
+ &lt;/li&gt;&#xD;
47
+ &lt;li&gt;Customers can submit their own question at the frontend. After finishing, their question will be listed at Manage FAQ page from the backend to wait for the store owner&#x2019;s answer.&#xD;
48
+ To navigate to the submit form, customer can click on the Submit Question link at top of FAQs list page.&#xD;
49
+ &lt;img alt="" src="http://www.mage-addons.com/media/wysiwyg/faq/submit-faq.png" /&gt;&#xD;
50
+ &lt;/li&gt;&#xD;
51
+ &lt;/ol&gt;&#xD;
52
+ &lt;/div&gt;&#xD;
53
+ &lt;div&gt;&#xD;
54
+ &lt;h3&gt;How to disable the extension&lt;/h3&gt;&#xD;
55
+ &lt;p&gt;Set &amp;quot;No&amp;quot; on System &amp;gt; Configuration&amp;gt; FAQ &amp;gt; General&lt;/p&gt;&#xD;
56
+ &lt;p&gt;Open the file Padoo_Faq.xml and change the following line: &#xD;
57
+ Form True&#xD;
58
+ To False&#xD;
59
+ &lt;/p&gt;&#xD;
60
+ &lt;/div&gt;</description>
61
+ <notes>Allow Admin create topics answers. And allow your customers submit and search question.</notes>
62
+ <authors><author><name>Padoosoft</name><user>MageAddons82</user><email>stdspace@gmail.com</email></author></authors>
63
+ <date>2016-03-25</date>
64
+ <time>03:13:06</time>
65
+ <contents><target name="magelocal"><dir name="Padoo"><dir name="Faq"><dir name="Block"><dir name="Adminhtml"><dir name="Faq"><dir name="Edit"><file name="Form.php" hash="93f1a80648b54563a4e1e4850d3c6fd2"/><dir name="Tab"><file name="Form.php" hash="a397d40f65464acc18a3d73d33f241ba"/></dir><file name="Tabs.php" hash="2e86e10b6a1e4b449a68bf4e443197aa"/></dir><file name="Edit.php" hash="e077fd1f8fa7723f3b8c20c2b6663b74"/><file name="Grid.php" hash="5a8cd6f850a1241f17cc6aa029b3779a"/></dir><file name="Faq.php" hash="96510fd75bd33556b3fd73d1e66eb2f9"/><dir name="Faqgroup"><dir name="Edit"><file name="Form.php" hash="659297097bc7dbcc7f5648b3257ea192"/><dir name="Tab"><file name="Faq.php" hash="bd9c48fed2658787db0d02457961b7b3"/><file name="Form.php" hash="1dca67e0a4d6fb989b88f752bb67190a"/><file name="Gridfaq.php" hash="e72fc7a9c103d081adb77b449f65f113"/><file name="_Gridfaq.php" hash="e72fc7a9c103d081adb77b449f65f113"/></dir><file name="Tabs.php" hash="29f4588133c5b1535b34df9e489475de"/></dir><file name="Edit.php" hash="12a24ccc3fe368942a48b7596928876a"/><file name="Grid.php" hash="ee8cf8526a668a09740d5458bda422ca"/></dir><file name="Faqgroup.php" hash="eaea17115b814250e865ca7caf3c1fb9"/><dir name="Widget"><dir name="Grid"><file name="Column.php" hash="04f8db550ac1073f227f5648499fcf62"/></dir><file name="Grid.php" hash="a53292e4f0d8e5dba887e3a0d2109832"/></dir></dir><file name="Faq.php" hash="c3692ef0f98962d1e0a21c566968f379"/><file name="Searchfaq.php" hash="c542d4825487c00fcd6de5fd506426d1"/></dir><dir name="Helper"><file name="Data.php" hash="ea24883dc88a8c7a335bcc1e84780ccc"/></dir><dir name="Model"><file name="Faq.php" hash="dccdf5982e6bf20d9a1b3fa99c60e491"/><file name="Faqgroup.php" hash="dec59e429f37ef757248d4d7f8f06b71"/><dir name="Mysql4"><dir name="Faq"><file name="Collection.php" hash="12df56757c989a45a794d856103c9cd4"/></dir><file name="Faq.php" hash="237400041bd67faaf94fc407d4c6baa0"/><dir name="Faqgroup"><file name="Collection.php" hash="6d1b50122359eefcfb57b03735ee951f"/></dir><file name="Faqgroup.php" hash="1a179f09e1d04f8efd48b76b4bfaf925"/></dir><file name="Status.php" hash="098c68332efa6a151271cd8382f06a1f"/><dir name="Wysiwyg"><file name="Config.php" hash="0008426aba15e4cf7c2781ab66f29f41"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FaqController.php" hash="6d10e85ecbd2dea93e1880d0a4080d9b"/><file name="FaqgroupController.php" hash="50e3db8bca66f6e55704791596c46d56"/></dir><file name="IndexController.php" hash="ada992be7d620d39ff7aa4c2a12dee9a"/><file name="SearchController.php" hash="e8ac3d510aff4366112cd0edf3faf2a2"/><file name="SubmitController.php" hash="60600af05d4851d0e839e8551fdfa005"/></dir><dir name="etc"><file name="adminhtml.xml" hash="109fc5e1f2b9b55e283265947e9c658c"/><file name="config.xml" hash="4c264d8cc8974805df58f0e3cbb59923"/><file name="system.xml" hash="ffe9ab472a66915732aeb8726fc7f79d"/></dir><dir name="sql"><dir name="faq_setup"><file name="mysql4-install-1.0.0.php" hash="0a96315166e8e9bd7490acca8c93bf76"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="99d4f2aa3e42606091535de4511eec96"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="45c45a821b5ab58c7957f5e0fb8717cc"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Padoo_Faq.xml" hash="711da934bfb9f6961aaf03a79cec922b"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="padoo_faq.xml" hash="25c436ea0f809dcef0420fd0d979017e"/></dir><dir name="template"><dir name="padoofaq"><file name="faq.phtml" hash="c7ee1d1a5e168ce6d65e51065fc79f15"/><file name="faq_group.phtml" hash="4e14a92d5fc517c24fbf88d19d49b9ef"/><file name="js.phtml" hash="db1fa4fcfc639a28a4a4b884f40649d5"/><file name="search.phtml" hash="928a5b5973e306f00fb69d3cf74bb04f"/><file name="searchresult.phtml" hash="28bae2892db4405e096bd499f50a29bf"/><file name="submit.phtml" hash="8e555c816242b8260eabbe3bba72fb29"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Padoo_Faq.csv" hash="6defcec67ba4f06573d97a545b5dad82"/></dir></target><target name="mage"><dir name="js"><dir name="padoo"><file name="checkValue.js" hash="963c1c86bbd0462be3c4793399a86024"/><file name="jquery.js" hash="b08031186fb28716dcbb38bcbd3ace0d"/><file name="jquery_noconflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><file name="scriptaculous.js" hash="b592273cfa1d97643325ad77f7030879"/><file name="simplecheckout.js" hash="7158c0b30c4fbf2cbfc9b87c3f065043"/><file name="storelocator.js" hash="4cd94ab10a4cd421fff843a3854f71c4"/><file name="tinybox.js" hash="7e8a0b5f8e639947f494c9668caa169c"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="faq"><file name="faq.css" hash="54a1020deae47a785ec03c78cad6e230"/><file name="label.css" hash="0f7a40cc43673394cd81672c24ad0631"/></dir><dir name="padoo"><file name="jquery-ui.css" hash="c932ef4ca169d744a94855e65fa39531"/><file name="jquery.bxslider.css" hash="951b49dc2e2d9639063f8d74fae1c8f9"/><file name="onecheckout.css" hash="e98e06328b5870f6900fad90b473fb7a"/><dir name="storelocator"><file name="navigation.png" hash="e9c107ff5505cdcc8b1a56b582785be5"/><file name="navigation1.png" hash="4059251ab55fe554770ec860167e279f"/><file name="tag-bg.png" hash="6ed007475c32ee2d35c7133dba65dea9"/><file name="vssver2.scc" hash="4a0203452e42133d03bba0f121cc392d"/></dir><file name="storelocator.css" hash="455f9cad3c21e072f34bdc0ba6c6c768"/><file name="testimonial.css" hash="11f853c031875b77b31ff818bccd8682"/><file name="tinybox.css" hash="dd735dee70c031110a582ce2f037b009"/></dir></dir><dir name="images"><dir name="faq"><file name="bg-answer.gif" hash="d9f4183b7dd6fe3d97dbfe2969c73134"/><file name="bg-question.gif" hash="475be89d7286debf1e46fd21fd7a059d"/><file name="vbulletin_sprites.png" hash="1215f199cba0d6d4e9379fafc3bbfea1"/></dir></dir><dir name="js"><dir name="faq"><file name="faq.js" hash="ee385c26a2f8e7ae62c56a5365d19ea7"/><file name="jquery-1.3.2.min.js" hash="7d91ff87b2c0439ac76c5af0bccb877b"/><file name="jquery.js" hash="23ba6db947a7a48ddaeab3164537dd55"/></dir><dir name="padoo"><file name="jquery.bxslider.js" hash="eea4ef92150fe92c5e75aef6507d06cf"/><file name="jquery.cycle.js" hash="ce83808c0a5a3fd7143adc6fdd6295f3"/></dir></dir></dir></dir></dir></target></contents>
66
+ <compatible/>
67
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
68
+ </package>
skin/frontend/default/default/css/faq/faq.css ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .col-main-faq{
2
+ width: 70%;
3
+ float: right;
4
+ }
5
+ .col-left-faq{
6
+ width: 25%;
7
+ float: left;
8
+ }
9
+ .col-main-faq .faq-title{
10
+ margin:0px;
11
+ }
12
+ .col-main-faq .faqs{
13
+ margin:0px;
14
+ }
15
+ hr.solid {
16
+ background-color: #b2b3b4;
17
+ border: medium none;
18
+ color: #b2b3b4;
19
+ height: 1px;
20
+ }
21
+
22
+ hr.dash {
23
+ background-color: transparent;
24
+ border-bottom: 1px dashed #b2b3b4;
25
+ border-top: medium none;
26
+ color: #b2b3b4;
27
+ height: 0;
28
+ }
29
+ .faq-title{
30
+ color:#001c32;
31
+ font-family: "Ubuntu";
32
+ font-size: 25px;
33
+ margin: 20px 0;
34
+ }
35
+ .faqs{
36
+ margin: 20px 0;
37
+ }
38
+ .faqs .box{
39
+ margin: 0 0 25px;
40
+ }
41
+ .pd_formsearch{
42
+ background: none repeat scroll 0 0 #efefef;
43
+ border: 1px solid #d4cfff;
44
+ display: inline-block;
45
+ padding: 5px 0 10px;
46
+ margin: 0px 0 20px;
47
+ width: 100%;
48
+ border-radius: 4px;
49
+ }
50
+ #searchform {padding:0 10px}
51
+ .pd_formsearch label{
52
+ display: block;
53
+ font-size: 16px;
54
+ font-weight: bold;
55
+ margin: 0 0 10px;
56
+ }
57
+ .pd_formsearch input{
58
+ height: 20px;
59
+ width: 500px;
60
+ padding:0 10px;
61
+ }
62
+ .pd_formsearch > a{
63
+ background: none repeat scroll 0 0 #b8cef7;
64
+ border: 1px solid #ccc;
65
+ border-radius: 5px;
66
+ display: table;
67
+ margin: 10px 10px 0;
68
+ padding: 6px 10px;
69
+ text-decoration: none;
70
+ font-weight: bold;
71
+ color:#000;
72
+ }
73
+ .faqs .box .faq-question-group{
74
+ color: #009dcb;
75
+ font-family: "Ubuntu";
76
+ font-size: 16px;
77
+ padding: 5px 0;
78
+ }
79
+ .faqs .box .faq-question-group .faq-question{font-weight: bold;}
80
+ .faqs .box.active .faq-content-group{ display:none}
81
+ .faqs .box .faq-content-group ul,
82
+ .result-search .faq-content{
83
+ list-style: outside none none;
84
+ margin: 0;
85
+ padding: 0;
86
+ }
87
+ .faqs .box .faq-content-group li.odd{background:#dbdee1}
88
+ .faqs .box .faq-content-group li.even{background:#efefef}
89
+ .faqs .box .faq-content-group li.active {background:#fff}
90
+ .faqs .box .faq-content-group li:last-child hr{border-bottom:0}
91
+ .faqs .box .faq-content-group ul li .faqq{
92
+ background: url("../../images/faq/vbulletin_sprites.png") no-repeat scroll -336px 0 rgba(0, 0, 0, 0);
93
+ float: left;
94
+ height: 7px;
95
+ margin: 8px 10px 0 5px;
96
+ padding: 5px 0;
97
+ width: 13px;
98
+ }
99
+ .faqs .box .faq-content-group ul li .faqopenindicator{
100
+ background: url("../../images/faq/vbulletin_sprites.png") no-repeat scroll -384px 0 rgba(0, 0, 0, 0);
101
+ float: right;
102
+ height: 7px;
103
+ margin: 8px 10px 0 0;
104
+ padding: 5px 0;
105
+ width: 15px;
106
+ }
107
+ .faqs .box .faq-content-group li.active .faqq{background-position:-352px 0}
108
+ .faqs .box .faq-content-group li.active .faqopenindicator{background-position:-400px 0}
109
+ .faqs .box .faq-content-group ul li .faq-content{padding:5px 0 10px 30px;background:#fff;display:none}
110
+ .faqs .box .faq-content-group li > p{cursor: pointer;font-weight: bold;padding: 7px 30px 7px 20px;margin: 0; }
111
+ .faqs.result-search .box .faq-content{display:none}
112
+ .submit-form{margin: 40px 0 20px;width:100%}
113
+ .submit-form .title{color: #a3bce6;font-size: 18px;}
114
+ .submit-form .field {margin: 0 0 15px}
115
+ .submit-form .field label{display: block;margin: 0 0 10px;}
116
+ .faq-sidebar .sidebar-box {
117
+ box-sizing: border-box;
118
+ margin: 0 0 10px;
119
+ padding: 10px 5px;
120
+ width: 100% !important;
121
+ }
122
+ .faq-sidebar .sidebar-question{font-weight:bold}
skin/frontend/default/default/css/faq/label.css ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @CHARSET "ISO-8859-1";
2
+ body{font-family: Arial;}
3
+ *{ padding: 0px; margin: 0px;}
4
+ /*-------------------------Form search-----------------------*/
5
+ .mw_formsearch{
6
+ background: #dce7ea;
7
+ border: 1px solid #c2d5dc;
8
+ padding: 20px 10px;
9
+ font-family: arial;
10
+ float: left;
11
+ font-family: Tahoma;
12
+ margin-bottom: 30px;
13
+ }
14
+ #searchform{
15
+ width: 635px;
16
+ margin: auto;
17
+ }
18
+ .mw_formsearch label{
19
+ font-family: Tahoma;
20
+ font-size: 14px;
21
+ color: #1e7ec8;
22
+ text-transform: uppercase;
23
+ float: left;
24
+ padding-bottom: 5px;
25
+ width: 100%;
26
+ }
27
+
28
+ .mw_formsearch .input_text{
29
+ border: 1px solid #d1d1d1;
30
+ clear: both;
31
+ float: left;
32
+ width: 555px;
33
+ height: 18px;
34
+ padding: 3px;
35
+ }
36
+ .mw_formsearch .mw_btn {
37
+ background: url(../../images/faq/right-bt-search.gif) no-repeat right top;
38
+ height: 26px;
39
+ border: 0px none;
40
+ width: 72px;
41
+ float: left;
42
+ cursor: pointer;
43
+ }
44
+ .mw_formsearch .mw_btn span{
45
+ color:#FFFFFF;
46
+ font-size:12px;
47
+ font-weight:bold;
48
+ padding:0 5px;
49
+ text-transform:uppercase;
50
+ cursor: pointer;
51
+ }
52
+ a.bt_submit, a:hover.bt_submit{
53
+ background: url(../../images/faq/left-submit.gif) no-repeat left top;
54
+ clear:both;
55
+ float:left;
56
+ height:40px;
57
+ margin-top:10px;
58
+ padding-left:33px;
59
+ text-decoration: none;
60
+ }
61
+ a.bt_submit span, a:hover.bt_submit span{
62
+ background: url(../../images/faq/right-submit.gif) no-repeat right top;
63
+ float:left;
64
+ height:40px;
65
+ line-height:37px;
66
+ padding:0 18px 0 10px;
67
+ color: #444;
68
+ font-size: 12px;
69
+ font-weight: bold;
70
+ cursor: pointer;
71
+ }
72
+ /*---------------------------end form search----------------*/
73
+
74
+ /*---------------------------faq----------------*/
75
+ .mw_faq{
76
+ border-bottom:1px solid #E4E7E2;
77
+ clear:both;
78
+ margin-bottom:30px;
79
+ padding-bottom:10px;
80
+ color: #737373;
81
+ }
82
+ .mw_faq_name{
83
+ color: #1e7ec8;
84
+ font-size: 14px;
85
+ font-weight: normal;
86
+ padding-bottom: 10px;
87
+ margin-bottom: 0px;
88
+ text-transform: uppercase;
89
+ }
90
+ .mw_faq_description {
91
+ font-size:12px;
92
+ }
93
+ .mw_question {
94
+ background: url(../../images/faq/bg-question.gif) no-repeat 0% 50%;
95
+ font-size: 12px;
96
+ font-weight: normal;
97
+ padding-left: 15px;
98
+ margin-bottom: 0px;
99
+ padding-bottom: 0px;
100
+ line-height: 20px;
101
+ }
102
+ .mw_question a{
103
+ text-decoration: none;
104
+ color: #737373;
105
+ font-size: 12px;
106
+ }
107
+ .mw_question a:hover{
108
+ text-decoration: underline;
109
+ color: #2b85ca;
110
+ font-size: 12px;
111
+ }
112
+ .mw_question_a_selected{
113
+ background: url(../../images/faq/bg-answer.gif) no-repeat 0% 50%;
114
+ font-size: 12px;
115
+ font-weight: bold;
116
+ padding-left: 15px;
117
+ margin-bottom: 0px;
118
+ padding-bottom: 0px;
119
+ line-height: 20px;
120
+ }
121
+ .mw_question_a_selected a{
122
+ color: #0a263c;
123
+ }
124
+ /*---------------------------end faq----------------*/
125
+ #mw_result{
126
+ clear:both;
127
+ color:#1E7EC8;
128
+ float:left;
129
+ font-size:24px;
130
+ font-weight:normal;
131
+ margin-bottom:17px;
132
+ }
133
+ .mw_submit{
134
+ clear: both;
135
+ font-size: 12px;
136
+ font-family: Arial;
137
+ color: #737373;
138
+ }
139
+ .mw_submit h4{
140
+ font-size: 14px;
141
+ font-weight: normal;
142
+ color: #1e7ec8;
143
+ text-transform: capitalize;
144
+ margin-bottom: 0px;
145
+ padding-bottom: 5px;
146
+ }
147
+ .mw_submit h4.title{
148
+ color:#1E7EC8;
149
+ font-family:tahoma;
150
+ font-size:14px;
151
+ font-weight:bold;
152
+ margin-bottom:0;
153
+ padding-bottom:15px;
154
+ text-transform:uppercase;
155
+ }
156
+ .mw_field{
157
+ clear: both;
158
+ padding-bottom: 15px;
159
+ }
160
+ .mw_field select{
161
+ width: 214px;
162
+ }
163
+ .mw_field textarea{
164
+ width: 465px;
165
+ }
166
+ .mw_code{
167
+ clear: both;
168
+ }
169
+ .mw_code input{
170
+ float: left;
171
+ width: 214px;
172
+ }
173
+ .mw_code img{
174
+ float: left;
175
+ }
176
+ .box_bt{
177
+ clear: both;
178
+ margin-top: 10px;
179
+ float: left;
180
+ }
181
+ /*.mw_button{
182
+ background:transparent url(../../images/faq/left-btn.gif) no-repeat scroll left top;
183
+ border:medium none;
184
+ display:block;
185
+ float:left;
186
+ height:28px;
187
+ margin:0 6px 0 0;
188
+ padding-left:10px;
189
+ }
190
+ .mw_button span{
191
+ background:transparent url(../../images/faq/right-btn.gif) no-repeat scroll right top;
192
+ color:#FFFFFF;
193
+ display:block;
194
+ float:left;
195
+ font-weight:bold;
196
+ height:28px;
197
+ line-height:28px;
198
+ padding-right:15px;
199
+ text-transform:capitalize;
200
+ cursor: pointer;
201
+ position: relative;
202
+ top: -1px;
203
+ }*/
204
+ button.mw_button{
205
+ border:none;
206
+ background:none;
207
+ padding:0px;
208
+ margin:0px;
209
+ }
210
+ button.mw_button span{
211
+ background:url(../../images/faq/left-btn.gif) no-repeat scroll 0% 0%;
212
+ padding:0px 0px 0px 15px;
213
+ display:block;
214
+ float:left;
215
+ /*font: normal 12px/28px Arial;*/
216
+ font: bold 12px/28px Arial;
217
+ height:28px;
218
+ color:#FFFFFF;
219
+ }
220
+ button.mw_button span span{
221
+ background:url(../../images/faq/right-btn.gif) no-repeat scroll 100% 0%;
222
+ padding:0px 15px 0px 0px;
223
+ color:#FFFFFF;
224
+ }
225
+ * html .mw_button span{
226
+ background:transparent url(../../images/faq/right-btn.gif) no-repeat scroll right top;
227
+ color:#FFFFFF;
228
+ display:block;
229
+ float:left;
230
+ font-weight:bold;
231
+ height:28px;
232
+ line-height:28px;
233
+ padding-right:15px;
234
+ text-transform:capitalize;
235
+ cursor: pointer;
236
+ position: relative;
237
+ top: 0px;
238
+ }
skin/frontend/default/default/css/padoo/jquery-ui.css ADDED
@@ -0,0 +1,1225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.4 - 2015-03-11
2
+ * http://jqueryui.com
3
+ * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden {
10
+ display: none;
11
+ }
12
+ .ui-helper-hidden-accessible {
13
+ border: 0;
14
+ clip: rect(0 0 0 0);
15
+ height: 1px;
16
+ margin: -1px;
17
+ overflow: hidden;
18
+ padding: 0;
19
+ position: absolute;
20
+ width: 1px;
21
+ }
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none;
31
+ }
32
+ .ui-helper-clearfix:before,
33
+ .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse;
37
+ }
38
+ .ui-helper-clearfix:after {
39
+ clear: both;
40
+ }
41
+ .ui-helper-clearfix {
42
+ min-height: 0; /* support: IE7 */
43
+ }
44
+ .ui-helper-zfix {
45
+ width: 100%;
46
+ height: 100%;
47
+ top: 0;
48
+ left: 0;
49
+ position: absolute;
50
+ opacity: 0;
51
+ filter:Alpha(Opacity=0); /* support: IE8 */
52
+ }
53
+
54
+ .ui-front {
55
+ z-index: 100;
56
+ }
57
+
58
+
59
+ /* Interaction Cues
60
+ ----------------------------------*/
61
+ .ui-state-disabled {
62
+ cursor: default !important;
63
+ }
64
+
65
+
66
+ /* Icons
67
+ ----------------------------------*/
68
+
69
+ /* states and images */
70
+ .ui-icon {
71
+ display: block;
72
+ text-indent: -99999px;
73
+ overflow: hidden;
74
+ background-repeat: no-repeat;
75
+ }
76
+
77
+
78
+ /* Misc visuals
79
+ ----------------------------------*/
80
+
81
+ /* Overlays */
82
+ .ui-widget-overlay {
83
+ position: fixed;
84
+ top: 0;
85
+ left: 0;
86
+ width: 100%;
87
+ height: 100%;
88
+ }
89
+ .ui-accordion .ui-accordion-header {
90
+ display: block;
91
+ cursor: pointer;
92
+ position: relative;
93
+ margin: 2px 0 0 0;
94
+ padding: .5em .5em .5em .7em;
95
+ min-height: 0; /* support: IE7 */
96
+ font-size: 100%;
97
+ }
98
+ .ui-accordion .ui-accordion-icons {
99
+ padding-left: 2.2em;
100
+ }
101
+ .ui-accordion .ui-accordion-icons .ui-accordion-icons {
102
+ padding-left: 2.2em;
103
+ }
104
+ .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
105
+ position: absolute;
106
+ left: .5em;
107
+ top: 50%;
108
+ margin-top: -8px;
109
+ }
110
+ .ui-accordion .ui-accordion-content {
111
+ padding: 1em 2.2em;
112
+ border-top: 0;
113
+ overflow: auto;
114
+ }
115
+ .ui-autocomplete {
116
+ position: absolute;
117
+ top: 0;
118
+ left: 0;
119
+ cursor: default;
120
+ }
121
+ .ui-button {
122
+ display: inline-block;
123
+ position: relative;
124
+ padding: 0;
125
+ line-height: normal;
126
+ margin-right: .1em;
127
+ cursor: pointer;
128
+ vertical-align: middle;
129
+ text-align: center;
130
+ overflow: visible; /* removes extra width in IE */
131
+ }
132
+ .ui-button,
133
+ .ui-button:link,
134
+ .ui-button:visited,
135
+ .ui-button:hover,
136
+ .ui-button:active {
137
+ text-decoration: none;
138
+ }
139
+ /* to make room for the icon, a width needs to be set here */
140
+ .ui-button-icon-only {
141
+ width: 2.2em;
142
+ }
143
+ /* button elements seem to need a little more width */
144
+ button.ui-button-icon-only {
145
+ width: 2.4em;
146
+ }
147
+ .ui-button-icons-only {
148
+ width: 3.4em;
149
+ }
150
+ button.ui-button-icons-only {
151
+ width: 3.7em;
152
+ }
153
+
154
+ /* button text element */
155
+ .ui-button .ui-button-text {
156
+ display: block;
157
+ line-height: normal;
158
+ }
159
+ .ui-button-text-only .ui-button-text {
160
+ padding: .4em 1em;
161
+ }
162
+ .ui-button-icon-only .ui-button-text,
163
+ .ui-button-icons-only .ui-button-text {
164
+ padding: .4em;
165
+ text-indent: -9999999px;
166
+ }
167
+ .ui-button-text-icon-primary .ui-button-text,
168
+ .ui-button-text-icons .ui-button-text {
169
+ padding: .4em 1em .4em 2.1em;
170
+ }
171
+ .ui-button-text-icon-secondary .ui-button-text,
172
+ .ui-button-text-icons .ui-button-text {
173
+ padding: .4em 2.1em .4em 1em;
174
+ }
175
+ .ui-button-text-icons .ui-button-text {
176
+ padding-left: 2.1em;
177
+ padding-right: 2.1em;
178
+ }
179
+ /* no icon support for input elements, provide padding by default */
180
+ input.ui-button {
181
+ padding: .4em 1em;
182
+ }
183
+
184
+ /* button icon element(s) */
185
+ .ui-button-icon-only .ui-icon,
186
+ .ui-button-text-icon-primary .ui-icon,
187
+ .ui-button-text-icon-secondary .ui-icon,
188
+ .ui-button-text-icons .ui-icon,
189
+ .ui-button-icons-only .ui-icon {
190
+ position: absolute;
191
+ top: 50%;
192
+ margin-top: -8px;
193
+ }
194
+ .ui-button-icon-only .ui-icon {
195
+ left: 50%;
196
+ margin-left: -8px;
197
+ }
198
+ .ui-button-text-icon-primary .ui-button-icon-primary,
199
+ .ui-button-text-icons .ui-button-icon-primary,
200
+ .ui-button-icons-only .ui-button-icon-primary {
201
+ left: .5em;
202
+ }
203
+ .ui-button-text-icon-secondary .ui-button-icon-secondary,
204
+ .ui-button-text-icons .ui-button-icon-secondary,
205
+ .ui-button-icons-only .ui-button-icon-secondary {
206
+ right: .5em;
207
+ }
208
+
209
+ /* button sets */
210
+ .ui-buttonset {
211
+ margin-right: 7px;
212
+ }
213
+ .ui-buttonset .ui-button {
214
+ margin-left: 0;
215
+ margin-right: -.3em;
216
+ }
217
+
218
+ /* workarounds */
219
+ /* reset extra padding in Firefox, see h5bp.com/l */
220
+ input.ui-button::-moz-focus-inner,
221
+ button.ui-button::-moz-focus-inner {
222
+ border: 0;
223
+ padding: 0;
224
+ }
225
+ .ui-datepicker {
226
+ width: 17em;
227
+ padding: .2em .2em 0;
228
+ display: none;
229
+ }
230
+ .ui-datepicker .ui-datepicker-header {
231
+ position: relative;
232
+ padding: .2em 0;
233
+ }
234
+ .ui-datepicker .ui-datepicker-prev,
235
+ .ui-datepicker .ui-datepicker-next {
236
+ position: absolute;
237
+ top: 2px;
238
+ width: 1.8em;
239
+ height: 1.8em;
240
+ }
241
+ .ui-datepicker .ui-datepicker-prev-hover,
242
+ .ui-datepicker .ui-datepicker-next-hover {
243
+ top: 1px;
244
+ }
245
+ .ui-datepicker .ui-datepicker-prev {
246
+ left: 2px;
247
+ }
248
+ .ui-datepicker .ui-datepicker-next {
249
+ right: 2px;
250
+ }
251
+ .ui-datepicker .ui-datepicker-prev-hover {
252
+ left: 1px;
253
+ }
254
+ .ui-datepicker .ui-datepicker-next-hover {
255
+ right: 1px;
256
+ }
257
+ .ui-datepicker .ui-datepicker-prev span,
258
+ .ui-datepicker .ui-datepicker-next span {
259
+ display: block;
260
+ position: absolute;
261
+ left: 50%;
262
+ margin-left: -8px;
263
+ top: 50%;
264
+ margin-top: -8px;
265
+ }
266
+ .ui-datepicker .ui-datepicker-title {
267
+ margin: 0 2.3em;
268
+ line-height: 1.8em;
269
+ text-align: center;
270
+ }
271
+ .ui-datepicker .ui-datepicker-title select {
272
+ font-size: 1em;
273
+ margin: 1px 0;
274
+ }
275
+ .ui-datepicker select.ui-datepicker-month,
276
+ .ui-datepicker select.ui-datepicker-year {
277
+ width: 45%;
278
+ }
279
+ .ui-datepicker table {
280
+ width: 100%;
281
+ font-size: .9em;
282
+ border-collapse: collapse;
283
+ margin: 0 0 .4em;
284
+ }
285
+ .ui-datepicker th {
286
+ padding: .7em .3em;
287
+ text-align: center;
288
+ font-weight: bold;
289
+ border: 0;
290
+ }
291
+ .ui-datepicker td {
292
+ border: 0;
293
+ padding: 1px;
294
+ }
295
+ .ui-datepicker td span,
296
+ .ui-datepicker td a {
297
+ display: block;
298
+ padding: .2em;
299
+ text-align: right;
300
+ text-decoration: none;
301
+ }
302
+ .ui-datepicker .ui-datepicker-buttonpane {
303
+ background-image: none;
304
+ margin: .7em 0 0 0;
305
+ padding: 0 .2em;
306
+ border-left: 0;
307
+ border-right: 0;
308
+ border-bottom: 0;
309
+ }
310
+ .ui-datepicker .ui-datepicker-buttonpane button {
311
+ float: right;
312
+ margin: .5em .2em .4em;
313
+ cursor: pointer;
314
+ padding: .2em .6em .3em .6em;
315
+ width: auto;
316
+ overflow: visible;
317
+ }
318
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
319
+ float: left;
320
+ }
321
+
322
+ /* with multiple calendars */
323
+ .ui-datepicker.ui-datepicker-multi {
324
+ width: auto;
325
+ }
326
+ .ui-datepicker-multi .ui-datepicker-group {
327
+ float: left;
328
+ }
329
+ .ui-datepicker-multi .ui-datepicker-group table {
330
+ width: 95%;
331
+ margin: 0 auto .4em;
332
+ }
333
+ .ui-datepicker-multi-2 .ui-datepicker-group {
334
+ width: 50%;
335
+ }
336
+ .ui-datepicker-multi-3 .ui-datepicker-group {
337
+ width: 33.3%;
338
+ }
339
+ .ui-datepicker-multi-4 .ui-datepicker-group {
340
+ width: 25%;
341
+ }
342
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
343
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
344
+ border-left-width: 0;
345
+ }
346
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
347
+ clear: left;
348
+ }
349
+ .ui-datepicker-row-break {
350
+ clear: both;
351
+ width: 100%;
352
+ font-size: 0;
353
+ }
354
+
355
+ /* RTL support */
356
+ .ui-datepicker-rtl {
357
+ direction: rtl;
358
+ }
359
+ .ui-datepicker-rtl .ui-datepicker-prev {
360
+ right: 2px;
361
+ left: auto;
362
+ }
363
+ .ui-datepicker-rtl .ui-datepicker-next {
364
+ left: 2px;
365
+ right: auto;
366
+ }
367
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
368
+ right: 1px;
369
+ left: auto;
370
+ }
371
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
372
+ left: 1px;
373
+ right: auto;
374
+ }
375
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
376
+ clear: right;
377
+ }
378
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
379
+ float: left;
380
+ }
381
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
382
+ .ui-datepicker-rtl .ui-datepicker-group {
383
+ float: right;
384
+ }
385
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
386
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
387
+ border-right-width: 0;
388
+ border-left-width: 1px;
389
+ }
390
+ .ui-dialog {
391
+ overflow: hidden;
392
+ position: absolute;
393
+ top: 0;
394
+ left: 0;
395
+ padding: .2em;
396
+ outline: 0;
397
+ }
398
+ .ui-dialog .ui-dialog-titlebar {
399
+ padding: .4em 1em;
400
+ position: relative;
401
+ }
402
+ .ui-dialog .ui-dialog-title {
403
+ float: left;
404
+ margin: .1em 0;
405
+ white-space: nowrap;
406
+ width: 90%;
407
+ overflow: hidden;
408
+ text-overflow: ellipsis;
409
+ }
410
+ .ui-dialog .ui-dialog-titlebar-close {
411
+ position: absolute;
412
+ right: .3em;
413
+ top: 50%;
414
+ width: 20px;
415
+ margin: -10px 0 0 0;
416
+ padding: 1px;
417
+ height: 20px;
418
+ }
419
+ .ui-dialog .ui-dialog-content {
420
+ position: relative;
421
+ border: 0;
422
+ padding: .5em 1em;
423
+ background: none;
424
+ overflow: auto;
425
+ }
426
+ .ui-dialog .ui-dialog-buttonpane {
427
+ text-align: left;
428
+ border-width: 1px 0 0 0;
429
+ background-image: none;
430
+ margin-top: .5em;
431
+ padding: .3em 1em .5em .4em;
432
+ }
433
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
434
+ float: right;
435
+ }
436
+ .ui-dialog .ui-dialog-buttonpane button {
437
+ margin: .5em .4em .5em 0;
438
+ cursor: pointer;
439
+ }
440
+ .ui-dialog .ui-resizable-se {
441
+ width: 12px;
442
+ height: 12px;
443
+ right: -5px;
444
+ bottom: -5px;
445
+ background-position: 16px 16px;
446
+ }
447
+ .ui-draggable .ui-dialog-titlebar {
448
+ cursor: move;
449
+ }
450
+ .ui-draggable-handle {
451
+ -ms-touch-action: none;
452
+ touch-action: none;
453
+ }
454
+ .ui-menu {
455
+ list-style: none;
456
+ padding: 0;
457
+ margin: 0;
458
+ display: block;
459
+ outline: none;
460
+ }
461
+ .ui-menu .ui-menu {
462
+ position: absolute;
463
+ }
464
+ .ui-menu .ui-menu-item {
465
+ position: relative;
466
+ margin: 0;
467
+ padding: 3px 1em 3px .4em;
468
+ cursor: pointer;
469
+ min-height: 0; /* support: IE7 */
470
+ /* support: IE10, see #8844 */
471
+ list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
472
+ }
473
+ .ui-menu .ui-menu-divider {
474
+ margin: 5px 0;
475
+ height: 0;
476
+ font-size: 0;
477
+ line-height: 0;
478
+ border-width: 1px 0 0 0;
479
+ }
480
+ .ui-menu .ui-state-focus,
481
+ .ui-menu .ui-state-active {
482
+ margin: -1px;
483
+ }
484
+
485
+ /* icon support */
486
+ .ui-menu-icons {
487
+ position: relative;
488
+ }
489
+ .ui-menu-icons .ui-menu-item {
490
+ padding-left: 2em;
491
+ }
492
+
493
+ /* left-aligned */
494
+ .ui-menu .ui-icon {
495
+ position: absolute;
496
+ top: 0;
497
+ bottom: 0;
498
+ left: .2em;
499
+ margin: auto 0;
500
+ }
501
+
502
+ /* right-aligned */
503
+ .ui-menu .ui-menu-icon {
504
+ left: auto;
505
+ right: 0;
506
+ }
507
+ .ui-progressbar {
508
+ height: 2em;
509
+ text-align: left;
510
+ overflow: hidden;
511
+ }
512
+ .ui-progressbar .ui-progressbar-value {
513
+ margin: -1px;
514
+ height: 100%;
515
+ }
516
+ .ui-progressbar .ui-progressbar-overlay {
517
+ background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
518
+ height: 100%;
519
+ filter: alpha(opacity=25); /* support: IE8 */
520
+ opacity: 0.25;
521
+ }
522
+ .ui-progressbar-indeterminate .ui-progressbar-value {
523
+ background-image: none;
524
+ }
525
+ .ui-resizable {
526
+ position: relative;
527
+ }
528
+ .ui-resizable-handle {
529
+ position: absolute;
530
+ font-size: 0.1px;
531
+ display: block;
532
+ -ms-touch-action: none;
533
+ touch-action: none;
534
+ }
535
+ .ui-resizable-disabled .ui-resizable-handle,
536
+ .ui-resizable-autohide .ui-resizable-handle {
537
+ display: none;
538
+ }
539
+ .ui-resizable-n {
540
+ cursor: n-resize;
541
+ height: 7px;
542
+ width: 100%;
543
+ top: -5px;
544
+ left: 0;
545
+ }
546
+ .ui-resizable-s {
547
+ cursor: s-resize;
548
+ height: 7px;
549
+ width: 100%;
550
+ bottom: -5px;
551
+ left: 0;
552
+ }
553
+ .ui-resizable-e {
554
+ cursor: e-resize;
555
+ width: 7px;
556
+ right: -5px;
557
+ top: 0;
558
+ height: 100%;
559
+ }
560
+ .ui-resizable-w {
561
+ cursor: w-resize;
562
+ width: 7px;
563
+ left: -5px;
564
+ top: 0;
565
+ height: 100%;
566
+ }
567
+ .ui-resizable-se {
568
+ cursor: se-resize;
569
+ width: 12px;
570
+ height: 12px;
571
+ right: 1px;
572
+ bottom: 1px;
573
+ }
574
+ .ui-resizable-sw {
575
+ cursor: sw-resize;
576
+ width: 9px;
577
+ height: 9px;
578
+ left: -5px;
579
+ bottom: -5px;
580
+ }
581
+ .ui-resizable-nw {
582
+ cursor: nw-resize;
583
+ width: 9px;
584
+ height: 9px;
585
+ left: -5px;
586
+ top: -5px;
587
+ }
588
+ .ui-resizable-ne {
589
+ cursor: ne-resize;
590
+ width: 9px;
591
+ height: 9px;
592
+ right: -5px;
593
+ top: -5px;
594
+ }
595
+ .ui-selectable {
596
+ -ms-touch-action: none;
597
+ touch-action: none;
598
+ }
599
+ .ui-selectable-helper {
600
+ position: absolute;
601
+ z-index: 100;
602
+ border: 1px dotted black;
603
+ }
604
+ .ui-selectmenu-menu {
605
+ padding: 0;
606
+ margin: 0;
607
+ position: absolute;
608
+ top: 0;
609
+ left: 0;
610
+ display: none;
611
+ }
612
+ .ui-selectmenu-menu .ui-menu {
613
+ overflow: auto;
614
+ /* Support: IE7 */
615
+ overflow-x: hidden;
616
+ padding-bottom: 1px;
617
+ }
618
+ .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
619
+ font-size: 1em;
620
+ font-weight: bold;
621
+ line-height: 1.5;
622
+ padding: 2px 0.4em;
623
+ margin: 0.5em 0 0 0;
624
+ height: auto;
625
+ border: 0;
626
+ }
627
+ .ui-selectmenu-open {
628
+ display: block;
629
+ }
630
+ .ui-selectmenu-button {
631
+ display: inline-block;
632
+ overflow: hidden;
633
+ position: relative;
634
+ text-decoration: none;
635
+ cursor: pointer;
636
+ }
637
+ .ui-selectmenu-button span.ui-icon {
638
+ right: 0.5em;
639
+ left: auto;
640
+ margin-top: -8px;
641
+ position: absolute;
642
+ top: 50%;
643
+ }
644
+ .ui-selectmenu-button span.ui-selectmenu-text {
645
+ text-align: left;
646
+ padding: 0.4em 2.1em 0.4em 1em;
647
+ display: block;
648
+ line-height: 1.4;
649
+ overflow: hidden;
650
+ text-overflow: ellipsis;
651
+ white-space: nowrap;
652
+ }
653
+ .ui-slider {
654
+ position: relative;
655
+ text-align: left;
656
+ }
657
+ .ui-slider .ui-slider-handle {
658
+ position: absolute;
659
+ z-index: 2;
660
+ width: 1.2em;
661
+ height: 1.2em;
662
+ cursor: default;
663
+ -ms-touch-action: none;
664
+ touch-action: none;
665
+ }
666
+ .ui-slider .ui-slider-range {
667
+ position: absolute;
668
+ z-index: 1;
669
+ font-size: .7em;
670
+ display: block;
671
+ border: 0;
672
+ background-position: 0 0;
673
+ }
674
+
675
+ /* support: IE8 - See #6727 */
676
+ .ui-slider.ui-state-disabled .ui-slider-handle,
677
+ .ui-slider.ui-state-disabled .ui-slider-range {
678
+ filter: inherit;
679
+ }
680
+
681
+ .ui-slider-horizontal {
682
+ height: .8em;
683
+ }
684
+ .ui-slider-horizontal .ui-slider-handle {
685
+ top: -.3em;
686
+ margin-left: -.6em;
687
+ }
688
+ .ui-slider-horizontal .ui-slider-range {
689
+ top: 0;
690
+ height: 100%;
691
+ }
692
+ .ui-slider-horizontal .ui-slider-range-min {
693
+ left: 0;
694
+ }
695
+ .ui-slider-horizontal .ui-slider-range-max {
696
+ right: 0;
697
+ }
698
+
699
+ .ui-slider-vertical {
700
+ width: .8em;
701
+ height: 100px;
702
+ }
703
+ .ui-slider-vertical .ui-slider-handle {
704
+ left: -.3em;
705
+ margin-left: 0;
706
+ margin-bottom: -.6em;
707
+ }
708
+ .ui-slider-vertical .ui-slider-range {
709
+ left: 0;
710
+ width: 100%;
711
+ }
712
+ .ui-slider-vertical .ui-slider-range-min {
713
+ bottom: 0;
714
+ }
715
+ .ui-slider-vertical .ui-slider-range-max {
716
+ top: 0;
717
+ }
718
+ .ui-sortable-handle {
719
+ -ms-touch-action: none;
720
+ touch-action: none;
721
+ }
722
+ .ui-spinner {
723
+ position: relative;
724
+ display: inline-block;
725
+ overflow: hidden;
726
+ padding: 0;
727
+ vertical-align: middle;
728
+ }
729
+ .ui-spinner-input {
730
+ border: none;
731
+ background: none;
732
+ color: inherit;
733
+ padding: 0;
734
+ margin: .2em 0;
735
+ vertical-align: middle;
736
+ margin-left: .4em;
737
+ margin-right: 22px;
738
+ }
739
+ .ui-spinner-button {
740
+ width: 16px;
741
+ height: 50%;
742
+ font-size: .5em;
743
+ padding: 0;
744
+ margin: 0;
745
+ text-align: center;
746
+ position: absolute;
747
+ cursor: default;
748
+ display: block;
749
+ overflow: hidden;
750
+ right: 0;
751
+ }
752
+ /* more specificity required here to override default borders */
753
+ .ui-spinner a.ui-spinner-button {
754
+ border-top: none;
755
+ border-bottom: none;
756
+ border-right: none;
757
+ }
758
+ /* vertically center icon */
759
+ .ui-spinner .ui-icon {
760
+ position: absolute;
761
+ margin-top: -8px;
762
+ top: 50%;
763
+ left: 0;
764
+ }
765
+ .ui-spinner-up {
766
+ top: 0;
767
+ }
768
+ .ui-spinner-down {
769
+ bottom: 0;
770
+ }
771
+
772
+ /* TR overrides */
773
+ .ui-spinner .ui-icon-triangle-1-s {
774
+ /* need to fix icons sprite */
775
+ background-position: -65px -16px;
776
+ }
777
+ .ui-tabs {
778
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
779
+ padding: .2em;
780
+ }
781
+ .ui-tabs .ui-tabs-nav {
782
+ margin: 0;
783
+ padding: .2em .2em 0;
784
+ }
785
+ .ui-tabs .ui-tabs-nav li {
786
+ list-style: none;
787
+ float: left;
788
+ position: relative;
789
+ top: 0;
790
+ margin: 1px .2em 0 0;
791
+ border-bottom-width: 0;
792
+ padding: 0;
793
+ white-space: nowrap;
794
+ }
795
+ .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
796
+ float: left;
797
+ padding: .5em 1em;
798
+ text-decoration: none;
799
+ }
800
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
801
+ margin-bottom: -1px;
802
+ padding-bottom: 1px;
803
+ }
804
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
805
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
806
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
807
+ cursor: text;
808
+ }
809
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
810
+ cursor: pointer;
811
+ }
812
+ .ui-tabs .ui-tabs-panel {
813
+ display: block;
814
+ border-width: 0;
815
+ padding: 1em 1.4em;
816
+ background: none;
817
+ }
818
+ .ui-tooltip {
819
+ padding: 8px;
820
+ position: absolute;
821
+ z-index: 9999;
822
+ max-width: 300px;
823
+ -webkit-box-shadow: 0 0 5px #aaa;
824
+ box-shadow: 0 0 5px #aaa;
825
+ }
826
+ body .ui-tooltip {
827
+ border-width: 2px;
828
+ }
829
+
830
+ /* Component containers
831
+ ----------------------------------*/
832
+ .ui-widget {
833
+ font-family: Verdana,Arial,sans-serif;
834
+ font-size: 1.1em;
835
+ }
836
+ .ui-widget .ui-widget {
837
+ font-size: 1em;
838
+ }
839
+ .ui-widget input,
840
+ .ui-widget select,
841
+ .ui-widget textarea,
842
+ .ui-widget button {
843
+ font-family: Verdana,Arial,sans-serif;
844
+ font-size: 1em;
845
+ }
846
+ .ui-widget-content {
847
+ border: 1px solid #aaaaaa;
848
+ background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
849
+ color: #222222;
850
+ }
851
+ .ui-widget-content a {
852
+ color: #222222;
853
+ }
854
+ .ui-widget-header {
855
+ border: 1px solid #aaaaaa;
856
+ background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
857
+ color: #222222;
858
+ font-weight: bold;
859
+ }
860
+ .ui-widget-header a {
861
+ color: #222222;
862
+ }
863
+
864
+ /* Interaction states
865
+ ----------------------------------*/
866
+ .ui-state-default,
867
+ .ui-widget-content .ui-state-default,
868
+ .ui-widget-header .ui-state-default {
869
+ border: 1px solid #d3d3d3;
870
+ background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
871
+ font-weight: normal;
872
+ color: #555555;
873
+ }
874
+ .ui-state-default a,
875
+ .ui-state-default a:link,
876
+ .ui-state-default a:visited {
877
+ color: #555555;
878
+ text-decoration: none;
879
+ }
880
+ .ui-state-hover,
881
+ .ui-widget-content .ui-state-hover,
882
+ .ui-widget-header .ui-state-hover,
883
+ .ui-state-focus,
884
+ .ui-widget-content .ui-state-focus,
885
+ .ui-widget-header .ui-state-focus {
886
+ border: 1px solid #999999;
887
+ background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
888
+ font-weight: normal;
889
+ color: #212121;
890
+ }
891
+ .ui-state-hover a,
892
+ .ui-state-hover a:hover,
893
+ .ui-state-hover a:link,
894
+ .ui-state-hover a:visited,
895
+ .ui-state-focus a,
896
+ .ui-state-focus a:hover,
897
+ .ui-state-focus a:link,
898
+ .ui-state-focus a:visited {
899
+ color: #212121;
900
+ text-decoration: none;
901
+ }
902
+ .ui-state-active,
903
+ .ui-widget-content .ui-state-active,
904
+ .ui-widget-header .ui-state-active {
905
+ border: 1px solid #aaaaaa;
906
+ background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
907
+ font-weight: normal;
908
+ color: #212121;
909
+ }
910
+ .ui-state-active a,
911
+ .ui-state-active a:link,
912
+ .ui-state-active a:visited {
913
+ color: #212121;
914
+ text-decoration: none;
915
+ }
916
+
917
+ /* Interaction Cues
918
+ ----------------------------------*/
919
+ .ui-state-highlight,
920
+ .ui-widget-content .ui-state-highlight,
921
+ .ui-widget-header .ui-state-highlight {
922
+ border: 1px solid #fcefa1;
923
+ background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
924
+ color: #363636;
925
+ }
926
+ .ui-state-highlight a,
927
+ .ui-widget-content .ui-state-highlight a,
928
+ .ui-widget-header .ui-state-highlight a {
929
+ color: #363636;
930
+ }
931
+ .ui-state-error,
932
+ .ui-widget-content .ui-state-error,
933
+ .ui-widget-header .ui-state-error {
934
+ border: 1px solid #cd0a0a;
935
+ background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
936
+ color: #cd0a0a;
937
+ }
938
+ .ui-state-error a,
939
+ .ui-widget-content .ui-state-error a,
940
+ .ui-widget-header .ui-state-error a {
941
+ color: #cd0a0a;
942
+ }
943
+ .ui-state-error-text,
944
+ .ui-widget-content .ui-state-error-text,
945
+ .ui-widget-header .ui-state-error-text {
946
+ color: #cd0a0a;
947
+ }
948
+ .ui-priority-primary,
949
+ .ui-widget-content .ui-priority-primary,
950
+ .ui-widget-header .ui-priority-primary {
951
+ font-weight: bold;
952
+ }
953
+ .ui-priority-secondary,
954
+ .ui-widget-content .ui-priority-secondary,
955
+ .ui-widget-header .ui-priority-secondary {
956
+ opacity: .7;
957
+ filter:Alpha(Opacity=70); /* support: IE8 */
958
+ font-weight: normal;
959
+ }
960
+ .ui-state-disabled,
961
+ .ui-widget-content .ui-state-disabled,
962
+ .ui-widget-header .ui-state-disabled {
963
+ opacity: .35;
964
+ filter:Alpha(Opacity=35); /* support: IE8 */
965
+ background-image: none;
966
+ }
967
+ .ui-state-disabled .ui-icon {
968
+ filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
969
+ }
970
+
971
+ /* Icons
972
+ ----------------------------------*/
973
+
974
+ /* states and images */
975
+ .ui-icon {
976
+ width: 16px;
977
+ height: 16px;
978
+ }
979
+ .ui-icon,
980
+ .ui-widget-content .ui-icon {
981
+ background-image: url("images/ui-icons_222222_256x240.png");
982
+ }
983
+ .ui-widget-header .ui-icon {
984
+ background-image: url("images/ui-icons_222222_256x240.png");
985
+ }
986
+ .ui-state-default .ui-icon {
987
+ background-image: url("images/ui-icons_888888_256x240.png");
988
+ }
989
+ .ui-state-hover .ui-icon,
990
+ .ui-state-focus .ui-icon {
991
+ background-image: url("images/ui-icons_454545_256x240.png");
992
+ }
993
+ .ui-state-active .ui-icon {
994
+ background-image: url("images/ui-icons_454545_256x240.png");
995
+ }
996
+ .ui-state-highlight .ui-icon {
997
+ background-image: url("images/ui-icons_2e83ff_256x240.png");
998
+ }
999
+ .ui-state-error .ui-icon,
1000
+ .ui-state-error-text .ui-icon {
1001
+ background-image: url("images/ui-icons_cd0a0a_256x240.png");
1002
+ }
1003
+
1004
+ /* positioning */
1005
+ .ui-icon-blank { background-position: 16px 16px; }
1006
+ .ui-icon-carat-1-n { background-position: 0 0; }
1007
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
1008
+ .ui-icon-carat-1-e { background-position: -32px 0; }
1009
+ .ui-icon-carat-1-se { background-position: -48px 0; }
1010
+ .ui-icon-carat-1-s { background-position: -64px 0; }
1011
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
1012
+ .ui-icon-carat-1-w { background-position: -96px 0; }
1013
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
1014
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
1015
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
1016
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
1017
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
1018
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
1019
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
1020
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
1021
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
1022
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
1023
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
1024
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
1025
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
1026
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
1027
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
1028
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
1029
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
1030
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
1031
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
1032
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
1033
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
1034
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
1035
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
1036
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
1037
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
1038
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
1039
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
1040
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
1041
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
1042
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
1043
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
1044
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
1045
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
1046
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1047
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1048
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1049
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1050
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1051
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1052
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1053
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1054
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1055
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1056
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1057
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1058
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1059
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1060
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1061
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1062
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1063
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1064
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1065
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1066
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1067
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1068
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1069
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1070
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
1071
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1072
+ .ui-icon-extlink { background-position: -32px -80px; }
1073
+ .ui-icon-newwin { background-position: -48px -80px; }
1074
+ .ui-icon-refresh { background-position: -64px -80px; }
1075
+ .ui-icon-shuffle { background-position: -80px -80px; }
1076
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
1077
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1078
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
1079
+ .ui-icon-folder-open { background-position: -16px -96px; }
1080
+ .ui-icon-document { background-position: -32px -96px; }
1081
+ .ui-icon-document-b { background-position: -48px -96px; }
1082
+ .ui-icon-note { background-position: -64px -96px; }
1083
+ .ui-icon-mail-closed { background-position: -80px -96px; }
1084
+ .ui-icon-mail-open { background-position: -96px -96px; }
1085
+ .ui-icon-suitcase { background-position: -112px -96px; }
1086
+ .ui-icon-comment { background-position: -128px -96px; }
1087
+ .ui-icon-person { background-position: -144px -96px; }
1088
+ .ui-icon-print { background-position: -160px -96px; }
1089
+ .ui-icon-trash { background-position: -176px -96px; }
1090
+ .ui-icon-locked { background-position: -192px -96px; }
1091
+ .ui-icon-unlocked { background-position: -208px -96px; }
1092
+ .ui-icon-bookmark { background-position: -224px -96px; }
1093
+ .ui-icon-tag { background-position: -240px -96px; }
1094
+ .ui-icon-home { background-position: 0 -112px; }
1095
+ .ui-icon-flag { background-position: -16px -112px; }
1096
+ .ui-icon-calendar { background-position: -32px -112px; }
1097
+ .ui-icon-cart { background-position: -48px -112px; }
1098
+ .ui-icon-pencil { background-position: -64px -112px; }
1099
+ .ui-icon-clock { background-position: -80px -112px; }
1100
+ .ui-icon-disk { background-position: -96px -112px; }
1101
+ .ui-icon-calculator { background-position: -112px -112px; }
1102
+ .ui-icon-zoomin { background-position: -128px -112px; }
1103
+ .ui-icon-zoomout { background-position: -144px -112px; }
1104
+ .ui-icon-search { background-position: -160px -112px; }
1105
+ .ui-icon-wrench { background-position: -176px -112px; }
1106
+ .ui-icon-gear { background-position: -192px -112px; }
1107
+ .ui-icon-heart { background-position: -208px -112px; }
1108
+ .ui-icon-star { background-position: -224px -112px; }
1109
+ .ui-icon-link { background-position: -240px -112px; }
1110
+ .ui-icon-cancel { background-position: 0 -128px; }
1111
+ .ui-icon-plus { background-position: -16px -128px; }
1112
+ .ui-icon-plusthick { background-position: -32px -128px; }
1113
+ .ui-icon-minus { background-position: -48px -128px; }
1114
+ .ui-icon-minusthick { background-position: -64px -128px; }
1115
+ .ui-icon-close { background-position: -80px -128px; }
1116
+ .ui-icon-closethick { background-position: -96px -128px; }
1117
+ .ui-icon-key { background-position: -112px -128px; }
1118
+ .ui-icon-lightbulb { background-position: -128px -128px; }
1119
+ .ui-icon-scissors { background-position: -144px -128px; }
1120
+ .ui-icon-clipboard { background-position: -160px -128px; }
1121
+ .ui-icon-copy { background-position: -176px -128px; }
1122
+ .ui-icon-contact { background-position: -192px -128px; }
1123
+ .ui-icon-image { background-position: -208px -128px; }
1124
+ .ui-icon-video { background-position: -224px -128px; }
1125
+ .ui-icon-script { background-position: -240px -128px; }
1126
+ .ui-icon-alert { background-position: 0 -144px; }
1127
+ .ui-icon-info { background-position: -16px -144px; }
1128
+ .ui-icon-notice { background-position: -32px -144px; }
1129
+ .ui-icon-help { background-position: -48px -144px; }
1130
+ .ui-icon-check { background-position: -64px -144px; }
1131
+ .ui-icon-bullet { background-position: -80px -144px; }
1132
+ .ui-icon-radio-on { background-position: -96px -144px; }
1133
+ .ui-icon-radio-off { background-position: -112px -144px; }
1134
+ .ui-icon-pin-w { background-position: -128px -144px; }
1135
+ .ui-icon-pin-s { background-position: -144px -144px; }
1136
+ .ui-icon-play { background-position: 0 -160px; }
1137
+ .ui-icon-pause { background-position: -16px -160px; }
1138
+ .ui-icon-seek-next { background-position: -32px -160px; }
1139
+ .ui-icon-seek-prev { background-position: -48px -160px; }
1140
+ .ui-icon-seek-end { background-position: -64px -160px; }
1141
+ .ui-icon-seek-start { background-position: -80px -160px; }
1142
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1143
+ .ui-icon-seek-first { background-position: -80px -160px; }
1144
+ .ui-icon-stop { background-position: -96px -160px; }
1145
+ .ui-icon-eject { background-position: -112px -160px; }
1146
+ .ui-icon-volume-off { background-position: -128px -160px; }
1147
+ .ui-icon-volume-on { background-position: -144px -160px; }
1148
+ .ui-icon-power { background-position: 0 -176px; }
1149
+ .ui-icon-signal-diag { background-position: -16px -176px; }
1150
+ .ui-icon-signal { background-position: -32px -176px; }
1151
+ .ui-icon-battery-0 { background-position: -48px -176px; }
1152
+ .ui-icon-battery-1 { background-position: -64px -176px; }
1153
+ .ui-icon-battery-2 { background-position: -80px -176px; }
1154
+ .ui-icon-battery-3 { background-position: -96px -176px; }
1155
+ .ui-icon-circle-plus { background-position: 0 -192px; }
1156
+ .ui-icon-circle-minus { background-position: -16px -192px; }
1157
+ .ui-icon-circle-close { background-position: -32px -192px; }
1158
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1159
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1160
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1161
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1162
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1163
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1164
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1165
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1166
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
1167
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
1168
+ .ui-icon-circle-check { background-position: -208px -192px; }
1169
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1170
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1171
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
1172
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1173
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1174
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
1175
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1176
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1177
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1178
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1179
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1180
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1181
+
1182
+
1183
+ /* Misc visuals
1184
+ ----------------------------------*/
1185
+
1186
+ /* Corner radius */
1187
+ .ui-corner-all,
1188
+ .ui-corner-top,
1189
+ .ui-corner-left,
1190
+ .ui-corner-tl {
1191
+ border-top-left-radius: 4px;
1192
+ }
1193
+ .ui-corner-all,
1194
+ .ui-corner-top,
1195
+ .ui-corner-right,
1196
+ .ui-corner-tr {
1197
+ border-top-right-radius: 4px;
1198
+ }
1199
+ .ui-corner-all,
1200
+ .ui-corner-bottom,
1201
+ .ui-corner-left,
1202
+ .ui-corner-bl {
1203
+ border-bottom-left-radius: 4px;
1204
+ }
1205
+ .ui-corner-all,
1206
+ .ui-corner-bottom,
1207
+ .ui-corner-right,
1208
+ .ui-corner-br {
1209
+ border-bottom-right-radius: 4px;
1210
+ }
1211
+
1212
+ /* Overlays */
1213
+ .ui-widget-overlay {
1214
+ background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
1215
+ opacity: .3;
1216
+ filter: Alpha(Opacity=30); /* support: IE8 */
1217
+ }
1218
+ .ui-widget-shadow {
1219
+ margin: -8px 0 0 -8px;
1220
+ padding: 8px;
1221
+ background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
1222
+ opacity: .3;
1223
+ filter: Alpha(Opacity=30); /* support: IE8 */
1224
+ border-radius: 8px;
1225
+ }
skin/frontend/default/default/css/padoo/jquery.bxslider.css ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BxSlider v4.1.2 - Fully loaded, responsive content slider
3
+ * http://bxslider.com
4
+ *
5
+ * Written by: Steven Wanderski, 2014
6
+ * http://stevenwanderski.com
7
+ * (while drinking Belgian ales and listening to jazz)
8
+ *
9
+ * CEO and founder of bxCreative, LTD
10
+ * http://bxcreative.com
11
+ */
12
+
13
+
14
+ /** RESET AND LAYOUT
15
+ ===================================*/
16
+
17
+ .bx-wrapper {
18
+ position: relative;
19
+ margin: 0 auto 60px;
20
+ padding: 0;
21
+ *zoom: 1;
22
+ }
23
+
24
+ .bx-wrapper img {
25
+ max-width: 100%;
26
+ display: block;
27
+ }
28
+
29
+ /** THEME
30
+ ===================================*/
31
+
32
+ .bx-wrapper .bx-viewport {
33
+ -moz-box-shadow: 0 0 5px #ccc;
34
+ -webkit-box-shadow: 0 0 5px #ccc;
35
+ box-shadow: 0 0 5px #ccc;
36
+ border: 5px solid #fff;
37
+ left: -5px;
38
+ background: #fff;
39
+
40
+ /*fix other elements on the page moving (on Chrome)*/
41
+ -webkit-transform: translatez(0);
42
+ -moz-transform: translatez(0);
43
+ -ms-transform: translatez(0);
44
+ -o-transform: translatez(0);
45
+ transform: translatez(0);
46
+ }
47
+
48
+ .bx-wrapper .bx-pager,
49
+ .bx-wrapper .bx-controls-auto {
50
+ position: absolute;
51
+ bottom: -30px;
52
+ width: 100%;
53
+ }
54
+
55
+ /* LOADER */
56
+
57
+ .bx-wrapper .bx-loading {
58
+ min-height: 50px;
59
+ background: url(images/bx_loader.gif) center center no-repeat #fff;
60
+ height: 100%;
61
+ width: 100%;
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ z-index: 2000;
66
+ }
67
+
68
+ /* PAGER */
69
+
70
+ .bx-wrapper .bx-pager {
71
+ text-align: center;
72
+ font-size: .85em;
73
+ font-family: Arial;
74
+ font-weight: bold;
75
+ color: #666;
76
+ padding-top: 20px;
77
+ }
78
+
79
+ .bx-wrapper .bx-pager .bx-pager-item,
80
+ .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
81
+ display: inline-block;
82
+ *zoom: 1;
83
+ *display: inline;
84
+ }
85
+
86
+ .bx-wrapper .bx-pager.bx-default-pager a {
87
+ background: #666;
88
+ text-indent: -9999px;
89
+ display: block;
90
+ width: 10px;
91
+ height: 10px;
92
+ margin: 0 5px;
93
+ outline: 0;
94
+ -moz-border-radius: 5px;
95
+ -webkit-border-radius: 5px;
96
+ border-radius: 5px;
97
+ }
98
+
99
+ .bx-wrapper .bx-pager.bx-default-pager a:hover,
100
+ .bx-wrapper .bx-pager.bx-default-pager a.active {
101
+ background: #000;
102
+ }
103
+
104
+ /* DIRECTION CONTROLS (NEXT / PREV) */
105
+
106
+ .bx-wrapper .bx-prev {
107
+ left: 10px;
108
+ background: url("../../images/ajaxshopping/slider_controls.png") no-repeat 0 -32px;
109
+ }
110
+
111
+ .bx-wrapper .bx-next {
112
+ right: 10px;
113
+ background: url("../../images/ajaxshopping/slider_controls.png") no-repeat -43px -32px;
114
+ }
115
+
116
+ .bx-wrapper .bx-prev:hover {
117
+ background-position: 0 0;
118
+ }
119
+
120
+ .bx-wrapper .bx-next:hover {
121
+ background-position: -43px 0;
122
+ }
123
+
124
+ .bx-wrapper .bx-controls-direction a {
125
+ position: absolute;
126
+ top: 50%;
127
+ margin-top: -16px;
128
+ outline: 0;
129
+ width: 32px;
130
+ height: 32px;
131
+ text-indent: -9999px;
132
+ z-index: 9999;
133
+ }
134
+
135
+ .bx-wrapper .bx-controls-direction a.disabled {
136
+ display: none;
137
+ }
138
+
139
+ /* AUTO CONTROLS (START / STOP) */
140
+
141
+ .bx-wrapper .bx-controls-auto {
142
+ text-align: center;
143
+ }
144
+
145
+ .bx-wrapper .bx-controls-auto .bx-start {
146
+ display: block;
147
+ text-indent: -9999px;
148
+ width: 10px;
149
+ height: 11px;
150
+ outline: 0;
151
+ background: url(images/controls.png) -86px -11px no-repeat;
152
+ margin: 0 3px;
153
+ }
154
+
155
+ .bx-wrapper .bx-controls-auto .bx-start:hover,
156
+ .bx-wrapper .bx-controls-auto .bx-start.active {
157
+ background-position: -86px 0;
158
+ }
159
+
160
+ .bx-wrapper .bx-controls-auto .bx-stop {
161
+ display: block;
162
+ text-indent: -9999px;
163
+ width: 9px;
164
+ height: 11px;
165
+ outline: 0;
166
+ background: url(images/controls.png) -86px -44px no-repeat;
167
+ margin: 0 3px;
168
+ }
169
+
170
+ .bx-wrapper .bx-controls-auto .bx-stop:hover,
171
+ .bx-wrapper .bx-controls-auto .bx-stop.active {
172
+ background-position: -86px -33px;
173
+ }
174
+
175
+ /* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
176
+
177
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
178
+ text-align: left;
179
+ width: 80%;
180
+ }
181
+
182
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
183
+ right: 0;
184
+ width: 35px;
185
+ }
186
+
187
+ /* IMAGE CAPTIONS */
188
+
189
+ .bx-wrapper .bx-caption {
190
+ position: absolute;
191
+ bottom: 0;
192
+ left: 0;
193
+ background: #666\9;
194
+ background: rgba(80, 80, 80, 0.75);
195
+ width: 100%;
196
+ }
197
+
198
+ .bx-wrapper .bx-caption span {
199
+ color: #fff;
200
+ font-family: Arial;
201
+ display: block;
202
+ font-size: .85em;
203
+ padding: 10px;
204
+ }
skin/frontend/default/default/css/padoo/onecheckout.css ADDED
@@ -0,0 +1,452 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css";
2
+ .onecheckout-onepage-wrap{
3
+ /* position:relative; */
4
+ }
5
+ #load-info-overlay{
6
+ position:relative;
7
+ background:url('../../images/ecommerceteam/loadinfo.gif') 50% 50% no-repeat #fff;
8
+ opacity:0.8;
9
+ filter: alpha(opacity=50);
10
+ width:100%;
11
+ z-index:255;
12
+ display:none;
13
+ }
14
+ #sln-overlay-methods .img-load {
15
+ display: none;
16
+ }
17
+ .img-load {
18
+ background:url('../../images/padoo/ajax-loader-tr.gif') no-repeat;
19
+ width: 32px;
20
+ height: 32px;
21
+ position:absolute;
22
+ right: 0;
23
+ left:0;
24
+ bottom:0;
25
+ top:0;
26
+ margin:auto;
27
+ }
28
+ #onecheckout-form-wrap form{
29
+ zoom:1;
30
+ }
31
+ #onecheckout-form-wrap form ul{
32
+ margin:0;
33
+ padding:5px 10px;
34
+ list-style:none;
35
+
36
+ }
37
+
38
+ #onecheckout-form-wrap form ul.right{
39
+ margin-right:38px;
40
+ }
41
+
42
+ #onecheckout-form-wrap .address-form-list li{
43
+ clear:both;
44
+ zoom:1;
45
+ }
46
+ #onecheckout-form-wrap .address-form-list label{
47
+ display:inline;
48
+ float:left;
49
+ width:130px;
50
+ text-align:left;
51
+ }
52
+
53
+ #onecheckout-form-wrap .form-list label.required em{
54
+ color: #eb340a;
55
+ float: left;
56
+ font-style: normal;
57
+ position:initial;
58
+ }
59
+
60
+ #onecheckout-form-wrap.onecheckout-3columns .address-form-list label{
61
+ width:110px;
62
+ }
63
+
64
+ #onecheckout-form-wrap .address-form-list .field {
65
+ width:auto;
66
+ }
67
+ #onecheckout-form-wrap .address-form-list .field .input-box{
68
+ clear:none;
69
+ width:auto;
70
+ float:left;
71
+ }
72
+ #onecheckout-form-wrap .easy-step{
73
+ display:block;
74
+ clear:both;
75
+ border:1px solid #ccc;
76
+ background:url('../../images/ecommerceteam/block.gif') 0 0 repeat-x #fff;
77
+ margin: 0 0 10px;
78
+ padding: 0 0 10px;
79
+ }
80
+ #onecheckout-shipping-payment-step{
81
+ width:100%;
82
+ margin-bottom:10px;
83
+ position:relative;
84
+ }
85
+
86
+ #onecheckout-shipping-payment-step td{
87
+ border:1px solid #ccc;
88
+
89
+ }
90
+ #onecheckout-shipping-payment-step td.shipping-method,
91
+ #onecheckout-shipping-payment-step td.payment-method{
92
+ background:#fff;
93
+ }
94
+ #onecheckout-shipping-payment-step td.methods-separator{
95
+ width:10px;
96
+ border:0;
97
+ }
98
+ #onecheckout-shipping-payment-step td.shipping-method{
99
+ width:40%;
100
+ }
101
+ #onecheckout-form-wrap.onecheckout-3columns #onecheckout-shipping-payment-step td.shipping-method{
102
+ width:250px;
103
+ }
104
+ #onecheckout-form-wrap.onecheckout-3columns #onecheckout-shipping-payment-step td.shipping-method .easy-step{
105
+ width:220px;
106
+ }
107
+ #onecheckout-form-wrap.onecheckout-3columns #onecheckout-shipping-payment-step td.shipping-method .input-text{
108
+ width:215px;
109
+ }
110
+ #onecheckout-form-wrap .easy-step h2{
111
+ /* color:#E26703; */
112
+ font-size:16px;
113
+ font-weight:900;
114
+ margin:0;
115
+ padding: 10px;
116
+ }
117
+ #onecheckout-form-wrap .easy-step h2 span{
118
+ color:#333;
119
+ font-weight:100;
120
+ text-transform:none;
121
+ }
122
+ #onecheckout-form-wrap .easy-step h2 label{
123
+ display: block;
124
+ }
125
+ #onecheckout-form-wrap .address-form-list .fields .field{
126
+ width:50%;
127
+ }
128
+ #onecheckout-form-wrap .address-form-list .fields .field .input-box{
129
+
130
+ }
131
+
132
+
133
+ #onecheckout-form-wrap .address-form-list .input-box input.input-text{
134
+ padding:3px;
135
+ width:252px;
136
+ background:url('../../images/ecommerceteam/inputbg.gif') 0 0 no-repeat #fff;
137
+ }
138
+ #onecheckout-form-wrap.onecheckout-3columns .address-form-list .fields .field .input-box{
139
+ width:152px;
140
+ }
141
+ #onecheckout-form-wrap.onecheckout-3columns .address-form-list .input-box input.input-text{
142
+ width:152px;
143
+ }
144
+ #onecheckout-form-wrap.onecheckout-3columns .address-form-list .input-box{
145
+ width:160px;
146
+ }
147
+ #onecheckout-form-wrap.onecheckout-3columns .address-form-list .input-box select{
148
+ width:160px;
149
+ }
150
+ #onecheckout-form-wrap.onecheckout-3columns .onecheckout-left-column{
151
+ float:left;
152
+ width:36%;
153
+
154
+ }
155
+ #onecheckout-form-wrap.onecheckout-3columns .onecheckout-right-column{
156
+ float:right;
157
+ width:63%;
158
+ }
159
+
160
+ #onecheckout-form-wrap .address-form-list .input-box input.readonly{
161
+ color:#969696;
162
+ background:url('../../images/ecommerceteam/inputbg-readonly.gif') 0 0 no-repeat #e6e6e6;
163
+ }
164
+
165
+ #onecheckout-form-wrap .address-form-list .input-box select{
166
+ padding:2px;
167
+ background:url('../../images/ecommerceteam/inputbg.gif') 0 0 no-repeat #fff;
168
+ }
169
+
170
+ #onecheckout-form-wrap .address-form-list .input-box .validation-failed{
171
+ border:1px solid #EB340A !important;
172
+ background:url('../../images/ecommerceteam/inputbg-error.gif') 0 0 no-repeat #fff !important;
173
+ }
174
+
175
+ #onecheckout-form-wrap #onecheckout-shippingmethod,
176
+ #onecheckout-form-wrap #onecheckout-paymentmethod{
177
+ border:0;
178
+ margin:0;
179
+ }
180
+
181
+ #onecheckout-form-wrap #onecheckout-review{
182
+ clear:both;
183
+ position:relative;
184
+ }
185
+ #onecheckout-form-wrap .validation-advice{
186
+ /*display:none;*/
187
+ }
188
+ #onecheckout-form-wrap .address-form-list .control label{
189
+ display:inline;
190
+ margin-right:17px;
191
+ }
192
+ #onecheckout-form-wrap fieldset{
193
+ padding-top:10px;
194
+ }
195
+ #onecheckout-form-wrap #checkout-review-table{
196
+ margin:10px 0;
197
+ border:1px solid #ddd;
198
+ }
199
+ #onecheckout-form-wrap #checkout-review-table thead th {
200
+ background:#eee;
201
+ border:0;
202
+ border-bottom:1px solid #ddd !important;
203
+ }
204
+ #onecheckout-form-wrap #checkout-review-table tfoot tr{
205
+ background:#eee !important;
206
+ }
207
+ #onecheckout-form-wrap #checkout-review-table tfoot tr.first td {
208
+ background:url('../../images/ecommerceteam/totalsbg.gif') 0 0 repeat-x #eee;
209
+ }
210
+
211
+ #onecheckout-form-wrap #checkout-review-table .even{
212
+ background:#fff !important;
213
+ }
214
+ #onecheckout-form-wrap .button-set{
215
+ text-align:right;
216
+ }
217
+ #onecheckout-form-wrap.onecheckout-3columns .button-set{
218
+ float:left;
219
+ }
220
+ #onecheckout-shippingmethod .box-weight {
221
+ float: left;
222
+ width: 100%;
223
+ margin: 5px 0px 0px 0px;
224
+ }
225
+ #onecheckout-shippingmethod .box-weight p {
226
+ float: left;
227
+ width: 50%;
228
+ }
229
+ #onecheckout-shippingmethod .box-weight p span {
230
+ font-size: 16px;
231
+ font-weight: bold;
232
+ }
233
+
234
+ #elogin-buttons{
235
+ overflow:hidden;
236
+ zoom:1;
237
+ }
238
+ #elogin-message{
239
+ color:red
240
+ }
241
+ #elogin-loading{
242
+ background:url('../../images/ecommerceteam/elogin-loading.gif') center center no-repeat;
243
+ font-size:10px;
244
+ color:#666;
245
+ padding-top:5px;
246
+ height:20px;
247
+ }
248
+ #elogin-buttons{
249
+ padding-top:3px;
250
+ height:22px;
251
+ }
252
+
253
+ #onecheckout-coupon{
254
+ width: 50%;
255
+ float:left;
256
+ }
257
+
258
+ #onecheckout-coupon button{
259
+ margin-top:10px;
260
+ }
261
+
262
+ #onecheckout-coupon .button-set {
263
+ float: left;
264
+ }
265
+
266
+ #coupon_code{
267
+ width:90%;
268
+ }
269
+
270
+ .onecheckout-3columns #register-customer-password .field{
271
+ margin-bottom:8px;
272
+ }
273
+ #onecheckout-form-wrap #onecheckout-addressbilling select.address-select,
274
+ #onecheckout-form-wrap #shipping-address-form select.address-select{
275
+ width:98%;
276
+ }
277
+ .one_step {
278
+ float: left;
279
+ width: 100%;
280
+ }
281
+ .one_step ul {
282
+ float: left;
283
+ width: 100%;
284
+ margin-left: 5%;
285
+ }
286
+ .one_step ul li {
287
+ float: left;
288
+ margin-top: 16px;
289
+ height: 60px;
290
+ width: 25%;
291
+ }
292
+ .one_step ul li strong {
293
+ color: #E26703;
294
+ float: left;
295
+ font-size: 20px;
296
+ line-height: 20px;
297
+ margin-right: 15px;
298
+
299
+ }
300
+ .one_step ul li p {
301
+ float: left;
302
+ font-size: 14px;
303
+ font-weight: bold;
304
+ text-align: center;
305
+ }
306
+ .checkout-5step ul {
307
+ margin-left: 2%;
308
+ }
309
+ .checkout-5step ul li {
310
+ width: 20%;
311
+ }
312
+ #myimage {
313
+ position: fixed;
314
+ top: 0px;
315
+ left: 400px;
316
+ background: #fff;
317
+ z-index: 9999;
318
+ width: 300px;
319
+ padding: 30px;
320
+ }
321
+ .easy-step .subscribe label {
322
+ }
323
+ #checkout-review-table .cat-image {
324
+ float: left;
325
+ margin-right: 10px;
326
+ }
327
+ #checkout-review-table dl.item-options{display: inherit;}
328
+ #checkout-review-table .update,
329
+ #checkout-review-table .delete {
330
+ background: url("../../images/padoo/bg-btn-delete.gif") no-repeat scroll 0 0 transparent;
331
+ line-height: 50px;
332
+ padding-left: 15px;
333
+ text-decoration: none;
334
+ text-align: right;
335
+ color: #000;
336
+ float: right;
337
+ margin: 20px 0px 0px 0px;
338
+ }
339
+ #checkout-review-table .update:hover,
340
+ #checkout-review-table .delete:hover {
341
+ color: #E26703;
342
+ }
343
+ #checkout-review-table .update span,
344
+ #checkout-review-table .delete span {
345
+ float: right;
346
+ line-height: 10px;
347
+ }
348
+ #checkout-review-table .update {
349
+ background: url("../../images/padoo/bg-btn-update.gif") no-repeat scroll 0 0 transparent;
350
+ margin: 17px 0px 0px 0px;
351
+ }
352
+
353
+ .checkout-agreements .agree {
354
+ margin: 0;
355
+ padding: 10px 0;
356
+ }
357
+ .checkout-agreements .agree a{
358
+ text-decoration: none;
359
+ }
360
+ .checkout-agreements li {margin:0 !important;}
361
+ .agreement-box{
362
+ bottom: 0;
363
+ display: block;
364
+ height: 100%;
365
+ left: 0;
366
+ position: fixed;
367
+ right: 0;
368
+ top: 0;
369
+ width: 100%;
370
+ z-index:10005;
371
+ background: rgba(0, 0, 0, 0.7) no-repeat 0 50%;
372
+ display:none;
373
+ }
374
+ .agreement-box .agreement-content{
375
+ background: none repeat scroll 0 0 #ffffff;
376
+ border: 1px solid #999999;
377
+ bottom: 0;
378
+ height: 150px;
379
+ left: 0;
380
+ margin: auto;
381
+ padding: 5px 5px 5px 20px;
382
+ position: absolute;
383
+ right: 0;
384
+ top: 0 !important;
385
+ width: 450px;
386
+ border-radius: 4px;
387
+ box-shadow: 0 0 4px 2px #888;
388
+ box-sizing:content-box;
389
+ }
390
+ .agreement-box .agreement-content span{
391
+ display: block;
392
+ height: 128px;
393
+ margin-top: 10px;
394
+ overflow-y: scroll;
395
+ text-align: left;
396
+ width: 100%;
397
+ }
398
+ .agreement-box .agreement-content .close-confirm {
399
+ background: rgba(0, 0, 0, 0) url("../../images/padoo/controls.png") no-repeat scroll -50px 0;
400
+ bottom: 4px;
401
+ float: right;
402
+ left: 3px;
403
+ position: relative;
404
+ width: 20px;
405
+ height: 20px;
406
+ }
407
+ .comments{width: 50%; float: left;}
408
+ .comments textarea{padding: 0; width: 99.5%;}
409
+ .onestepcheckout-survey{
410
+ background: #f8f7f5;
411
+ margin: 10px;
412
+ padding: 10px;
413
+ }
414
+ .onestepcheckout-survey label{
415
+ display: block;
416
+ margin: 0 0 5px;
417
+ }
418
+ .onestepcheckout-survey select{
419
+ width: 50%;
420
+ }
421
+ .onestepcheckout-group{
422
+ display: inline-block;
423
+ padding: 1%;
424
+ width: 98%;
425
+ }
426
+ .onestepcheckout-group h2{padding: 10px 0 !important;}
427
+ .onestepcheckout-giftmessage{
428
+ background:#f8f7f5;
429
+ margin: 10px;
430
+ padding: 1px 10px;
431
+ }
432
+ .onestepcheckout-giftmessage .onestepcheckout-form-list{
433
+ padding:0 !important;
434
+ }
435
+ .onestepcheckout-giftmessage .gift-messages{
436
+ padding: 5px 0;
437
+ }
438
+ .onestepcheckout-form-list .field {
439
+ width:49%;
440
+ }
441
+ .onestepcheckout-form-list .field .input-box input {
442
+ width:98%;
443
+ }
444
+ .onestepcheckout-form-list .input-box textarea {
445
+ width: 99%;
446
+ }
447
+ .delivery-box{
448
+ margin:10px 0;
449
+ padding: 5px 10px;
450
+ }
451
+ .delivery-box input {height:19px;}
452
+ .enable-shipping,.group-method,#onecheckout-paymentmethod-available,#checkout-review-table-wrapper,.agreements,.subscribe,.delivery-enable{padding:5px 10px }
skin/frontend/default/default/css/padoo/storelocator.css ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*Search*/
2
+ .store-locator-search-box{
3
+ width:100%;
4
+ border-bottom:1px solid #ccc;
5
+ margin-bottom:20px;
6
+ }
7
+ .store-locator-list {
8
+ width:50%;
9
+ float :left;
10
+ }
11
+ .store-locator-list:nth-child(2n){text-align:right}
12
+ .store-locator-content a:active{text-decoration:underline;color:#6699FF;}
13
+ .store-locator-list-store td{vertical-align:middle;}
14
+ .store-locator-list-store td:first-child{padding-right:25px;}
15
+ .fields.store-locator-list.last {
16
+ float: right;
17
+ margin:15px 0 10px;
18
+ }
19
+ .store-locator-list label{
20
+ width:24%;
21
+ float:left;
22
+ }
23
+ .store-locator-list input{
24
+ width:70%;
25
+ padding:2px!important;
26
+ }
27
+ .adp-directions{width:100%;}
28
+ .store-locator-list select{
29
+ width:71%!important;
30
+ padding:0;
31
+ margin:0;
32
+ padding:2px!important;
33
+ }
34
+ .store-locator-column-left{
35
+ padding-left:2%;
36
+ width:40%!important;
37
+ float:left;
38
+ }
39
+ .padoo-map-image{
40
+ width:100%;
41
+ }
42
+ .padoo-map-image img{width:100%;}
43
+ .store-locator-column-right{
44
+ padding-left:5px;
45
+ width:55%!important;
46
+ float:right;
47
+ }
48
+ .store-locator-column-button{
49
+ padding-right:5px;
50
+ text-align:right;
51
+ }
52
+ /*Content*/
53
+ .store-locator-content{
54
+ width:100%;
55
+ height: auto;
56
+ border-bottom:1px solid #ccc;
57
+ padding-bottom:10px;
58
+ }
59
+ /*List store*/
60
+ .store-locator-list-store-box{
61
+ border:1px solid #ccc;
62
+ float:left;
63
+ width:29%;
64
+ padding:5px 0px 5px 10px;
65
+ height:520px;
66
+ }
67
+
68
+ .fb_iframe_widget span,.fb_iframe_widget iframe{width:100%!important;}
69
+ .fb_iframe_widget{display:inline!important;}
70
+ .store-locator-list-store-title{
71
+ width:95%;
72
+ font-size:16pt;
73
+ border-bottom:1px solid #ccc;
74
+ margin-bottom:5px;
75
+ }
76
+ .store-locator-list-store{
77
+ height:480px;
78
+ overflow:auto;
79
+ }
80
+ .store-locator-list-store-item{
81
+ width:93%;
82
+ min-height:100px;
83
+ height: auto;
84
+ margin-bottom:10px;
85
+ border:1px solid #ccc;
86
+ padding:2%;
87
+
88
+ }
89
+ .store-locator-list-store-item:hover{
90
+ background:#E9E9F3;
91
+ }
92
+ .active{
93
+ background:#E9E9F3;
94
+ }
95
+ .selecteda{
96
+ background:#E9E9F3;
97
+ }
98
+ .store-locator-item-content{
99
+ color:#666;
100
+ float:left;
101
+ width:60%;
102
+ font-size:8pt;
103
+ }
104
+ .store-locator-item-image{
105
+ float:right;
106
+ width:70px;
107
+ height:100px;
108
+ background:#edf7fd;
109
+ }
110
+ .store-locator-item-name{
111
+ font-size:9pt;
112
+ color:#de5400;
113
+ font-weight:bold;
114
+ }
115
+ .store-locator-view-detail .store-locator-item-name a{
116
+ text-decoration: none;
117
+ color: #de5400;
118
+ }
119
+ .store-locator-view-detail .store-locator-item-name a:hover{
120
+ text-decoration: underline;
121
+ }
122
+ .store-locator-item-content a{
123
+ color:#69F;
124
+ font-style:italic;
125
+ text-decoration:none;
126
+ margin-right:10px;
127
+ }
128
+ .store-locator-item-content a:hover{
129
+ text-decoration:underline;
130
+ }
131
+ /*Map*/
132
+ .store-locator-map{
133
+ border:1px solid #ccc;
134
+ float:right;
135
+ height:530px;
136
+ width:68%;
137
+ }
138
+
139
+ .store-locator-view-detail{
140
+ width: 40%;
141
+ height: auto;
142
+ float: left;
143
+ }
144
+ .store-locator-view-detail a{
145
+ color:#69F;
146
+ text-decoration: none;
147
+ }
148
+ .store-locator-view-detail label{
149
+ display: block;
150
+ float: left;
151
+ width: 25%;
152
+ font-weight: bold;
153
+ clear: both;
154
+ }
155
+ .store-locator-view-detail span{
156
+ width: 73%;
157
+ display: block;
158
+ float: right;
159
+ padding-bottom: 2px;
160
+ }
161
+ .store-locator-view-detail p{
162
+ text-align: justify;
163
+ padding-top:1px;
164
+ padding-bottom: 1px;
165
+ margin: 0;
166
+ }
167
+ .clear{
168
+ clear:both;
169
+ }
170
+
171
+ .store-pickup-image{
172
+ float :left;
173
+ margin-right: 5px;
174
+ }
175
+
176
+ .locator-main-outer .locator-image-small{
177
+ border: 2px solid #DDDDDD;
178
+ float: left;
179
+ height: 56px;
180
+ overflow: hidden;
181
+ width: 56px;
182
+ }
183
+ .locator-image-main{
184
+ margin: 0 0 13px;
185
+ }
186
+ .locator-main-outer .more-views h2 {
187
+ border-bottom: 1px solid #CCCCCC;
188
+ font-size: 11px;
189
+ margin: 0 0 8px;
190
+ text-transform: uppercase;
191
+ font-weight: bold;
192
+ }
193
+ .store-locator-title{
194
+ color: #de5400;
195
+ font-weight: bold;
196
+ font-size: 13px;
197
+ margin-bottom: 5px;
198
+ display: block;
199
+ }
200
+
201
+ .more-views ul li {
202
+ float: left;
203
+ padding: 3px;
204
+ margin: 1px;
205
+ border: 1px solid rgb(230, 230, 230);
206
+ }
207
+ .padoo-map-image:hover img{
208
+ box-shadow: 0 0 5px rgb(155, 148, 148);
209
+ }
210
+ .locator-image-small:hover img{
211
+ border: 1px solid #ccc;
212
+ }
213
+ #description {
214
+ overflow: auto;
215
+ max-height: 250px;
216
+ }
217
+ .store-locator-tag{
218
+ position: relative;
219
+ width:98%;
220
+ padding:1%;
221
+ margin:auto;
222
+ padding-top: 20px;
223
+ margin-top:13px;
224
+ border:1px solid #E5E5E5;
225
+ background:url(storelocator/tag-bg.png) repeat;
226
+ }
227
+ .store-locator-tag a{
228
+ color:#fafafa;
229
+ text-shadow: 0 1px rgba(0,0,0,0.4);
230
+ text-decoration:none;
231
+ display: inline-block;
232
+ padding: 0 12px;
233
+ font-size:11pt;
234
+ margin-bottom: 5px;
235
+ background:#06F;
236
+ border-radius:15px;
237
+ background: #ff9035; /* Old browsers */
238
+ line-height:27px;
239
+ background: -moz-linear-gradient(top, #ff9035 1%, #ff7400 100%); /* FF3.6+ */
240
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#ff9035), color-stop(100%,#ff7400)); /* Chrome,Safari4+ */
241
+ background: -webkit-linear-gradient(top, #ff9035 1%,#ff7400 100%); /* Chrome10+,Safari5.1+ */
242
+ background: -o-linear-gradient(top, #ff9035 1%,#ff7400 100%); /* Opera 11.10+ */
243
+ background: -ms-linear-gradient(top, #ff9035 1%,#ff7400 100%); /* IE10+ */
244
+ background: linear-gradient(to bottom, #ff9035 1%,#ff7400 100%); /* W3C */
245
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9035', endColorstr='#ff7400',GradientType=0 ); /* IE6-9 */
246
+
247
+ box-shadow: 0 1px 2px rgba(0,0,0,0.21);
248
+ }
249
+ .store-locator-tag a:hover{
250
+ background: #B6DA25;
251
+ }
252
+ .padoo-storelocator-getdirection{
253
+ border: 1px solid #E5E6E3;
254
+ background-color: #FFFFFF;
255
+ margin-top: -10px;
256
+ margin-bottom: 10px;
257
+ width: 97%;
258
+ clear:both;
259
+ display:block;
260
+ }
261
+ .padoo-storelocator-navigation{
262
+ margin-top: 5px;
263
+ margin-bottom:5px;
264
+ display: block;
265
+ }
266
+ .padoo-storelocator-navigation .store-locator-navigation_image{
267
+ background: url(storelocator/navigation.png) left no-repeat;
268
+ background-position: 0px 0px;
269
+ display:inline-block;
270
+ height: 8px;
271
+ width: 16px;
272
+ margin-right:10px;
273
+ margin-left:5px;
274
+ }
275
+ .padoo-storelocator-directionsPanel{}
276
+ .padoo-storelocator-navigation-up{
277
+ background-image: url(storelocator/navigation.png);
278
+ background-position: 16px 0px;
279
+
280
+ height: 8px;
281
+ width: 16px;
282
+ margin-left: 107px;
283
+ margin-top: 3px;
284
+ display: block;
285
+ }
286
+ .store-locator-tag .tag_active{
287
+ background:#B6DA25;
288
+ }
289
+
290
+ .store-locator-span-tag {
291
+ font-weight: bold;
292
+ border: 1px solid #E5E5E5;
293
+ position: absolute;
294
+ top: -10px;
295
+ padding:2px;
296
+ background-color: #F1F0F0;
297
+ background:url(storelocator/tag-bg.png) repeat;
298
+ }
299
+ .store-locator-list input,.store-locator-list select{height:auto!important; border:1px solid #CCCCCC;}
300
+
301
+ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++RESPONSIVE++++++++++++++++++++++++++++++++++++++++++++++++++++*/
302
+
303
+ /*@media all and (min-width: 0px) and (max-width: 379px) {
304
+
305
+ }*/
306
+
307
+ @media all and (min-width: 0px) and (max-width: 719px) {
308
+ .store-locator-list,.store-locator-list label,.store-locator-list input,.store-locator-list select{
309
+ width:100%!important;
310
+ text-align:left;
311
+ -webkit-box-sizing:border-box;
312
+ -moz-box-sizing:border-box;
313
+ box-sizing:border-box;
314
+ -moz-background-clip:padding-box !important;
315
+ -webkit-background-clip:padding-box !important;
316
+ background-clip:padding-box !important;
317
+ }
318
+ .store-locator-list-store-box{
319
+ width:100%;
320
+ border:none;
321
+ padding:5px 0 5px 0px;
322
+ border-bottom:1px solid #cccccc;
323
+ margin-bottom:18px;
324
+ height:auto;
325
+ }
326
+ .store-locator-list-store{width:100%;
327
+ padding-right:0;
328
+ height:160px;
329
+ }
330
+ .store-locator-list-store-title,.store-locator-view-detail{
331
+ width:100%;
332
+ }
333
+
334
+ .store-locator-list-store-item{
335
+ width:100%;
336
+ float:left;
337
+ -webkit-box-sizing:border-box;
338
+ -moz-box-sizing:border-box;
339
+ box-sizing:border-box;
340
+ -moz-background-clip:padding-box !important;
341
+ -webkit-background-clip:padding-box !important;
342
+ background-clip:padding-box !important;
343
+ }
344
+
345
+ #store-locator-list-store div.store-locator-list-store-item:nth-child(even){
346
+ float:right;
347
+ }
348
+ .store-locator-list-store-box .clear{
349
+ display:none;
350
+ }
351
+ .store-locator-map{
352
+ width:100%!important;
353
+ margin-bottom:15px;
354
+ }
355
+ .store-locator-item-content a{float:left!important;}
356
+ .padoo-map-image{width:100%;}
357
+ .padoo-map-image img{width:100%;}
358
+
359
+ .store-locator-column-right,.fb_iframe_widget span,.fb_iframe_widget iframe{width:100%!important;}
360
+ .fb_iframe_widget{display:inline!important;}
361
+
362
+ .store-locator-column-left{
363
+ width:100%!important;
364
+ margin-bottom:18px;
365
+ }
366
+ }
367
+ /*
368
+ @media all and (min-width: 481px) and (max-width: 719px) {
369
+ .store-locator-list,.store-locator-list label,.store-locator-list input,.store-locator-list select{
370
+ width:100%;
371
+ text-align:left;
372
+ -webkit-box-sizing:border-box;
373
+ -moz-box-sizing:border-box;
374
+ box-sizing:border-box;
375
+ -moz-background-clip:padding-box !important;
376
+ -webkit-background-clip:padding-box !important;
377
+ background-clip:padding-box !important;
378
+ }
379
+ .store-locator-list-store-box,.store-locator-view-detail{
380
+ width:100%;
381
+ border:none;
382
+ padding:5px 0 5px 0px;
383
+ border-bottom:1px solid #cccccc;
384
+ margin-bottom:18px;
385
+ height:auto;
386
+ }
387
+ .store-locator-list-store{width:100%;
388
+ padding-right:0;
389
+ height:160px;
390
+ }
391
+ .store-locator-list-store-title{
392
+ width:100%;
393
+ }
394
+
395
+ .store-locator-list-store-item{
396
+ width:49%;
397
+ float:left;
398
+ -webkit-box-sizing:border-box;
399
+ -moz-box-sizing:border-box;
400
+ box-sizing:border-box;
401
+ -moz-background-clip:padding-box !important;
402
+ -webkit-background-clip:padding-box !important;
403
+ background-clip:padding-box !important;
404
+ }
405
+
406
+ #store-locator-list-store div.store-locator-list-store-item:nth-child(even){
407
+ float:right;
408
+ }
409
+ .store-locator-list-store-box .clear{
410
+ display:none;
411
+ }
412
+ .store-locator-map{
413
+ width:100%!important;
414
+ margin-bottom:15px;
415
+ }
416
+ .store-locator-item-content a{float:left!important;}
417
+ .store-locator-column-right{
418
+ float:left;
419
+ }
420
+ .store-locator-column-left{
421
+ width:100%!important;
422
+ }
423
+ .locator-image-main img{
424
+ width:400px;
425
+ display:block;
426
+ float:none; margin:0 auto;
427
+ }
428
+
429
+ .store-locator-title{text-align:center;}
430
+
431
+ .store-locator-column-right,.fb_iframe_widget span,.fb_iframe_widget iframe{width:100%!important;}
432
+ .fb_iframe_widget{display:inline!important;}
433
+
434
+ }
435
+ */
436
+ @media screen and (min-width: 720px) and (max-width: 985px) {
437
+ .store-locator-list,.store-locator-list label,.store-locator-list input,.store-locator-list select{
438
+ width:100%!important;
439
+ text-align:left;
440
+ -webkit-box-sizing:border-box;
441
+ -moz-box-sizing:border-box;
442
+ box-sizing:border-box;
443
+ -moz-background-clip:padding-box !important;
444
+ -webkit-background-clip:padding-box !important;
445
+ background-clip:padding-box !important;
446
+ }
447
+ .store-locator-list-store-box{
448
+ width:100%;
449
+ border:none;
450
+ padding:5px 0 5px 0px;
451
+ border-bottom:1px solid #cccccc;
452
+ margin-bottom:18px;
453
+ height:auto;
454
+ }
455
+ .store-locator-list-store{width:100%;
456
+ padding-right:0;
457
+ height:160px;
458
+ }
459
+ .store-locator-list-store-title,.store-locator-view-detail{
460
+ width:100%;
461
+ }
462
+
463
+ .store-locator-list-store-item{
464
+ width:100%;
465
+ float:left;
466
+ -webkit-box-sizing:border-box;
467
+ -moz-box-sizing:border-box;
468
+ box-sizing:border-box;
469
+ -moz-background-clip:padding-box !important;
470
+ -webkit-background-clip:padding-box !important;
471
+ background-clip:padding-box !important;
472
+ }
473
+
474
+ #store-locator-list-store div.store-locator-list-store-item:nth-child(even){
475
+ float:right;
476
+ }
477
+ .store-locator-list-store-box .clear{
478
+ display:none;
479
+ }
480
+ .store-locator-map{
481
+ width:100%!important;
482
+ margin-bottom:15px;
483
+ }
484
+ .store-locator-item-content a{float:left!important;}
485
+ .padoo-map-image{width:100%;}
486
+ .padoo-map-image img{width:100%;}
487
+
488
+ .store-locator-column-right,.fb_iframe_widget span,.fb_iframe_widget iframe{width:100%!important;}
489
+ .fb_iframe_widget{display:inline!important;}
490
+
491
+ .store-locator-column-left{
492
+ width:100%!important;
493
+ margin-bottom:18px;
494
+ }
495
+ }
496
+ @media only screen and (max-width: 767px) {
497
+ .store-locator-list label{width:27%;}
498
+ .store-locator-column-right{float:right;width:100%;}
499
+ .padoo-map-image{width:100%;}
500
+ .padoo-map-image img{width:100%;}
501
+
502
+ .fb_iframe_widget span,.fb_iframe_widget iframe{width:100%!important;}
503
+ .fb_iframe_widget{display:inline!important;}
504
+ }
505
+
506
+ @media screen and (min-width: 986px) and (max-width: 1235px) {
507
+
508
+ }
509
+
510
+
511
+
512
+ @media screen and (min-width: 1236px) and (max-width: 1585px) {
513
+
514
+
515
+ }
516
+
517
+
518
+ @media screen and (min-width: 1586px) and (max-width: 1890px) {
519
+
520
+ }
521
+
522
+
523
+ @media screen and (min-width:1891px) {
524
+
525
+ }
526
+ .store-locator-content #map img {
527
+ max-width: inherit;
528
+ width: auto !important;
529
+ }
skin/frontend/default/default/css/padoo/storelocator/navigation.png ADDED
Binary file
skin/frontend/default/default/css/padoo/storelocator/navigation1.png ADDED
Binary file
skin/frontend/default/default/css/padoo/storelocator/tag-bg.png ADDED
Binary file
skin/frontend/default/default/css/padoo/storelocator/vssver2.scc ADDED
Binary file
skin/frontend/default/default/css/padoo/testimonial.css ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .testimonials-container {}
2
+ .testimonials-container .title-box { position: relative;}
3
+ .testimonials-container .title-box a {
4
+ position: absolute;
5
+ right: 0;
6
+ text-decoration: none;
7
+ top: 15px;
8
+ }
9
+ .testimonials-container .title {
10
+ border-bottom: 1px solid #ccc;
11
+ margin: 0 0 30px;
12
+ font-size: 25px;
13
+ }
14
+ .testimonials-container .testimonials {}
15
+ .testimonials-container .testimonials .testimonial-image {
16
+ float: left;
17
+ margin: 0 10px 10px 0;
18
+ }
19
+ .testimonials-container .testimonials .testimonial-text {
20
+ border-bottom: 1px solid #ccc;
21
+ margin: 0 0 15px;
22
+ min-height: 150px;
23
+ }
24
+ .testimonials-container .testimonials .testimonial-text .author,
25
+ .sidebar-box .sidebar-name{
26
+ text-align: right;
27
+ font-style: italic;
28
+ }
29
+ .testimonials-sidebar{}
30
+ .testimonials-sidebar .block-title{}
31
+ .testimonials-sidebar .block-content{}
32
+ .testimonials-sidebar .block-content .sidebar-box{
33
+ margin: 0 0 10px;
34
+ padding: 10px 5px;
35
+ box-sizing: border-box;
36
+ width: 100% !important;
37
+ }
38
+ .testimonials-sidebar .block-content .sidebar-box.last{border:0}
39
+ .testimonials-sidebar .block-content .sidebar-box .sidebar-media img{width:100%;text-align:center}
40
+ .testimonials-sidebar .block-content .sidebar-box .sidebar-text{}
41
+ .testimonials-sidebar .block-content .sidebar-box .sidebar-name{}
42
+
43
+ .testimonials-slider li {height: 200px;}
44
+ .testimonials-container.slider .testimonial-item{padding: 5px 10px 0 0;}
45
+ .testimonials-container.slider .testimonial-text{padding-top: 5px;}
46
+ .testimonials-container.slider .bx-controls .bx-controls-direction{display:none}
47
+ .testimonials-container.slider figure {text-align: center;padding: 0 0 5px;}
48
+ .testimonials-container.slider figure img{
49
+ display: inline-block;
50
+ width: 120px;
51
+ }
52
+ .testimonials-container.slider .author{
53
+ font-style: italic;
54
+ text-align: center;
55
+ color: #f5831f;
56
+ }
57
+ .testimonials-container.slider blockquote::before {
58
+ color: #ccc;
59
+ content: "“";
60
+ font-family: Georgia,"Times New Roman",Times,serif;
61
+ font-size: 30px;
62
+ font-style: normal;
63
+ left: 3px;
64
+ position: absolute;
65
+ top: -3px;
66
+ width: 55px;
67
+ }
68
+ .submit-form h4.title {
69
+ font-size: 22px;
70
+ margin: 0 0 15px;
71
+ }
72
+ .submit-form .field label {
73
+ display: block;
74
+ margin: 0 0 5px;
75
+ }
76
+ .submit-form .field input[type='text'] {
77
+ border: 1px solid #ccc;
78
+ height: 20px;
79
+ width: 50%;
80
+ }
81
+ .submit-form .field {
82
+ margin: 0 0 15px;
83
+ }
skin/frontend/default/default/css/padoo/tinybox.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ #tinybox {position:fixed; top:40% !important; display:none;padding:15px; background:#fff ; z-index:2000}
2
+ #tinymask {position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000; z-index:1500}
3
+ #tinycontent {background:#fff}
skin/frontend/default/default/images/faq/bg-answer.gif ADDED
Binary file
skin/frontend/default/default/images/faq/bg-question.gif ADDED
Binary file
skin/frontend/default/default/images/faq/vbulletin_sprites.png ADDED
Binary file
skin/frontend/default/default/js/faq/faq.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+ jQuery.noConflict();
3
+ jQuery(".faq-content-group li").each(function(){
4
+ jQuery(this).find('p').click(function(){
5
+ jQuery(this).parent().find(".faq-content").slideToggle().parent().toggleClass( "active" );
6
+ });
7
+ });
8
+ });
skin/frontend/default/default/js/faq/jquery-1.3.2.min.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery JavaScript Library v1.3.2
3
+ * http://jquery.com/
4
+ *
5
+ * Copyright (c) 2009 John Resig
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://docs.jquery.com/License
8
+ *
9
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
10
+ * Revision: 6246
11
+ */
12
+ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
13
+ /*
14
+ * Sizzle CSS Selector Engine - v0.9.3
15
+ * Copyright 2009, The Dojo Foundation
16
+ * Released under the MIT, BSD, and GPL Licenses.
17
+ * More information: http://sizzlejs.com/
18
+ */
19
+ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
skin/frontend/default/default/js/faq/jquery.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery 1.2.3 - New Wave Javascript
3
+ *
4
+ * Copyright (c) 2008 John Resig (jquery.com)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
9
+ * $Rev: 4663 $
10
+ */
11
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i<M;i++)7((11=18[i])!=V)Q(L a 1p 11){7(b===11[a])6w;7(5c&&11[a]&&1o 11[a]=="3V"&&b[a]&&!11[a].15)b[a]=E.1s(b[a],11[a]);N 7(11[a]!=10)b[a]=11[a]}K b};L F="3N"+(1B 3v()).3L(),6t=0,5b={};L H=/z-?4X|86-?84|1w|6k|7Z-?1R/i;E.1s({7Y:J(a){1e.$=D;7(a)1e.3N=w;K E},1q:J(a){K!!a&&1o a!="25"&&!a.12&&a.1k!=1M&&/J/i.17(a+"")},3E:J(a){K a.1F&&!a.1h||a.28&&a.2i&&!a.2i.1h},5g:J(a){a=E.3g(a);7(a){L b=T.3S("6f")[0]||T.1F,1m=T.3s("1m");1m.U="1u/4m";7(E.14.1d)1m.1u=a;N 1m.38(T.5r(a));b.38(1m);b.34(1m)}},12:J(b,a){K b.12&&b.12.2E()==a.2E()},1T:{},O:J(c,d,b){c=c==1e?5b:c;L a=c[F];7(!a)a=c[F]=++6t;7(d&&!E.1T[a])E.1T[a]={};7(b!=10)E.1T[a][d]=b;K d?E.1T[a][d]:a},35:J(c,b){c=c==1e?5b:c;L a=c[F];7(b){7(E.1T[a]){2V E.1T[a][b];b="";Q(b 1p E.1T[a])1Q;7(!b)E.35(c)}}N{1S{2V c[F]}1X(e){7(c.52)c.52(F)}2V E.1T[a]}},R:J(c,a,b){7(b){7(c.M==10){Q(L d 1p c)7(a.1i(c[d],b)===S)1Q}N Q(L i=0,M=c.M;i<M;i++)7(a.1i(c[i],b)===S)1Q}N{7(c.M==10){Q(L d 1p c)7(a.1P(c[d],d,c[d])===S)1Q}N Q(L i=0,M=c.M,1A=c[0];i<M&&a.1P(1A,i,1A)!==S;1A=c[++i]){}}K c},1l:J(b,a,c,i,d){7(E.1q(a))a=a.1P(b,i);K a&&a.1k==51&&c=="2o"&&!H.17(d)?a+"2S":a},1t:{1b:J(c,b){E.R((b||"").23(/\\s+/),J(i,a){7(c.15==1&&!E.1t.3Y(c.1t,a))c.1t+=(c.1t?" ":"")+a})},1V:J(c,b){7(c.15==1)c.1t=b!=10?E.3y(c.1t.23(/\\s+/),J(a){K!E.1t.3Y(b,a)}).6a(" "):""},3Y:J(b,a){K E.33(a,(b.1t||b).3X().23(/\\s+/))>-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i<f.M;i++)7(f[i]!=V)2C[i].W.19=f[i]}7(k=="1w"&&d=="")d="1"}N 7(e.4n){L g=k.1r(/\\-(\\w)/g,J(a,b){K b.2E()});d=e.4n[k]||e.4n[g];7(!/^\\d+(2S)?$/i.17(d)&&/^\\d/.17(d)){L l=e.W.26,3K=e.3K.26;e.3K.26=e.4n.26;e.W.26=d||0;d=e.W.7f+"2S";e.W.26=l;e.3K.26=3K}}K d},4a:J(l,h){L k=[];h=h||T;7(1o h.3s==\'10\')h=h.2i||h[0]&&h[0].2i||T;E.R(l,J(i,d){7(!d)K;7(d.1k==51)d=d.3X();7(1o d=="25"){d=d.1r(/(<(\\w+)[^>]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+"></"+c+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>","</2k>"]||!f.1f("<9M")&&[1,"<73>","</73>"]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>","</1O>"]||!f.1f("<4v")&&[2,"<1O><1U>","</1U></1O>"]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>","</4v></1U></1O>"]||!f.1f("<7e")&&[2,"<1O><1U></1U><6V>","</6V></1O>"]||E.14.1d&&[1,"1x<1x>","</1x>"]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i<M;i++)a.1g(b[i]);N a=b.2K(0);K a},33:J(b,a){Q(L i=0,M=a.M;i<M;i++)7(a[i]==b)K i;K-1},37:J(a,b){7(E.14.1d){Q(L i=0;b[i];i++)7(b[i].15!=8)a.1g(b[i])}N Q(L i=0;b[i];i++)a.1g(b[i]);K a},57:J(a){L c=[],2r={};1S{Q(L i=0,M=a.M;i<M;i++){L b=E.O(a[i]);7(!2r[b]){2r[b]=P;c.1g(a[i])}}}1X(e){c=a}K c},3y:J(c,a,d){L b=[];Q(L i=0,M=c.M;i<M;i++)7(!d&&a(c[i],i)||d&&!a(c[i],i))b.1g(c[i]);K b},2c:J(d,a){L c=[];Q(L i=0,M=d.M;i<M;i++){L b=a(d[i],i);7(b!==V&&b!=10){7(b.1k!=1M)b=[b];c=c.71(b)}}K c}});L v=8Y.8W.2h();E.14={5K:(v.1D(/.+(?:8T|8S|8R|8O)[\\/: ]([\\d.]+)/)||[])[1],2d:/77/.17(v),2z:/2z/.17(v),1d:/1d/.17(v)&&!/2z/.17(v),48:/48/.17(v)&&!/(8L|77)/.17(v)};L y=E.14.1d?"6H":"75";E.1s({8I:!E.14.1d||T.6F=="79",46:{"Q":"8F","8E":"1t","4g":y,75:y,6H:y,3d:"3d",1t:"1t",1A:"1A",2Y:"2Y",3k:"3k",8C:"8B",2p:"2p",8A:"8z",3T:"3T",6C:"6C",28:"28",12:"12"}});E.R({6B:J(a){K a.1a},8y:J(a){K E.4u(a,"1a")},8x:J(a){K E.2Z(a,2,"2B")},8v:J(a){K E.2Z(a,2,"4t")},8u:J(a){K E.4u(a,"2B")},8t:J(a){K E.4u(a,"4t")},8s:J(a){K E.5i(a.1a.1C,a)},8r:J(a){K E.5i(a.1C)},6z:J(a){K E.12(a,"8q")?a.8o||a.8n.T:E.2I(a.3p)}},J(c,d){E.1n[c]=J(b){L a=E.2c(6,d);7(b&&1o b=="25")a=E.3e(b,a);K 6.2F(E.57(a))}});E.R({6y:"3t",8m:"6q",3o:"6o",8l:"5a",8k:"6S"},J(c,b){E.1n[c]=J(){L a=18;K 6.R(J(){Q(L i=0,M=a.M;i<M;i++)E(a[i])[b](6)})}});E.R({8j:J(a){E.1J(6,a,"");7(6.15==1)6.52(a)},8i:J(a){E.1t.1b(6,a)},8h:J(a){E.1t.1V(6,a)},8g:J(a){E.1t[E.1t.3Y(6,a)?"1V":"1b"](6,a)},1V:J(a){7(!a||E.1E(a,[6]).r.M){E("*",6).1b(6).R(J(){E.16.1V(6);E.35(6)});7(6.1a)6.1a.34(6)}},4x:J(){E(">*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K i<m[3]-0},88:J(a,i,m){K i>m[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i<T.4L.M;i++)7(T.4L[i].2Y){3z(18.3R,0);K}E.21()},S);7(E.14.2d){L a;(J(){7(E.2Q)K;7(T.39!="5V"&&T.39!="1y"){3z(18.3R,0);K}7(a===10)a=E("W, 7a[7A=7z]").M;7(T.4L.M!=a){3z(18.3R,0);K}E.21()})()}E.16.1b(1e,"3U",E.21)}E.R(("7y,7x,3U,7w,5d,4H,4V,7v,"+"7G,7u,7t,4P,4O,7s,2k,"+"58,7K,7q,7p,3a").23(","),J(i,b){E.1n[b]=J(a){K a?6.2j(b,a):6.1N(b)}});L I=J(a,c){L b=a.4S;2b(b&&b!=c)1S{b=b.1a}1X(3a){b=c}K b==c};E(1e).2j("4H",J(){E("*").1b(T).3w()});E.1n.1s({3U:J(g,d,c){7(E.1q(g))K 6.2j("3U",g);L e=g.1f(" ");7(e>=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i<a.M;i++)7(!a[i]())a.72(i--,1);7(!a.M){6I(E.3W);E.3W=V}},13)}},1G:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1G=P;6.45(0,6.2m());7(6.1l=="27"||6.1l=="1R")6.Y.W[6.1l]="8N";E(6.Y).1G()},1I:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1I=P;6.45(6.2m(),0)},30:J(a){L t=(1B 3v()).3L();7(a||t>6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{}))
skin/frontend/default/default/js/padoo/jquery.bxslider.js ADDED
@@ -0,0 +1,1343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BxSlider v4.1.2 - Fully loaded, responsive content slider
3
+ * http://bxslider.com
4
+ *
5
+ * Copyright 2014, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
6
+ * Written while drinking Belgian ales and listening to jazz
7
+ *
8
+ * Released under the MIT license - http://opensource.org/licenses/MIT
9
+ */
10
+
11
+ ;(function($){
12
+
13
+ var plugin = {};
14
+
15
+ var defaults = {
16
+
17
+ // GENERAL
18
+ mode: 'horizontal',
19
+ slideSelector: '',
20
+ infiniteLoop: true,
21
+ hideControlOnEnd: false,
22
+ speed: 500,
23
+ easing: null,
24
+ slideMargin: 0,
25
+ startSlide: 0,
26
+ randomStart: false,
27
+ captions: false,
28
+ ticker: false,
29
+ tickerHover: false,
30
+ adaptiveHeight: false,
31
+ adaptiveHeightSpeed: 500,
32
+ video: false,
33
+ useCSS: true,
34
+ preloadImages: 'visible',
35
+ responsive: true,
36
+ slideZIndex: 50,
37
+ wrapperClass: 'bx-wrapper',
38
+
39
+ // TOUCH
40
+ touchEnabled: true,
41
+ swipeThreshold: 50,
42
+ oneToOneTouch: true,
43
+ preventDefaultSwipeX: true,
44
+ preventDefaultSwipeY: false,
45
+
46
+ // PAGER
47
+ pager: true,
48
+ pagerType: 'full',
49
+ pagerShortSeparator: ' / ',
50
+ pagerSelector: null,
51
+ buildPager: null,
52
+ pagerCustom: null,
53
+
54
+ // CONTROLS
55
+ controls: true,
56
+ nextText: 'Next',
57
+ prevText: 'Prev',
58
+ nextSelector: null,
59
+ prevSelector: null,
60
+ autoControls: false,
61
+ startText: 'Start',
62
+ stopText: 'Stop',
63
+ autoControlsCombine: false,
64
+ autoControlsSelector: null,
65
+
66
+ // AUTO
67
+ auto: false,
68
+ pause: 4000,
69
+ autoStart: true,
70
+ autoDirection: 'next',
71
+ autoHover: false,
72
+ autoDelay: 0,
73
+ autoSlideForOnePage: false,
74
+
75
+ // CAROUSEL
76
+ minSlides: 1,
77
+ maxSlides: 1,
78
+ moveSlides: 0,
79
+ slideWidth: 0,
80
+
81
+ // CALLBACKS
82
+ onSliderLoad: function() {},
83
+ onSlideBefore: function() {},
84
+ onSlideAfter: function() {},
85
+ onSlideNext: function() {},
86
+ onSlidePrev: function() {},
87
+ onSliderResize: function() {}
88
+ }
89
+
90
+ $.fn.bxSlider = function(options){
91
+
92
+ if(this.length == 0) return this;
93
+
94
+ // support mutltiple elements
95
+ if(this.length > 1){
96
+ this.each(function(){$(this).bxSlider(options)});
97
+ return this;
98
+ }
99
+
100
+ // create a namespace to be used throughout the plugin
101
+ var slider = {};
102
+ // set a reference to our slider element
103
+ var el = this;
104
+ plugin.el = this;
105
+
106
+ /**
107
+ * Makes slideshow responsive
108
+ */
109
+ // first get the original window dimens (thanks alot IE)
110
+ var windowWidth = $(window).width();
111
+ var windowHeight = $(window).height();
112
+
113
+
114
+
115
+ /**
116
+ * ===================================================================================
117
+ * = PRIVATE FUNCTIONS
118
+ * ===================================================================================
119
+ */
120
+
121
+ /**
122
+ * Initializes namespace settings to be used throughout plugin
123
+ */
124
+ var init = function(){
125
+ // merge user-supplied options with the defaults
126
+ slider.settings = $.extend({}, defaults, options);
127
+ // parse slideWidth setting
128
+ slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
129
+ // store the original children
130
+ slider.children = el.children(slider.settings.slideSelector);
131
+ // check if actual number of slides is less than minSlides / maxSlides
132
+ if(slider.children.length < slider.settings.minSlides) slider.settings.minSlides = slider.children.length;
133
+ if(slider.children.length < slider.settings.maxSlides) slider.settings.maxSlides = slider.children.length;
134
+ // if random start, set the startSlide setting to random number
135
+ if(slider.settings.randomStart) slider.settings.startSlide = Math.floor(Math.random() * slider.children.length);
136
+ // store active slide information
137
+ slider.active = { index: slider.settings.startSlide }
138
+ // store if the slider is in carousel mode (displaying / moving multiple slides)
139
+ slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
140
+ // if carousel, force preloadImages = 'all'
141
+ if(slider.carousel) slider.settings.preloadImages = 'all';
142
+ // calculate the min / max width thresholds based on min / max number of slides
143
+ // used to setup and update carousel slides dimensions
144
+ slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
145
+ slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
146
+ // store the current state of the slider (if currently animating, working is true)
147
+ slider.working = false;
148
+ // initialize the controls object
149
+ slider.controls = {};
150
+ // initialize an auto interval
151
+ slider.interval = null;
152
+ // determine which property to use for transitions
153
+ slider.animProp = slider.settings.mode == 'vertical' ? 'top' : 'left';
154
+ // determine if hardware acceleration can be used
155
+ slider.usingCSS = slider.settings.useCSS && slider.settings.mode != 'fade' && (function(){
156
+ // create our test div element
157
+ var div = document.createElement('div');
158
+ // css transition properties
159
+ var props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
160
+ // test for each property
161
+ for(var i in props){
162
+ if(div.style[props[i]] !== undefined){
163
+ slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
164
+ slider.animProp = '-' + slider.cssPrefix + '-transform';
165
+ return true;
166
+ }
167
+ }
168
+ return false;
169
+ }());
170
+ // if vertical mode always make maxSlides and minSlides equal
171
+ if(slider.settings.mode == 'vertical') slider.settings.maxSlides = slider.settings.minSlides;
172
+ // save original style data
173
+ el.data("origStyle", el.attr("style"));
174
+ el.children(slider.settings.slideSelector).each(function() {
175
+ $(this).data("origStyle", $(this).attr("style"));
176
+ });
177
+ // perform all DOM / CSS modifications
178
+ setup();
179
+ }
180
+
181
+ /**
182
+ * Performs all DOM and CSS modifications
183
+ */
184
+ var setup = function(){
185
+ // wrap el in a wrapper
186
+ el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="bx-viewport"></div></div>');
187
+ // store a namspace reference to .bx-viewport
188
+ slider.viewport = el.parent();
189
+ // add a loading div to display while images are loading
190
+ slider.loader = $('<div class="bx-loading" />');
191
+ slider.viewport.prepend(slider.loader);
192
+ // set el to a massive width, to hold any needed slides
193
+ // also strip any margin and padding from el
194
+ el.css({
195
+ width: slider.settings.mode == 'horizontal' ? (slider.children.length * 100 + 215) + '%' : 'auto',
196
+ position: 'relative'
197
+ });
198
+ // if using CSS, add the easing property
199
+ if(slider.usingCSS && slider.settings.easing){
200
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
201
+ // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
202
+ }else if(!slider.settings.easing){
203
+ slider.settings.easing = 'swing';
204
+ }
205
+ var slidesShowing = getNumberSlidesShowing();
206
+ // make modifications to the viewport (.bx-viewport)
207
+ slider.viewport.css({
208
+ width: '100%',
209
+ overflow: 'hidden',
210
+ position: 'relative'
211
+ });
212
+ slider.viewport.parent().css({
213
+ maxWidth: getViewportMaxWidth()
214
+ });
215
+ // make modification to the wrapper (.bx-wrapper)
216
+ if(!slider.settings.pager) {
217
+ slider.viewport.parent().css({
218
+ margin: '0 auto 0px'
219
+ });
220
+ }
221
+ // apply css to all slider children
222
+ slider.children.css({
223
+ 'float': slider.settings.mode == 'horizontal' ? 'left' : 'none',
224
+ listStyle: 'none',
225
+ position: 'relative'
226
+ });
227
+ // apply the calculated width after the float is applied to prevent scrollbar interference
228
+ slider.children.css('width', getSlideWidth());
229
+ // if slideMargin is supplied, add the css
230
+ if(slider.settings.mode == 'horizontal' && slider.settings.slideMargin > 0) slider.children.css('marginRight', slider.settings.slideMargin);
231
+ if(slider.settings.mode == 'vertical' && slider.settings.slideMargin > 0) slider.children.css('marginBottom', slider.settings.slideMargin);
232
+ // if "fade" mode, add positioning and z-index CSS
233
+ if(slider.settings.mode == 'fade'){
234
+ slider.children.css({
235
+ position: 'absolute',
236
+ zIndex: 0,
237
+ display: 'none'
238
+ });
239
+ // prepare the z-index on the showing element
240
+ slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
241
+ }
242
+ // create an element to contain all slider controls (pager, start / stop, etc)
243
+ slider.controls.el = $('<div class="bx-controls" />');
244
+ // if captions are requested, add them
245
+ if(slider.settings.captions) appendCaptions();
246
+ // check if startSlide is last slide
247
+ slider.active.last = slider.settings.startSlide == getPagerQty() - 1;
248
+ // if video is true, set up the fitVids plugin
249
+ if(slider.settings.video) el.fitVids();
250
+ // set the default preload selector (visible)
251
+ var preloadSelector = slider.children.eq(slider.settings.startSlide);
252
+ if (slider.settings.preloadImages == "all") preloadSelector = slider.children;
253
+ // only check for control addition if not in "ticker" mode
254
+ if(!slider.settings.ticker){
255
+ // if pager is requested, add it
256
+ if(slider.settings.pager) appendPager();
257
+ // if controls are requested, add them
258
+ if(slider.settings.controls) appendControls();
259
+ // if auto is true, and auto controls are requested, add them
260
+ if(slider.settings.auto && slider.settings.autoControls) appendControlsAuto();
261
+ // if any control option is requested, add the controls wrapper
262
+ if(slider.settings.controls || slider.settings.autoControls || slider.settings.pager) slider.viewport.after(slider.controls.el);
263
+ // if ticker mode, do not allow a pager
264
+ }else{
265
+ slider.settings.pager = false;
266
+ }
267
+ // preload all images, then perform final DOM / CSS modifications that depend on images being loaded
268
+ loadElements(preloadSelector, start);
269
+ }
270
+
271
+ var loadElements = function(selector, callback){
272
+ var total = selector.find('img, iframe').length;
273
+ if (total == 0){
274
+ callback();
275
+ return;
276
+ }
277
+ var count = 0;
278
+ selector.find('img, iframe').each(function(){
279
+ $(this).one('load', function() {
280
+ if(++count == total) callback();
281
+ }).each(function() {
282
+ if(this.complete) $(this).load();
283
+ });
284
+ });
285
+ }
286
+
287
+ /**
288
+ * Start the slider
289
+ */
290
+ var start = function(){
291
+ // if infinite loop, prepare additional slides
292
+ if(slider.settings.infiniteLoop && slider.settings.mode != 'fade' && !slider.settings.ticker){
293
+ var slice = slider.settings.mode == 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides;
294
+ var sliceAppend = slider.children.slice(0, slice).clone().addClass('bx-clone');
295
+ var slicePrepend = slider.children.slice(-slice).clone().addClass('bx-clone');
296
+ el.append(sliceAppend).prepend(slicePrepend);
297
+ }
298
+ // remove the loading DOM element
299
+ slider.loader.remove();
300
+ // set the left / top position of "el"
301
+ setSlidePosition();
302
+ // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
303
+ if (slider.settings.mode == 'vertical') slider.settings.adaptiveHeight = true;
304
+ // set the viewport height
305
+ slider.viewport.height(getViewportHeight());
306
+ // make sure everything is positioned just right (same as a window resize)
307
+ el.redrawSlider();
308
+ // onSliderLoad callback
309
+ slider.settings.onSliderLoad(slider.active.index);
310
+ // slider has been fully initialized
311
+ slider.initialized = true;
312
+ // bind the resize call to the window
313
+ if (slider.settings.responsive) $(window).bind('resize', resizeWindow);
314
+ // if auto is true and has more than 1 page, start the show
315
+ if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) initAuto();
316
+ // if ticker is true, start the ticker
317
+ if (slider.settings.ticker) initTicker();
318
+ // if pager is requested, make the appropriate pager link active
319
+ if (slider.settings.pager) updatePagerActive(slider.settings.startSlide);
320
+ // check for any updates to the controls (like hideControlOnEnd updates)
321
+ if (slider.settings.controls) updateDirectionControls();
322
+ // if touchEnabled is true, setup the touch events
323
+ if (slider.settings.touchEnabled && !slider.settings.ticker) initTouch();
324
+ }
325
+
326
+ /**
327
+ * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
328
+ */
329
+ var getViewportHeight = function(){
330
+ var height = 0;
331
+ // first determine which children (slides) should be used in our height calculation
332
+ var children = $();
333
+ // if mode is not "vertical" and adaptiveHeight is false, include all children
334
+ if(slider.settings.mode != 'vertical' && !slider.settings.adaptiveHeight){
335
+ children = slider.children;
336
+ }else{
337
+ // if not carousel, return the single active child
338
+ if(!slider.carousel){
339
+ children = slider.children.eq(slider.active.index);
340
+ // if carousel, return a slice of children
341
+ }else{
342
+ // get the individual slide index
343
+ var currentIndex = slider.settings.moveSlides == 1 ? slider.active.index : slider.active.index * getMoveBy();
344
+ // add the current slide to the children
345
+ children = slider.children.eq(currentIndex);
346
+ // cycle through the remaining "showing" slides
347
+ for (i = 1; i <= slider.settings.maxSlides - 1; i++){
348
+ // if looped back to the start
349
+ if(currentIndex + i >= slider.children.length){
350
+ children = children.add(slider.children.eq(i - 1));
351
+ }else{
352
+ children = children.add(slider.children.eq(currentIndex + i));
353
+ }
354
+ }
355
+ }
356
+ }
357
+ // if "vertical" mode, calculate the sum of the heights of the children
358
+ if(slider.settings.mode == 'vertical'){
359
+ children.each(function(index) {
360
+ height += $(this).outerHeight();
361
+ });
362
+ // add user-supplied margins
363
+ if(slider.settings.slideMargin > 0){
364
+ height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
365
+ }
366
+ // if not "vertical" mode, calculate the max height of the children
367
+ }else{
368
+ height = Math.max.apply(Math, children.map(function(){
369
+ return $(this).outerHeight(false);
370
+ }).get());
371
+ }
372
+
373
+ if(slider.viewport.css('box-sizing') == 'border-box'){
374
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
375
+ parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
376
+ }else if(slider.viewport.css('box-sizing') == 'padding-box'){
377
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
378
+ }
379
+
380
+ return height;
381
+ }
382
+
383
+ /**
384
+ * Returns the calculated width to be used for the outer wrapper / viewport
385
+ */
386
+ var getViewportMaxWidth = function(){
387
+ var width = '100%';
388
+ if(slider.settings.slideWidth > 0){
389
+ if(slider.settings.mode == 'horizontal'){
390
+ width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
391
+ }else{
392
+ width = slider.settings.slideWidth;
393
+ }
394
+ }
395
+ return width;
396
+ }
397
+
398
+ /**
399
+ * Returns the calculated width to be applied to each slide
400
+ */
401
+ var getSlideWidth = function(){
402
+ // start with any user-supplied slide width
403
+ var newElWidth = slider.settings.slideWidth;
404
+ // get the current viewport width
405
+ var wrapWidth = slider.viewport.width();
406
+ // if slide width was not supplied, or is larger than the viewport use the viewport width
407
+ if(slider.settings.slideWidth == 0 ||
408
+ (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
409
+ slider.settings.mode == 'vertical'){
410
+ newElWidth = wrapWidth;
411
+ // if carousel, use the thresholds to determine the width
412
+ }else if(slider.settings.maxSlides > 1 && slider.settings.mode == 'horizontal'){
413
+ if(wrapWidth > slider.maxThreshold){
414
+ // newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.maxSlides - 1))) / slider.settings.maxSlides;
415
+ }else if(wrapWidth < slider.minThreshold){
416
+ newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
417
+ }
418
+ }
419
+ return newElWidth;
420
+ }
421
+
422
+ /**
423
+ * Returns the number of slides currently visible in the viewport (includes partially visible slides)
424
+ */
425
+ var getNumberSlidesShowing = function(){
426
+ var slidesShowing = 1;
427
+ if(slider.settings.mode == 'horizontal' && slider.settings.slideWidth > 0){
428
+ // if viewport is smaller than minThreshold, return minSlides
429
+ if(slider.viewport.width() < slider.minThreshold){
430
+ slidesShowing = slider.settings.minSlides;
431
+ // if viewport is larger than minThreshold, return maxSlides
432
+ }else if(slider.viewport.width() > slider.maxThreshold){
433
+ slidesShowing = slider.settings.maxSlides;
434
+ // if viewport is between min / max thresholds, divide viewport width by first child width
435
+ }else{
436
+ var childWidth = slider.children.first().width() + slider.settings.slideMargin;
437
+ slidesShowing = Math.floor((slider.viewport.width() +
438
+ slider.settings.slideMargin) / childWidth);
439
+ }
440
+ // if "vertical" mode, slides showing will always be minSlides
441
+ }else if(slider.settings.mode == 'vertical'){
442
+ slidesShowing = slider.settings.minSlides;
443
+ }
444
+ return slidesShowing;
445
+ }
446
+
447
+ /**
448
+ * Returns the number of pages (one full viewport of slides is one "page")
449
+ */
450
+ var getPagerQty = function(){
451
+ var pagerQty = 0;
452
+ // if moveSlides is specified by the user
453
+ if(slider.settings.moveSlides > 0){
454
+ if(slider.settings.infiniteLoop){
455
+ pagerQty = Math.ceil(slider.children.length / getMoveBy());
456
+ }else{
457
+ // use a while loop to determine pages
458
+ var breakPoint = 0;
459
+ var counter = 0
460
+ // when breakpoint goes above children length, counter is the number of pages
461
+ while (breakPoint < slider.children.length){
462
+ ++pagerQty;
463
+ breakPoint = counter + getNumberSlidesShowing();
464
+ counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
465
+ }
466
+ }
467
+ // if moveSlides is 0 (auto) divide children length by sides showing, then round up
468
+ }else{
469
+ pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
470
+ }
471
+ return pagerQty;
472
+ }
473
+
474
+ /**
475
+ * Returns the number of indivual slides by which to shift the slider
476
+ */
477
+ var getMoveBy = function(){
478
+ // if moveSlides was set by the user and moveSlides is less than number of slides showing
479
+ if(slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()){
480
+ return slider.settings.moveSlides;
481
+ }
482
+ // if moveSlides is 0 (auto)
483
+ return getNumberSlidesShowing();
484
+ }
485
+
486
+ /**
487
+ * Sets the slider's (el) left or top position
488
+ */
489
+ var setSlidePosition = function(){
490
+ // if last slide, not infinite loop, and number of children is larger than specified maxSlides
491
+ if(slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop){
492
+ if (slider.settings.mode == 'horizontal'){
493
+ // get the last child's position
494
+ var lastChild = slider.children.last();
495
+ var position = lastChild.position();
496
+ // set the left position
497
+ setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
498
+ }else if(slider.settings.mode == 'vertical'){
499
+ // get the last showing index's position
500
+ var lastShowingIndex = slider.children.length - slider.settings.minSlides;
501
+ var position = slider.children.eq(lastShowingIndex).position();
502
+ // set the top position
503
+ setPositionProperty(-position.top, 'reset', 0);
504
+ }
505
+ // if not last slide
506
+ }else{
507
+ // get the position of the first showing slide
508
+ var position = slider.children.eq(slider.active.index * getMoveBy()).position();
509
+ // check for last slide
510
+ if (slider.active.index == getPagerQty() - 1) slider.active.last = true;
511
+ // set the repective position
512
+ if (position != undefined){
513
+ if (slider.settings.mode == 'horizontal') setPositionProperty(-position.left, 'reset', 0);
514
+ else if (slider.settings.mode == 'vertical') setPositionProperty(-position.top, 'reset', 0);
515
+ }
516
+ }
517
+ }
518
+
519
+ /**
520
+ * Sets the el's animating property position (which in turn will sometimes animate el).
521
+ * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
522
+ *
523
+ * @param value (int)
524
+ * - the animating property's value
525
+ *
526
+ * @param type (string) 'slider', 'reset', 'ticker'
527
+ * - the type of instance for which the function is being
528
+ *
529
+ * @param duration (int)
530
+ * - the amount of time (in ms) the transition should occupy
531
+ *
532
+ * @param params (array) optional
533
+ * - an optional parameter containing any variables that need to be passed in
534
+ */
535
+ var setPositionProperty = function(value, type, duration, params){
536
+ // use CSS transform
537
+ if(slider.usingCSS){
538
+ // determine the translate3d value
539
+ var propValue = slider.settings.mode == 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
540
+ // add the CSS transition-duration
541
+ el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
542
+ if(type == 'slide'){
543
+ // set the property value
544
+ el.css(slider.animProp, propValue);
545
+ // bind a callback method - executes when CSS transition completes
546
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
547
+ // unbind the callback
548
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
549
+ updateAfterSlideTransition();
550
+ });
551
+ }else if(type == 'reset'){
552
+ el.css(slider.animProp, propValue);
553
+ }else if(type == 'ticker'){
554
+ // make the transition use 'linear'
555
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
556
+ el.css(slider.animProp, propValue);
557
+ // bind a callback method - executes when CSS transition completes
558
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
559
+ // unbind the callback
560
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
561
+ // reset the position
562
+ setPositionProperty(params['resetValue'], 'reset', 0);
563
+ // start the loop again
564
+ tickerLoop();
565
+ });
566
+ }
567
+ // use JS animate
568
+ }else{
569
+ var animateObj = {};
570
+ animateObj[slider.animProp] = value;
571
+ if(type == 'slide'){
572
+ el.animate(animateObj, duration, slider.settings.easing, function(){
573
+ updateAfterSlideTransition();
574
+ });
575
+ }else if(type == 'reset'){
576
+ el.css(slider.animProp, value)
577
+ }else if(type == 'ticker'){
578
+ el.animate(animateObj, speed, 'linear', function(){
579
+ setPositionProperty(params['resetValue'], 'reset', 0);
580
+ // run the recursive loop after animation
581
+ tickerLoop();
582
+ });
583
+ }
584
+ }
585
+ }
586
+
587
+ /**
588
+ * Populates the pager with proper amount of pages
589
+ */
590
+ var populatePager = function(){
591
+ var pagerHtml = '';
592
+ var pagerQty = getPagerQty();
593
+ // loop through each pager item
594
+ for(var i=0; i < pagerQty; i++){
595
+ var linkContent = '';
596
+ // if a buildPager function is supplied, use it to get pager link value, else use index + 1
597
+ if(slider.settings.buildPager && $.isFunction(slider.settings.buildPager)){
598
+ linkContent = slider.settings.buildPager(i);
599
+ slider.pagerEl.addClass('bx-custom-pager');
600
+ }else{
601
+ linkContent = i + 1;
602
+ slider.pagerEl.addClass('bx-default-pager');
603
+ }
604
+ // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
605
+ // add the markup to the string
606
+ pagerHtml += '<div class="bx-pager-item"><a href="" data-slide-index="' + i + '" class="bx-pager-link">' + linkContent + '</a></div>';
607
+ };
608
+ // populate the pager element with pager links
609
+ slider.pagerEl.html(pagerHtml);
610
+ }
611
+
612
+ /**
613
+ * Appends the pager to the controls element
614
+ */
615
+ var appendPager = function(){
616
+ if(!slider.settings.pagerCustom){
617
+ // create the pager DOM element
618
+ slider.pagerEl = $('<div class="bx-pager" />');
619
+ // if a pager selector was supplied, populate it with the pager
620
+ if(slider.settings.pagerSelector){
621
+ $(slider.settings.pagerSelector).html(slider.pagerEl);
622
+ // if no pager selector was supplied, add it after the wrapper
623
+ }else{
624
+ slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
625
+ }
626
+ // populate the pager
627
+ populatePager();
628
+ }else{
629
+ slider.pagerEl = $(slider.settings.pagerCustom);
630
+ }
631
+ // assign the pager click binding
632
+ slider.pagerEl.on('click', 'a', clickPagerBind);
633
+ }
634
+
635
+ /**
636
+ * Appends prev / next controls to the controls element
637
+ */
638
+ var appendControls = function(){
639
+ slider.controls.next = $('<a class="bx-next" href="">' + slider.settings.nextText + '</a>');
640
+ slider.controls.prev = $('<a class="bx-prev" href="">' + slider.settings.prevText + '</a>');
641
+ // bind click actions to the controls
642
+ slider.controls.next.bind('click', clickNextBind);
643
+ slider.controls.prev.bind('click', clickPrevBind);
644
+ // if nextSlector was supplied, populate it
645
+ if(slider.settings.nextSelector){
646
+ $(slider.settings.nextSelector).append(slider.controls.next);
647
+ }
648
+ // if prevSlector was supplied, populate it
649
+ if(slider.settings.prevSelector){
650
+ $(slider.settings.prevSelector).append(slider.controls.prev);
651
+ }
652
+ // if no custom selectors were supplied
653
+ if(!slider.settings.nextSelector && !slider.settings.prevSelector){
654
+ // add the controls to the DOM
655
+ slider.controls.directionEl = $('<div class="bx-controls-direction" />');
656
+ // add the control elements to the directionEl
657
+ slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
658
+ // slider.viewport.append(slider.controls.directionEl);
659
+ slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
660
+ }
661
+ }
662
+
663
+ /**
664
+ * Appends start / stop auto controls to the controls element
665
+ */
666
+ var appendControlsAuto = function(){
667
+ slider.controls.start = $('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + slider.settings.startText + '</a></div>');
668
+ slider.controls.stop = $('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + slider.settings.stopText + '</a></div>');
669
+ // add the controls to the DOM
670
+ slider.controls.autoEl = $('<div class="bx-controls-auto" />');
671
+ // bind click actions to the controls
672
+ slider.controls.autoEl.on('click', '.bx-start', clickStartBind);
673
+ slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);
674
+ // if autoControlsCombine, insert only the "start" control
675
+ if(slider.settings.autoControlsCombine){
676
+ slider.controls.autoEl.append(slider.controls.start);
677
+ // if autoControlsCombine is false, insert both controls
678
+ }else{
679
+ slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
680
+ }
681
+ // if auto controls selector was supplied, populate it with the controls
682
+ if(slider.settings.autoControlsSelector){
683
+ $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
684
+ // if auto controls selector was not supplied, add it after the wrapper
685
+ }else{
686
+ slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
687
+ }
688
+ // update the auto controls
689
+ updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
690
+ }
691
+
692
+ /**
693
+ * Appends image captions to the DOM
694
+ */
695
+ var appendCaptions = function(){
696
+ // cycle through each child
697
+ slider.children.each(function(index){
698
+ // get the image title attribute
699
+ var title = $(this).find('img:first').attr('title');
700
+ // append the caption
701
+ if (title != undefined && ('' + title).length) {
702
+ $(this).append('<div class="bx-caption"><span>' + title + '</span></div>');
703
+ }
704
+ });
705
+ }
706
+
707
+ /**
708
+ * Click next binding
709
+ *
710
+ * @param e (event)
711
+ * - DOM event object
712
+ */
713
+ var clickNextBind = function(e){
714
+ // if auto show is running, stop it
715
+ if (slider.settings.auto) el.stopAuto();
716
+ el.goToNextSlide();
717
+ e.preventDefault();
718
+ }
719
+
720
+ /**
721
+ * Click prev binding
722
+ *
723
+ * @param e (event)
724
+ * - DOM event object
725
+ */
726
+ var clickPrevBind = function(e){
727
+ // if auto show is running, stop it
728
+ if (slider.settings.auto) el.stopAuto();
729
+ el.goToPrevSlide();
730
+ e.preventDefault();
731
+ }
732
+
733
+ /**
734
+ * Click start binding
735
+ *
736
+ * @param e (event)
737
+ * - DOM event object
738
+ */
739
+ var clickStartBind = function(e){
740
+ el.startAuto();
741
+ e.preventDefault();
742
+ }
743
+
744
+ /**
745
+ * Click stop binding
746
+ *
747
+ * @param e (event)
748
+ * - DOM event object
749
+ */
750
+ var clickStopBind = function(e){
751
+ el.stopAuto();
752
+ e.preventDefault();
753
+ }
754
+
755
+ /**
756
+ * Click pager binding
757
+ *
758
+ * @param e (event)
759
+ * - DOM event object
760
+ */
761
+ var clickPagerBind = function(e){
762
+ // if auto show is running, stop it
763
+ if (slider.settings.auto) el.stopAuto();
764
+ var pagerLink = $(e.currentTarget);
765
+ if(pagerLink.attr('data-slide-index') !== undefined){
766
+ var pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
767
+ // if clicked pager link is not active, continue with the goToSlide call
768
+ if(pagerIndex != slider.active.index) el.goToSlide(pagerIndex);
769
+ e.preventDefault();
770
+ }
771
+ }
772
+
773
+ /**
774
+ * Updates the pager links with an active class
775
+ *
776
+ * @param slideIndex (int)
777
+ * - index of slide to make active
778
+ */
779
+ var updatePagerActive = function(slideIndex){
780
+ // if "short" pager type
781
+ var len = slider.children.length; // nb of children
782
+ if(slider.settings.pagerType == 'short'){
783
+ if(slider.settings.maxSlides > 1) {
784
+ len = Math.ceil(slider.children.length/slider.settings.maxSlides);
785
+ }
786
+ slider.pagerEl.html( (slideIndex + 1) + slider.settings.pagerShortSeparator + len);
787
+ return;
788
+ }
789
+ // remove all pager active classes
790
+ slider.pagerEl.find('a').removeClass('active');
791
+ // apply the active class for all pagers
792
+ slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
793
+ }
794
+
795
+ /**
796
+ * Performs needed actions after a slide transition
797
+ */
798
+ var updateAfterSlideTransition = function(){
799
+ // if infinte loop is true
800
+ if(slider.settings.infiniteLoop){
801
+ var position = '';
802
+ // first slide
803
+ if(slider.active.index == 0){
804
+ // set the new position
805
+ position = slider.children.eq(0).position();
806
+ // carousel, last slide
807
+ }else if(slider.active.index == getPagerQty() - 1 && slider.carousel){
808
+ position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
809
+ // last slide
810
+ }else if(slider.active.index == slider.children.length - 1){
811
+ position = slider.children.eq(slider.children.length - 1).position();
812
+ }
813
+ if(position){
814
+ if (slider.settings.mode == 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
815
+ else if (slider.settings.mode == 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
816
+ }
817
+ }
818
+ // declare that the transition is complete
819
+ slider.working = false;
820
+ // onSlideAfter callback
821
+ slider.settings.onSlideAfter(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
822
+ }
823
+
824
+ /**
825
+ * Updates the auto controls state (either active, or combined switch)
826
+ *
827
+ * @param state (string) "start", "stop"
828
+ * - the new state of the auto show
829
+ */
830
+ var updateAutoControls = function(state){
831
+ // if autoControlsCombine is true, replace the current control with the new state
832
+ if(slider.settings.autoControlsCombine){
833
+ slider.controls.autoEl.html(slider.controls[state]);
834
+ // if autoControlsCombine is false, apply the "active" class to the appropriate control
835
+ }else{
836
+ slider.controls.autoEl.find('a').removeClass('active');
837
+ slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');
838
+ }
839
+ }
840
+
841
+ /**
842
+ * Updates the direction controls (checks if either should be hidden)
843
+ */
844
+ var updateDirectionControls = function(){
845
+ if(getPagerQty() == 1){
846
+ slider.controls.prev.addClass('disabled');
847
+ slider.controls.next.addClass('disabled');
848
+ }else if(!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd){
849
+ // if first slide
850
+ if (slider.active.index == 0){
851
+ slider.controls.prev.addClass('disabled');
852
+ slider.controls.next.removeClass('disabled');
853
+ // if last slide
854
+ }else if(slider.active.index == getPagerQty() - 1){
855
+ slider.controls.next.addClass('disabled');
856
+ slider.controls.prev.removeClass('disabled');
857
+ // if any slide in the middle
858
+ }else{
859
+ slider.controls.prev.removeClass('disabled');
860
+ slider.controls.next.removeClass('disabled');
861
+ }
862
+ }
863
+ }
864
+
865
+ /**
866
+ * Initialzes the auto process
867
+ */
868
+ var initAuto = function(){
869
+ // if autoDelay was supplied, launch the auto show using a setTimeout() call
870
+ if(slider.settings.autoDelay > 0){
871
+ var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
872
+ // if autoDelay was not supplied, start the auto show normally
873
+ }else{
874
+ el.startAuto();
875
+ }
876
+ // if autoHover is requested
877
+ if(slider.settings.autoHover){
878
+ // on el hover
879
+ el.hover(function(){
880
+ // if the auto show is currently playing (has an active interval)
881
+ if(slider.interval){
882
+ // stop the auto show and pass true agument which will prevent control update
883
+ el.stopAuto(true);
884
+ // create a new autoPaused value which will be used by the relative "mouseout" event
885
+ slider.autoPaused = true;
886
+ }
887
+ }, function(){
888
+ // if the autoPaused value was created be the prior "mouseover" event
889
+ if(slider.autoPaused){
890
+ // start the auto show and pass true agument which will prevent control update
891
+ el.startAuto(true);
892
+ // reset the autoPaused value
893
+ slider.autoPaused = null;
894
+ }
895
+ });
896
+ }
897
+ }
898
+
899
+ /**
900
+ * Initialzes the ticker process
901
+ */
902
+ var initTicker = function(){
903
+ var startPosition = 0;
904
+ // if autoDirection is "next", append a clone of the entire slider
905
+ if(slider.settings.autoDirection == 'next'){
906
+ el.append(slider.children.clone().addClass('bx-clone'));
907
+ // if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
908
+ }else{
909
+ el.prepend(slider.children.clone().addClass('bx-clone'));
910
+ var position = slider.children.first().position();
911
+ startPosition = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
912
+ }
913
+ setPositionProperty(startPosition, 'reset', 0);
914
+ // do not allow controls in ticker mode
915
+ slider.settings.pager = false;
916
+ slider.settings.controls = false;
917
+ slider.settings.autoControls = false;
918
+ // if autoHover is requested
919
+ if(slider.settings.tickerHover && !slider.usingCSS){
920
+ // on el hover
921
+ slider.viewport.hover(function(){
922
+ el.stop();
923
+ }, function(){
924
+ // calculate the total width of children (used to calculate the speed ratio)
925
+ var totalDimens = 0;
926
+ slider.children.each(function(index){
927
+ totalDimens += slider.settings.mode == 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
928
+ });
929
+ // calculate the speed ratio (used to determine the new speed to finish the paused animation)
930
+ var ratio = slider.settings.speed / totalDimens;
931
+ // determine which property to use
932
+ var property = slider.settings.mode == 'horizontal' ? 'left' : 'top';
933
+ // calculate the new speed
934
+ var newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
935
+ tickerLoop(newSpeed);
936
+ });
937
+ }
938
+ // start the ticker loop
939
+ tickerLoop();
940
+ }
941
+
942
+ /**
943
+ * Runs a continuous loop, news ticker-style
944
+ */
945
+ var tickerLoop = function(resumeSpeed){
946
+ speed = resumeSpeed ? resumeSpeed : slider.settings.speed;
947
+ var position = {left: 0, top: 0};
948
+ var reset = {left: 0, top: 0};
949
+ // if "next" animate left position to last child, then reset left to 0
950
+ if(slider.settings.autoDirection == 'next'){
951
+ position = el.find('.bx-clone').first().position();
952
+ // if "prev" animate left position to 0, then reset left to first non-clone child
953
+ }else{
954
+ reset = slider.children.first().position();
955
+ }
956
+ var animateProperty = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
957
+ var resetValue = slider.settings.mode == 'horizontal' ? -reset.left : -reset.top;
958
+ var params = {resetValue: resetValue};
959
+ setPositionProperty(animateProperty, 'ticker', speed, params);
960
+ }
961
+
962
+ /**
963
+ * Initializes touch events
964
+ */
965
+ var initTouch = function(){
966
+ // initialize object to contain all touch values
967
+ slider.touch = {
968
+ start: {x: 0, y: 0},
969
+ end: {x: 0, y: 0}
970
+ }
971
+ slider.viewport.bind('touchstart', onTouchStart);
972
+ }
973
+
974
+ /**
975
+ * Event handler for "touchstart"
976
+ *
977
+ * @param e (event)
978
+ * - DOM event object
979
+ */
980
+ var onTouchStart = function(e){
981
+ if(slider.working){
982
+ e.preventDefault();
983
+ }else{
984
+ // record the original position when touch starts
985
+ slider.touch.originalPos = el.position();
986
+ var orig = e.originalEvent;
987
+ // record the starting touch x, y coordinates
988
+ slider.touch.start.x = orig.changedTouches[0].pageX;
989
+ slider.touch.start.y = orig.changedTouches[0].pageY;
990
+ // bind a "touchmove" event to the viewport
991
+ slider.viewport.bind('touchmove', onTouchMove);
992
+ // bind a "touchend" event to the viewport
993
+ slider.viewport.bind('touchend', onTouchEnd);
994
+ }
995
+ }
996
+
997
+ /**
998
+ * Event handler for "touchmove"
999
+ *
1000
+ * @param e (event)
1001
+ * - DOM event object
1002
+ */
1003
+ var onTouchMove = function(e){
1004
+ var orig = e.originalEvent;
1005
+ // if scrolling on y axis, do not prevent default
1006
+ var xMovement = Math.abs(orig.changedTouches[0].pageX - slider.touch.start.x);
1007
+ var yMovement = Math.abs(orig.changedTouches[0].pageY - slider.touch.start.y);
1008
+ // x axis swipe
1009
+ if((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX){
1010
+ e.preventDefault();
1011
+ // y axis swipe
1012
+ }else if((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY){
1013
+ e.preventDefault();
1014
+ }
1015
+ if(slider.settings.mode != 'fade' && slider.settings.oneToOneTouch){
1016
+ var value = 0;
1017
+ // if horizontal, drag along x axis
1018
+ if(slider.settings.mode == 'horizontal'){
1019
+ var change = orig.changedTouches[0].pageX - slider.touch.start.x;
1020
+ value = slider.touch.originalPos.left + change;
1021
+ // if vertical, drag along y axis
1022
+ }else{
1023
+ var change = orig.changedTouches[0].pageY - slider.touch.start.y;
1024
+ value = slider.touch.originalPos.top + change;
1025
+ }
1026
+ setPositionProperty(value, 'reset', 0);
1027
+ }
1028
+ }
1029
+
1030
+ /**
1031
+ * Event handler for "touchend"
1032
+ *
1033
+ * @param e (event)
1034
+ * - DOM event object
1035
+ */
1036
+ var onTouchEnd = function(e){
1037
+ slider.viewport.unbind('touchmove', onTouchMove);
1038
+ var orig = e.originalEvent;
1039
+ var value = 0;
1040
+ // record end x, y positions
1041
+ slider.touch.end.x = orig.changedTouches[0].pageX;
1042
+ slider.touch.end.y = orig.changedTouches[0].pageY;
1043
+ // if fade mode, check if absolute x distance clears the threshold
1044
+ if(slider.settings.mode == 'fade'){
1045
+ var distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
1046
+ if(distance >= slider.settings.swipeThreshold){
1047
+ slider.touch.start.x > slider.touch.end.x ? el.goToNextSlide() : el.goToPrevSlide();
1048
+ el.stopAuto();
1049
+ }
1050
+ // not fade mode
1051
+ }else{
1052
+ var distance = 0;
1053
+ // calculate distance and el's animate property
1054
+ if(slider.settings.mode == 'horizontal'){
1055
+ distance = slider.touch.end.x - slider.touch.start.x;
1056
+ value = slider.touch.originalPos.left;
1057
+ }else{
1058
+ distance = slider.touch.end.y - slider.touch.start.y;
1059
+ value = slider.touch.originalPos.top;
1060
+ }
1061
+ // if not infinite loop and first / last slide, do not attempt a slide transition
1062
+ if(!slider.settings.infiniteLoop && ((slider.active.index == 0 && distance > 0) || (slider.active.last && distance < 0))){
1063
+ setPositionProperty(value, 'reset', 200);
1064
+ }else{
1065
+ // check if distance clears threshold
1066
+ if(Math.abs(distance) >= slider.settings.swipeThreshold){
1067
+ distance < 0 ? el.goToNextSlide() : el.goToPrevSlide();
1068
+ el.stopAuto();
1069
+ }else{
1070
+ // el.animate(property, 200);
1071
+ setPositionProperty(value, 'reset', 200);
1072
+ }
1073
+ }
1074
+ }
1075
+ slider.viewport.unbind('touchend', onTouchEnd);
1076
+ }
1077
+
1078
+ /**
1079
+ * Window resize event callback
1080
+ */
1081
+ var resizeWindow = function(e){
1082
+ // don't do anything if slider isn't initialized.
1083
+ if(!slider.initialized) return;
1084
+ // get the new window dimens (again, thank you IE)
1085
+ var windowWidthNew = $(window).width();
1086
+ var windowHeightNew = $(window).height();
1087
+ // make sure that it is a true window resize
1088
+ // *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
1089
+ // are resized. Can you just die already?*
1090
+ if(windowWidth != windowWidthNew || windowHeight != windowHeightNew){
1091
+ // set the new window dimens
1092
+ windowWidth = windowWidthNew;
1093
+ windowHeight = windowHeightNew;
1094
+ // update all dynamic elements
1095
+ el.redrawSlider();
1096
+ // Call user resize handler
1097
+ slider.settings.onSliderResize.call(el, slider.active.index);
1098
+ }
1099
+ }
1100
+
1101
+ /**
1102
+ * ===================================================================================
1103
+ * = PUBLIC FUNCTIONS
1104
+ * ===================================================================================
1105
+ */
1106
+
1107
+ /**
1108
+ * Performs slide transition to the specified slide
1109
+ *
1110
+ * @param slideIndex (int)
1111
+ * - the destination slide's index (zero-based)
1112
+ *
1113
+ * @param direction (string)
1114
+ * - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
1115
+ */
1116
+ el.goToSlide = function(slideIndex, direction){
1117
+ // if plugin is currently in motion, ignore request
1118
+ if(slider.working || slider.active.index == slideIndex) return;
1119
+ // declare that plugin is in motion
1120
+ slider.working = true;
1121
+ // store the old index
1122
+ slider.oldIndex = slider.active.index;
1123
+ // if slideIndex is less than zero, set active index to last child (this happens during infinite loop)
1124
+ if(slideIndex < 0){
1125
+ slider.active.index = getPagerQty() - 1;
1126
+ // if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
1127
+ }else if(slideIndex >= getPagerQty()){
1128
+ slider.active.index = 0;
1129
+ // set active index to requested slide
1130
+ }else{
1131
+ slider.active.index = slideIndex;
1132
+ }
1133
+ // onSlideBefore, onSlideNext, onSlidePrev callbacks
1134
+ slider.settings.onSlideBefore(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1135
+ if(direction == 'next'){
1136
+ slider.settings.onSlideNext(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1137
+ }else if(direction == 'prev'){
1138
+ slider.settings.onSlidePrev(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1139
+ }
1140
+ // check if last slide
1141
+ slider.active.last = slider.active.index >= getPagerQty() - 1;
1142
+ // update the pager with active class
1143
+ if(slider.settings.pager) updatePagerActive(slider.active.index);
1144
+ // // check for direction control update
1145
+ if(slider.settings.controls) updateDirectionControls();
1146
+ // if slider is set to mode: "fade"
1147
+ if(slider.settings.mode == 'fade'){
1148
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1149
+ if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1150
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1151
+ }
1152
+ // fade out the visible child and reset its z-index value
1153
+ slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
1154
+ // fade in the newly requested slide
1155
+ slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex+1).fadeIn(slider.settings.speed, function(){
1156
+ $(this).css('zIndex', slider.settings.slideZIndex);
1157
+ updateAfterSlideTransition();
1158
+ });
1159
+ // slider mode is not "fade"
1160
+ }else{
1161
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1162
+ if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1163
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1164
+ }
1165
+ var moveBy = 0;
1166
+ var position = {left: 0, top: 0};
1167
+ // if carousel and not infinite loop
1168
+ if(!slider.settings.infiniteLoop && slider.carousel && slider.active.last){
1169
+ if(slider.settings.mode == 'horizontal'){
1170
+ // get the last child position
1171
+ var lastChild = slider.children.eq(slider.children.length - 1);
1172
+ position = lastChild.position();
1173
+ // calculate the position of the last slide
1174
+ moveBy = slider.viewport.width() - lastChild.outerWidth();
1175
+ }else{
1176
+ // get last showing index position
1177
+ var lastShowingIndex = slider.children.length - slider.settings.minSlides;
1178
+ position = slider.children.eq(lastShowingIndex).position();
1179
+ }
1180
+ // horizontal carousel, going previous while on first slide (infiniteLoop mode)
1181
+ }else if(slider.carousel && slider.active.last && direction == 'prev'){
1182
+ // get the last child position
1183
+ var eq = slider.settings.moveSlides == 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
1184
+ var lastChild = el.children('.bx-clone').eq(eq);
1185
+ position = lastChild.position();
1186
+ // if infinite loop and "Next" is clicked on the last slide
1187
+ }else if(direction == 'next' && slider.active.index == 0){
1188
+ // get the last clone position
1189
+ position = el.find('> .bx-clone').eq(slider.settings.maxSlides).position();
1190
+ slider.active.last = false;
1191
+ // normal non-zero requests
1192
+ }else if(slideIndex >= 0){
1193
+ var requestEl = slideIndex * getMoveBy();
1194
+ position = slider.children.eq(requestEl).position();
1195
+ }
1196
+
1197
+ /* If the position doesn't exist
1198
+ * (e.g. if you destroy the slider on a next click),
1199
+ * it doesn't throw an error.
1200
+ */
1201
+ if ("undefined" !== typeof(position)) {
1202
+ var value = slider.settings.mode == 'horizontal' ? -(position.left - moveBy) : -position.top;
1203
+ // plugin values to be animated
1204
+ setPositionProperty(value, 'slide', slider.settings.speed);
1205
+ }
1206
+ }
1207
+ }
1208
+
1209
+ /**
1210
+ * Transitions to the next slide in the show
1211
+ */
1212
+ el.goToNextSlide = function(){
1213
+ // if infiniteLoop is false and last page is showing, disregard call
1214
+ if (!slider.settings.infiniteLoop && slider.active.last) return;
1215
+ var pagerIndex = parseInt(slider.active.index) + 1;
1216
+ el.goToSlide(pagerIndex, 'next');
1217
+ }
1218
+
1219
+ /**
1220
+ * Transitions to the prev slide in the show
1221
+ */
1222
+ el.goToPrevSlide = function(){
1223
+ // if infiniteLoop is false and last page is showing, disregard call
1224
+ if (!slider.settings.infiniteLoop && slider.active.index == 0) return;
1225
+ var pagerIndex = parseInt(slider.active.index) - 1;
1226
+ el.goToSlide(pagerIndex, 'prev');
1227
+ }
1228
+
1229
+ /**
1230
+ * Starts the auto show
1231
+ *
1232
+ * @param preventControlUpdate (boolean)
1233
+ * - if true, auto controls state will not be updated
1234
+ */
1235
+ el.startAuto = function(preventControlUpdate){
1236
+ // if an interval already exists, disregard call
1237
+ if(slider.interval) return;
1238
+ // create an interval
1239
+ slider.interval = setInterval(function(){
1240
+ slider.settings.autoDirection == 'next' ? el.goToNextSlide() : el.goToPrevSlide();
1241
+ }, slider.settings.pause);
1242
+ // if auto controls are displayed and preventControlUpdate is not true
1243
+ if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('stop');
1244
+ }
1245
+
1246
+ /**
1247
+ * Stops the auto show
1248
+ *
1249
+ * @param preventControlUpdate (boolean)
1250
+ * - if true, auto controls state will not be updated
1251
+ */
1252
+ el.stopAuto = function(preventControlUpdate){
1253
+ // if no interval exists, disregard call
1254
+ if(!slider.interval) return;
1255
+ // clear the interval
1256
+ clearInterval(slider.interval);
1257
+ slider.interval = null;
1258
+ // if auto controls are displayed and preventControlUpdate is not true
1259
+ if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('start');
1260
+ }
1261
+
1262
+ /**
1263
+ * Returns current slide index (zero-based)
1264
+ */
1265
+ el.getCurrentSlide = function(){
1266
+ return slider.active.index;
1267
+ }
1268
+
1269
+ /**
1270
+ * Returns current slide element
1271
+ */
1272
+ el.getCurrentSlideElement = function(){
1273
+ return slider.children.eq(slider.active.index);
1274
+ }
1275
+
1276
+ /**
1277
+ * Returns number of slides in show
1278
+ */
1279
+ el.getSlideCount = function(){
1280
+ return slider.children.length;
1281
+ }
1282
+
1283
+ /**
1284
+ * Update all dynamic slider elements
1285
+ */
1286
+ el.redrawSlider = function(){
1287
+ // resize all children in ratio to new screen size
1288
+ slider.children.add(el.find('.bx-clone')).width(getSlideWidth());
1289
+ // adjust the height
1290
+ slider.viewport.css('height', getViewportHeight());
1291
+ // update the slide position
1292
+ if(!slider.settings.ticker) setSlidePosition();
1293
+ // if active.last was true before the screen resize, we want
1294
+ // to keep it last no matter what screen size we end on
1295
+ if (slider.active.last) slider.active.index = getPagerQty() - 1;
1296
+ // if the active index (page) no longer exists due to the resize, simply set the index as last
1297
+ if (slider.active.index >= getPagerQty()) slider.active.last = true;
1298
+ // if a pager is being displayed and a custom pager is not being used, update it
1299
+ if(slider.settings.pager && !slider.settings.pagerCustom){
1300
+ populatePager();
1301
+ updatePagerActive(slider.active.index);
1302
+ }
1303
+ }
1304
+
1305
+ /**
1306
+ * Destroy the current instance of the slider (revert everything back to original state)
1307
+ */
1308
+ el.destroySlider = function(){
1309
+ // don't do anything if slider has already been destroyed
1310
+ if(!slider.initialized) return;
1311
+ slider.initialized = false;
1312
+ $('.bx-clone', this).remove();
1313
+ slider.children.each(function() {
1314
+ $(this).data("origStyle") != undefined ? $(this).attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1315
+ });
1316
+ $(this).data("origStyle") != undefined ? this.attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1317
+ $(this).unwrap().unwrap();
1318
+ if(slider.controls.el) slider.controls.el.remove();
1319
+ if(slider.controls.next) slider.controls.next.remove();
1320
+ if(slider.controls.prev) slider.controls.prev.remove();
1321
+ if(slider.pagerEl && slider.settings.controls) slider.pagerEl.remove();
1322
+ $('.bx-caption', this).remove();
1323
+ if(slider.controls.autoEl) slider.controls.autoEl.remove();
1324
+ clearInterval(slider.interval);
1325
+ if(slider.settings.responsive) $(window).unbind('resize', resizeWindow);
1326
+ }
1327
+
1328
+ /**
1329
+ * Reload the slider (revert all DOM changes, and re-initialize)
1330
+ */
1331
+ el.reloadSlider = function(settings){
1332
+ if (settings != undefined) options = settings;
1333
+ el.destroySlider();
1334
+ init();
1335
+ }
1336
+
1337
+ init();
1338
+
1339
+ // returns the current jQuery object
1340
+ return this;
1341
+ }
1342
+
1343
+ })(jQuery);
skin/frontend/default/default/js/padoo/jquery.cycle.js ADDED
@@ -0,0 +1,1548 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Cycle Plugin (with Transition Definitions)
3
+ * Examples and documentation at: http://jquery.malsup.com/cycle/
4
+ * Copyright (c) 2007-2010 M. Alsup
5
+ * Version: 2.9999.6 (11-SEP-2012)
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://jquery.malsup.com/license.html
8
+ * Requires: jQuery v1.3.2 or later
9
+ */
10
+ ;(function($, undefined) {
11
+ "use strict";
12
+
13
+ var ver = '2.9999.6';
14
+
15
+ // if $.support is not defined (pre jQuery 1.3) add what I need
16
+ if ($.support === undefined) {
17
+ $.support = {
18
+ opacity: !($.browser.msie)
19
+ };
20
+ }
21
+
22
+ function debug(s) {
23
+ if ($.fn.cycle.debug)
24
+ log(s);
25
+ }
26
+ function log() {
27
+ if (window.console && console.log)
28
+ console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
29
+ }
30
+ $.expr[':'].paused = function(el) {
31
+ return el.cyclePause;
32
+ };
33
+
34
+
35
+ // the options arg can be...
36
+ // a number - indicates an immediate transition should occur to the given slide index
37
+ // a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
38
+ // an object - properties to control the slideshow
39
+ //
40
+ // the arg2 arg can be...
41
+ // the name of an fx (only used in conjunction with a numeric value for 'options')
42
+ // the value true (only used in first arg == 'resume') and indicates
43
+ // that the resume should occur immediately (not wait for next timeout)
44
+
45
+ $.fn.cycle = function(options, arg2) {
46
+ var o = { s: this.selector, c: this.context };
47
+
48
+ // in 1.3+ we can fix mistakes with the ready state
49
+ if (this.length === 0 && options != 'stop') {
50
+ if (!$.isReady && o.s) {
51
+ log('DOM not ready, queuing slideshow');
52
+ $(function() {
53
+ $(o.s,o.c).cycle(options,arg2);
54
+ });
55
+ return this;
56
+ }
57
+ // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
58
+ log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
59
+ return this;
60
+ }
61
+
62
+ // iterate the matched nodeset
63
+ return this.each(function() {
64
+ var opts = handleArguments(this, options, arg2);
65
+ if (opts === false)
66
+ return;
67
+
68
+ opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
69
+
70
+ // stop existing slideshow for this container (if there is one)
71
+ if (this.cycleTimeout)
72
+ clearTimeout(this.cycleTimeout);
73
+ this.cycleTimeout = this.cyclePause = 0;
74
+ this.cycleStop = 0; // issue #108
75
+
76
+ var $cont = $(this);
77
+ var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
78
+ var els = $slides.get();
79
+
80
+ if (els.length < 2) {
81
+ log('terminating; too few slides: ' + els.length);
82
+ return;
83
+ }
84
+
85
+ var opts2 = buildOptions($cont, $slides, els, opts, o);
86
+ if (opts2 === false)
87
+ return;
88
+
89
+ var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
90
+
91
+ // if it's an auto slideshow, kick it off
92
+ if (startTime) {
93
+ startTime += (opts2.delay || 0);
94
+ if (startTime < 10)
95
+ startTime = 10;
96
+ debug('first timeout: ' + startTime);
97
+ this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
98
+ }
99
+ });
100
+ };
101
+
102
+ function triggerPause(cont, byHover, onPager) {
103
+ var opts = $(cont).data('cycle.opts');
104
+ var paused = !!cont.cyclePause;
105
+ if (paused && opts.paused)
106
+ opts.paused(cont, opts, byHover, onPager);
107
+ else if (!paused && opts.resumed)
108
+ opts.resumed(cont, opts, byHover, onPager);
109
+ }
110
+
111
+ // process the args that were passed to the plugin fn
112
+ function handleArguments(cont, options, arg2) {
113
+ if (cont.cycleStop === undefined)
114
+ cont.cycleStop = 0;
115
+ if (options === undefined || options === null)
116
+ options = {};
117
+ if (options.constructor == String) {
118
+ switch(options) {
119
+ case 'destroy':
120
+ case 'stop':
121
+ var opts = $(cont).data('cycle.opts');
122
+ if (!opts)
123
+ return false;
124
+ cont.cycleStop++; // callbacks look for change
125
+ if (cont.cycleTimeout)
126
+ clearTimeout(cont.cycleTimeout);
127
+ cont.cycleTimeout = 0;
128
+ if (opts.elements)
129
+ $(opts.elements).stop();
130
+ $(cont).removeData('cycle.opts');
131
+ if (options == 'destroy')
132
+ destroy(cont, opts);
133
+ return false;
134
+ case 'toggle':
135
+ cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
136
+ checkInstantResume(cont.cyclePause, arg2, cont);
137
+ triggerPause(cont);
138
+ return false;
139
+ case 'pause':
140
+ cont.cyclePause = 1;
141
+ triggerPause(cont);
142
+ return false;
143
+ case 'resume':
144
+ cont.cyclePause = 0;
145
+ checkInstantResume(false, arg2, cont);
146
+ triggerPause(cont);
147
+ return false;
148
+ case 'prev':
149
+ case 'next':
150
+ opts = $(cont).data('cycle.opts');
151
+ if (!opts) {
152
+ log('options not found, "prev/next" ignored');
153
+ return false;
154
+ }
155
+ $.fn.cycle[options](opts);
156
+ return false;
157
+ default:
158
+ options = { fx: options };
159
+ }
160
+ return options;
161
+ }
162
+ else if (options.constructor == Number) {
163
+ // go to the requested slide
164
+ var num = options;
165
+ options = $(cont).data('cycle.opts');
166
+ if (!options) {
167
+ log('options not found, can not advance slide');
168
+ return false;
169
+ }
170
+ if (num < 0 || num >= options.elements.length) {
171
+ log('invalid slide index: ' + num);
172
+ return false;
173
+ }
174
+ options.nextSlide = num;
175
+ if (cont.cycleTimeout) {
176
+ clearTimeout(cont.cycleTimeout);
177
+ cont.cycleTimeout = 0;
178
+ }
179
+ if (typeof arg2 == 'string')
180
+ options.oneTimeFx = arg2;
181
+ go(options.elements, options, 1, num >= options.currSlide);
182
+ return false;
183
+ }
184
+ return options;
185
+
186
+ function checkInstantResume(isPaused, arg2, cont) {
187
+ if (!isPaused && arg2 === true) { // resume now!
188
+ var options = $(cont).data('cycle.opts');
189
+ if (!options) {
190
+ log('options not found, can not resume');
191
+ return false;
192
+ }
193
+ if (cont.cycleTimeout) {
194
+ clearTimeout(cont.cycleTimeout);
195
+ cont.cycleTimeout = 0;
196
+ }
197
+ go(options.elements, options, 1, !options.backwards);
198
+ }
199
+ }
200
+ }
201
+
202
+ function removeFilter(el, opts) {
203
+ if (!$.support.opacity && opts.cleartype && el.style.filter) {
204
+ try { el.style.removeAttribute('filter'); }
205
+ catch(smother) {} // handle old opera versions
206
+ }
207
+ }
208
+
209
+ // unbind event handlers
210
+ function destroy(cont, opts) {
211
+ if (opts.next)
212
+ $(opts.next).unbind(opts.prevNextEvent);
213
+ if (opts.prev)
214
+ $(opts.prev).unbind(opts.prevNextEvent);
215
+
216
+ if (opts.pager || opts.pagerAnchorBuilder)
217
+ $.each(opts.pagerAnchors || [], function() {
218
+ this.unbind().remove();
219
+ });
220
+ opts.pagerAnchors = null;
221
+ $(cont).unbind('mouseenter.cycle mouseleave.cycle');
222
+ if (opts.destroy) // callback
223
+ opts.destroy(opts);
224
+ }
225
+
226
+ // one-time initialization
227
+ function buildOptions($cont, $slides, els, options, o) {
228
+ var startingSlideSpecified;
229
+ // support metadata plugin (v1.0 and v2.0)
230
+ var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
231
+ var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
232
+ if (meta)
233
+ opts = $.extend(opts, meta);
234
+ if (opts.autostop)
235
+ opts.countdown = opts.autostopCount || els.length;
236
+
237
+ var cont = $cont[0];
238
+ $cont.data('cycle.opts', opts);
239
+ opts.$cont = $cont;
240
+ opts.stopCount = cont.cycleStop;
241
+ opts.elements = els;
242
+ opts.before = opts.before ? [opts.before] : [];
243
+ opts.after = opts.after ? [opts.after] : [];
244
+
245
+ // push some after callbacks
246
+ if (!$.support.opacity && opts.cleartype)
247
+ opts.after.push(function() { removeFilter(this, opts); });
248
+ if (opts.continuous)
249
+ opts.after.push(function() { go(els,opts,0,!opts.backwards); });
250
+
251
+ saveOriginalOpts(opts);
252
+
253
+ // clearType corrections
254
+ if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
255
+ clearTypeFix($slides);
256
+
257
+ // container requires non-static position so that slides can be position within
258
+ if ($cont.css('position') == 'static')
259
+ $cont.css('position', 'relative');
260
+ if (opts.width)
261
+ $cont.width(opts.width);
262
+ if (opts.height && opts.height != 'auto')
263
+ $cont.height(opts.height);
264
+
265
+ if (opts.startingSlide !== undefined) {
266
+ opts.startingSlide = parseInt(opts.startingSlide,10);
267
+ if (opts.startingSlide >= els.length || opts.startSlide < 0)
268
+ opts.startingSlide = 0; // catch bogus input
269
+ else
270
+ startingSlideSpecified = true;
271
+ }
272
+ else if (opts.backwards)
273
+ opts.startingSlide = els.length - 1;
274
+ else
275
+ opts.startingSlide = 0;
276
+
277
+ // if random, mix up the slide array
278
+ if (opts.random) {
279
+ opts.randomMap = [];
280
+ for (var i = 0; i < els.length; i++)
281
+ opts.randomMap.push(i);
282
+ opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
283
+ if (startingSlideSpecified) {
284
+ // try to find the specified starting slide and if found set start slide index in the map accordingly
285
+ for ( var cnt = 0; cnt < els.length; cnt++ ) {
286
+ if ( opts.startingSlide == opts.randomMap[cnt] ) {
287
+ opts.randomIndex = cnt;
288
+ }
289
+ }
290
+ }
291
+ else {
292
+ opts.randomIndex = 1;
293
+ opts.startingSlide = opts.randomMap[1];
294
+ }
295
+ }
296
+ else if (opts.startingSlide >= els.length)
297
+ opts.startingSlide = 0; // catch bogus input
298
+ opts.currSlide = opts.startingSlide || 0;
299
+ var first = opts.startingSlide;
300
+
301
+ // set position and zIndex on all the slides
302
+ $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
303
+ var z;
304
+ if (opts.backwards)
305
+ z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
306
+ else
307
+ z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
308
+ $(this).css('z-index', z);
309
+ });
310
+
311
+ // make sure first slide is visible
312
+ $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
313
+ removeFilter(els[first], opts);
314
+
315
+ // stretch slides
316
+ if (opts.fit) {
317
+ if (!opts.aspect) {
318
+ if (opts.width)
319
+ $slides.width(opts.width);
320
+ if (opts.height && opts.height != 'auto')
321
+ $slides.height(opts.height);
322
+ } else {
323
+ $slides.each(function(){
324
+ var $slide = $(this);
325
+ var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
326
+ if( opts.width && $slide.width() != opts.width ) {
327
+ $slide.width( opts.width );
328
+ $slide.height( opts.width / ratio );
329
+ }
330
+
331
+ if( opts.height && $slide.height() < opts.height ) {
332
+ $slide.height( opts.height );
333
+ $slide.width( opts.height * ratio );
334
+ }
335
+ });
336
+ }
337
+ }
338
+
339
+ if (opts.center && ((!opts.fit) || opts.aspect)) {
340
+ $slides.each(function(){
341
+ var $slide = $(this);
342
+ $slide.css({
343
+ "margin-left": opts.width ?
344
+ ((opts.width - $slide.width()) / 2) + "px" :
345
+ 0,
346
+ "margin-top": opts.height ?
347
+ ((opts.height - $slide.height()) / 2) + "px" :
348
+ 0
349
+ });
350
+ });
351
+ }
352
+
353
+ if (opts.center && !opts.fit && !opts.slideResize) {
354
+ $slides.each(function(){
355
+ var $slide = $(this);
356
+ $slide.css({
357
+ "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
358
+ "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
359
+ });
360
+ });
361
+ }
362
+
363
+ // stretch container
364
+ var reshape = (opts.containerResize || opts.containerResizeHeight) && !$cont.innerHeight();
365
+ if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
366
+ var maxw = 0, maxh = 0;
367
+ for(var j=0; j < els.length; j++) {
368
+ var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
369
+ if (!w) w = e.offsetWidth || e.width || $e.attr('width');
370
+ if (!h) h = e.offsetHeight || e.height || $e.attr('height');
371
+ maxw = w > maxw ? w : maxw;
372
+ maxh = h > maxh ? h : maxh;
373
+ }
374
+ if (opts.containerResize && maxw > 0 && maxh > 0)
375
+ $cont.css({width:maxw+'px',height:maxh+'px'});
376
+ if (opts.containerResizeHeight && maxh > 0)
377
+ $cont.css({height:maxh+'px'});
378
+ }
379
+
380
+ var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
381
+ if (opts.pause)
382
+ $cont.bind('mouseenter.cycle', function(){
383
+ pauseFlag = true;
384
+ this.cyclePause++;
385
+ triggerPause(cont, true);
386
+ }).bind('mouseleave.cycle', function(){
387
+ if (pauseFlag)
388
+ this.cyclePause--;
389
+ triggerPause(cont, true);
390
+ });
391
+
392
+ if (supportMultiTransitions(opts) === false)
393
+ return false;
394
+
395
+ // apparently a lot of people use image slideshows without height/width attributes on the images.
396
+ // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
397
+ var requeue = false;
398
+ options.requeueAttempts = options.requeueAttempts || 0;
399
+ $slides.each(function() {
400
+ // try to get height/width of each slide
401
+ var $el = $(this);
402
+ this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
403
+ this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
404
+
405
+ if ( $el.is('img') ) {
406
+ // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when
407
+ // an image is being downloaded and the markup did not include sizing info (height/width attributes);
408
+ // there seems to be some "default" sizes used in this situation
409
+ var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
410
+ var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
411
+ var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
412
+ var loadingOther = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
413
+ // don't requeue for images that are still loading but have a valid size
414
+ if (loadingIE || loadingFF || loadingOp || loadingOther) {
415
+ if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
416
+ log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
417
+ setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
418
+ requeue = true;
419
+ return false; // break each loop
420
+ }
421
+ else {
422
+ log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
423
+ }
424
+ }
425
+ }
426
+ return true;
427
+ });
428
+
429
+ if (requeue)
430
+ return false;
431
+
432
+ opts.cssBefore = opts.cssBefore || {};
433
+ opts.cssAfter = opts.cssAfter || {};
434
+ opts.cssFirst = opts.cssFirst || {};
435
+ opts.animIn = opts.animIn || {};
436
+ opts.animOut = opts.animOut || {};
437
+
438
+ $slides.not(':eq('+first+')').css(opts.cssBefore);
439
+ $($slides[first]).css(opts.cssFirst);
440
+
441
+ if (opts.timeout) {
442
+ opts.timeout = parseInt(opts.timeout,10);
443
+ // ensure that timeout and speed settings are sane
444
+ if (opts.speed.constructor == String)
445
+ opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
446
+ if (!opts.sync)
447
+ opts.speed = opts.speed / 2;
448
+
449
+ var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
450
+ while((opts.timeout - opts.speed) < buffer) // sanitize timeout
451
+ opts.timeout += opts.speed;
452
+ }
453
+ if (opts.easing)
454
+ opts.easeIn = opts.easeOut = opts.easing;
455
+ if (!opts.speedIn)
456
+ opts.speedIn = opts.speed;
457
+ if (!opts.speedOut)
458
+ opts.speedOut = opts.speed;
459
+
460
+ opts.slideCount = els.length;
461
+ opts.currSlide = opts.lastSlide = first;
462
+ if (opts.random) {
463
+ if (++opts.randomIndex == els.length)
464
+ opts.randomIndex = 0;
465
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
466
+ }
467
+ else if (opts.backwards)
468
+ opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
469
+ else
470
+ opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
471
+
472
+ // run transition init fn
473
+ if (!opts.multiFx) {
474
+ var init = $.fn.cycle.transitions[opts.fx];
475
+ if ($.isFunction(init))
476
+ init($cont, $slides, opts);
477
+ else if (opts.fx != 'custom' && !opts.multiFx) {
478
+ log('unknown transition: ' + opts.fx,'; slideshow terminating');
479
+ return false;
480
+ }
481
+ }
482
+
483
+ // fire artificial events
484
+ var e0 = $slides[first];
485
+ if (!opts.skipInitializationCallbacks) {
486
+ if (opts.before.length)
487
+ opts.before[0].apply(e0, [e0, e0, opts, true]);
488
+ if (opts.after.length)
489
+ opts.after[0].apply(e0, [e0, e0, opts, true]);
490
+ }
491
+ if (opts.next)
492
+ $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
493
+ if (opts.prev)
494
+ $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
495
+ if (opts.pager || opts.pagerAnchorBuilder)
496
+ buildPager(els,opts);
497
+
498
+ exposeAddSlide(opts, els);
499
+
500
+ return opts;
501
+ }
502
+
503
+ // save off original opts so we can restore after clearing state
504
+ function saveOriginalOpts(opts) {
505
+ opts.original = { before: [], after: [] };
506
+ opts.original.cssBefore = $.extend({}, opts.cssBefore);
507
+ opts.original.cssAfter = $.extend({}, opts.cssAfter);
508
+ opts.original.animIn = $.extend({}, opts.animIn);
509
+ opts.original.animOut = $.extend({}, opts.animOut);
510
+ $.each(opts.before, function() { opts.original.before.push(this); });
511
+ $.each(opts.after, function() { opts.original.after.push(this); });
512
+ }
513
+
514
+ function supportMultiTransitions(opts) {
515
+ var i, tx, txs = $.fn.cycle.transitions;
516
+ // look for multiple effects
517
+ if (opts.fx.indexOf(',') > 0) {
518
+ opts.multiFx = true;
519
+ opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
520
+ // discard any bogus effect names
521
+ for (i=0; i < opts.fxs.length; i++) {
522
+ var fx = opts.fxs[i];
523
+ tx = txs[fx];
524
+ if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
525
+ log('discarding unknown transition: ',fx);
526
+ opts.fxs.splice(i,1);
527
+ i--;
528
+ }
529
+ }
530
+ // if we have an empty list then we threw everything away!
531
+ if (!opts.fxs.length) {
532
+ log('No valid transitions named; slideshow terminating.');
533
+ return false;
534
+ }
535
+ }
536
+ else if (opts.fx == 'all') { // auto-gen the list of transitions
537
+ opts.multiFx = true;
538
+ opts.fxs = [];
539
+ for (var p in txs) {
540
+ if (txs.hasOwnProperty(p)) {
541
+ tx = txs[p];
542
+ if (txs.hasOwnProperty(p) && $.isFunction(tx))
543
+ opts.fxs.push(p);
544
+ }
545
+ }
546
+ }
547
+ if (opts.multiFx && opts.randomizeEffects) {
548
+ // munge the fxs array to make effect selection random
549
+ var r1 = Math.floor(Math.random() * 20) + 30;
550
+ for (i = 0; i < r1; i++) {
551
+ var r2 = Math.floor(Math.random() * opts.fxs.length);
552
+ opts.fxs.push(opts.fxs.splice(r2,1)[0]);
553
+ }
554
+ debug('randomized fx sequence: ',opts.fxs);
555
+ }
556
+ return true;
557
+ }
558
+
559
+ // provide a mechanism for adding slides after the slideshow has started
560
+ function exposeAddSlide(opts, els) {
561
+ opts.addSlide = function(newSlide, prepend) {
562
+ var $s = $(newSlide), s = $s[0];
563
+ if (!opts.autostopCount)
564
+ opts.countdown++;
565
+ els[prepend?'unshift':'push'](s);
566
+ if (opts.els)
567
+ opts.els[prepend?'unshift':'push'](s); // shuffle needs this
568
+ opts.slideCount = els.length;
569
+
570
+ // add the slide to the random map and resort
571
+ if (opts.random) {
572
+ opts.randomMap.push(opts.slideCount-1);
573
+ opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
574
+ }
575
+
576
+ $s.css('position','absolute');
577
+ $s[prepend?'prependTo':'appendTo'](opts.$cont);
578
+
579
+ if (prepend) {
580
+ opts.currSlide++;
581
+ opts.nextSlide++;
582
+ }
583
+
584
+ if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
585
+ clearTypeFix($s);
586
+
587
+ if (opts.fit && opts.width)
588
+ $s.width(opts.width);
589
+ if (opts.fit && opts.height && opts.height != 'auto')
590
+ $s.height(opts.height);
591
+ s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
592
+ s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
593
+
594
+ $s.css(opts.cssBefore);
595
+
596
+ if (opts.pager || opts.pagerAnchorBuilder)
597
+ $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
598
+
599
+ if ($.isFunction(opts.onAddSlide))
600
+ opts.onAddSlide($s);
601
+ else
602
+ $s.hide(); // default behavior
603
+ };
604
+ }
605
+
606
+ // reset internal state; we do this on every pass in order to support multiple effects
607
+ $.fn.cycle.resetState = function(opts, fx) {
608
+ fx = fx || opts.fx;
609
+ opts.before = []; opts.after = [];
610
+ opts.cssBefore = $.extend({}, opts.original.cssBefore);
611
+ opts.cssAfter = $.extend({}, opts.original.cssAfter);
612
+ opts.animIn = $.extend({}, opts.original.animIn);
613
+ opts.animOut = $.extend({}, opts.original.animOut);
614
+ opts.fxFn = null;
615
+ $.each(opts.original.before, function() { opts.before.push(this); });
616
+ $.each(opts.original.after, function() { opts.after.push(this); });
617
+
618
+ // re-init
619
+ var init = $.fn.cycle.transitions[fx];
620
+ if ($.isFunction(init))
621
+ init(opts.$cont, $(opts.elements), opts);
622
+ };
623
+
624
+ // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
625
+ function go(els, opts, manual, fwd) {
626
+ var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
627
+
628
+ // opts.busy is true if we're in the middle of an animation
629
+ if (manual && opts.busy && opts.manualTrump) {
630
+ // let manual transitions requests trump active ones
631
+ debug('manualTrump in go(), stopping active transition');
632
+ $(els).stop(true,true);
633
+ opts.busy = 0;
634
+ clearTimeout(p.cycleTimeout);
635
+ }
636
+
637
+ // don't begin another timeout-based transition if there is one active
638
+ if (opts.busy) {
639
+ debug('transition active, ignoring new tx request');
640
+ return;
641
+ }
642
+
643
+
644
+ // stop cycling if we have an outstanding stop request
645
+ if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
646
+ return;
647
+
648
+ // check to see if we should stop cycling based on autostop options
649
+ if (!manual && !p.cyclePause && !opts.bounce &&
650
+ ((opts.autostop && (--opts.countdown <= 0)) ||
651
+ (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
652
+ if (opts.end)
653
+ opts.end(opts);
654
+ return;
655
+ }
656
+
657
+ // if slideshow is paused, only transition on a manual trigger
658
+ var changed = false;
659
+ if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
660
+ changed = true;
661
+ var fx = opts.fx;
662
+ // keep trying to get the slide size if we don't have it yet
663
+ curr.cycleH = curr.cycleH || $(curr).height();
664
+ curr.cycleW = curr.cycleW || $(curr).width();
665
+ next.cycleH = next.cycleH || $(next).height();
666
+ next.cycleW = next.cycleW || $(next).width();
667
+
668
+ // support multiple transition types
669
+ if (opts.multiFx) {
670
+ if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
671
+ opts.lastFx = 0;
672
+ else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
673
+ opts.lastFx = opts.fxs.length - 1;
674
+ fx = opts.fxs[opts.lastFx];
675
+ }
676
+
677
+ // one-time fx overrides apply to: $('div').cycle(3,'zoom');
678
+ if (opts.oneTimeFx) {
679
+ fx = opts.oneTimeFx;
680
+ opts.oneTimeFx = null;
681
+ }
682
+
683
+ $.fn.cycle.resetState(opts, fx);
684
+
685
+ // run the before callbacks
686
+ if (opts.before.length)
687
+ $.each(opts.before, function(i,o) {
688
+ if (p.cycleStop != opts.stopCount) return;
689
+ o.apply(next, [curr, next, opts, fwd]);
690
+ });
691
+
692
+ // stage the after callacks
693
+ var after = function() {
694
+ opts.busy = 0;
695
+ $.each(opts.after, function(i,o) {
696
+ if (p.cycleStop != opts.stopCount) return;
697
+ o.apply(next, [curr, next, opts, fwd]);
698
+ });
699
+ if (!p.cycleStop) {
700
+ // queue next transition
701
+ queueNext();
702
+ }
703
+ };
704
+
705
+ debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
706
+
707
+ // get ready to perform the transition
708
+ opts.busy = 1;
709
+ if (opts.fxFn) // fx function provided?
710
+ opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
711
+ else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
712
+ $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
713
+ else
714
+ $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
715
+ }
716
+ else {
717
+ queueNext();
718
+ }
719
+
720
+ if (changed || opts.nextSlide == opts.currSlide) {
721
+ // calculate the next slide
722
+ var roll;
723
+ opts.lastSlide = opts.currSlide;
724
+ if (opts.random) {
725
+ opts.currSlide = opts.nextSlide;
726
+ if (++opts.randomIndex == els.length) {
727
+ opts.randomIndex = 0;
728
+ opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
729
+ }
730
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
731
+ if (opts.nextSlide == opts.currSlide)
732
+ opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
733
+ }
734
+ else if (opts.backwards) {
735
+ roll = (opts.nextSlide - 1) < 0;
736
+ if (roll && opts.bounce) {
737
+ opts.backwards = !opts.backwards;
738
+ opts.nextSlide = 1;
739
+ opts.currSlide = 0;
740
+ }
741
+ else {
742
+ opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
743
+ opts.currSlide = roll ? 0 : opts.nextSlide+1;
744
+ }
745
+ }
746
+ else { // sequence
747
+ roll = (opts.nextSlide + 1) == els.length;
748
+ if (roll && opts.bounce) {
749
+ opts.backwards = !opts.backwards;
750
+ opts.nextSlide = els.length-2;
751
+ opts.currSlide = els.length-1;
752
+ }
753
+ else {
754
+ opts.nextSlide = roll ? 0 : opts.nextSlide+1;
755
+ opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
756
+ }
757
+ }
758
+ }
759
+ if (changed && opts.pager)
760
+ opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
761
+
762
+ function queueNext() {
763
+ // stage the next transition
764
+ var ms = 0, timeout = opts.timeout;
765
+ if (opts.timeout && !opts.continuous) {
766
+ ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
767
+ if (opts.fx == 'shuffle')
768
+ ms -= opts.speedOut;
769
+ }
770
+ else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
771
+ ms = 10;
772
+ if (ms > 0)
773
+ p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
774
+ }
775
+ }
776
+
777
+ // invoked after transition
778
+ $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
779
+ $(pager).each(function() {
780
+ $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
781
+ });
782
+ };
783
+
784
+ // calculate timeout value for current transition
785
+ function getTimeout(curr, next, opts, fwd) {
786
+ if (opts.timeoutFn) {
787
+ // call user provided calc fn
788
+ var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
789
+ while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
790
+ t += opts.speed;
791
+ debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
792
+ if (t !== false)
793
+ return t;
794
+ }
795
+ return opts.timeout;
796
+ }
797
+
798
+ // expose next/prev function, caller must pass in state
799
+ $.fn.cycle.next = function(opts) { advance(opts,1); };
800
+ $.fn.cycle.prev = function(opts) { advance(opts,0);};
801
+
802
+ // advance slide forward or back
803
+ function advance(opts, moveForward) {
804
+ var val = moveForward ? 1 : -1;
805
+ var els = opts.elements;
806
+ var p = opts.$cont[0], timeout = p.cycleTimeout;
807
+ if (timeout) {
808
+ clearTimeout(timeout);
809
+ p.cycleTimeout = 0;
810
+ }
811
+ if (opts.random && val < 0) {
812
+ // move back to the previously display slide
813
+ opts.randomIndex--;
814
+ if (--opts.randomIndex == -2)
815
+ opts.randomIndex = els.length-2;
816
+ else if (opts.randomIndex == -1)
817
+ opts.randomIndex = els.length-1;
818
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
819
+ }
820
+ else if (opts.random) {
821
+ opts.nextSlide = opts.randomMap[opts.randomIndex];
822
+ }
823
+ else {
824
+ opts.nextSlide = opts.currSlide + val;
825
+ if (opts.nextSlide < 0) {
826
+ if (opts.nowrap) return false;
827
+ opts.nextSlide = els.length - 1;
828
+ }
829
+ else if (opts.nextSlide >= els.length) {
830
+ if (opts.nowrap) return false;
831
+ opts.nextSlide = 0;
832
+ }
833
+ }
834
+
835
+ var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
836
+ if ($.isFunction(cb))
837
+ cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
838
+ go(els, opts, 1, moveForward);
839
+ return false;
840
+ }
841
+
842
+ function buildPager(els, opts) {
843
+ var $p = $(opts.pager);
844
+ $.each(els, function(i,o) {
845
+ $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
846
+ });
847
+ opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
848
+ }
849
+
850
+ $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
851
+ var a;
852
+ if ($.isFunction(opts.pagerAnchorBuilder)) {
853
+ a = opts.pagerAnchorBuilder(i,el);
854
+ debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
855
+ }
856
+ else
857
+ a = '<a href="#">'+(i+1)+'</a>';
858
+
859
+ if (!a)
860
+ return;
861
+ var $a = $(a);
862
+ // don't reparent if anchor is in the dom
863
+ if ($a.parents('body').length === 0) {
864
+ var arr = [];
865
+ if ($p.length > 1) {
866
+ $p.each(function() {
867
+ var $clone = $a.clone(true);
868
+ $(this).append($clone);
869
+ arr.push($clone[0]);
870
+ });
871
+ $a = $(arr);
872
+ }
873
+ else {
874
+ $a.appendTo($p);
875
+ }
876
+ }
877
+
878
+ opts.pagerAnchors = opts.pagerAnchors || [];
879
+ opts.pagerAnchors.push($a);
880
+
881
+ var pagerFn = function(e) {
882
+ e.preventDefault();
883
+ opts.nextSlide = i;
884
+ var p = opts.$cont[0], timeout = p.cycleTimeout;
885
+ if (timeout) {
886
+ clearTimeout(timeout);
887
+ p.cycleTimeout = 0;
888
+ }
889
+ var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
890
+ if ($.isFunction(cb))
891
+ cb(opts.nextSlide, els[opts.nextSlide]);
892
+ go(els,opts,1,opts.currSlide < i); // trigger the trans
893
+ // return false; // <== allow bubble
894
+ };
895
+
896
+ if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
897
+ $a.hover(pagerFn, function(){/* no-op */} );
898
+ }
899
+ else {
900
+ $a.bind(opts.pagerEvent, pagerFn);
901
+ }
902
+
903
+ if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
904
+ $a.bind('click.cycle', function(){return false;}); // suppress click
905
+
906
+ var cont = opts.$cont[0];
907
+ var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
908
+ if (opts.pauseOnPagerHover) {
909
+ $a.hover(
910
+ function() {
911
+ pauseFlag = true;
912
+ cont.cyclePause++;
913
+ triggerPause(cont,true,true);
914
+ }, function() {
915
+ if (pauseFlag)
916
+ cont.cyclePause--;
917
+ triggerPause(cont,true,true);
918
+ }
919
+ );
920
+ }
921
+ };
922
+
923
+ // helper fn to calculate the number of slides between the current and the next
924
+ $.fn.cycle.hopsFromLast = function(opts, fwd) {
925
+ var hops, l = opts.lastSlide, c = opts.currSlide;
926
+ if (fwd)
927
+ hops = c > l ? c - l : opts.slideCount - l;
928
+ else
929
+ hops = c < l ? l - c : l + opts.slideCount - c;
930
+ return hops;
931
+ };
932
+
933
+ // fix clearType problems in ie6 by setting an explicit bg color
934
+ // (otherwise text slides look horrible during a fade transition)
935
+ function clearTypeFix($slides) {
936
+ debug('applying clearType background-color hack');
937
+ function hex(s) {
938
+ s = parseInt(s,10).toString(16);
939
+ return s.length < 2 ? '0'+s : s;
940
+ }
941
+ function getBg(e) {
942
+ for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
943
+ var v = $.css(e,'background-color');
944
+ if (v && v.indexOf('rgb') >= 0 ) {
945
+ var rgb = v.match(/\d+/g);
946
+ return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
947
+ }
948
+ if (v && v != 'transparent')
949
+ return v;
950
+ }
951
+ return '#ffffff';
952
+ }
953
+ $slides.each(function() { $(this).css('background-color', getBg(this)); });
954
+ }
955
+
956
+ // reset common props before the next transition
957
+ $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
958
+ $(opts.elements).not(curr).hide();
959
+ if (typeof opts.cssBefore.opacity == 'undefined')
960
+ opts.cssBefore.opacity = 1;
961
+ opts.cssBefore.display = 'block';
962
+ if (opts.slideResize && w !== false && next.cycleW > 0)
963
+ opts.cssBefore.width = next.cycleW;
964
+ if (opts.slideResize && h !== false && next.cycleH > 0)
965
+ opts.cssBefore.height = next.cycleH;
966
+ opts.cssAfter = opts.cssAfter || {};
967
+ opts.cssAfter.display = 'none';
968
+ $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
969
+ $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
970
+ };
971
+
972
+ // the actual fn for effecting a transition
973
+ $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
974
+ var $l = $(curr), $n = $(next);
975
+ var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
976
+ $n.css(opts.cssBefore);
977
+ if (speedOverride) {
978
+ if (typeof speedOverride == 'number')
979
+ speedIn = speedOut = speedOverride;
980
+ else
981
+ speedIn = speedOut = 1;
982
+ easeIn = easeOut = null;
983
+ }
984
+ var fn = function() {
985
+ $n.animate(opts.animIn, speedIn, easeIn, function() {
986
+ cb();
987
+ });
988
+ };
989
+ $l.animate(opts.animOut, speedOut, easeOut, function() {
990
+ $l.css(opts.cssAfter);
991
+ if (!opts.sync)
992
+ fn();
993
+ });
994
+ if (opts.sync) fn();
995
+ };
996
+
997
+ // transition definitions - only fade is defined here, transition pack defines the rest
998
+ $.fn.cycle.transitions = {
999
+ fade: function($cont, $slides, opts) {
1000
+ $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
1001
+ opts.before.push(function(curr,next,opts) {
1002
+ $.fn.cycle.commonReset(curr,next,opts);
1003
+ opts.cssBefore.opacity = 0;
1004
+ });
1005
+ opts.animIn = { opacity: 1 };
1006
+ opts.animOut = { opacity: 0 };
1007
+ opts.cssBefore = { top: 0, left: 0 };
1008
+ }
1009
+ };
1010
+
1011
+ $.fn.cycle.ver = function() { return ver; };
1012
+
1013
+ // override these globally if you like (they are all optional)
1014
+ $.fn.cycle.defaults = {
1015
+ activePagerClass: 'activeSlide', // class name used for the active pager link
1016
+ after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
1017
+ allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
1018
+ animIn: null, // properties that define how the slide animates in
1019
+ animOut: null, // properties that define how the slide animates out
1020
+ aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
1021
+ autostop: 0, // true to end slideshow after X transitions (where X == slide count)
1022
+ autostopCount: 0, // number of transitions (optionally used with autostop to define X)
1023
+ backwards: false, // true to start slideshow at last slide and move backwards through the stack
1024
+ before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
1025
+ center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options)
1026
+ cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE)
1027
+ cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
1028
+ containerResize: 1, // resize container to fit largest slide
1029
+ containerResizeHeight: 0, // resize containers height to fit the largest slide but leave the width dynamic
1030
+ continuous: 0, // true to start next transition immediately after current one completes
1031
+ cssAfter: null, // properties that defined the state of the slide after transitioning out
1032
+ cssBefore: null, // properties that define the initial state of the slide before transitioning in
1033
+ delay: 0, // additional delay (in ms) for first transition (hint: can be negative)
1034
+ easeIn: null, // easing for "in" transition
1035
+ easeOut: null, // easing for "out" transition
1036
+ easing: null, // easing method for both in and out transitions
1037
+ end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
1038
+ fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
1039
+ fit: 0, // force slides to fit container
1040
+ fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
1041
+ fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
1042
+ height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
1043
+ manualTrump: true, // causes manual transition to stop an active transition instead of being ignored
1044
+ metaAttr: 'cycle', // data- attribute that holds the option data for the slideshow
1045
+ next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
1046
+ nowrap: 0, // true to prevent slideshow from wrapping
1047
+ onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
1048
+ onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
1049
+ pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container
1050
+ pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement)
1051
+ pagerEvent: 'click.cycle', // name of event which drives the pager navigation
1052
+ pause: 0, // true to enable "pause on hover"
1053
+ pauseOnPagerHover: 0, // true to pause when hovering over pager link
1054
+ prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
1055
+ prevNextEvent: 'click.cycle',// event which drives the manual transition to the previous or next slide
1056
+ random: 0, // true for random, false for sequence (not applicable to shuffle fx)
1057
+ randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random
1058
+ requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
1059
+ requeueTimeout: 250, // ms delay for requeue
1060
+ rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
1061
+ shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 }
1062
+ skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
1063
+ slideExpr: null, // expression for selecting slides (if something other than all children is required)
1064
+ slideResize: 1, // force slide width/height to fixed size before every transition
1065
+ speed: 1000, // speed of the transition (any valid fx speed value)
1066
+ speedIn: null, // speed of the 'in' transition
1067
+ speedOut: null, // speed of the 'out' transition
1068
+ startingSlide: undefined,// zero-based index of the first slide to be displayed
1069
+ sync: 1, // true if in/out transitions should occur simultaneously
1070
+ timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance)
1071
+ timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag)
1072
+ updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
1073
+ width: null // container width (if the 'fit' option is true, the slides will be set to this width as well)
1074
+ };
1075
+
1076
+ })(jQuery);
1077
+
1078
+
1079
+ /*!
1080
+ * jQuery Cycle Plugin Transition Definitions
1081
+ * This script is a plugin for the jQuery Cycle Plugin
1082
+ * Examples and documentation at: http://malsup.com/jquery/cycle/
1083
+ * Copyright (c) 2007-2010 M. Alsup
1084
+ * Version: 2.73
1085
+ * Dual licensed under the MIT and GPL licenses:
1086
+ * http://www.opensource.org/licenses/mit-license.php
1087
+ * http://www.gnu.org/licenses/gpl.html
1088
+ */
1089
+ (function($) {
1090
+ "use strict";
1091
+
1092
+ //
1093
+ // These functions define slide initialization and properties for the named
1094
+ // transitions. To save file size feel free to remove any of these that you
1095
+ // don't need.
1096
+ //
1097
+ $.fn.cycle.transitions.none = function($cont, $slides, opts) {
1098
+ opts.fxFn = function(curr,next,opts,after){
1099
+ $(next).show();
1100
+ $(curr).hide();
1101
+ after();
1102
+ };
1103
+ };
1104
+
1105
+ // not a cross-fade, fadeout only fades out the top slide
1106
+ $.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
1107
+ $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
1108
+ opts.before.push(function(curr,next,opts,w,h,rev) {
1109
+ $(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
1110
+ $(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
1111
+ });
1112
+ opts.animIn.opacity = 1;
1113
+ opts.animOut.opacity = 0;
1114
+ opts.cssBefore.opacity = 1;
1115
+ opts.cssBefore.display = 'block';
1116
+ opts.cssAfter.zIndex = 0;
1117
+ };
1118
+
1119
+ // scrollUp/Down/Left/Right
1120
+ $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
1121
+ $cont.css('overflow','hidden');
1122
+ opts.before.push($.fn.cycle.commonReset);
1123
+ var h = $cont.height();
1124
+ opts.cssBefore.top = h;
1125
+ opts.cssBefore.left = 0;
1126
+ opts.cssFirst.top = 0;
1127
+ opts.animIn.top = 0;
1128
+ opts.animOut.top = -h;
1129
+ };
1130
+ $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
1131
+ $cont.css('overflow','hidden');
1132
+ opts.before.push($.fn.cycle.commonReset);
1133
+ var h = $cont.height();
1134
+ opts.cssFirst.top = 0;
1135
+ opts.cssBefore.top = -h;
1136
+ opts.cssBefore.left = 0;
1137
+ opts.animIn.top = 0;
1138
+ opts.animOut.top = h;
1139
+ };
1140
+ $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
1141
+ $cont.css('overflow','hidden');
1142
+ opts.before.push($.fn.cycle.commonReset);
1143
+ var w = $cont.width();
1144
+ opts.cssFirst.left = 0;
1145
+ opts.cssBefore.left = w;
1146
+ opts.cssBefore.top = 0;
1147
+ opts.animIn.left = 0;
1148
+ opts.animOut.left = 0-w;
1149
+ };
1150
+ $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
1151
+ $cont.css('overflow','hidden');
1152
+ opts.before.push($.fn.cycle.commonReset);
1153
+ var w = $cont.width();
1154
+ opts.cssFirst.left = 0;
1155
+ opts.cssBefore.left = -w;
1156
+ opts.cssBefore.top = 0;
1157
+ opts.animIn.left = 0;
1158
+ opts.animOut.left = w;
1159
+ };
1160
+ $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
1161
+ $cont.css('overflow','hidden').width();
1162
+ opts.before.push(function(curr, next, opts, fwd) {
1163
+ if (opts.rev)
1164
+ fwd = !fwd;
1165
+ $.fn.cycle.commonReset(curr,next,opts);
1166
+ opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
1167
+ opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
1168
+ });
1169
+ opts.cssFirst.left = 0;
1170
+ opts.cssBefore.top = 0;
1171
+ opts.animIn.left = 0;
1172
+ opts.animOut.top = 0;
1173
+ };
1174
+ $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
1175
+ $cont.css('overflow','hidden');
1176
+ opts.before.push(function(curr, next, opts, fwd) {
1177
+ if (opts.rev)
1178
+ fwd = !fwd;
1179
+ $.fn.cycle.commonReset(curr,next,opts);
1180
+ opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
1181
+ opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
1182
+ });
1183
+ opts.cssFirst.top = 0;
1184
+ opts.cssBefore.left = 0;
1185
+ opts.animIn.top = 0;
1186
+ opts.animOut.left = 0;
1187
+ };
1188
+
1189
+ // slideX/slideY
1190
+ $.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
1191
+ opts.before.push(function(curr, next, opts) {
1192
+ $(opts.elements).not(curr).hide();
1193
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1194
+ opts.animIn.width = next.cycleW;
1195
+ });
1196
+ opts.cssBefore.left = 0;
1197
+ opts.cssBefore.top = 0;
1198
+ opts.cssBefore.width = 0;
1199
+ opts.animIn.width = 'show';
1200
+ opts.animOut.width = 0;
1201
+ };
1202
+ $.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
1203
+ opts.before.push(function(curr, next, opts) {
1204
+ $(opts.elements).not(curr).hide();
1205
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1206
+ opts.animIn.height = next.cycleH;
1207
+ });
1208
+ opts.cssBefore.left = 0;
1209
+ opts.cssBefore.top = 0;
1210
+ opts.cssBefore.height = 0;
1211
+ opts.animIn.height = 'show';
1212
+ opts.animOut.height = 0;
1213
+ };
1214
+
1215
+ // shuffle
1216
+ $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
1217
+ var i, w = $cont.css('overflow', 'visible').width();
1218
+ $slides.css({left: 0, top: 0});
1219
+ opts.before.push(function(curr,next,opts) {
1220
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1221
+ });
1222
+ // only adjust speed once!
1223
+ if (!opts.speedAdjusted) {
1224
+ opts.speed = opts.speed / 2; // shuffle has 2 transitions
1225
+ opts.speedAdjusted = true;
1226
+ }
1227
+ opts.random = 0;
1228
+ opts.shuffle = opts.shuffle || {left:-w, top:15};
1229
+ opts.els = [];
1230
+ for (i=0; i < $slides.length; i++)
1231
+ opts.els.push($slides[i]);
1232
+
1233
+ for (i=0; i < opts.currSlide; i++)
1234
+ opts.els.push(opts.els.shift());
1235
+
1236
+ // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
1237
+ opts.fxFn = function(curr, next, opts, cb, fwd) {
1238
+ if (opts.rev)
1239
+ fwd = !fwd;
1240
+ var $el = fwd ? $(curr) : $(next);
1241
+ $(next).css(opts.cssBefore);
1242
+ var count = opts.slideCount;
1243
+ $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
1244
+ var hops = $.fn.cycle.hopsFromLast(opts, fwd);
1245
+ for (var k=0; k < hops; k++) {
1246
+ if (fwd)
1247
+ opts.els.push(opts.els.shift());
1248
+ else
1249
+ opts.els.unshift(opts.els.pop());
1250
+ }
1251
+ if (fwd) {
1252
+ for (var i=0, len=opts.els.length; i < len; i++)
1253
+ $(opts.els[i]).css('z-index', len-i+count);
1254
+ }
1255
+ else {
1256
+ var z = $(curr).css('z-index');
1257
+ $el.css('z-index', parseInt(z,10)+1+count);
1258
+ }
1259
+ $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
1260
+ $(fwd ? this : curr).hide();
1261
+ if (cb) cb();
1262
+ });
1263
+ });
1264
+ };
1265
+ $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
1266
+ };
1267
+
1268
+ // turnUp/Down/Left/Right
1269
+ $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
1270
+ opts.before.push(function(curr, next, opts) {
1271
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1272
+ opts.cssBefore.top = next.cycleH;
1273
+ opts.animIn.height = next.cycleH;
1274
+ opts.animOut.width = next.cycleW;
1275
+ });
1276
+ opts.cssFirst.top = 0;
1277
+ opts.cssBefore.left = 0;
1278
+ opts.cssBefore.height = 0;
1279
+ opts.animIn.top = 0;
1280
+ opts.animOut.height = 0;
1281
+ };
1282
+ $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
1283
+ opts.before.push(function(curr, next, opts) {
1284
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1285
+ opts.animIn.height = next.cycleH;
1286
+ opts.animOut.top = curr.cycleH;
1287
+ });
1288
+ opts.cssFirst.top = 0;
1289
+ opts.cssBefore.left = 0;
1290
+ opts.cssBefore.top = 0;
1291
+ opts.cssBefore.height = 0;
1292
+ opts.animOut.height = 0;
1293
+ };
1294
+ $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
1295
+ opts.before.push(function(curr, next, opts) {
1296
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1297
+ opts.cssBefore.left = next.cycleW;
1298
+ opts.animIn.width = next.cycleW;
1299
+ });
1300
+ opts.cssBefore.top = 0;
1301
+ opts.cssBefore.width = 0;
1302
+ opts.animIn.left = 0;
1303
+ opts.animOut.width = 0;
1304
+ };
1305
+ $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
1306
+ opts.before.push(function(curr, next, opts) {
1307
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1308
+ opts.animIn.width = next.cycleW;
1309
+ opts.animOut.left = curr.cycleW;
1310
+ });
1311
+ $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
1312
+ opts.animIn.left = 0;
1313
+ opts.animOut.width = 0;
1314
+ };
1315
+
1316
+ // zoom
1317
+ $.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
1318
+ opts.before.push(function(curr, next, opts) {
1319
+ $.fn.cycle.commonReset(curr,next,opts,false,false,true);
1320
+ opts.cssBefore.top = next.cycleH/2;
1321
+ opts.cssBefore.left = next.cycleW/2;
1322
+ $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
1323
+ $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
1324
+ });
1325
+ opts.cssFirst.top = 0;
1326
+ opts.cssFirst.left = 0;
1327
+ opts.cssBefore.width = 0;
1328
+ opts.cssBefore.height = 0;
1329
+ };
1330
+
1331
+ // fadeZoom
1332
+ $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
1333
+ opts.before.push(function(curr, next, opts) {
1334
+ $.fn.cycle.commonReset(curr,next,opts,false,false);
1335
+ opts.cssBefore.left = next.cycleW/2;
1336
+ opts.cssBefore.top = next.cycleH/2;
1337
+ $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
1338
+ });
1339
+ opts.cssBefore.width = 0;
1340
+ opts.cssBefore.height = 0;
1341
+ opts.animOut.opacity = 0;
1342
+ };
1343
+
1344
+ // blindX
1345
+ $.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
1346
+ var w = $cont.css('overflow','hidden').width();
1347
+ opts.before.push(function(curr, next, opts) {
1348
+ $.fn.cycle.commonReset(curr,next,opts);
1349
+ opts.animIn.width = next.cycleW;
1350
+ opts.animOut.left = curr.cycleW;
1351
+ });
1352
+ opts.cssBefore.left = w;
1353
+ opts.cssBefore.top = 0;
1354
+ opts.animIn.left = 0;
1355
+ opts.animOut.left = w;
1356
+ };
1357
+ // blindY
1358
+ $.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
1359
+ var h = $cont.css('overflow','hidden').height();
1360
+ opts.before.push(function(curr, next, opts) {
1361
+ $.fn.cycle.commonReset(curr,next,opts);
1362
+ opts.animIn.height = next.cycleH;
1363
+ opts.animOut.top = curr.cycleH;
1364
+ });
1365
+ opts.cssBefore.top = h;
1366
+ opts.cssBefore.left = 0;
1367
+ opts.animIn.top = 0;
1368
+ opts.animOut.top = h;
1369
+ };
1370
+ // blindZ
1371
+ $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
1372
+ var h = $cont.css('overflow','hidden').height();
1373
+ var w = $cont.width();
1374
+ opts.before.push(function(curr, next, opts) {
1375
+ $.fn.cycle.commonReset(curr,next,opts);
1376
+ opts.animIn.height = next.cycleH;
1377
+ opts.animOut.top = curr.cycleH;
1378
+ });
1379
+ opts.cssBefore.top = h;
1380
+ opts.cssBefore.left = w;
1381
+ opts.animIn.top = 0;
1382
+ opts.animIn.left = 0;
1383
+ opts.animOut.top = h;
1384
+ opts.animOut.left = w;
1385
+ };
1386
+
1387
+ // growX - grow horizontally from centered 0 width
1388
+ $.fn.cycle.transitions.growX = function($cont, $slides, opts) {
1389
+ opts.before.push(function(curr, next, opts) {
1390
+ $.fn.cycle.commonReset(curr,next,opts,false,true);
1391
+ opts.cssBefore.left = this.cycleW/2;
1392
+ opts.animIn.left = 0;
1393
+ opts.animIn.width = this.cycleW;
1394
+ opts.animOut.left = 0;
1395
+ });
1396
+ opts.cssBefore.top = 0;
1397
+ opts.cssBefore.width = 0;
1398
+ };
1399
+ // growY - grow vertically from centered 0 height
1400
+ $.fn.cycle.transitions.growY = function($cont, $slides, opts) {
1401
+ opts.before.push(function(curr, next, opts) {
1402
+ $.fn.cycle.commonReset(curr,next,opts,true,false);
1403
+ opts.cssBefore.top = this.cycleH/2;
1404
+ opts.animIn.top = 0;
1405
+ opts.animIn.height = this.cycleH;
1406
+ opts.animOut.top = 0;
1407
+ });
1408
+ opts.cssBefore.height = 0;
1409
+ opts.cssBefore.left = 0;
1410
+ };
1411
+
1412
+ // curtainX - squeeze in both edges horizontally
1413
+ $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
1414
+ opts.before.push(function(curr, next, opts) {
1415
+ $.fn.cycle.commonReset(curr,next,opts,false,true,true);
1416
+ opts.cssBefore.left = next.cycleW/2;
1417
+ opts.animIn.left = 0;
1418
+ opts.animIn.width = this.cycleW;
1419
+ opts.animOut.left = curr.cycleW/2;
1420
+ opts.animOut.width = 0;
1421
+ });
1422
+ opts.cssBefore.top = 0;
1423
+ opts.cssBefore.width = 0;
1424
+ };
1425
+ // curtainY - squeeze in both edges vertically
1426
+ $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
1427
+ opts.before.push(function(curr, next, opts) {
1428
+ $.fn.cycle.commonReset(curr,next,opts,true,false,true);
1429
+ opts.cssBefore.top = next.cycleH/2;
1430
+ opts.animIn.top = 0;
1431
+ opts.animIn.height = next.cycleH;
1432
+ opts.animOut.top = curr.cycleH/2;
1433
+ opts.animOut.height = 0;
1434
+ });
1435
+ opts.cssBefore.height = 0;
1436
+ opts.cssBefore.left = 0;
1437
+ };
1438
+
1439
+ // cover - curr slide covered by next slide
1440
+ $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
1441
+ var d = opts.direction || 'left';
1442
+ var w = $cont.css('overflow','hidden').width();
1443
+ var h = $cont.height();
1444
+ opts.before.push(function(curr, next, opts) {
1445
+ $.fn.cycle.commonReset(curr,next,opts);
1446
+ if (d == 'right')
1447
+ opts.cssBefore.left = -w;
1448
+ else if (d == 'up')
1449
+ opts.cssBefore.top = h;
1450
+ else if (d == 'down')
1451
+ opts.cssBefore.top = -h;
1452
+ else
1453
+ opts.cssBefore.left = w;
1454
+ });
1455
+ opts.animIn.left = 0;
1456
+ opts.animIn.top = 0;
1457
+ opts.cssBefore.top = 0;
1458
+ opts.cssBefore.left = 0;
1459
+ };
1460
+
1461
+ // uncover - curr slide moves off next slide
1462
+ $.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
1463
+ var d = opts.direction || 'left';
1464
+ var w = $cont.css('overflow','hidden').width();
1465
+ var h = $cont.height();
1466
+ opts.before.push(function(curr, next, opts) {
1467
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1468
+ if (d == 'right')
1469
+ opts.animOut.left = w;
1470
+ else if (d == 'up')
1471
+ opts.animOut.top = -h;
1472
+ else if (d == 'down')
1473
+ opts.animOut.top = h;
1474
+ else
1475
+ opts.animOut.left = -w;
1476
+ });
1477
+ opts.animIn.left = 0;
1478
+ opts.animIn.top = 0;
1479
+ opts.cssBefore.top = 0;
1480
+ opts.cssBefore.left = 0;
1481
+ };
1482
+
1483
+ // toss - move top slide and fade away
1484
+ $.fn.cycle.transitions.toss = function($cont, $slides, opts) {
1485
+ var w = $cont.css('overflow','visible').width();
1486
+ var h = $cont.height();
1487
+ opts.before.push(function(curr, next, opts) {
1488
+ $.fn.cycle.commonReset(curr,next,opts,true,true,true);
1489
+ // provide default toss settings if animOut not provided
1490
+ if (!opts.animOut.left && !opts.animOut.top)
1491
+ $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
1492
+ else
1493
+ opts.animOut.opacity = 0;
1494
+ });
1495
+ opts.cssBefore.left = 0;
1496
+ opts.cssBefore.top = 0;
1497
+ opts.animIn.left = 0;
1498
+ };
1499
+
1500
+ // wipe - clip animation
1501
+ $.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
1502
+ var w = $cont.css('overflow','hidden').width();
1503
+ var h = $cont.height();
1504
+ opts.cssBefore = opts.cssBefore || {};
1505
+ var clip;
1506
+ if (opts.clip) {
1507
+ if (/l2r/.test(opts.clip))
1508
+ clip = 'rect(0px 0px '+h+'px 0px)';
1509
+ else if (/r2l/.test(opts.clip))
1510
+ clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
1511
+ else if (/t2b/.test(opts.clip))
1512
+ clip = 'rect(0px '+w+'px 0px 0px)';
1513
+ else if (/b2t/.test(opts.clip))
1514
+ clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
1515
+ else if (/zoom/.test(opts.clip)) {
1516
+ var top = parseInt(h/2,10);
1517
+ var left = parseInt(w/2,10);
1518
+ clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
1519
+ }
1520
+ }
1521
+
1522
+ opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
1523
+
1524
+ var d = opts.cssBefore.clip.match(/(\d+)/g);
1525
+ var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
1526
+
1527
+ opts.before.push(function(curr, next, opts) {
1528
+ if (curr == next) return;
1529
+ var $curr = $(curr), $next = $(next);
1530
+ $.fn.cycle.commonReset(curr,next,opts,true,true,false);
1531
+ opts.cssAfter.display = 'block';
1532
+
1533
+ var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
1534
+ (function f() {
1535
+ var tt = t ? t - parseInt(step * (t/count),10) : 0;
1536
+ var ll = l ? l - parseInt(step * (l/count),10) : 0;
1537
+ var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
1538
+ var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
1539
+ $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
1540
+ (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
1541
+ })();
1542
+ });
1543
+ $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
1544
+ opts.animIn = { left: 0 };
1545
+ opts.animOut = { left: 0 };
1546
+ };
1547
+
1548
+ })(jQuery);