Version Notes
First Release
Download this release
Release Info
Developer | Dataman Computers System(P) Ltd. |
Extension | Dataman_Bannerslider |
Version | 0.1.1 |
Comparing to | |
See all releases |
Version 0.1.1
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider.php +12 -0
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit.php +45 -0
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Form.php +19 -0
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Tab/Form.php +73 -0
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Tabs.php +24 -0
- app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Grid.php +116 -0
- app/code/local/Dataman/Bannerslider/Block/Bannerslider.php +23 -0
- app/code/local/Dataman/Bannerslider/Helper/Data.php +6 -0
- app/code/local/Dataman/Bannerslider/Model/Bannerslider.php +10 -0
- app/code/local/Dataman/Bannerslider/Model/Mysql4/Bannerslider.php +10 -0
- app/code/local/Dataman/Bannerslider/Model/Mysql4/Bannerslider/Collection.php +10 -0
- app/code/local/Dataman/Bannerslider/Model/Status.php +15 -0
- app/code/local/Dataman/Bannerslider/Model/System/Config/Source/Dropdown/Values.php +54 -0
- app/code/local/Dataman/Bannerslider/controllers/Adminhtml/BannersliderController.php +214 -0
- app/code/local/Dataman/Bannerslider/controllers/IndexController.php +52 -0
- app/code/local/Dataman/Bannerslider/data/bannerslider_setup/data-install-0.1.0.php +77 -0
- app/code/local/Dataman/Bannerslider/etc/adminhtml.xml +22 -0
- app/code/local/Dataman/Bannerslider/etc/config.xml +142 -0
- app/code/local/Dataman/Bannerslider/etc/system.xml +68 -0
- app/code/local/Dataman/Bannerslider/sql/bannerslider_setup/mysql4-install-0.1.0.php +23 -0
- app/code/local/Dataman/Bannerslider/sql/bannerslider_setup/mysql4-upgrade-0.1.0-0.1.1.php +10 -0
- app/design/adminhtml/default/default/layout/bannerslider.xml +8 -0
- app/design/frontend/base/default/layout/bannerslider.xml +32 -0
- app/design/frontend/base/default/template/bannerslider/bannerslider.phtml +6 -0
- app/design/frontend/base/default/template/bannerslider/slider1.phtml +262 -0
- app/design/frontend/base/default/template/bannerslider/slider10.phtml +169 -0
- app/design/frontend/base/default/template/bannerslider/slider11.phtml +175 -0
- app/design/frontend/base/default/template/bannerslider/slider2.phtml +238 -0
- app/design/frontend/base/default/template/bannerslider/slider3.phtml +245 -0
- app/design/frontend/base/default/template/bannerslider/slider4.phtml +252 -0
- app/design/frontend/base/default/template/bannerslider/slider5.phtml +243 -0
- app/design/frontend/base/default/template/bannerslider/slider6.phtml +215 -0
- app/design/frontend/base/default/template/bannerslider/slider7.phtml +307 -0
- app/design/frontend/base/default/template/bannerslider/slider8.phtml +180 -0
- app/design/frontend/base/default/template/bannerslider/slider9.phtml +140 -0
- app/etc/modules/Dataman_Bannerslider.xml +17 -0
- js/bannerslider/jquery-1.9.1.min.js +20 -0
- js/bannerslider/jssor.js +2850 -0
- js/bannerslider/jssor.slider.js +4088 -0
- media/bannerslider/images/a17.png +0 -0
- media/bannerslider/images/slider1.jpg +0 -0
- media/bannerslider/images/slider10.jpg +0 -0
- media/bannerslider/images/slider2.jpg +0 -0
- media/bannerslider/images/slider3.jpg +0 -0
- media/bannerslider/images/slider4.jpg +0 -0
- media/bannerslider/images/slider5.jpg +0 -0
- media/bannerslider/images/slider6.jpg +0 -0
- media/bannerslider/images/slider7.jpg +0 -0
- media/bannerslider/images/slider8.jpg +0 -0
- media/bannerslider/images/slider9.jpg +0 -0
- package.xml +27 -0
- skin/frontend/base/default/css/bannerslider/css/default.css +637 -0
- skin/frontend/base/default/css/bannerslider/images/a02.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/a11.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/a13.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/a17.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/a20.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/b03.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/loading.gif +0 -0
- skin/frontend/base/default/css/bannerslider/images/share-icons.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/sidebar.png +0 -0
- skin/frontend/base/default/css/bannerslider/images/t01.png +0 -0
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
$this->_controller = 'adminhtml_bannerslider';
|
7 |
+
$this->_blockGroup = 'bannerslider';
|
8 |
+
$this->_headerText = Mage::helper('bannerslider')->__('Banner Manager');
|
9 |
+
$this->_addButtonLabel = Mage::helper('bannerslider')->__('Add Banner');
|
10 |
+
parent::__construct();
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit.php
ADDED
@@ -0,0 +1,45 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
|
9 |
+
$this->_objectId = 'id';
|
10 |
+
$this->_blockGroup = 'bannerslider';
|
11 |
+
$this->_controller = 'adminhtml_bannerslider';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('bannerslider')->__('Save Item'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('bannerslider')->__('Delete Item'));
|
15 |
+
|
16 |
+
$this->_addButton('saveandcontinue', array(
|
17 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
18 |
+
'onclick' => 'saveAndContinueEdit()',
|
19 |
+
'class' => 'save',
|
20 |
+
), -100);
|
21 |
+
|
22 |
+
$this->_formScripts[] = "
|
23 |
+
function toggleEditor() {
|
24 |
+
if (tinyMCE.getInstanceById('bannerslider_content') == null) {
|
25 |
+
tinyMCE.execCommand('mceAddControl', false, 'bannerslider_content');
|
26 |
+
} else {
|
27 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'bannerslider_content');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function saveAndContinueEdit(){
|
32 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
33 |
+
}
|
34 |
+
";
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getHeaderText()
|
38 |
+
{
|
39 |
+
if( Mage::registry('bannerslider_data') && Mage::registry('bannerslider_data')->getId() ) {
|
40 |
+
return Mage::helper('bannerslider')->__("Edit Banner '%s'", $this->htmlEscape(Mage::registry('bannerslider_data')->getTitle()));
|
41 |
+
} else {
|
42 |
+
return Mage::helper('bannerslider')->__('Add Banner');
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,73 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form();
|
8 |
+
$this->setForm($form);
|
9 |
+
$fieldset = $form->addFieldset('bannerslider_form', array('legend'=>Mage::helper('bannerslider')->__('Item information')));
|
10 |
+
|
11 |
+
$fieldset->addField('title', 'text', array(
|
12 |
+
'label' => Mage::helper('bannerslider')->__('Title'),
|
13 |
+
'class' => 'required-entry',
|
14 |
+
'required' => true,
|
15 |
+
'name' => 'title',
|
16 |
+
));
|
17 |
+
|
18 |
+
$fieldset->addField('filename', 'file', array(
|
19 |
+
'label' => Mage::helper('bannerslider')->__('Banner Image'),
|
20 |
+
'required' => false,
|
21 |
+
'name' => 'filename',
|
22 |
+
));
|
23 |
+
|
24 |
+
$fieldset->addField('status', 'select', array(
|
25 |
+
'label' => Mage::helper('bannerslider')->__('Status'),
|
26 |
+
'name' => 'status',
|
27 |
+
'values' => array(
|
28 |
+
array(
|
29 |
+
'value' => 1,
|
30 |
+
'label' => Mage::helper('bannerslider')->__('Enabled'),
|
31 |
+
),
|
32 |
+
|
33 |
+
array(
|
34 |
+
'value' => 2,
|
35 |
+
'label' => Mage::helper('bannerslider')->__('Disabled'),
|
36 |
+
),
|
37 |
+
),
|
38 |
+
));
|
39 |
+
|
40 |
+
$fieldset->addField('content', 'editor', array(
|
41 |
+
'name' => 'content',
|
42 |
+
'label' => Mage::helper('bannerslider')->__('Alt Text'),
|
43 |
+
'title' => Mage::helper('bannerslider')->__('Alt Text'),
|
44 |
+
'wysiwyg' => false,
|
45 |
+
'required' => false,
|
46 |
+
));
|
47 |
+
|
48 |
+
$fieldset->addField('titlestatus', 'select', array(
|
49 |
+
'label' => Mage::helper('bannerslider')->__('Display title on banner'),
|
50 |
+
'name' => 'titlestatus',
|
51 |
+
'values' => array(
|
52 |
+
array(
|
53 |
+
'value' => 1,
|
54 |
+
'label' => Mage::helper('bannerslider')->__('Enabled'),
|
55 |
+
),
|
56 |
+
|
57 |
+
array(
|
58 |
+
'value' => 2,
|
59 |
+
'label' => Mage::helper('bannerslider')->__('Disabled'),
|
60 |
+
),
|
61 |
+
),
|
62 |
+
));
|
63 |
+
|
64 |
+
if ( Mage::getSingleton('adminhtml/session')->getBannersliderData() )
|
65 |
+
{
|
66 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getBannersliderData());
|
67 |
+
Mage::getSingleton('adminhtml/session')->setBannersliderData(null);
|
68 |
+
} elseif ( Mage::registry('bannerslider_data') ) {
|
69 |
+
$form->setValues(Mage::registry('bannerslider_data')->getData());
|
70 |
+
}
|
71 |
+
return parent::_prepareForm();
|
72 |
+
}
|
73 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Edit/Tabs.php
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('bannerslider_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('bannerslider')->__('Banner Information'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('bannerslider')->__('Banner Information'),
|
18 |
+
'title' => Mage::helper('bannerslider')->__('Banner Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('bannerslider/adminhtml_bannerslider_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Adminhtml/Bannerslider/Grid.php
ADDED
@@ -0,0 +1,116 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Block_Adminhtml_Bannerslider_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('bannersliderGrid');
|
9 |
+
$this->setDefaultSort('bannerslider_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareCollection()
|
15 |
+
{
|
16 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
17 |
+
$this->setCollection($collection);
|
18 |
+
return parent::_prepareCollection();
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _prepareColumns()
|
22 |
+
{
|
23 |
+
$this->addColumn('bannerslider_id', array(
|
24 |
+
'header' => Mage::helper('bannerslider')->__('ID'),
|
25 |
+
'align' =>'right',
|
26 |
+
'width' => '50px',
|
27 |
+
'index' => 'bannerslider_id',
|
28 |
+
));
|
29 |
+
|
30 |
+
$this->addColumn('title', array(
|
31 |
+
'header' => Mage::helper('bannerslider')->__('Title'),
|
32 |
+
'align' =>'left',
|
33 |
+
'index' => 'title',
|
34 |
+
));
|
35 |
+
|
36 |
+
/*
|
37 |
+
$this->addColumn('content', array(
|
38 |
+
'header' => Mage::helper('bannerslider')->__('Item Content'),
|
39 |
+
'width' => '150px',
|
40 |
+
'index' => 'content',
|
41 |
+
));
|
42 |
+
*/
|
43 |
+
|
44 |
+
$this->addColumn('status', array(
|
45 |
+
'header' => Mage::helper('bannerslider')->__('Status'),
|
46 |
+
'align' => 'left',
|
47 |
+
'width' => '80px',
|
48 |
+
'index' => 'status',
|
49 |
+
'type' => 'options',
|
50 |
+
'options' => array(
|
51 |
+
1 => 'Enabled',
|
52 |
+
2 => 'Disabled',
|
53 |
+
),
|
54 |
+
));
|
55 |
+
|
56 |
+
$this->addColumn('action',
|
57 |
+
array(
|
58 |
+
'header' => Mage::helper('bannerslider')->__('Action'),
|
59 |
+
'width' => '100',
|
60 |
+
'type' => 'action',
|
61 |
+
'getter' => 'getId',
|
62 |
+
'actions' => array(
|
63 |
+
array(
|
64 |
+
'caption' => Mage::helper('bannerslider')->__('Edit'),
|
65 |
+
'url' => array('base'=> '*/*/edit'),
|
66 |
+
'field' => 'id'
|
67 |
+
)
|
68 |
+
),
|
69 |
+
'filter' => false,
|
70 |
+
'sortable' => false,
|
71 |
+
'index' => 'stores',
|
72 |
+
'is_system' => true,
|
73 |
+
));
|
74 |
+
|
75 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('bannerslider')->__('CSV'));
|
76 |
+
$this->addExportType('*/*/exportXml', Mage::helper('bannerslider')->__('XML'));
|
77 |
+
|
78 |
+
return parent::_prepareColumns();
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _prepareMassaction()
|
82 |
+
{
|
83 |
+
$this->setMassactionIdField('bannerslider_id');
|
84 |
+
$this->getMassactionBlock()->setFormFieldName('bannerslider');
|
85 |
+
|
86 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
87 |
+
'label' => Mage::helper('bannerslider')->__('Delete'),
|
88 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
89 |
+
'confirm' => Mage::helper('bannerslider')->__('Are you sure?')
|
90 |
+
));
|
91 |
+
|
92 |
+
$statuses = Mage::getSingleton('bannerslider/status')->getOptionArray();
|
93 |
+
|
94 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
95 |
+
$this->getMassactionBlock()->addItem('status', array(
|
96 |
+
'label'=> Mage::helper('bannerslider')->__('Change status'),
|
97 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
98 |
+
'additional' => array(
|
99 |
+
'visibility' => array(
|
100 |
+
'name' => 'status',
|
101 |
+
'type' => 'select',
|
102 |
+
'class' => 'required-entry',
|
103 |
+
'label' => Mage::helper('bannerslider')->__('Status'),
|
104 |
+
'values' => $statuses
|
105 |
+
)
|
106 |
+
)
|
107 |
+
));
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getRowUrl($row)
|
112 |
+
{
|
113 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
app/code/local/Dataman/Bannerslider/Block/Bannerslider.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class Dataman_Bannerslider_Block_Bannerslider extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
public function _prepareLayout()
|
5 |
+
{
|
6 |
+
return parent::_prepareLayout();
|
7 |
+
}
|
8 |
+
|
9 |
+
|
10 |
+
public function getEnable()
|
11 |
+
{
|
12 |
+
return Mage::getStoreConfig('tab1/general/enable');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getBannerslider()
|
16 |
+
{
|
17 |
+
if (!$this->hasData('bannerslider')) {
|
18 |
+
$this->setData('bannerslider', Mage::registry('bannerslider'));
|
19 |
+
}
|
20 |
+
return $this->getData('bannerslider');
|
21 |
+
|
22 |
+
}
|
23 |
+
}
|
app/code/local/Dataman/Bannerslider/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/local/Dataman/Bannerslider/Model/Bannerslider.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Model_Bannerslider extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('bannerslider/bannerslider');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Dataman/Bannerslider/Model/Mysql4/Bannerslider.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Model_Mysql4_Bannerslider extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
// Note that the bannerslider_id refers to the key field in your database table.
|
8 |
+
$this->_init('bannerslider/bannerslider', 'bannerslider_id');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Dataman/Bannerslider/Model/Mysql4/Bannerslider/Collection.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Model_Mysql4_Bannerslider_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('bannerslider/bannerslider');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Dataman/Bannerslider/Model/Status.php
ADDED
@@ -0,0 +1,15 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Model_Status extends Varien_Object
|
4 |
+
{
|
5 |
+
const STATUS_ENABLED = 1;
|
6 |
+
const STATUS_DISABLED = 2;
|
7 |
+
|
8 |
+
static public function getOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
self::STATUS_ENABLED => Mage::helper('bannerslider')->__('Enabled'),
|
12 |
+
self::STATUS_DISABLED => Mage::helper('bannerslider')->__('Disabled')
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Dataman/Bannerslider/Model/System/Config/Source/Dropdown/Values.php
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Model_System_Config_Source_Dropdown_Values
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
array(
|
9 |
+
'value' => 'slider1',
|
10 |
+
'label' => 'Rotational Slider',
|
11 |
+
),
|
12 |
+
array(
|
13 |
+
'value' => 'slider2',
|
14 |
+
'label' => 'Rotational Slider with single thumbnail',
|
15 |
+
),
|
16 |
+
array(
|
17 |
+
'value' => 'slider3',
|
18 |
+
'label' => 'Spinning cuboids to left',
|
19 |
+
),
|
20 |
+
array(
|
21 |
+
'value' => 'slider4',
|
22 |
+
'label' => 'Simple transion with thumbnail',
|
23 |
+
),
|
24 |
+
array(
|
25 |
+
'value' => 'slider5',
|
26 |
+
'label' => 'Slider with Vertical Thumbnail(Two Columns)',
|
27 |
+
),
|
28 |
+
array(
|
29 |
+
'value' => 'slider6',
|
30 |
+
'label' => 'Thubnail within dotted border at bottom',
|
31 |
+
),
|
32 |
+
array(
|
33 |
+
'value' => 'slider7',
|
34 |
+
'label' => 'Slider with Bullet Navigator',
|
35 |
+
),
|
36 |
+
array(
|
37 |
+
'value' => 'slider8',
|
38 |
+
'label' => 'Slider with Vertical Thumbnail at Right',
|
39 |
+
),
|
40 |
+
array(
|
41 |
+
'value' => 'slider9',
|
42 |
+
'label' => 'Slider having partial visibility of nearby banners',
|
43 |
+
),
|
44 |
+
array(
|
45 |
+
'value' => 'slider10',
|
46 |
+
'label' => 'Slider with Tab Navigator',
|
47 |
+
),
|
48 |
+
array(
|
49 |
+
'value' => 'slider11',
|
50 |
+
'label' => 'Slider with Thumbnail Navigator',
|
51 |
+
),
|
52 |
+
);
|
53 |
+
}
|
54 |
+
}
|
app/code/local/Dataman/Bannerslider/controllers/Adminhtml/BannersliderController.php
ADDED
@@ -0,0 +1,214 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dataman_Bannerslider_Adminhtml_BannersliderController extends Mage_Adminhtml_Controller_action
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _initAction() {
|
7 |
+
$this->loadLayout()
|
8 |
+
->_setActiveMenu('bannerslider/items')
|
9 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction() {
|
15 |
+
$this->_initAction()
|
16 |
+
->renderLayout();
|
17 |
+
}
|
18 |
+
|
19 |
+
public function editAction() {
|
20 |
+
$id = $this->getRequest()->getParam('id');
|
21 |
+
$model = Mage::getModel('bannerslider/bannerslider')->load($id);
|
22 |
+
|
23 |
+
if ($model->getId() || $id == 0) {
|
24 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
25 |
+
if (!empty($data)) {
|
26 |
+
$model->setData($data);
|
27 |
+
}
|
28 |
+
|
29 |
+
Mage::register('bannerslider_data', $model);
|
30 |
+
|
31 |
+
$this->loadLayout();
|
32 |
+
$this->_setActiveMenu('bannerslider/items');
|
33 |
+
|
34 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
35 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
36 |
+
|
37 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
38 |
+
|
39 |
+
$this->_addContent($this->getLayout()->createBlock('bannerslider/adminhtml_bannerslider_edit'))
|
40 |
+
->_addLeft($this->getLayout()->createBlock('bannerslider/adminhtml_bannerslider_edit_tabs'));
|
41 |
+
|
42 |
+
$this->renderLayout();
|
43 |
+
} else {
|
44 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('bannerslider')->__('Item does not exist'));
|
45 |
+
$this->_redirect('*/*/');
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
public function newAction() {
|
50 |
+
$this->_forward('edit');
|
51 |
+
}
|
52 |
+
|
53 |
+
public function saveAction() {
|
54 |
+
if ($data = $this->getRequest()->getPost()) {
|
55 |
+
|
56 |
+
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
|
57 |
+
try {
|
58 |
+
/* Starting upload */
|
59 |
+
$uploader = new Varien_File_Uploader('filename');
|
60 |
+
|
61 |
+
// Any extention would work
|
62 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
63 |
+
$uploader->setAllowRenameFiles(false);
|
64 |
+
|
65 |
+
// Set the file upload mode
|
66 |
+
// false -> get the file directly in the specified folder
|
67 |
+
// true -> get the file in the product like folders
|
68 |
+
// (file.jpg will go in something like /media/f/i/file.jpg)
|
69 |
+
$uploader->setFilesDispersion(false);
|
70 |
+
|
71 |
+
// We set media as the upload dir
|
72 |
+
$path = Mage::getBaseDir('media') . DS . ('bannerslider') .DS . ('images') .DS ;
|
73 |
+
$uploader->save($path, $_FILES['filename']['name'] );
|
74 |
+
|
75 |
+
} catch (Exception $e) {
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
//this way the name is saved in DB
|
80 |
+
$data['filename'] = $_FILES['filename']['name'];
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
$model = Mage::getModel('bannerslider/bannerslider');
|
85 |
+
$model->setData($data)
|
86 |
+
->setId($this->getRequest()->getParam('id'));
|
87 |
+
|
88 |
+
try {
|
89 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
90 |
+
$model->setCreatedTime(now())
|
91 |
+
->setUpdateTime(now());
|
92 |
+
} else {
|
93 |
+
$model->setUpdateTime(now());
|
94 |
+
}
|
95 |
+
|
96 |
+
$model->save();
|
97 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bannerslider')->__('Item was successfully saved'));
|
98 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
99 |
+
|
100 |
+
if ($this->getRequest()->getParam('back')) {
|
101 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
$this->_redirect('*/*/');
|
105 |
+
return;
|
106 |
+
} catch (Exception $e) {
|
107 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
108 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
109 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('bannerslider')->__('Unable to find item to save'));
|
114 |
+
$this->_redirect('*/*/');
|
115 |
+
}
|
116 |
+
|
117 |
+
public function deleteAction() {
|
118 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
119 |
+
try {
|
120 |
+
$model = Mage::getModel('bannerslider/bannerslider');
|
121 |
+
|
122 |
+
$model->setId($this->getRequest()->getParam('id'))
|
123 |
+
->delete();
|
124 |
+
|
125 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
126 |
+
$this->_redirect('*/*/');
|
127 |
+
} catch (Exception $e) {
|
128 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
129 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
130 |
+
}
|
131 |
+
}
|
132 |
+
$this->_redirect('*/*/');
|
133 |
+
}
|
134 |
+
|
135 |
+
public function massDeleteAction() {
|
136 |
+
$bannersliderIds = $this->getRequest()->getParam('bannerslider');
|
137 |
+
if(!is_array($bannersliderIds)) {
|
138 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
139 |
+
} else {
|
140 |
+
try {
|
141 |
+
foreach ($bannersliderIds as $bannersliderId) {
|
142 |
+
$bannerslider = Mage::getModel('bannerslider/bannerslider')->load($bannersliderId);
|
143 |
+
$bannerslider->delete();
|
144 |
+
}
|
145 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
146 |
+
Mage::helper('adminhtml')->__(
|
147 |
+
'Total of %d record(s) were successfully deleted', count($bannersliderIds)
|
148 |
+
)
|
149 |
+
);
|
150 |
+
} catch (Exception $e) {
|
151 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
152 |
+
}
|
153 |
+
}
|
154 |
+
$this->_redirect('*/*/index');
|
155 |
+
}
|
156 |
+
|
157 |
+
public function massStatusAction()
|
158 |
+
{
|
159 |
+
$bannersliderIds = $this->getRequest()->getParam('bannerslider');
|
160 |
+
if(!is_array($bannersliderIds)) {
|
161 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
162 |
+
} else {
|
163 |
+
try {
|
164 |
+
foreach ($bannersliderIds as $bannersliderId) {
|
165 |
+
$bannerslider = Mage::getSingleton('bannerslider/bannerslider')
|
166 |
+
->load($bannersliderId)
|
167 |
+
->setStatus($this->getRequest()->getParam('status'))
|
168 |
+
->setIsMassupdate(true)
|
169 |
+
->save();
|
170 |
+
}
|
171 |
+
$this->_getSession()->addSuccess(
|
172 |
+
$this->__('Total of %d record(s) were successfully updated', count($bannersliderIds))
|
173 |
+
);
|
174 |
+
} catch (Exception $e) {
|
175 |
+
$this->_getSession()->addError($e->getMessage());
|
176 |
+
}
|
177 |
+
}
|
178 |
+
$this->_redirect('*/*/index');
|
179 |
+
}
|
180 |
+
|
181 |
+
public function exportCsvAction()
|
182 |
+
{
|
183 |
+
$fileName = 'bannerslider.csv';
|
184 |
+
$content = $this->getLayout()->createBlock('bannerslider/adminhtml_bannerslider_grid')
|
185 |
+
->getCsv();
|
186 |
+
|
187 |
+
$this->_sendUploadResponse($fileName, $content);
|
188 |
+
}
|
189 |
+
|
190 |
+
public function exportXmlAction()
|
191 |
+
{
|
192 |
+
$fileName = 'bannerslider.xml';
|
193 |
+
$content = $this->getLayout()->createBlock('bannerslider/adminhtml_bannerslider_grid')
|
194 |
+
->getXml();
|
195 |
+
|
196 |
+
$this->_sendUploadResponse($fileName, $content);
|
197 |
+
}
|
198 |
+
|
199 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
200 |
+
{
|
201 |
+
$response = $this->getResponse();
|
202 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
203 |
+
$response->setHeader('Pragma', 'public', true);
|
204 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
205 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
206 |
+
$response->setHeader('Last-Modified', date('r'));
|
207 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
208 |
+
$response->setHeader('Content-Length', strlen($content));
|
209 |
+
$response->setHeader('Content-type', $contentType);
|
210 |
+
$response->setBody($content);
|
211 |
+
$response->sendResponse();
|
212 |
+
die;
|
213 |
+
}
|
214 |
+
}
|
app/code/local/Dataman/Bannerslider/controllers/IndexController.php
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class Dataman_Bannerslider_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
if(!Mage::getStoreConfig('tab1/general/enable')){
|
7 |
+
$this->norouteAction();
|
8 |
+
return $this;
|
9 |
+
}
|
10 |
+
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Load an object by id
|
14 |
+
* Request looking like:
|
15 |
+
* http://site.com/bannerslider?id=15
|
16 |
+
* or
|
17 |
+
* http://site.com/bannerslider/id/15
|
18 |
+
*/
|
19 |
+
|
20 |
+
$bannerslider_id = $this->getRequest()->getParam('id');
|
21 |
+
|
22 |
+
if($bannerslider_id != null && $bannerslider_id != '') {
|
23 |
+
$bannerslider = Mage::getModel('bannerslider/bannerslider')->load($bannerslider_id)->getData();
|
24 |
+
} else {
|
25 |
+
$bannerslider = null;
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
/*
|
30 |
+
* If no param we load a the last created item
|
31 |
+
*/
|
32 |
+
|
33 |
+
if($bannerslider == null) {
|
34 |
+
$resource = Mage::getSingleton('core/resource');
|
35 |
+
$read= $resource->getConnection('core_read');
|
36 |
+
$bannersliderTable = $resource->getTableName('bannerslider');
|
37 |
+
|
38 |
+
$select = $read->select()
|
39 |
+
->from($bannersliderTable,array('bannerslider_id','title','filename','status'))
|
40 |
+
->where('status',1)
|
41 |
+
->order('created_time DESC') ;
|
42 |
+
|
43 |
+
$bannerslider = $read->fetchRow($select);
|
44 |
+
}
|
45 |
+
Mage::register('bannerslider', $bannerslider);
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
$this->loadLayout();
|
50 |
+
$this->renderLayout();
|
51 |
+
}
|
52 |
+
}
|
app/code/local/Dataman/Bannerslider/data/bannerslider_setup/data-install-0.1.0.php
ADDED
@@ -0,0 +1,77 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Banner data installation script
|
4 |
+
*
|
5 |
+
* @author Priyanka_Dataman
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @var $installer Mage_Core_Model_Resource_Setup
|
10 |
+
*/
|
11 |
+
$installer = $this;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var $model Dataman_Bannerslider_Model_Bannerslider
|
15 |
+
*/
|
16 |
+
$model = Mage::getModel('bannerslider/bannerslider');
|
17 |
+
|
18 |
+
// Set up data rows
|
19 |
+
$dataRows = array(
|
20 |
+
array(
|
21 |
+
'title' => 'Slider 1',
|
22 |
+
'filename' => 'slider1.jpg',
|
23 |
+
'status' => '1',
|
24 |
+
),
|
25 |
+
|
26 |
+
array(
|
27 |
+
'title' => 'Slider 2',
|
28 |
+
'filename' => 'slider2.jpg',
|
29 |
+
'status' => '1',
|
30 |
+
),
|
31 |
+
|
32 |
+
array(
|
33 |
+
'title' => 'Slider 3',
|
34 |
+
'filename' => 'slider3.jpg',
|
35 |
+
'status' => '1',
|
36 |
+
),
|
37 |
+
array(
|
38 |
+
'title' => 'Slider 4',
|
39 |
+
'filename' => 'slider4.jpg',
|
40 |
+
'status' => '1',
|
41 |
+
),
|
42 |
+
array(
|
43 |
+
'title' => 'Slider 5',
|
44 |
+
'filename' => 'slider5.jpg',
|
45 |
+
'status' => '1',
|
46 |
+
),
|
47 |
+
array(
|
48 |
+
'title' => 'Slider 6',
|
49 |
+
'filename' => 'slider6.jpg',
|
50 |
+
'status' => '1',
|
51 |
+
),
|
52 |
+
array(
|
53 |
+
'title' => 'Slider 7',
|
54 |
+
'filename' => 'slider7.jpg',
|
55 |
+
'status' => '1',
|
56 |
+
),
|
57 |
+
array(
|
58 |
+
'title' => 'Slider 8',
|
59 |
+
'filename' => 'slider8.jpg',
|
60 |
+
'status' => '1',
|
61 |
+
),
|
62 |
+
array(
|
63 |
+
'title' => 'Slider 9',
|
64 |
+
'filename' => 'slider9.jpg',
|
65 |
+
'status' => '1',
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'title' => 'Slider 10',
|
69 |
+
'filename' => 'slider10.jpg',
|
70 |
+
'status' => '1',
|
71 |
+
),
|
72 |
+
);
|
73 |
+
|
74 |
+
// Generate news items
|
75 |
+
foreach ($dataRows as $data) {
|
76 |
+
$model->setData($data)->setOrigData()->save();
|
77 |
+
}
|
app/code/local/Dataman/Bannerslider/etc/adminhtml.xml
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<tab1>
|
12 |
+
<title>Tab #1</title> <!-- Used in resources tree -->
|
13 |
+
</tab1>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
</config>
|
app/code/local/Dataman/Bannerslider/etc/config.xml
ADDED
@@ -0,0 +1,142 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Dataman
|
5 |
+
* @package Dataman_Bannerslider
|
6 |
+
* @author Priyanka_dataman
|
7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
*/
|
9 |
+
-->
|
10 |
+
<config>
|
11 |
+
<modules>
|
12 |
+
<Dataman_Bannerslider>
|
13 |
+
<version>0.1.1</version>
|
14 |
+
</Dataman_Bannerslider>
|
15 |
+
</modules>
|
16 |
+
<frontend>
|
17 |
+
<routers>
|
18 |
+
<bannerslider>
|
19 |
+
<use>standard</use>
|
20 |
+
<args>
|
21 |
+
<module>Dataman_Bannerslider</module>
|
22 |
+
<frontName>bannerslider</frontName>
|
23 |
+
</args>
|
24 |
+
</bannerslider>
|
25 |
+
</routers>
|
26 |
+
<layout>
|
27 |
+
<updates>
|
28 |
+
<bannerslider>
|
29 |
+
<file>bannerslider.xml</file>
|
30 |
+
</bannerslider>
|
31 |
+
</updates>
|
32 |
+
</layout>
|
33 |
+
</frontend>
|
34 |
+
<admin>
|
35 |
+
<routers>
|
36 |
+
<bannerslider>
|
37 |
+
<use>admin</use>
|
38 |
+
<args>
|
39 |
+
<module>Dataman_Bannerslider</module>
|
40 |
+
<frontName>bannerslider</frontName>
|
41 |
+
</args>
|
42 |
+
</bannerslider>
|
43 |
+
</routers>
|
44 |
+
</admin>
|
45 |
+
<adminhtml>
|
46 |
+
<menu>
|
47 |
+
<bannerslider module="bannerslider">
|
48 |
+
<title>Banner Slider</title>
|
49 |
+
<sort_order>71</sort_order>
|
50 |
+
<children>
|
51 |
+
<items module="bannerslider">
|
52 |
+
<title>Manage Banners</title>
|
53 |
+
<sort_order>0</sort_order>
|
54 |
+
<action>bannerslider/adminhtml_bannerslider</action>
|
55 |
+
</items>
|
56 |
+
</children>
|
57 |
+
</bannerslider>
|
58 |
+
</menu>
|
59 |
+
<acl>
|
60 |
+
<resources>
|
61 |
+
<all>
|
62 |
+
<title>Allow Everything</title>
|
63 |
+
</all>
|
64 |
+
<admin>
|
65 |
+
<children>
|
66 |
+
<Dataman_Bannerslider>
|
67 |
+
<title>Bannerslider Module</title>
|
68 |
+
<sort_order>10</sort_order>
|
69 |
+
</Dataman_Bannerslider>
|
70 |
+
</children>
|
71 |
+
</admin>
|
72 |
+
</resources>
|
73 |
+
</acl>
|
74 |
+
<layout>
|
75 |
+
<updates>
|
76 |
+
<bannerslider>
|
77 |
+
<file>bannerslider.xml</file>
|
78 |
+
</bannerslider>
|
79 |
+
</updates>
|
80 |
+
</layout>
|
81 |
+
</adminhtml>
|
82 |
+
<global>
|
83 |
+
<models>
|
84 |
+
<bannerslider>
|
85 |
+
<class>Dataman_Bannerslider_Model</class>
|
86 |
+
<resourceModel>bannerslider_mysql4</resourceModel>
|
87 |
+
</bannerslider>
|
88 |
+
<bannerslider_mysql4>
|
89 |
+
<class>Dataman_Bannerslider_Model_Mysql4</class>
|
90 |
+
<entities>
|
91 |
+
<bannerslider>
|
92 |
+
<table>bannerslider</table>
|
93 |
+
</bannerslider>
|
94 |
+
</entities>
|
95 |
+
</bannerslider_mysql4>
|
96 |
+
</models>
|
97 |
+
<resources>
|
98 |
+
<bannerslider_setup>
|
99 |
+
<setup>
|
100 |
+
<module>Dataman_Bannerslider</module>
|
101 |
+
<class>Mage_Core_Model_Resource_Setup</class>
|
102 |
+
</setup>
|
103 |
+
<connection>
|
104 |
+
<use>core_setup</use>
|
105 |
+
</connection>
|
106 |
+
</bannerslider_setup>
|
107 |
+
<bannerslider_write>
|
108 |
+
<connection>
|
109 |
+
<use>core_write</use>
|
110 |
+
</connection>
|
111 |
+
</bannerslider_write>
|
112 |
+
<bannerslider_read>
|
113 |
+
<connection>
|
114 |
+
<use>core_read</use>
|
115 |
+
</connection>
|
116 |
+
</bannerslider_read>
|
117 |
+
</resources>
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
<blocks>
|
122 |
+
<bannerslider>
|
123 |
+
<class>Dataman_Bannerslider_Block</class>
|
124 |
+
</bannerslider>
|
125 |
+
</blocks>
|
126 |
+
<helpers>
|
127 |
+
<bannerslider>
|
128 |
+
<class>Dataman_Bannerslider_Helper</class>
|
129 |
+
</bannerslider>
|
130 |
+
</helpers>
|
131 |
+
</global>
|
132 |
+
<default>
|
133 |
+
<tab1>
|
134 |
+
<general>
|
135 |
+
<enable>1</enable>
|
136 |
+
<text_field></text_field>
|
137 |
+
<slider_mode>1</slider_mode>
|
138 |
+
<slider_type>slider1</slider_type>
|
139 |
+
</general>
|
140 |
+
</tab1>
|
141 |
+
</default>
|
142 |
+
</config>
|
app/code/local/Dataman/Bannerslider/etc/system.xml
ADDED
@@ -0,0 +1,68 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<myconf translate="label">
|
5 |
+
<label>Dataman_Bannerslider</label>
|
6 |
+
<sort_order>150</sort_order>
|
7 |
+
</myconf>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<tab1 translate="label" module="adminhtml">
|
11 |
+
<label>Settings</label>
|
12 |
+
<tab>myconf</tab>
|
13 |
+
<sort_order>10</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<general translate="label comment">
|
19 |
+
<label>General Configuration</label>
|
20 |
+
<sort_order>50</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<!--comment><![CDATA[This is a <strong>global comment</strong> about my <em>configuration</em>.<br />You can specify <u>custom html</u> tags. <a href="http://www.bubblecode.net/en" target="_blank">Click here for example!</a>]]></comment-->
|
25 |
+
<fields>
|
26 |
+
<enable translate="label comment">
|
27 |
+
<label>Enable</label>
|
28 |
+
<frontend_type>select</frontend_type>
|
29 |
+
<sort_order>1</sort_order>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
</enable>
|
35 |
+
<slider_type translate="label comment">
|
36 |
+
<label>Slider Style</label>
|
37 |
+
<!--comment>Dropdown with global scope.</comment-->
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>bannerslider/system_config_source_dropdown_values</source_model>
|
40 |
+
<sort_order>30</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>0</show_in_website>
|
43 |
+
<show_in_store>0</show_in_store>
|
44 |
+
</slider_type>
|
45 |
+
<text_field translate="label comment">
|
46 |
+
<label>Width</label>
|
47 |
+
<comment>Put the value in px. For example 720. If you want to set auto, put value 0</comment>
|
48 |
+
<frontend_type>text</frontend_type>
|
49 |
+
<sort_order>20</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>1</show_in_store>
|
53 |
+
</text_field>
|
54 |
+
<slider_mode translate="label comment">
|
55 |
+
<label>Display Slider on Home page</label>
|
56 |
+
<frontend_type>select</frontend_type>
|
57 |
+
<sort_order>2</sort_order>
|
58 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>1</show_in_store>
|
62 |
+
</slider_mode>
|
63 |
+
</fields>
|
64 |
+
</general>
|
65 |
+
</groups>
|
66 |
+
</tab1>
|
67 |
+
</sections>
|
68 |
+
</config>
|
app/code/local/Dataman/Bannerslider/sql/bannerslider_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
-- DROP TABLE IF EXISTS {$this->getTable('bannerslider')};
|
10 |
+
CREATE TABLE {$this->getTable('bannerslider')} (
|
11 |
+
`bannerslider_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
+
`title` varchar(255) NOT NULL default '',
|
13 |
+
`filename` varchar(255) NOT NULL default '',
|
14 |
+
`content` text NOT NULL default '',
|
15 |
+
`status` smallint(6) NOT NULL default '0',
|
16 |
+
`created_time` datetime NULL,
|
17 |
+
`update_time` datetime NULL,
|
18 |
+
PRIMARY KEY (`bannerslider_id`)
|
19 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
20 |
+
|
21 |
+
");
|
22 |
+
|
23 |
+
$installer->endSetup();
|
app/code/local/Dataman/Bannerslider/sql/bannerslider_setup/mysql4-upgrade-0.1.0-0.1.1.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$installer->getConnection()->addColumn($this->getTable('bannerslider/bannerslider'), 'titlestatus', array(
|
5 |
+
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
6 |
+
'length' => 1,
|
7 |
+
'nullable' => false,
|
8 |
+
'default' => 1,
|
9 |
+
'comment' => 'Some comment here'
|
10 |
+
));
|
app/design/adminhtml/default/default/layout/bannerslider.xml
ADDED
@@ -0,0 +1,8 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<bannerslider_adminhtml_bannerslider_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="bannerslider/adminhtml_bannerslider" name="bannerslider" />
|
6 |
+
</reference>
|
7 |
+
</bannerslider_adminhtml_bannerslider_index>
|
8 |
+
</layout>
|
app/design/frontend/base/default/layout/bannerslider.xml
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addCss"><stylesheet>css/bannerslider/css/default.css</stylesheet></action>
|
6 |
+
<action method="addJs"><script>bannerslider/jquery-1.9.1.min.js</script></action>
|
7 |
+
<action method="addJs"><script>bannerslider/jssor.js</script></action>
|
8 |
+
<action method="addJs"><script>bannerslider/jssor.slider.js</script></action>
|
9 |
+
</reference>
|
10 |
+
</default>
|
11 |
+
<bannerslider_index_index>
|
12 |
+
<reference name="root">
|
13 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
14 |
+
</reference>
|
15 |
+
<reference name="content">
|
16 |
+
<block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/bannerslider.phtml" />
|
17 |
+
</reference>
|
18 |
+
</bannerslider_index_index>
|
19 |
+
|
20 |
+
|
21 |
+
<!-- homepage -->
|
22 |
+
<cms_index_index>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="bannerslider/bannerslider" name="cms.page.content.top" before="-">
|
25 |
+
<action method="setTemplate" ifconfig="tab1/general/slider_mode">
|
26 |
+
<template>bannerslider/bannerslider.phtml</template>
|
27 |
+
</action>
|
28 |
+
</block>
|
29 |
+
</reference>
|
30 |
+
</cms_index_index>
|
31 |
+
<!--End homepage -->
|
32 |
+
</layout>
|
app/design/frontend/base/default/template/bannerslider/bannerslider.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$slider_type=Mage::getStoreConfig('tab1/general/slider_type');
|
3 |
+
echo $this->getLayout()->createBlock('bannerslider/bannerslider')->setTemplate('bannerslider/'.$slider_type.'.phtml')->toHtml();
|
4 |
+
|
5 |
+
|
6 |
+
|
app/design/frontend/base/default/template/bannerslider/slider1.phtml
ADDED
@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
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
|
5 |
+
<!-- Rotator Type1-->
|
6 |
+
<script>
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
//Reference http://www.jssor.com/development/slider-with-slideshow-jquery.html
|
9 |
+
//Reference http://www.jssor.com/development/tool-slideshow-transition-viewer.html
|
10 |
+
|
11 |
+
var _SlideshowTransitions = [
|
12 |
+
//Rotate Overlap
|
13 |
+
{ $Duration: 1200, $Zoom: 11, $Rotate: -1, $Easing: { $Zoom: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Round: { $Rotate: 0.5 }, $Brother: { $Duration: 1200, $Zoom: 1, $Rotate: 1, $Easing: $JssorEasing$.$EaseSwing, $Opacity: 2, $Round: { $Rotate: 0.5 }, $Shift: 90 } },
|
14 |
+
//Switch
|
15 |
+
{ $Duration: 1400, x: 0.25, $Zoom: 1.5, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInSine }, $Opacity: 2, $ZIndex: -10, $Brother: { $Duration: 1400, x: -0.25, $Zoom: 1.5, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInSine }, $Opacity: 2, $ZIndex: -10 } },
|
16 |
+
//Rotate Relay
|
17 |
+
{ $Duration: 1200, $Zoom: 11, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Round: { $Rotate: 1 }, $ZIndex: -10, $Brother: { $Duration: 1200, $Zoom: 11, $Rotate: -1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Round: { $Rotate: 1 }, $ZIndex: -10, $Shift: 600 } },
|
18 |
+
//Doors
|
19 |
+
{ $Duration: 1500, x: 0.5, $Cols: 2, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2, $Brother: { $Duration: 1500, $Opacity: 2 } },
|
20 |
+
//Rotate in+ out-
|
21 |
+
{ $Duration: 1500, x: -0.3, y: 0.5, $Zoom: 1, $Rotate: 0.1, $During: { $Left: [0.6, 0.4], $Top: [0.6, 0.4], $Rotate: [0.6, 0.4], $Zoom: [0.6, 0.4] }, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Top: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Brother: { $Duration: 1000, $Zoom: 11, $Rotate: -0.5, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Shift: 200 } },
|
22 |
+
//Fly Twins
|
23 |
+
{ $Duration: 1500, x: 0.3, $During: { $Left: [0.6, 0.4] }, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true, $Brother: { $Duration: 1000, x: -0.3, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 } },
|
24 |
+
//Rotate in- out+
|
25 |
+
{ $Duration: 1500, $Zoom: 11, $Rotate: 0.5, $During: { $Left: [0.4, 0.6], $Top: [0.4, 0.6], $Rotate: [0.4, 0.6], $Zoom: [0.4, 0.6] }, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Brother: { $Duration: 1000, $Zoom: 1, $Rotate: -0.5, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Shift: 200 } },
|
26 |
+
//Rotate Axis up overlap
|
27 |
+
{ $Duration: 1200, x: 0.25, y: 0.5, $Rotate: -0.1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Top: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Brother: { $Duration: 1200, x: -0.1, y: -0.7, $Rotate: 0.1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Top: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 } },
|
28 |
+
//Chess Replace TB
|
29 |
+
{ $Duration: 1600, x: 1, $Rows: 2, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Brother: { $Duration: 1600, x: -1, $Rows: 2, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 } },
|
30 |
+
//Chess Replace LR
|
31 |
+
{ $Duration: 1600, y: -1, $Cols: 2, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Brother: { $Duration: 1600, y: 1, $Cols: 2, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 } },
|
32 |
+
//Shift TB
|
33 |
+
{ $Duration: 1200, y: 1, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Brother: { $Duration: 1200, y: -1, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 } },
|
34 |
+
//Shift LR
|
35 |
+
{ $Duration: 1200, x: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Brother: { $Duration: 1200, x: -1, $Easing: { $Left: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 } },
|
36 |
+
//Return TB
|
37 |
+
{ $Duration: 1200, y: -1, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $ZIndex: -10, $Brother: { $Duration: 1200, y: -1, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $ZIndex: -10, $Shift: -100 } },
|
38 |
+
//Return LR
|
39 |
+
{ $Duration: 1200, x: 1, $Delay: 40, $Cols: 6, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Easing: { $Left: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $ZIndex: -10, $Brother: { $Duration: 1200, x: 1, $Delay: 40, $Cols: 6, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Easing: { $Top: $JssorEasing$.$EaseInOutQuart, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $ZIndex: -10, $Shift: -100 } },
|
40 |
+
//Rotate Axis down
|
41 |
+
{ $Duration: 1500, x: -0.1, y: -0.7, $Rotate: 0.1, $During: { $Left: [0.6, 0.4], $Top: [0.6, 0.4], $Rotate: [0.6, 0.4] }, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Top: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2, $Brother: { $Duration: 1000, x: 0.2, y: 0.5, $Rotate: -0.1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Top: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 } },
|
42 |
+
//Extrude Replace
|
43 |
+
{ $Duration: 1600, x: -0.2, $Delay: 40, $Cols: 12, $During: { $Left: [0.4, 0.6] }, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInOutExpo, $Opacity: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $Outside: true, $Round: { $Top: 0.5 }, $Brother: { $Duration: 1000, x: 0.2, $Delay: 40, $Cols: 12, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Assembly: 1028, $Easing: { $Left: $JssorEasing$.$EaseInOutExpo, $Opacity: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $Round: { $Top: 0.5 } } }
|
44 |
+
];
|
45 |
+
|
46 |
+
var _CaptionTransitions = [
|
47 |
+
//CLIP|LR
|
48 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
49 |
+
//CLIP|TB
|
50 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
51 |
+
|
52 |
+
//DDGDANCE|LB
|
53 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
54 |
+
//DDGDANCE|RB
|
55 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
56 |
+
|
57 |
+
//TORTUOUS|HL
|
58 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
59 |
+
//TORTUOUS|VB
|
60 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
61 |
+
|
62 |
+
//ZMF|10
|
63 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
64 |
+
|
65 |
+
//ZML|R
|
66 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
67 |
+
//ZML|B
|
68 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
69 |
+
|
70 |
+
//ZMS|B
|
71 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
72 |
+
|
73 |
+
//ZM*JDN|LB
|
74 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
75 |
+
//ZM*JUP|LB
|
76 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
77 |
+
//ZM*JUP|RB
|
78 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
79 |
+
|
80 |
+
//ZM*WVR|LT
|
81 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
82 |
+
//ZM*WVR|RT
|
83 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
84 |
+
//ZM*WVR|TL
|
85 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
86 |
+
//ZM*WVR|BL
|
87 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
88 |
+
|
89 |
+
//RTT|10
|
90 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
91 |
+
|
92 |
+
//RTTL|R
|
93 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
94 |
+
//RTTL|B
|
95 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
96 |
+
|
97 |
+
//RTTS|R
|
98 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
99 |
+
//RTTS|B
|
100 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
101 |
+
|
102 |
+
//RTT*JDN|RT
|
103 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
104 |
+
//RTT*JDN|LB
|
105 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
106 |
+
//RTT*JUP|RB
|
107 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
108 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
109 |
+
//RTT*JUP|BR
|
110 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
111 |
+
|
112 |
+
//R|IB
|
113 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
114 |
+
//B|IB
|
115 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
116 |
+
|
117 |
+
];
|
118 |
+
|
119 |
+
var options = {
|
120 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
121 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
122 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
123 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
124 |
+
|
125 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
126 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
127 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
128 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
129 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
130 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
131 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
132 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
133 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
134 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
135 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
136 |
+
|
137 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
138 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
139 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
140 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
141 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
142 |
+
},
|
143 |
+
|
144 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
145 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
146 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
147 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
148 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
149 |
+
},
|
150 |
+
|
151 |
+
$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not
|
152 |
+
$Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance
|
153 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
154 |
+
$AutoCenter: 0, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
155 |
+
$Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1
|
156 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1
|
157 |
+
$SpacingX: 10, //[Optional] Horizontal space between each item in pixel, default value is 0
|
158 |
+
$SpacingY: 10, //[Optional] Vertical space between each item in pixel, default value is 0
|
159 |
+
$Orientation: 1 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1
|
160 |
+
},
|
161 |
+
|
162 |
+
$ArrowNavigatorOptions: {
|
163 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
164 |
+
$ChanceToShow: 2 //[Required] 0 Never, 1 Mouse Over, 2 Always
|
165 |
+
}
|
166 |
+
};
|
167 |
+
|
168 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
169 |
+
//responsive code begin
|
170 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
171 |
+
|
172 |
+
function ScaleSlider() {
|
173 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
174 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
175 |
+
if(customWidth==0){
|
176 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
177 |
+
}
|
178 |
+
if (parentWidth)
|
179 |
+
jssor_slider1.$ScaleWidth(Math.min(parentWidth, customWidth));
|
180 |
+
else
|
181 |
+
window.setTimeout(ScaleSlider, 30);
|
182 |
+
}
|
183 |
+
|
184 |
+
ScaleSlider();
|
185 |
+
|
186 |
+
$(window).bind("load", ScaleSlider);
|
187 |
+
$(window).bind("resize", ScaleSlider);
|
188 |
+
$(window).bind("orientationchange", ScaleSlider);
|
189 |
+
|
190 |
+
//responsive code end
|
191 |
+
});
|
192 |
+
</script>
|
193 |
+
|
194 |
+
|
195 |
+
<!-- You can move inline styles to css file or css block. -->
|
196 |
+
<div class="slidercontainer">
|
197 |
+
<div id="slider1_container" style="position: relative; width:800px;
|
198 |
+
height: 500px; overflow: hidden;">
|
199 |
+
|
200 |
+
<!-- Loading Screen -->
|
201 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
202 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
203 |
+
background-color: #000; top: 0px; left: 0px;width: 100%;height:100%;">
|
204 |
+
</div>
|
205 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
206 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
207 |
+
</div>
|
208 |
+
</div>
|
209 |
+
|
210 |
+
<!-- Slides Container -->
|
211 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 800px; height: 500px; overflow: hidden;">
|
212 |
+
|
213 |
+
<?php
|
214 |
+
|
215 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
216 |
+
$cnt = count($collection);
|
217 |
+
|
218 |
+
foreach ($collection as $item) {
|
219 |
+
if($item->getstatus()==1){
|
220 |
+
?>
|
221 |
+
<div>
|
222 |
+
<a u=image href="#"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" /></a>
|
223 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
224 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
225 |
+
<?php echo $item->gettitle();?>
|
226 |
+
</div>
|
227 |
+
<?php }?>
|
228 |
+
</div>
|
229 |
+
<?php }
|
230 |
+
}?>
|
231 |
+
|
232 |
+
</div>
|
233 |
+
|
234 |
+
|
235 |
+
|
236 |
+
<!-- Bullet Navigator Skin Begin -->
|
237 |
+
|
238 |
+
<!-- bullet navigator container -->
|
239 |
+
|
240 |
+
<div u="navigator" class="jssorb01" style="position: absolute; bottom: 16px; right: 10px;">
|
241 |
+
<!-- bullet navigator item prototype -->
|
242 |
+
<div u="prototype" style="POSITION: absolute; WIDTH: 12px; HEIGHT: 12px;"></div>
|
243 |
+
</div>
|
244 |
+
<!-- Bullet Navigator Skin End -->
|
245 |
+
|
246 |
+
<!-- Arrow Navigator Skin Begin -->
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
|
251 |
+
<!-- Arrow Left -->
|
252 |
+
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 230px; left: 8px;">
|
253 |
+
</span>
|
254 |
+
<!-- Arrow Right -->
|
255 |
+
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 230px; right: 8px">
|
256 |
+
</span>
|
257 |
+
<!-- Arrow Navigator Skin End -->
|
258 |
+
|
259 |
+
</div>
|
260 |
+
<!-- End Rotator Type1-->
|
261 |
+
</div>
|
262 |
+
|
app/design/frontend/base/default/template/bannerslider/slider10.phtml
ADDED
@@ -0,0 +1,169 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--tab-slider.source-->
|
5 |
+
<script>
|
6 |
+
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
|
9 |
+
var _CaptionTransitions = [];
|
10 |
+
_CaptionTransitions["L"] = { $Duration: 900, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
11 |
+
_CaptionTransitions["R"] = { $Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
12 |
+
_CaptionTransitions["T"] = { $Duration: 900, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
13 |
+
_CaptionTransitions["B"] = { $Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
14 |
+
_CaptionTransitions["TR"] = { $Duration: 900, x: -0.6, y: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
15 |
+
|
16 |
+
_CaptionTransitions["L|IB"] = { $Duration: 1200, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
17 |
+
_CaptionTransitions["R|IB"] = { $Duration: 1200, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
18 |
+
_CaptionTransitions["T|IB"] = { $Duration: 1200, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
19 |
+
|
20 |
+
_CaptionTransitions["CLIP|LR"] = { $Duration: 900, $Clip: 3, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
21 |
+
_CaptionTransitions["CLIP|TB"] = { $Duration: 900, $Clip: 12, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
22 |
+
_CaptionTransitions["CLIP|L"] = { $Duration: 900, $Clip: 1, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
23 |
+
|
24 |
+
_CaptionTransitions["MCLIP|R"] = { $Duration: 900, $Clip: 2, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
25 |
+
_CaptionTransitions["MCLIP|T"] = { $Duration: 900, $Clip: 4, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
26 |
+
|
27 |
+
_CaptionTransitions["WV|B"] = { $Duration: 1200, x: -0.2, y: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Left: 1.5} };
|
28 |
+
|
29 |
+
_CaptionTransitions["TORTUOUS|VB"] = { $Duration: 1800, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} };
|
30 |
+
|
31 |
+
_CaptionTransitions["LISTH|R"] = { $Duration: 1500, x: -0.8, $Clip: 1, $Easing: $JssorEasing$.$EaseInOutCubic, $ScaleClip: 0.8, $Opacity: 2, $During: { $Left: [0.4, 0.6], $Clip: [0, 0.4], $Opacity: [0.4, 0.6]} };
|
32 |
+
|
33 |
+
_CaptionTransitions["RTT|360"] = { $Duration: 900, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 };
|
34 |
+
_CaptionTransitions["RTT|10"] = { $Duration: 900, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
35 |
+
|
36 |
+
_CaptionTransitions["RTTL|BR"] = { $Duration: 900, x: -0.6, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
37 |
+
|
38 |
+
_CaptionTransitions["T|IE*IE"] = { $Duration: 1800, y: 0.8, $Zoom: 11, $Rotate: -1.5, $Easing: { $Top: $JssorEasing$.$EaseInOutElastic, $Zoom: $JssorEasing$.$EaseInElastic, $Rotate: $JssorEasing$.$EaseInOutElastic }, $Opacity: 2, $During: { $Zoom: [0, 0.8], $Opacity: [0, 0.7] }, $Round: { $Rotate: 0.5} };
|
39 |
+
|
40 |
+
_CaptionTransitions["RTTS|R"] = { $Duration: 900, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
41 |
+
_CaptionTransitions["RTTS|T"] = { $Duration: 900, y: 0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
42 |
+
|
43 |
+
_CaptionTransitions["DDGDANCE|RB"] = { $Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} };
|
44 |
+
_CaptionTransitions["ZMF|10"] = { $Duration: 900, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 };
|
45 |
+
_CaptionTransitions["DDG|TR"] = { $Duration: 1200, x: -0.3, y: 0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 0.8} };
|
46 |
+
|
47 |
+
_CaptionTransitions["FLTTR|R"] = { $Duration: 900, x: -0.2, y: -0.1, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Top: 1.3} };
|
48 |
+
_CaptionTransitions["FLTTRWN|LT"] = { $Duration: 1800, x: 0.5, y: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.7], $Top: [0.1, 0.7] }, $Round: { $Top: 1.3} };
|
49 |
+
|
50 |
+
_CaptionTransitions["ATTACK|BR"] = { $Duration: 1500, x: -0.1, y: -0.5, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Top: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $During: { $Left: [0.3, 0.7], $Top: [0, 0.7] }, $Round: { $Left: 1.3} };
|
51 |
+
|
52 |
+
_CaptionTransitions["FADE"] = { $Duration: 900, $Opacity: 2 };
|
53 |
+
|
54 |
+
var options = {
|
55 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
56 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
57 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
58 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
59 |
+
|
60 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
61 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
62 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
63 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
64 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
65 |
+
$SlideSpacing: 5, //[Optional] Space between each slide in pixels, default value is 0
|
66 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
67 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
68 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
69 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
70 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
71 |
+
|
72 |
+
$ThumbnailNavigatorOptions: {
|
73 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
74 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
75 |
+
|
76 |
+
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
|
77 |
+
$AutoCenter: 3, //[Optional] Auto center thumbnail items in the thumbnail navigator container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 3
|
78 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange thumbnails, default value is 1
|
79 |
+
$SpacingX: 1, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
80 |
+
$SpacingY: 0, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
|
81 |
+
$DisplayPieces: 5, //[Optional] Number of pieces to display, default value is 1
|
82 |
+
$ParkingPosition: 0, //[Optional] The offset position to park thumbnail
|
83 |
+
$Orientation: 1, //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1
|
84 |
+
$DisableDrag: true //[Optional] Disable drag or not, default value is false
|
85 |
+
},
|
86 |
+
|
87 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
88 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
89 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
90 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
91 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
92 |
+
}
|
93 |
+
};
|
94 |
+
|
95 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
96 |
+
|
97 |
+
//responsive code begin
|
98 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
99 |
+
function ScaleSlider() {
|
100 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
101 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
102 |
+
if(customWidth==0){
|
103 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
104 |
+
}
|
105 |
+
if (parentWidth) {
|
106 |
+
var sliderWidth = parentWidth;
|
107 |
+
|
108 |
+
//keep the slider width no more than 600
|
109 |
+
sliderWidth = Math.min(sliderWidth, customWidth);
|
110 |
+
|
111 |
+
jssor_slider1.$ScaleWidth(sliderWidth);
|
112 |
+
}
|
113 |
+
else
|
114 |
+
window.setTimeout(ScaleSlider, 30);
|
115 |
+
}
|
116 |
+
ScaleSlider();
|
117 |
+
|
118 |
+
$(window).bind("load", ScaleSlider);
|
119 |
+
$(window).bind("resize", ScaleSlider);
|
120 |
+
$(window).bind("orientationchange", ScaleSlider);
|
121 |
+
//responsive code end
|
122 |
+
});
|
123 |
+
</script>
|
124 |
+
<!-- Jssor Slider Begin -->
|
125 |
+
<!-- You can move inline styles to css file or css block. -->
|
126 |
+
<div class="slidercontainer">
|
127 |
+
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px; height: 327px; background: #fff; overflow: hidden; ">
|
128 |
+
|
129 |
+
<!-- Slides Container -->
|
130 |
+
<div u="slides" style="cursor: move; position: absolute; left:0px; top: 27px; width: 600px; height: 300px;
|
131 |
+
overflow: hidden;">
|
132 |
+
<?php
|
133 |
+
|
134 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
135 |
+
|
136 |
+
$cnt = count($collection);
|
137 |
+
foreach ($collection as $item) {
|
138 |
+
if($item->getstatus()==1){
|
139 |
+
?>
|
140 |
+
<div>
|
141 |
+
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" style="width: 100%; height: 100%;" />
|
142 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
143 |
+
<div u=caption t="CLIP|LR" du="1500" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:250px; height:30px;">
|
144 |
+
<?php echo $item->gettitle(); ?>
|
145 |
+
</div>
|
146 |
+
<?php }?>
|
147 |
+
<div u="thumb"><?php echo $item->gettitle() ?></div>
|
148 |
+
|
149 |
+
</div>
|
150 |
+
<?php }
|
151 |
+
}?>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<!-- ThumbnailNavigator Skin Begin -->
|
155 |
+
<div u="thumbnavigator" class="jssort14" style="position: absolute; width: 504px; height: 27px; left:0px; top: 0px;background:#fff;">
|
156 |
+
<!-- Thumbnail Item Skin Begin -->
|
157 |
+
<div u="slides" style="cursor: move; top:0px; left:0px;">
|
158 |
+
<div u="prototype" class="p" style="POSITION: absolute; WIDTH: 100px; HEIGHT: 27px; TOP: 0; LEFT: 0; padding:0px; background:#fff;">
|
159 |
+
<div class=w><div u="thumbnailtemplate" class="c" style=" WIDTH: 100%; HEIGHT: 23px; position:absolute; TOP: 0; LEFT: 0; line-height:23px; text-align:center;"></div></div>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
<!-- Thumbnail Item Skin End -->
|
164 |
+
</div>
|
165 |
+
<!-- ThumbnailNavigator Skin Begin -->
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
<!-- Jssor Slider End -->
|
169 |
+
|
app/design/frontend/base/default/template/bannerslider/slider11.phtml
ADDED
@@ -0,0 +1,175 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--thumbnail-navigator-with-arrows.source-->
|
5 |
+
|
6 |
+
<script>
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
var _CaptionTransitions = [];
|
9 |
+
_CaptionTransitions["L"] = { $Duration: 900, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
10 |
+
_CaptionTransitions["R"] = { $Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
11 |
+
_CaptionTransitions["T"] = { $Duration: 900, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
12 |
+
_CaptionTransitions["B"] = { $Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
13 |
+
_CaptionTransitions["TR"] = { $Duration: 900, x: -0.6, y: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
14 |
+
|
15 |
+
_CaptionTransitions["L|IB"] = { $Duration: 1200, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
16 |
+
_CaptionTransitions["R|IB"] = { $Duration: 1200, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
17 |
+
_CaptionTransitions["T|IB"] = { $Duration: 1200, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
18 |
+
|
19 |
+
_CaptionTransitions["CLIP|LR"] = { $Duration: 900, $Clip: 3, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
20 |
+
_CaptionTransitions["CLIP|TB"] = { $Duration: 900, $Clip: 12, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
21 |
+
_CaptionTransitions["CLIP|L"] = { $Duration: 900, $Clip: 1, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
22 |
+
|
23 |
+
_CaptionTransitions["MCLIP|R"] = { $Duration: 900, $Clip: 2, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
24 |
+
_CaptionTransitions["MCLIP|T"] = { $Duration: 900, $Clip: 4, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
25 |
+
|
26 |
+
_CaptionTransitions["WV|B"] = { $Duration: 1200, x: -0.2, y: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Left: 1.5} };
|
27 |
+
|
28 |
+
_CaptionTransitions["TORTUOUS|VB"] = { $Duration: 1800, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} };
|
29 |
+
|
30 |
+
_CaptionTransitions["LISTH|R"] = { $Duration: 1500, x: -0.8, $Clip: 1, $Easing: $JssorEasing$.$EaseInOutCubic, $ScaleClip: 0.8, $Opacity: 2, $During: { $Left: [0.4, 0.6], $Clip: [0, 0.4], $Opacity: [0.4, 0.6]} };
|
31 |
+
|
32 |
+
_CaptionTransitions["RTT|360"] = { $Duration: 900, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 };
|
33 |
+
_CaptionTransitions["RTT|10"] = { $Duration: 900, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
34 |
+
|
35 |
+
_CaptionTransitions["RTTL|BR"] = { $Duration: 900, x: -0.6, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
36 |
+
|
37 |
+
_CaptionTransitions["T|IE*IE"] = { $Duration: 1800, y: 0.8, $Zoom: 11, $Rotate: -1.5, $Easing: { $Top: $JssorEasing$.$EaseInOutElastic, $Zoom: $JssorEasing$.$EaseInElastic, $Rotate: $JssorEasing$.$EaseInOutElastic }, $Opacity: 2, $During: { $Zoom: [0, 0.8], $Opacity: [0, 0.7] }, $Round: { $Rotate: 0.5} };
|
38 |
+
|
39 |
+
_CaptionTransitions["RTTS|R"] = { $Duration: 900, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
40 |
+
_CaptionTransitions["RTTS|T"] = { $Duration: 900, y: 0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
41 |
+
|
42 |
+
_CaptionTransitions["DDGDANCE|RB"] = { $Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} };
|
43 |
+
_CaptionTransitions["ZMF|10"] = { $Duration: 900, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 };
|
44 |
+
_CaptionTransitions["DDG|TR"] = { $Duration: 1200, x: -0.3, y: 0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 0.8} };
|
45 |
+
|
46 |
+
_CaptionTransitions["FLTTR|R"] = { $Duration: 900, x: -0.2, y: -0.1, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Top: 1.3} };
|
47 |
+
_CaptionTransitions["FLTTRWN|LT"] = { $Duration: 1800, x: 0.5, y: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.7], $Top: [0.1, 0.7] }, $Round: { $Top: 1.3} };
|
48 |
+
|
49 |
+
_CaptionTransitions["ATTACK|BR"] = { $Duration: 1500, x: -0.1, y: -0.5, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Top: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $During: { $Left: [0.3, 0.7], $Top: [0, 0.7] }, $Round: { $Left: 1.3} };
|
50 |
+
|
51 |
+
_CaptionTransitions["FADE"] = { $Duration: 900, $Opacity: 2 };
|
52 |
+
|
53 |
+
var options = {
|
54 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
55 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
56 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
57 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
58 |
+
$UISearchMode: 0, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
59 |
+
|
60 |
+
$ThumbnailNavigatorOptions: {
|
61 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
62 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
63 |
+
|
64 |
+
$Loop: 2, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
|
65 |
+
$SpacingX: 3, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
66 |
+
$SpacingY: 3, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
|
67 |
+
$DisplayPieces: 6, //[Optional] Number of pieces to display, default value is 1
|
68 |
+
$ParkingPosition: 204, //[Optional] The offset position to park thumbnail,
|
69 |
+
|
70 |
+
$ArrowNavigatorOptions: {
|
71 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
72 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
73 |
+
$AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
74 |
+
$Steps: 6 //[Optional] Steps to go for each navigation request, default value is 1
|
75 |
+
}
|
76 |
+
},
|
77 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
78 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
79 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
80 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
81 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
82 |
+
}
|
83 |
+
|
84 |
+
};
|
85 |
+
|
86 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
87 |
+
|
88 |
+
//responsive code begin
|
89 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
90 |
+
function ScaleSlider() {
|
91 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
92 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
93 |
+
if(customWidth==0){
|
94 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
95 |
+
}
|
96 |
+
if (parentWidth)
|
97 |
+
jssor_slider1.$ScaleWidth(Math.min(parentWidth, customWidth));
|
98 |
+
else
|
99 |
+
window.setTimeout(ScaleSlider, 30);
|
100 |
+
}
|
101 |
+
ScaleSlider();
|
102 |
+
|
103 |
+
$(window).bind("load", ScaleSlider);
|
104 |
+
$(window).bind("resize", ScaleSlider);
|
105 |
+
$(window).bind("orientationchange", ScaleSlider);
|
106 |
+
//responsive code end
|
107 |
+
});
|
108 |
+
</script>
|
109 |
+
<!-- Jssor Slider Begin -->
|
110 |
+
<!-- You can move inline styles to css file or css block. -->
|
111 |
+
<div class="slidercontainer">
|
112 |
+
<div id="slider1_container" style="position: relative; width: 720px;
|
113 |
+
height: 480px; overflow: hidden;">
|
114 |
+
|
115 |
+
<!-- Loading Screen -->
|
116 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
117 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
118 |
+
background-color: #000; top: 0px; left: 0px;width: 100%;height:100%;">
|
119 |
+
</div>
|
120 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
121 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<!-- Slides Container -->
|
126 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 720px; height: 480px;
|
127 |
+
overflow: hidden;">
|
128 |
+
<?php
|
129 |
+
|
130 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
131 |
+
|
132 |
+
$cnt = count($collection);
|
133 |
+
foreach ($collection as $item) {
|
134 |
+
if($item->getstatus()==1){
|
135 |
+
?>
|
136 |
+
<div>
|
137 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
138 |
+
<img u="thumb" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
139 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
140 |
+
<div u=caption t="DDGDANCE|RB" t2="RTT|10" d=-1800 du=3800 class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
141 |
+
<?php echo $item->gettitle();?></div>
|
142 |
+
<?php }?>
|
143 |
+
</div>
|
144 |
+
<?php }
|
145 |
+
}?>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<!-- Thumbnail Navigator Skin Begin -->
|
149 |
+
<div u="thumbnavigator" class="jssort07" style="position: absolute; width: 720px; height: 100px; left: 0px; bottom: 0px; overflow: hidden; ">
|
150 |
+
<div style=" background-color: #000; filter:alpha(opacity=30); opacity:.3; width: 100%; height:100%;"></div>
|
151 |
+
<!-- Thumbnail Item Skin Begin -->
|
152 |
+
|
153 |
+
<div u="slides" style="cursor: move;">
|
154 |
+
<div u="prototype" class="p" style="POSITION: absolute; WIDTH: 99px; HEIGHT: 66px; TOP: 0; LEFT: 0;">
|
155 |
+
<div u="thumbnailtemplate" class="i" style="position:absolute;"></div>
|
156 |
+
<div class="o">
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
<!-- Thumbnail Item Skin End -->
|
161 |
+
<!-- Arrow Navigator Skin Begin -->
|
162 |
+
|
163 |
+
<!-- Arrow Left -->
|
164 |
+
<span u="arrowleft" class="jssora11l" style="width: 37px; height: 37px; top: 123px; left: 8px;">
|
165 |
+
</span>
|
166 |
+
<!-- Arrow Right -->
|
167 |
+
<span u="arrowright" class="jssora11r" style="width: 37px; height: 37px; top: 123px; right: 8px">
|
168 |
+
</span>
|
169 |
+
<!-- Arrow Navigator Skin End -->
|
170 |
+
</div>
|
171 |
+
<!-- ThumbnailNavigator Skin End -->
|
172 |
+
<!-- Trigger -->
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
<!-- Jssor Slider End -->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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!-- Rotator Type3-->
|
5 |
+
<script>
|
6 |
+
jQuery(document).ready(function ($) {
|
7 |
+
//Reference http://www.jssor.com/development/slider-with-slideshow-jquery.html
|
8 |
+
//Reference http://www.jssor.com/development/tool-slideshow-transition-viewer.html
|
9 |
+
|
10 |
+
var _CaptionTransitions = [
|
11 |
+
//CLIP|LR
|
12 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
13 |
+
//CLIP|TB
|
14 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
15 |
+
|
16 |
+
//DDGDANCE|LB
|
17 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
18 |
+
//DDGDANCE|RB
|
19 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
20 |
+
|
21 |
+
//TORTUOUS|HL
|
22 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
23 |
+
//TORTUOUS|VB
|
24 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
25 |
+
|
26 |
+
//ZMF|10
|
27 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
28 |
+
|
29 |
+
//ZML|R
|
30 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
31 |
+
//ZML|B
|
32 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
33 |
+
|
34 |
+
//ZMS|B
|
35 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
36 |
+
|
37 |
+
//ZM*JDN|LB
|
38 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
39 |
+
//ZM*JUP|LB
|
40 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
41 |
+
//ZM*JUP|RB
|
42 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
43 |
+
|
44 |
+
//ZM*WVR|LT
|
45 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
46 |
+
//ZM*WVR|RT
|
47 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
48 |
+
//ZM*WVR|TL
|
49 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
50 |
+
//ZM*WVR|BL
|
51 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
52 |
+
|
53 |
+
//RTT|10
|
54 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
55 |
+
|
56 |
+
//RTTL|R
|
57 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
58 |
+
//RTTL|B
|
59 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
60 |
+
|
61 |
+
//RTTS|R
|
62 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
63 |
+
//RTTS|B
|
64 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
65 |
+
|
66 |
+
//RTT*JDN|RT
|
67 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
68 |
+
//RTT*JDN|LB
|
69 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
70 |
+
//RTT*JUP|RB
|
71 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
72 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
73 |
+
//RTT*JUP|BR
|
74 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
75 |
+
|
76 |
+
//R|IB
|
77 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
78 |
+
//B|IB
|
79 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
80 |
+
|
81 |
+
];
|
82 |
+
var _SlideshowTransitions = [
|
83 |
+
//Fade in R
|
84 |
+
{$Duration: 1200, x: -0.3, $During: { $Left: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
85 |
+
//Fade out L
|
86 |
+
, { $Duration: 1200, x: 0.3, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
87 |
+
];
|
88 |
+
|
89 |
+
var options = {
|
90 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
91 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
92 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
93 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
94 |
+
|
95 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
96 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
97 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
98 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
99 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
100 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
101 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
102 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
103 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
104 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
105 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
106 |
+
|
107 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
108 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
109 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
110 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
111 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
112 |
+
},
|
113 |
+
|
114 |
+
$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not
|
115 |
+
$Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance
|
116 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
117 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1
|
118 |
+
$SpacingX: 10, //[Optional] Horizontal space between each item in pixel, default value is 0
|
119 |
+
$SpacingY: 10 //[Optional] Vertical space between each item in pixel, default value is 0
|
120 |
+
},
|
121 |
+
|
122 |
+
$ArrowNavigatorOptions: {
|
123 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
124 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
125 |
+
$AutoCenter: 2 //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
126 |
+
},
|
127 |
+
|
128 |
+
$ThumbnailNavigatorOptions: {
|
129 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
130 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
131 |
+
$ActionMode: 0, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
|
132 |
+
$DisableDrag: true //[Optional] Disable drag or not, default value is false
|
133 |
+
},
|
134 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
135 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
136 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
137 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
138 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
139 |
+
}
|
140 |
+
|
141 |
+
};
|
142 |
+
|
143 |
+
var jssor_sliderb = new $JssorSlider$("sliderb_container", options);
|
144 |
+
//responsive code begin
|
145 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
146 |
+
function ScaleSlider() {
|
147 |
+
var parentWidth = jssor_sliderb.$Elmt.parentNode.clientWidth;
|
148 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
149 |
+
if(customWidth==0){
|
150 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
151 |
+
}
|
152 |
+
if (parentWidth)
|
153 |
+
jssor_sliderb.$ScaleWidth(Math.min(parentWidth, customWidth));
|
154 |
+
else
|
155 |
+
window.setTimeout(ScaleSlider, 30);
|
156 |
+
}
|
157 |
+
ScaleSlider();
|
158 |
+
|
159 |
+
$(window).bind("load", ScaleSlider);
|
160 |
+
$(window).bind("resize", ScaleSlider);
|
161 |
+
$(window).bind("orientationchange", ScaleSlider);
|
162 |
+
//responsive code end
|
163 |
+
});
|
164 |
+
</script>
|
165 |
+
<!-- Jssor Slider Begin -->
|
166 |
+
<!-- You can move inline styles to css file or css block. -->
|
167 |
+
<div class="slidercontainer">
|
168 |
+
<div id="sliderb_container" style="position: relative; width: 600px;
|
169 |
+
height: 300px; overflow: hidden;">
|
170 |
+
|
171 |
+
<!-- Loading Screen -->
|
172 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
173 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
174 |
+
background-color: #000; top: 0px; left: 0px;width: 100%;height:100%;">
|
175 |
+
</div>
|
176 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
177 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
|
181 |
+
<!-- Slides Container -->
|
182 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 600px; height: 300px;
|
183 |
+
overflow: hidden;">
|
184 |
+
<?php
|
185 |
+
|
186 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
187 |
+
|
188 |
+
$cnt = count($collection);
|
189 |
+
foreach ($collection as $item) {
|
190 |
+
if($item->getstatus()==1){
|
191 |
+
?>
|
192 |
+
<div>
|
193 |
+
<a u=image href="#"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" /></a>
|
194 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
195 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
196 |
+
<?php echo $item->gettitle() ?>
|
197 |
+
</div>
|
198 |
+
<?php }?>
|
199 |
+
</div>
|
200 |
+
<?php }
|
201 |
+
}?>
|
202 |
+
|
203 |
+
<!-- ThumbnailNavigator Skin Begin -->
|
204 |
+
<div u="thumbnavigator" class="sliderb-T" style="position: absolute; bottom: 0px; left: 0px; height:45px; width:600px;">
|
205 |
+
<div style="filter: alpha(opacity=40); opacity:0.4; position: absolute; display: block;
|
206 |
+
background-color: #000000; top: 0px; left: 0px; width: 100%; height: 100%;">
|
207 |
+
</div>
|
208 |
+
<!-- Thumbnail Item Skin Begin -->
|
209 |
+
<div u="slides">
|
210 |
+
<div u="prototype" style="POSITION: absolute; WIDTH: 600px; HEIGHT: 45px; TOP: 0; LEFT: 0;">
|
211 |
+
<div u="thumbnailtemplate" style="font-family: verdana; font-weight: normal; POSITION: absolute; WIDTH: 100%; HEIGHT: 100%; TOP: 0; LEFT: 0; color:#fff; line-height: 45px; font-size:20px; padding-left:10px;"></div>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
<!-- Thumbnail Item Skin End -->
|
215 |
+
</div>
|
216 |
+
<!-- ThumbnailNavigator Skin End -->
|
217 |
+
|
218 |
+
<!-- Bullet Navigator Skin Begin -->
|
219 |
+
|
220 |
+
<!-- bullet navigator container -->
|
221 |
+
<div u="navigator" class="jssorb01" style="position: absolute; bottom: 16px; right: 10px;">
|
222 |
+
<!-- bullet navigator item prototype -->
|
223 |
+
<div u="prototype" style="POSITION: absolute; WIDTH: 12px; HEIGHT: 12px;"></div>
|
224 |
+
</div>
|
225 |
+
<!-- Bullet Navigator Skin End -->
|
226 |
+
|
227 |
+
<!-- Arrow Left -->
|
228 |
+
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 123px; left: 8px;">
|
229 |
+
</span>
|
230 |
+
<!-- Arrow Right -->
|
231 |
+
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 123px; right: 8px">
|
232 |
+
</span>
|
233 |
+
<!-- Arrow Navigator Skin End -->
|
234 |
+
<!-- Trigger -->
|
235 |
+
</div>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
<!-- End Rotator Type3-->
|
app/design/frontend/base/default/template/bannerslider/slider3.phtml
ADDED
@@ -0,0 +1,245 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
|
5 |
+
<!-- Rotator Type2-->
|
6 |
+
<script>
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
//Reference http://www.jssor.com/development/slider-with-slideshow-jquery.html
|
9 |
+
//Reference http://www.jssor.com/development/tool-slideshow-transition-viewer.html
|
10 |
+
|
11 |
+
var _CaptionTransitions = [
|
12 |
+
//CLIP|LR
|
13 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
14 |
+
//CLIP|TB
|
15 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
16 |
+
|
17 |
+
//DDGDANCE|LB
|
18 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
19 |
+
//DDGDANCE|RB
|
20 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
21 |
+
|
22 |
+
//TORTUOUS|HL
|
23 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
24 |
+
//TORTUOUS|VB
|
25 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
26 |
+
|
27 |
+
//ZMF|10
|
28 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
29 |
+
|
30 |
+
//ZML|R
|
31 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
32 |
+
//ZML|B
|
33 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
34 |
+
|
35 |
+
//ZMS|B
|
36 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
37 |
+
|
38 |
+
//ZM*JDN|LB
|
39 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
40 |
+
//ZM*JUP|LB
|
41 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
42 |
+
//ZM*JUP|RB
|
43 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
44 |
+
|
45 |
+
//ZM*WVR|LT
|
46 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
47 |
+
//ZM*WVR|RT
|
48 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
49 |
+
//ZM*WVR|TL
|
50 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
51 |
+
//ZM*WVR|BL
|
52 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
53 |
+
|
54 |
+
//RTT|10
|
55 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
56 |
+
|
57 |
+
//RTTL|R
|
58 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
59 |
+
//RTTL|B
|
60 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
61 |
+
|
62 |
+
//RTTS|R
|
63 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
64 |
+
//RTTS|B
|
65 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
66 |
+
|
67 |
+
//RTT*JDN|RT
|
68 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
69 |
+
//RTT*JDN|LB
|
70 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
71 |
+
//RTT*JUP|RB
|
72 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
73 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
74 |
+
//RTT*JUP|BR
|
75 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
76 |
+
|
77 |
+
//R|IB
|
78 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
79 |
+
//B|IB
|
80 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
81 |
+
|
82 |
+
];
|
83 |
+
|
84 |
+
var _SlideshowTransitions = [
|
85 |
+
//Swing Outside in Stairs
|
86 |
+
{$Duration: 1200, x: 0.2, y: -0.1, $Delay: 20, $Cols: 8, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Outside: true, $Round: { $Left: 1.3, $Top: 2.5} }
|
87 |
+
|
88 |
+
//Dodge Dance Outside out Stairs
|
89 |
+
, { $Duration: 1500, x: 0.3, y: -0.3, $Delay: 20, $Cols: 8, $Rows: 4, $Clip: 15, $During: { $Left: [0.1, 0.9], $Top: [0.1, 0.9] }, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Clip: $JssorEasing$.$EaseOutQuad }, $Outside: true, $Round: { $Left: 0.8, $Top: 2.5} }
|
90 |
+
|
91 |
+
//Dodge Pet Outside in Stairs
|
92 |
+
, { $Duration: 1500, x: 0.2, y: -0.1, $Delay: 20, $Cols: 8, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Outside: true, $Round: { $Left: 0.8, $Top: 2.5} }
|
93 |
+
|
94 |
+
//Dodge Dance Outside in Random
|
95 |
+
, { $Duration: 1500, x: 0.3, y: -0.3, $Delay: 80, $Cols: 8, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Clip: $JssorEasing$.$EaseOutQuad }, $Outside: true, $Round: { $Left: 0.8, $Top: 2.5} }
|
96 |
+
|
97 |
+
//Flutter out Wind
|
98 |
+
, { $Duration: 1800, x: 1, y: 0.2, $Delay: 30, $Cols: 10, $Rows: 5, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $SlideOut: true, $Reverse: true, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 2050, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseOutWave, $Clip: $JssorEasing$.$EaseInOutQuad }, $Outside: true, $Round: { $Top: 1.3} }
|
99 |
+
|
100 |
+
//Collapse Stairs
|
101 |
+
, { $Duration: 1200, $Delay: 30, $Cols: 8, $Rows: 4, $Clip: 15, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 2049, $Easing: $JssorEasing$.$EaseOutQuad }
|
102 |
+
|
103 |
+
//Collapse Random
|
104 |
+
, { $Duration: 1000, $Delay: 80, $Cols: 8, $Rows: 4, $Clip: 15, $SlideOut: true, $Easing: $JssorEasing$.$EaseOutQuad }
|
105 |
+
|
106 |
+
//Vertical Chess Stripe
|
107 |
+
, { $Duration: 1000, y: -1, $Cols: 12, $Formation: $JssorSlideshowFormations$.$FormationStraight, $ChessMode: { $Column: 12} }
|
108 |
+
|
109 |
+
//Extrude out Stripe
|
110 |
+
, { $Duration: 1000, x: -0.2, $Delay: 40, $Cols: 12, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInOutExpo, $Opacity: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $Outside: true, $Round: { $Top: 0.5} }
|
111 |
+
|
112 |
+
//Dominoes Stripe
|
113 |
+
, { $Duration: 2000, y: -1, $Delay: 60, $Cols: 15, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationStraight, $Easing: $JssorEasing$.$EaseOutJump, $Round: { $Top: 1.5} }
|
114 |
+
];
|
115 |
+
|
116 |
+
var options = {
|
117 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
118 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
119 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
120 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
121 |
+
|
122 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
123 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
124 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
125 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
126 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
127 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
128 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
129 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
130 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
131 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
132 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
133 |
+
|
134 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
135 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
136 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
137 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
138 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
139 |
+
},
|
140 |
+
|
141 |
+
$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not
|
142 |
+
$Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance
|
143 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
144 |
+
$AutoCenter: 0, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
145 |
+
$Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1
|
146 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1
|
147 |
+
$SpacingX: 10, //[Optional] Horizontal space between each item in pixel, default value is 0
|
148 |
+
$SpacingY: 10, //[Optional] Vertical space between each item in pixel, default value is 0
|
149 |
+
$Orientation: 1 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1
|
150 |
+
},
|
151 |
+
|
152 |
+
$ArrowNavigatorOptions: {
|
153 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
154 |
+
$ChanceToShow: 2 //[Required] 0 Never, 1 Mouse Over, 2 Always
|
155 |
+
},
|
156 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
157 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
158 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
159 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
160 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
161 |
+
}
|
162 |
+
};
|
163 |
+
|
164 |
+
var jssor_slider2 = new $JssorSlider$("slider2_container", options);
|
165 |
+
|
166 |
+
//responsive code begin
|
167 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
168 |
+
function ScaleSlider() {
|
169 |
+
var parentWidth = jssor_slider2.$Elmt.parentNode.clientWidth;
|
170 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
171 |
+
if(customWidth==0){
|
172 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
173 |
+
}
|
174 |
+
if (parentWidth)
|
175 |
+
jssor_slider2.$ScaleWidth(Math.min(parentWidth, customWidth));
|
176 |
+
else
|
177 |
+
window.setTimeout(ScaleSlider, 30);
|
178 |
+
}
|
179 |
+
|
180 |
+
ScaleSlider();
|
181 |
+
|
182 |
+
$(window).bind("load", ScaleSlider);
|
183 |
+
$(window).bind("resize", ScaleSlider);
|
184 |
+
$(window).bind("orientationchange", ScaleSlider);
|
185 |
+
|
186 |
+
//responsive code end
|
187 |
+
});
|
188 |
+
</script>
|
189 |
+
<!-- Jssor Slider Begin -->
|
190 |
+
<!-- You can move inline styles to css file or css block. -->
|
191 |
+
<div class="slidercontainer">
|
192 |
+
<div id="slider2_container" style="position: relative; width: 600px;
|
193 |
+
height: 300px;">
|
194 |
+
<!-- Loading Screen -->
|
195 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
196 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
197 |
+
background-color: #000; top: 0px; left: 0px;width: 100%;height:100%;">
|
198 |
+
</div>
|
199 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
200 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
|
204 |
+
<!-- Slides Container -->
|
205 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 600px; height: 300px;
|
206 |
+
overflow: hidden;">
|
207 |
+
<?php
|
208 |
+
|
209 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
210 |
+
|
211 |
+
$cnt = count($collection);
|
212 |
+
foreach ($collection as $item) {
|
213 |
+
if($item->getstatus()==1){
|
214 |
+
?>
|
215 |
+
<div>
|
216 |
+
<a u=image href="#"><img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" /></a>
|
217 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
218 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
219 |
+
<?php echo $item->gettitle() ?>
|
220 |
+
</div>
|
221 |
+
<?php }?>
|
222 |
+
</div>
|
223 |
+
<?php }
|
224 |
+
}?>
|
225 |
+
</div>
|
226 |
+
|
227 |
+
|
228 |
+
<!-- bullet navigator container -->
|
229 |
+
<div u="navigator" class="jssorb01" style="position: absolute; bottom: 16px; right: 10px;">
|
230 |
+
<!-- bullet navigator item prototype -->
|
231 |
+
<div u="prototype" style="POSITION: absolute; WIDTH: 12px; HEIGHT: 12px;"></div>
|
232 |
+
</div>
|
233 |
+
<!-- Bullet Navigator Skin End -->
|
234 |
+
|
235 |
+
<!-- Arrow Left -->
|
236 |
+
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 123px; left: 8px;">
|
237 |
+
</span>
|
238 |
+
<!-- Arrow Right -->
|
239 |
+
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 123px; right: 8px">
|
240 |
+
</span>
|
241 |
+
<!-- Arrow Navigator Skin End -->
|
242 |
+
</div>
|
243 |
+
</div>
|
244 |
+
|
245 |
+
<!-- End Rotator Type2-->
|
app/design/frontend/base/default/template/bannerslider/slider4.phtml
ADDED
@@ -0,0 +1,252 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--image-gallery.source-->
|
5 |
+
<script>
|
6 |
+
jQuery(document).ready(function ($) {
|
7 |
+
|
8 |
+
var _CaptionTransitions = [
|
9 |
+
//CLIP|LR
|
10 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
11 |
+
//CLIP|TB
|
12 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
13 |
+
|
14 |
+
//DDGDANCE|LB
|
15 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
16 |
+
//DDGDANCE|RB
|
17 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
18 |
+
|
19 |
+
//TORTUOUS|HL
|
20 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
21 |
+
//TORTUOUS|VB
|
22 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
23 |
+
|
24 |
+
//ZMF|10
|
25 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
26 |
+
|
27 |
+
//ZML|R
|
28 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
29 |
+
//ZML|B
|
30 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
31 |
+
|
32 |
+
//ZMS|B
|
33 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
34 |
+
|
35 |
+
//ZM*JDN|LB
|
36 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
37 |
+
//ZM*JUP|LB
|
38 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
39 |
+
//ZM*JUP|RB
|
40 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
41 |
+
|
42 |
+
//ZM*WVR|LT
|
43 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
44 |
+
//ZM*WVR|RT
|
45 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
46 |
+
//ZM*WVR|TL
|
47 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
48 |
+
//ZM*WVR|BL
|
49 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
50 |
+
|
51 |
+
//RTT|10
|
52 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
53 |
+
|
54 |
+
//RTTL|R
|
55 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
56 |
+
//RTTL|B
|
57 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
58 |
+
|
59 |
+
//RTTS|R
|
60 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
61 |
+
//RTTS|B
|
62 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
63 |
+
|
64 |
+
//RTT*JDN|RT
|
65 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
66 |
+
//RTT*JDN|LB
|
67 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
68 |
+
//RTT*JUP|RB
|
69 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
70 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
71 |
+
//RTT*JUP|BR
|
72 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
73 |
+
|
74 |
+
//R|IB
|
75 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
76 |
+
//B|IB
|
77 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
78 |
+
|
79 |
+
];
|
80 |
+
|
81 |
+
var _SlideshowTransitions = [
|
82 |
+
//Fade in L
|
83 |
+
{$Duration: 1200, x: 0.3, $During: { $Left: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
84 |
+
//Fade out R
|
85 |
+
, { $Duration: 1200, x: -0.3, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
86 |
+
//Fade in R
|
87 |
+
, { $Duration: 1200, x: -0.3, $During: { $Left: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
88 |
+
//Fade out L
|
89 |
+
, { $Duration: 1200, x: 0.3, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
90 |
+
|
91 |
+
//Fade in T
|
92 |
+
, { $Duration: 1200, y: 0.3, $During: { $Top: [0.3, 0.7] }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
93 |
+
//Fade out B
|
94 |
+
, { $Duration: 1200, y: -0.3, $SlideOut: true, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
95 |
+
//Fade in B
|
96 |
+
, { $Duration: 1200, y: -0.3, $During: { $Top: [0.3, 0.7] }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
97 |
+
//Fade out T
|
98 |
+
, { $Duration: 1200, y: 0.3, $SlideOut: true, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
99 |
+
|
100 |
+
//Fade in LR
|
101 |
+
, { $Duration: 1200, x: 0.3, $Cols: 2, $During: { $Left: [0.3, 0.7] }, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
102 |
+
//Fade out LR
|
103 |
+
, { $Duration: 1200, x: 0.3, $Cols: 2, $SlideOut: true, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
104 |
+
//Fade in TB
|
105 |
+
, { $Duration: 1200, y: 0.3, $Rows: 2, $During: { $Top: [0.3, 0.7] }, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
106 |
+
//Fade out TB
|
107 |
+
, { $Duration: 1200, y: 0.3, $Rows: 2, $SlideOut: true, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
108 |
+
|
109 |
+
//Fade in LR Chess
|
110 |
+
, { $Duration: 1200, y: 0.3, $Cols: 2, $During: { $Top: [0.3, 0.7] }, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
111 |
+
//Fade out LR Chess
|
112 |
+
, { $Duration: 1200, y: -0.3, $Cols: 2, $SlideOut: true, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
113 |
+
//Fade in TB Chess
|
114 |
+
, { $Duration: 1200, x: 0.3, $Rows: 2, $During: { $Left: [0.3, 0.7] }, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
115 |
+
//Fade out TB Chess
|
116 |
+
, { $Duration: 1200, x: -0.3, $Rows: 2, $SlideOut: true, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
117 |
+
|
118 |
+
//Fade in Corners
|
119 |
+
, { $Duration: 1200, x: 0.3, y: 0.3, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
120 |
+
//Fade out Corners
|
121 |
+
, { $Duration: 1200, x: 0.3, y: 0.3, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $SlideOut: true, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
122 |
+
|
123 |
+
//Fade Clip in H
|
124 |
+
, { $Duration: 1200, $Delay: 20, $Clip: 3, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
125 |
+
//Fade Clip out H
|
126 |
+
, { $Duration: 1200, $Delay: 20, $Clip: 3, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
127 |
+
//Fade Clip in V
|
128 |
+
, { $Duration: 1200, $Delay: 20, $Clip: 12, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
129 |
+
//Fade Clip out V
|
130 |
+
, { $Duration: 1200, $Delay: 20, $Clip: 12, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
131 |
+
];
|
132 |
+
|
133 |
+
var options = {
|
134 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
135 |
+
$AutoPlayInterval: 1500, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
136 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
137 |
+
|
138 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
139 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
140 |
+
$SlideDuration: 800, //Specifies default duration (swipe) for slide in milliseconds
|
141 |
+
|
142 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
143 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
144 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
145 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
146 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
147 |
+
},
|
148 |
+
|
149 |
+
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
|
150 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
151 |
+
$ChanceToShow: 1 //[Required] 0 Never, 1 Mouse Over, 2 Always
|
152 |
+
},
|
153 |
+
|
154 |
+
$ThumbnailNavigatorOptions: { //[Optional] Options to specify and enable thumbnail navigator or not
|
155 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
156 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
157 |
+
|
158 |
+
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
|
159 |
+
$SpacingX: 8, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
160 |
+
$DisplayPieces: 10, //[Optional] Number of pieces to display, default value is 1
|
161 |
+
$ParkingPosition: 360 //[Optional] The offset position to park thumbnail
|
162 |
+
},
|
163 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
164 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
165 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
166 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
167 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
168 |
+
}
|
169 |
+
};
|
170 |
+
|
171 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
172 |
+
//responsive code begin
|
173 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
174 |
+
function ScaleSlider() {
|
175 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
176 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
177 |
+
if(customWidth==0){
|
178 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
179 |
+
}
|
180 |
+
if (parentWidth)
|
181 |
+
jssor_slider1.$ScaleWidth(Math.max(Math.min(parentWidth, customWidth), 300));
|
182 |
+
else
|
183 |
+
window.setTimeout(ScaleSlider, 30);
|
184 |
+
}
|
185 |
+
ScaleSlider();
|
186 |
+
|
187 |
+
$(window).bind("load", ScaleSlider);
|
188 |
+
$(window).bind("resize", ScaleSlider);
|
189 |
+
$(window).bind("orientationchange", ScaleSlider);
|
190 |
+
//responsive code end
|
191 |
+
});
|
192 |
+
</script>
|
193 |
+
<!-- Jssor Slider Begin -->
|
194 |
+
<!-- You can move inline styles to css file or css block. -->
|
195 |
+
<div class="slidercontainer">
|
196 |
+
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 800px;
|
197 |
+
height: 456px; background: #191919; overflow: hidden;">
|
198 |
+
|
199 |
+
<!-- Loading Screen -->
|
200 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
201 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
202 |
+
background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
|
203 |
+
</div>
|
204 |
+
<div class="loading_screen">
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<!-- Slides Container -->
|
209 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 800px; height: 356px; overflow: hidden;">
|
210 |
+
<?php
|
211 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
212 |
+
$cnt = count($collection);
|
213 |
+
foreach ($collection as $item) {
|
214 |
+
if($item->getstatus()==1){
|
215 |
+
?>
|
216 |
+
<div>
|
217 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
218 |
+
<img u="thumb" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
219 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
220 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
221 |
+
<?php echo $item->gettitle();?>
|
222 |
+
</div>
|
223 |
+
<?php }?>
|
224 |
+
</div>
|
225 |
+
<?php }
|
226 |
+
}?>
|
227 |
+
|
228 |
+
</div>
|
229 |
+
|
230 |
+
<!-- Arrow Left -->
|
231 |
+
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 158px; left: 8px;">
|
232 |
+
</span>
|
233 |
+
<!-- Arrow Right -->
|
234 |
+
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 158px; right: 8px">
|
235 |
+
</span>
|
236 |
+
<!-- Arrow Navigator Skin End -->
|
237 |
+
|
238 |
+
<!-- Thumbnail Navigator Skin Begin -->
|
239 |
+
<div u="thumbnavigator" class="jssort01" style="position: absolute; width: 800px; height: 100px; left:0px; bottom: 0px;">
|
240 |
+
|
241 |
+
<div u="slides" style="cursor: move;">
|
242 |
+
<div u="prototype" class="p" style="position: absolute; width: 72px; height: 72px; top: 0; left: 0;">
|
243 |
+
<div class=w><div u="thumbnailtemplate" style=" width: 100%; height: 100%; border: none;position:absolute; top: 0; left: 0;"></div></div>
|
244 |
+
<div class=c>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
<!-- Thumbnail Item Skin End -->
|
249 |
+
</div>
|
250 |
+
<!-- Thumbnail Navigator Skin End -->
|
251 |
+
</div>
|
252 |
+
</div>
|
app/design/frontend/base/default/template/bannerslider/slider5.phtml
ADDED
@@ -0,0 +1,243 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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ig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--image-gallery-with-vertical-thumbnail.source-->
|
5 |
+
|
6 |
+
<script>
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
|
9 |
+
var _CaptionTransitions = [
|
10 |
+
//CLIP|LR
|
11 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
12 |
+
//CLIP|TB
|
13 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
14 |
+
|
15 |
+
//DDGDANCE|LB
|
16 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
17 |
+
//DDGDANCE|RB
|
18 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
19 |
+
|
20 |
+
//TORTUOUS|HL
|
21 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
22 |
+
//TORTUOUS|VB
|
23 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
24 |
+
|
25 |
+
//ZMF|10
|
26 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
27 |
+
|
28 |
+
//ZML|R
|
29 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
30 |
+
//ZML|B
|
31 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
32 |
+
|
33 |
+
//ZMS|B
|
34 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
35 |
+
|
36 |
+
//ZM*JDN|LB
|
37 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
38 |
+
//ZM*JUP|LB
|
39 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
40 |
+
//ZM*JUP|RB
|
41 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
42 |
+
|
43 |
+
//ZM*WVR|LT
|
44 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
45 |
+
//ZM*WVR|RT
|
46 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
47 |
+
//ZM*WVR|TL
|
48 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
49 |
+
//ZM*WVR|BL
|
50 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
51 |
+
|
52 |
+
//RTT|10
|
53 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
54 |
+
|
55 |
+
//RTTL|R
|
56 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
57 |
+
//RTTL|B
|
58 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
59 |
+
|
60 |
+
//RTTS|R
|
61 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
62 |
+
//RTTS|B
|
63 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
64 |
+
|
65 |
+
//RTT*JDN|RT
|
66 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
67 |
+
//RTT*JDN|LB
|
68 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
69 |
+
//RTT*JUP|RB
|
70 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
71 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
72 |
+
//RTT*JUP|BR
|
73 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
74 |
+
|
75 |
+
//R|IB
|
76 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
77 |
+
//B|IB
|
78 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
79 |
+
|
80 |
+
];
|
81 |
+
|
82 |
+
var _SlideshowTransitions = [
|
83 |
+
//Zoom- in
|
84 |
+
{$Duration: 1200, $Zoom: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2 },
|
85 |
+
//Zoom+ out
|
86 |
+
{$Duration: 1000, $Zoom: 11, $SlideOut: true, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
87 |
+
//Rotate Zoom- in
|
88 |
+
{$Duration: 1200, $Zoom: 1, $Rotate: 1, $During: { $Zoom: [0.2, 0.8], $Rotate: [0.2, 0.8] }, $Easing: { $Zoom: $JssorEasing$.$EaseSwing, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseSwing }, $Opacity: 2, $Round: { $Rotate: 0.5} },
|
89 |
+
//Rotate Zoom+ out
|
90 |
+
{$Duration: 1000, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
91 |
+
|
92 |
+
//Zoom HDouble- in
|
93 |
+
{$Duration: 1200, x: 0.5, $Cols: 2, $Zoom: 1, $Assembly: 2049, $ChessMode: { $Column: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
94 |
+
//Zoom HDouble+ out
|
95 |
+
{$Duration: 1200, x: 4, $Cols: 2, $Zoom: 11, $SlideOut: true, $Assembly: 2049, $ChessMode: { $Column: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
96 |
+
|
97 |
+
//Rotate Zoom- in L
|
98 |
+
{$Duration: 1200, x: 0.6, $Zoom: 1, $Rotate: 1, $During: { $Left: [0.2, 0.8], $Zoom: [0.2, 0.8], $Rotate: [0.2, 0.8] }, $Easing: { $Left: $JssorEasing$.$EaseSwing, $Zoom: $JssorEasing$.$EaseSwing, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseSwing }, $Opacity: 2, $Round: { $Rotate: 0.5} },
|
99 |
+
//Rotate Zoom+ out R
|
100 |
+
{$Duration: 1000, x: -4, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
101 |
+
//Rotate Zoom- in R
|
102 |
+
{$Duration: 1200, x: -0.6, $Zoom: 1, $Rotate: 1, $During: { $Left: [0.2, 0.8], $Zoom: [0.2, 0.8], $Rotate: [0.2, 0.8] }, $Easing: { $Left: $JssorEasing$.$EaseSwing, $Zoom: $JssorEasing$.$EaseSwing, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseSwing }, $Opacity: 2, $Round: { $Rotate: 0.5} },
|
103 |
+
//Rotate Zoom+ out L
|
104 |
+
{$Duration: 1000, x: 4, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
105 |
+
|
106 |
+
//Rotate HDouble- in
|
107 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Cols: 2, $Zoom: 1, $Rotate: 1, $Assembly: 2049, $ChessMode: { $Column: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.7} },
|
108 |
+
//Rotate HDouble- out
|
109 |
+
{$Duration: 1000, x: 0.5, y: 0.3, $Cols: 2, $Zoom: 1, $Rotate: 1, $SlideOut: true, $Assembly: 2049, $ChessMode: { $Column: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Top: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.7} },
|
110 |
+
//Rotate VFork in
|
111 |
+
{$Duration: 1200, x: -4, y: 2, $Rows: 2, $Zoom: 11, $Rotate: 1, $Assembly: 2049, $ChessMode: { $Row: 28 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.7} },
|
112 |
+
//Rotate HFork in
|
113 |
+
{$Duration: 1200, x: 1, y: 2, $Cols: 2, $Zoom: 11, $Rotate: 1, $Assembly: 2049, $ChessMode: { $Column: 19 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} }
|
114 |
+
];
|
115 |
+
|
116 |
+
var options = {
|
117 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
118 |
+
$AutoPlayInterval: 1500, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
119 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
120 |
+
|
121 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
122 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
123 |
+
$SlideDuration: 600, //Specifies default duration (swipe) for slide in milliseconds
|
124 |
+
|
125 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
126 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
127 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
128 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
129 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
130 |
+
},
|
131 |
+
|
132 |
+
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
|
133 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
134 |
+
$ChanceToShow: 1, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
135 |
+
$AutoCenter: 2, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
136 |
+
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
|
137 |
+
},
|
138 |
+
|
139 |
+
$ThumbnailNavigatorOptions: { //[Optional] Options to specify and enable thumbnail navigator or not
|
140 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
141 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
142 |
+
|
143 |
+
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
|
144 |
+
$Lanes: 2, //[Optional] Specify lanes to arrange thumbnails, default value is 1
|
145 |
+
$SpacingX: 14, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
146 |
+
$SpacingY: 12, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
|
147 |
+
$DisplayPieces: 6, //[Optional] Number of pieces to display, default value is 1
|
148 |
+
$ParkingPosition: 156, //[Optional] The offset position to park thumbnail
|
149 |
+
$Orientation: 2 //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1
|
150 |
+
},
|
151 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
152 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
153 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
154 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
155 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
156 |
+
}
|
157 |
+
};
|
158 |
+
|
159 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
160 |
+
//responsive code begin
|
161 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
162 |
+
function ScaleSlider() {
|
163 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
164 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
165 |
+
if(customWidth==0){
|
166 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
167 |
+
}
|
168 |
+
if (parentWidth)
|
169 |
+
jssor_slider1.$ScaleWidth(Math.max(Math.min(parentWidth, customWidth), 300));
|
170 |
+
else
|
171 |
+
window.setTimeout(ScaleSlider, 30);
|
172 |
+
}
|
173 |
+
ScaleSlider();
|
174 |
+
|
175 |
+
$(window).bind("load", ScaleSlider);
|
176 |
+
$(window).bind("resize", ScaleSlider);
|
177 |
+
$(window).bind("orientationchange", ScaleSlider);
|
178 |
+
//responsive code end
|
179 |
+
});
|
180 |
+
</script>
|
181 |
+
<!-- Jssor Slider Begin -->
|
182 |
+
<!-- You can move inline styles to css file or css block. -->
|
183 |
+
<div class="slidercontainer">
|
184 |
+
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 960px;
|
185 |
+
height: 480px; background: #191919; overflow: hidden;">
|
186 |
+
|
187 |
+
<!-- Loading Screen -->
|
188 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
189 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
190 |
+
background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
|
191 |
+
</div>
|
192 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
193 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
|
197 |
+
<!-- Slides Container -->
|
198 |
+
<div u="slides" style="cursor: move; position: absolute; left: 240px; top: 0px; width: 720px; height: 480px; overflow: hidden;">
|
199 |
+
<?php
|
200 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
201 |
+
$cnt = count($collection);
|
202 |
+
foreach ($collection as $item) {
|
203 |
+
if($item->getstatus()==1){
|
204 |
+
?>
|
205 |
+
<div>
|
206 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
207 |
+
<img u="thumb" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
208 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
209 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
210 |
+
<?php echo $item->gettitle();?>
|
211 |
+
</div>
|
212 |
+
<?php }?>
|
213 |
+
</div>
|
214 |
+
<?php }
|
215 |
+
} ?>
|
216 |
+
|
217 |
+
</div>
|
218 |
+
|
219 |
+
<!-- Arrow Left -->
|
220 |
+
<span u="arrowleft" class="jssora05l" style="width: 40px; height: 40px; top: 158px; left: 248px;">
|
221 |
+
</span>
|
222 |
+
<!-- Arrow Right -->
|
223 |
+
<span u="arrowright" class="jssora05r" style="width: 40px; height: 40px; top: 158px; right: 8px">
|
224 |
+
</span>
|
225 |
+
<!-- Arrow Navigator Skin End -->
|
226 |
+
|
227 |
+
<!-- Thumbnail Navigator Skin 02 Begin -->
|
228 |
+
<div u="thumbnavigator" class="jssort02" style="position: absolute; width: 240px; height: 480px; left:0px; bottom: 0px;">
|
229 |
+
|
230 |
+
<!-- Thumbnail Item Skin Begin -->
|
231 |
+
|
232 |
+
<div u="slides" style="cursor: move;">
|
233 |
+
<div u="prototype" class="p" style="position: absolute; width: 99px; height: 66px; top: 0; left: 0;">
|
234 |
+
<div class=w><div u="thumbnailtemplate" style=" width: 100%; height: 100%; border: none;position:absolute; top: 0; left: 0;"></div></div>
|
235 |
+
<div class=c>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
<!-- Thumbnail Item Skin End -->
|
240 |
+
</div>
|
241 |
+
<!-- Thumbnail Navigator Skin End -->
|
242 |
+
</div>
|
243 |
+
</div>
|
app/design/frontend/base/default/template/bannerslider/slider6.phtml
ADDED
@@ -0,0 +1,215 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--image-slider-2.source-->
|
5 |
+
<script>
|
6 |
+
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
var _CaptionTransitions = [
|
9 |
+
//CLIP|LR
|
10 |
+
{$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic },
|
11 |
+
//CLIP|TB
|
12 |
+
{$Duration: 900, $Clip: 12, $Easing: $JssorEasing$.$EaseInOutCubic },
|
13 |
+
|
14 |
+
//DDGDANCE|LB
|
15 |
+
{$Duration: 1800, x: 0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
16 |
+
//DDGDANCE|RB
|
17 |
+
{$Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} },
|
18 |
+
|
19 |
+
//TORTUOUS|HL
|
20 |
+
{$Duration: 1500, x: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Left: [0, 0.7] }, $Round: { $Left: 1.3} },
|
21 |
+
//TORTUOUS|VB
|
22 |
+
{$Duration: 1500, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} },
|
23 |
+
|
24 |
+
//ZMF|10
|
25 |
+
{$Duration: 600, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 },
|
26 |
+
|
27 |
+
//ZML|R
|
28 |
+
{$Duration: 600, x: -0.6, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
29 |
+
//ZML|B
|
30 |
+
{$Duration: 600, y: -0.6, $Zoom: 11, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
31 |
+
|
32 |
+
//ZMS|B
|
33 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2 },
|
34 |
+
|
35 |
+
//ZM*JDN|LB
|
36 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
37 |
+
//ZM*JUP|LB
|
38 |
+
{$Duration: 1200, x: 0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
39 |
+
//ZM*JUP|RB
|
40 |
+
{$Duration: 1200, x: -0.8, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
41 |
+
|
42 |
+
//ZM*WVR|LT
|
43 |
+
{$Duration: 1200, x: 0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
44 |
+
//ZM*WVR|RT
|
45 |
+
{$Duration: 1200, x: -0.5, y: 0.3, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
46 |
+
//ZM*WVR|TL
|
47 |
+
{$Duration: 1200, x: 0.3, y: 0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
48 |
+
//ZM*WVR|BL
|
49 |
+
{$Duration: 1200, x: 0.3, y: -0.5, $Zoom: 11, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
50 |
+
|
51 |
+
//RTT|10
|
52 |
+
{$Duration: 700, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
53 |
+
|
54 |
+
//RTTL|R
|
55 |
+
{$Duration: 700, x: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
56 |
+
//RTTL|B
|
57 |
+
{$Duration: 700, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} },
|
58 |
+
|
59 |
+
//RTTS|R
|
60 |
+
{$Duration: 700, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
61 |
+
//RTTS|B
|
62 |
+
{$Duration: 700, y: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} },
|
63 |
+
|
64 |
+
//RTT*JDN|RT
|
65 |
+
{$Duration: 1000, x: -0.8, y: 0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
66 |
+
//RTT*JDN|LB
|
67 |
+
{$Duration: 1000, x: 0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseOutCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
68 |
+
//RTT*JUP|RB
|
69 |
+
{$Duration: 1000, x: -0.8, y: -0.5, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Top: [0, 0.5]} },
|
70 |
+
{$Duration: 1000, x: -0.5, y: 0.8, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5] }, $Round: { $Rotate: 0.5 } },
|
71 |
+
//RTT*JUP|BR
|
72 |
+
{$Duration: 1000, x: -0.5, y: -0.8, $Zoom: 11, $Rotate: 0.2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseLinear, $Zoom: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $During: { $Left: [0, 0.5]} },
|
73 |
+
|
74 |
+
//R|IB
|
75 |
+
{$Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
76 |
+
//B|IB
|
77 |
+
{$Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 },
|
78 |
+
|
79 |
+
];
|
80 |
+
|
81 |
+
var options = {
|
82 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
83 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
84 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
85 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
86 |
+
|
87 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
88 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
89 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
90 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
91 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
92 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
93 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
94 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
95 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
96 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
97 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
98 |
+
|
99 |
+
$ArrowNavigatorOptions: {
|
100 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
101 |
+
$ChanceToShow: 1, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
102 |
+
$AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
103 |
+
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
|
104 |
+
},
|
105 |
+
|
106 |
+
$ThumbnailNavigatorOptions: {
|
107 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
108 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
109 |
+
|
110 |
+
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
|
111 |
+
$AutoCenter: 3, //[Optional] Auto center thumbnail items in the thumbnail navigator container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 3
|
112 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange thumbnails, default value is 1
|
113 |
+
$SpacingX: 3, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
114 |
+
$SpacingY: 3, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
|
115 |
+
$DisplayPieces: 9, //[Optional] Number of pieces to display, default value is 1
|
116 |
+
$ParkingPosition: 260, //[Optional] The offset position to park thumbnail
|
117 |
+
$Orientation: 1, //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1
|
118 |
+
$DisableDrag: false //[Optional] Disable drag or not, default value is false
|
119 |
+
},
|
120 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
121 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
122 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
123 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
124 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
125 |
+
}
|
126 |
+
};
|
127 |
+
|
128 |
+
var jssor_slider2 = new $JssorSlider$("slider2_container", options);
|
129 |
+
//responsive code begin
|
130 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
131 |
+
function ScaleSlider() {
|
132 |
+
var parentWidth = jssor_slider2.$Elmt.parentNode.clientWidth;
|
133 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
134 |
+
if(customWidth==0){
|
135 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
136 |
+
}
|
137 |
+
if (parentWidth)
|
138 |
+
jssor_slider2.$ScaleWidth(Math.min(parentWidth, customWidth));
|
139 |
+
else
|
140 |
+
window.setTimeout(ScaleSlider, 30);
|
141 |
+
}
|
142 |
+
ScaleSlider();
|
143 |
+
|
144 |
+
$(window).bind("load", ScaleSlider);
|
145 |
+
$(window).bind("resize", ScaleSlider);
|
146 |
+
$(window).bind("orientationchange", ScaleSlider);
|
147 |
+
//responsive code end
|
148 |
+
});
|
149 |
+
</script>
|
150 |
+
<!-- Jssor Slider Begin -->
|
151 |
+
<!-- You can move inline styles to css file or css block. -->
|
152 |
+
<div class="slidercontainer">
|
153 |
+
<div id="slider2_container" style="position: relative; top: 0px; left: 0px; width: 800px; height: 300px; overflow: hidden; ">
|
154 |
+
|
155 |
+
<!-- Loading Screen -->
|
156 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
157 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
158 |
+
background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
|
159 |
+
</div>
|
160 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
161 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<!-- Slides Container -->
|
166 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 800px; height: 300px; overflow: hidden;">
|
167 |
+
<?php
|
168 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
169 |
+
$cnt = count($collection);
|
170 |
+
foreach ($collection as $item) {
|
171 |
+
if($item->getstatus()==1){
|
172 |
+
?>
|
173 |
+
<div>
|
174 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
175 |
+
<img u="thumb" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
176 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
177 |
+
<div u=caption t="*" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
|
178 |
+
<?php echo $item->gettitle();?>
|
179 |
+
</div>
|
180 |
+
<?php }?>
|
181 |
+
</div>
|
182 |
+
<?php }
|
183 |
+
}?>
|
184 |
+
</div>
|
185 |
+
|
186 |
+
<!-- Arrow Navigator Skin Begin -->
|
187 |
+
|
188 |
+
<!-- Arrow Left -->
|
189 |
+
<span u="arrowleft" class="jssora02l" style="width: 55px; height: 55px; top: 123px; left: 8px;">
|
190 |
+
</span>
|
191 |
+
<!-- Arrow Right -->
|
192 |
+
<span u="arrowright" class="jssora02r" style="width: 55px; height: 55px; top: 123px; right: 8px">
|
193 |
+
</span>
|
194 |
+
<!-- Arrow Navigator Skin End -->
|
195 |
+
|
196 |
+
<!-- ThumbnailNavigator Skin Begin -->
|
197 |
+
<div u="thumbnavigator" class="jssort03" style="position: absolute; width: 800px; height: 60px; left:0px; bottom: 0px;">
|
198 |
+
<div style=" background-color: #000; filter:alpha(opacity=30); opacity:.3; width: 100%; height:100%;"></div>
|
199 |
+
|
200 |
+
<!-- Thumbnail Item Skin Begin -->
|
201 |
+
|
202 |
+
<div u="slides" style="cursor: move;">
|
203 |
+
<div u="prototype" class="p" style="POSITION: absolute; WIDTH: 62px; HEIGHT: 32px; TOP: 0; LEFT: 0;">
|
204 |
+
<div class=w><div u="thumbnailtemplate" style=" WIDTH: 100%; HEIGHT: 100%; border: none;position:absolute; TOP: 0; LEFT: 0;"></div></div>
|
205 |
+
<div class=c style="POSITION: absolute; BACKGROUND-COLOR: #000; TOP: 0; LEFT: 0">
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
</div>
|
209 |
+
<!-- Thumbnail Item Skin End -->
|
210 |
+
</div>
|
211 |
+
<!-- ThumbnailNavigator Skin End -->
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<!-- Jssor Slider End -->
|
app/design/frontend/base/default/template/bannerslider/slider7.phtml
ADDED
@@ -0,0 +1,307 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--introduction-slider.source-->
|
5 |
+
|
6 |
+
<script>
|
7 |
+
|
8 |
+
jQuery(document).ready(function ($) {
|
9 |
+
//Reference http://www.jssor.com/development/slider-with-slideshow-jquery.html
|
10 |
+
//Reference http://www.jssor.com/development/tool-slideshow-transition-viewer.html
|
11 |
+
|
12 |
+
var _SlideshowTransitions = [
|
13 |
+
//Collapse Random
|
14 |
+
{ $Duration: 1000, $Delay: 80, $Cols: 10, $Rows: 4, $Clip: 15, $SlideOut: true, $Easing: $JssorEasing$.$EaseOutQuad }
|
15 |
+
|
16 |
+
//Fade in LR Chess
|
17 |
+
, { $Duration: 1200, y: 0.3, $Cols: 2, $During: { $Top: [0.3, 0.7] }, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
|
18 |
+
|
19 |
+
//Rotate VDouble+ out
|
20 |
+
, { $Duration: 1000, x: -1, y: 2, $Rows: 2, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Assembly: 2049, $ChessMode: { $Row: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Top: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.85 } }
|
21 |
+
|
22 |
+
////Swing Inside in Stairs
|
23 |
+
//, { $Duration: 1200, x: 0.2, y: -0.1, $Delay: 20, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Round: { $Left: 1.3, $Top: 2.5} }
|
24 |
+
|
25 |
+
//Zoom HDouble+ out
|
26 |
+
, { $Duration: 1200, x: 4, $Cols: 2, $Zoom: 11, $SlideOut: true, $Assembly: 2049, $ChessMode: { $Column: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
27 |
+
|
28 |
+
////Dodge Pet Inside in Stairs
|
29 |
+
//, { $Duration: 1500, x: 0.2, y: -0.1, $Delay: 20, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Round: { $Left: 0.8, $Top: 2.5} }
|
30 |
+
|
31 |
+
//Rotate Zoom+ out BL
|
32 |
+
, { $Duration: 1200, x: 4, y: -4, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Top: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8 } }
|
33 |
+
|
34 |
+
//Dodge Dance Inside in Random
|
35 |
+
, { $Duration: 1500, x: 0.3, y: -0.3, $Delay: 80, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Clip: $JssorEasing$.$EaseOutQuad }, $Round: { $Left: 0.8, $Top: 2.5 } }
|
36 |
+
|
37 |
+
//Rotate VFork+ out
|
38 |
+
, { $Duration: 1200, x: -3, y: 1, $Rows: 2, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Assembly: 2049, $ChessMode: { $Row: 28 }, $Easing: { $Left: $JssorEasing$.$EaseInExpo, $Top: $JssorEasing$.$EaseInExpo, $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.7 } }
|
39 |
+
|
40 |
+
//Clip and Chess in
|
41 |
+
, { $Duration: 1200, y: -1, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Top: [0.5, 0.5], $Clip: [0, 0.5] }, $Formation: $JssorSlideshowFormations$.$FormationStraight, $ChessMode: { $Column: 12 }, $ScaleClip: 0.5 }
|
42 |
+
|
43 |
+
////Swing Inside in Swirl
|
44 |
+
//, { $Duration: 1200, x: 0.2, y: -0.1, $Delay: 20, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationSwirl, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Round: { $Left: 1.3, $Top: 2.5} }
|
45 |
+
|
46 |
+
////Rotate Zoom+ out
|
47 |
+
//, { $Duration: 1200, $Zoom: 11, $Rotate: 1, $SlideOut: true, $Easing: { $Zoom: $JssorEasing$.$EaseInCubic, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.7} }
|
48 |
+
|
49 |
+
////Dodge Pet Inside in ZigZag
|
50 |
+
//, { $Duration: 1500, x: 0.2, y: -0.1, $Delay: 20, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $Formation: $JssorSlideshowFormations$.$FormationZigZag, $Assembly: 260, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseOutQuad }, $Round: { $Left: 0.8, $Top: 2.5} }
|
51 |
+
|
52 |
+
//Rotate Zoom- out TL
|
53 |
+
, { $Duration: 1200, x: 0.5, y: 0.5, $Zoom: 1, $Rotate: 1, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.5 } }
|
54 |
+
|
55 |
+
//Rotate Zoom- in BR
|
56 |
+
, { $Duration: 1200, x: -0.6, y: -0.6, $Zoom: 1, $Rotate: 1, $During: { $Left: [0.2, 0.8], $Top: [0.2, 0.8], $Zoom: [0.2, 0.8], $Rotate: [0.2, 0.8] }, $Easing: { $Zoom: $JssorEasing$.$EaseSwing, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseSwing }, $Opacity: 2, $Round: { $Rotate: 0.5 } }
|
57 |
+
|
58 |
+
// Wave out Eagle
|
59 |
+
, { $Duration: 1500, y: -0.5, $Delay: 60, $Cols: 24, $SlideOut: true, $Formation: $JssorSlideshowFormations$.$FormationCircle, $Easing: $JssorEasing$.$EaseInWave, $Round: { $Top: 1.5 } }
|
60 |
+
|
61 |
+
//Expand Stairs
|
62 |
+
, { $Duration: 1000, $Delay: 30, $Cols: 10, $Rows: 4, $Clip: 15, $Formation: $JssorSlideshowFormations$.$FormationStraightStairs, $Assembly: 2050, $Easing: $JssorEasing$.$EaseInQuad }
|
63 |
+
|
64 |
+
//Fade Clip out H
|
65 |
+
, { $Duration: 1200, $Delay: 20, $Clip: 3, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
|
66 |
+
|
67 |
+
////Dodge Pet Inside in Random Chess
|
68 |
+
//, { $Duration: 1500, x: 0.2, y: -0.1, $Delay: 80, $Cols: 10, $Rows: 4, $Clip: 15, $During: { $Left: [0.2, 0.8], $Top: [0.2, 0.8] }, $ChessMode: { $Column: 15, $Row: 15 }, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseInWave, $Clip: $JssorEasing$.$EaseLinear }, $Round: { $Left: 0.8, $Top: 2.5} }
|
69 |
+
];
|
70 |
+
|
71 |
+
//Reference http://www.jssor.com/development/slider-with-caption-jquery.html
|
72 |
+
//Reference http://www.jssor.com/development/reference-ui-definition.html#captiondefinition
|
73 |
+
//Reference http://www.jssor.com/development/tool-caption-transition-viewer.html
|
74 |
+
|
75 |
+
var _CaptionTransitions = [];
|
76 |
+
_CaptionTransitions["L"] = { $Duration: 900, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
77 |
+
_CaptionTransitions["R"] = { $Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
78 |
+
_CaptionTransitions["T"] = { $Duration: 900, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
79 |
+
_CaptionTransitions["B"] = { $Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
80 |
+
_CaptionTransitions["TR"] = { $Duration: 900, x: -0.6, y: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
81 |
+
|
82 |
+
_CaptionTransitions["L|IB"] = { $Duration: 1200, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
83 |
+
_CaptionTransitions["R|IB"] = { $Duration: 1200, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
84 |
+
_CaptionTransitions["T|IB"] = { $Duration: 1200, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
85 |
+
|
86 |
+
_CaptionTransitions["CLIP|LR"] = { $Duration: 900, $Clip: 3, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
87 |
+
_CaptionTransitions["CLIP|TB"] = { $Duration: 900, $Clip: 12, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
88 |
+
_CaptionTransitions["CLIP|L"] = { $Duration: 900, $Clip: 1, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
89 |
+
|
90 |
+
_CaptionTransitions["MCLIP|R"] = { $Duration: 900, $Clip: 2, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
91 |
+
_CaptionTransitions["MCLIP|T"] = { $Duration: 900, $Clip: 4, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
92 |
+
|
93 |
+
_CaptionTransitions["WV|B"] = { $Duration: 1200, x: -0.2, y: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Left: 1.5} };
|
94 |
+
|
95 |
+
_CaptionTransitions["TORTUOUS|VB"] = { $Duration: 1800, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} };
|
96 |
+
|
97 |
+
_CaptionTransitions["LISTH|R"] = { $Duration: 1500, x: -0.8, $Clip: 1, $Easing: $JssorEasing$.$EaseInOutCubic, $ScaleClip: 0.8, $Opacity: 2, $During: { $Left: [0.4, 0.6], $Clip: [0, 0.4], $Opacity: [0.4, 0.6]} };
|
98 |
+
|
99 |
+
_CaptionTransitions["RTT|360"] = { $Duration: 900, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 };
|
100 |
+
_CaptionTransitions["RTT|10"] = { $Duration: 900, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
101 |
+
|
102 |
+
_CaptionTransitions["RTTL|BR"] = { $Duration: 900, x: -0.6, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
103 |
+
|
104 |
+
_CaptionTransitions["T|IE*IE"] = { $Duration: 1800, y: 0.8, $Zoom: 11, $Rotate: -1.5, $Easing: { $Top: $JssorEasing$.$EaseInOutElastic, $Zoom: $JssorEasing$.$EaseInElastic, $Rotate: $JssorEasing$.$EaseInOutElastic }, $Opacity: 2, $During: { $Zoom: [0, 0.8], $Opacity: [0, 0.7] }, $Round: { $Rotate: 0.5} };
|
105 |
+
|
106 |
+
_CaptionTransitions["RTTS|R"] = { $Duration: 900, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
107 |
+
_CaptionTransitions["RTTS|T"] = { $Duration: 900, y: 0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
108 |
+
|
109 |
+
_CaptionTransitions["DDGDANCE|RB"] = { $Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} };
|
110 |
+
_CaptionTransitions["ZMF|10"] = { $Duration: 900, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 };
|
111 |
+
_CaptionTransitions["DDG|TR"] = { $Duration: 1200, x: -0.3, y: 0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 0.8} };
|
112 |
+
|
113 |
+
_CaptionTransitions["FLTTR|R"] = { $Duration: 900, x: -0.2, y: -0.1, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Top: 1.3} };
|
114 |
+
_CaptionTransitions["FLTTRWN|LT"] = { $Duration: 1800, x: 0.5, y: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.7], $Top: [0.1, 0.7] }, $Round: { $Top: 1.3} };
|
115 |
+
|
116 |
+
_CaptionTransitions["ATTACK|BR"] = { $Duration: 1500, x: -0.1, y: -0.5, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Top: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $During: { $Left: [0.3, 0.7], $Top: [0, 0.7] }, $Round: { $Left: 1.3} };
|
117 |
+
|
118 |
+
_CaptionTransitions["FADE"] = { $Duration: 900, $Opacity: 2 };
|
119 |
+
|
120 |
+
var options = {
|
121 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
122 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
123 |
+
$AutoPlayInterval: 2000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
124 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
125 |
+
|
126 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
127 |
+
$SlideEasing: $JssorEasing$.$EaseOutQuint, //[Optional] Specifies easing for right to left animation, default value is $JssorEasing$.$EaseOutQuad
|
128 |
+
$SlideDuration: 800, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
129 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
130 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
131 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
132 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
133 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
134 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
135 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
136 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
137 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
138 |
+
|
139 |
+
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
|
140 |
+
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
|
141 |
+
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
|
142 |
+
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
|
143 |
+
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
|
144 |
+
},
|
145 |
+
|
146 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
147 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
148 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
149 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
150 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
151 |
+
},
|
152 |
+
|
153 |
+
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
|
154 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
155 |
+
$ChanceToShow: 1, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
156 |
+
$AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
157 |
+
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
|
158 |
+
},
|
159 |
+
|
160 |
+
$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not
|
161 |
+
$Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance
|
162 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
163 |
+
$AutoCenter: 1, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
164 |
+
$Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1
|
165 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1
|
166 |
+
$SpacingX: 4, //[Optional] Horizontal space between each item in pixel, default value is 0
|
167 |
+
$SpacingY: 4, //[Optional] Vertical space between each item in pixel, default value is 0
|
168 |
+
$Orientation: 1 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1
|
169 |
+
}
|
170 |
+
};
|
171 |
+
|
172 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
173 |
+
//responsive code begin
|
174 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
175 |
+
function ScaleSlider() {
|
176 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
177 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
178 |
+
if(customWidth==0){
|
179 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
180 |
+
}
|
181 |
+
if (parentWidth)
|
182 |
+
jssor_slider1.$ScaleWidth(Math.max(Math.min(parentWidth, customWidth), 300));
|
183 |
+
else
|
184 |
+
window.setTimeout(ScaleSlider, 30);
|
185 |
+
}
|
186 |
+
ScaleSlider();
|
187 |
+
|
188 |
+
$(window).bind("load", ScaleSlider);
|
189 |
+
$(window).bind("resize", ScaleSlider);
|
190 |
+
$(window).bind("orientationchange", ScaleSlider);
|
191 |
+
//responsive code end
|
192 |
+
});
|
193 |
+
</script>
|
194 |
+
|
195 |
+
<!-- Jssor Slider Begin -->
|
196 |
+
<!-- You can move inline styles to css file or css block. -->
|
197 |
+
<div class="slidercontainer">
|
198 |
+
<div id="slider1_container" style="position: relative; width: 980px;
|
199 |
+
height: 380px; overflow: hidden;">
|
200 |
+
|
201 |
+
<!-- Loading Screen -->
|
202 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
203 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
204 |
+
|
205 |
+
background-color: #000; top: 0px; left: 0px;width: 100%; height:100%;">
|
206 |
+
</div>
|
207 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
208 |
+
|
209 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
|
213 |
+
<!-- Slides Container -->
|
214 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 980px; height: 380px;
|
215 |
+
overflow: hidden;">
|
216 |
+
<?php
|
217 |
+
|
218 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
219 |
+
|
220 |
+
$cnt = count($collection);
|
221 |
+
foreach ($collection as $item) {
|
222 |
+
if($item->getstatus()==1){
|
223 |
+
?>
|
224 |
+
|
225 |
+
|
226 |
+
<div>
|
227 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
228 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
229 |
+
<div u=caption t="CLIP|LR" du="1500" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:500px; height:30px;">
|
230 |
+
<?php echo $item->gettitle() ?>
|
231 |
+
</div>
|
232 |
+
<?php }?>
|
233 |
+
<!--div u=caption t="L|IB" t2=L d=-900 class="captionBlack" style="position:absolute; left:360px; top: 130px; width:60px; height:30px;">
|
234 |
+
comes
|
235 |
+
</div>
|
236 |
+
<div u=caption t="RTT|360" d=-200 class="captionBlack" style="position:absolute; left:360px; top: 180px; width:60px; height:30px;">
|
237 |
+
with
|
238 |
+
</div>
|
239 |
+
<div u=caption t="DDGDANCE|RB" t2="RTT|10" d=-1800 du=3800 class="captionOrange" style="position:absolute; left:560px; top: 110px; width:200px; height:120px; text-align: left;">
|
240 |
+
Banner Slider<br />
|
241 |
+
Image Gallery Slider<br />
|
242 |
+
Image Slider<br />
|
243 |
+
Carousel Slider
|
244 |
+
</div>
|
245 |
+
<div u=caption t="T|IE*IE" d=-1600 du=3800 t2="B" class="captionOrange" style="position:absolute; left:20px; top: 310px; width:330px; height:30px;">
|
246 |
+
slideshow and responsive slider ...
|
247 |
+
</div>
|
248 |
+
<div u="caption" t="ZMF|10" t2="B" d=-1300 style="position:absolute;left:420px;top:280px;width:90px;height:40px;font-size:36px;color:#fff;line-height:40px;">390+</div>
|
249 |
+
<div u="caption" t="CLIP|L" d=-300 style="position:absolute;left:520px;top:280px;width:160px;height:40px;font-size:36px;color:#fff;line-height:40px; text-align: center;">caption</div>
|
250 |
+
<a class="captionOrange" u="caption" t="CLIP|L" d=-300 href="http://www.jssor.com/development/tool-caption-transition-viewer.html" style="position:absolute;left:720px;top:280px;width:220px;height:40px;font-size:36px;color:#fff;line-height:40px;">transitions</a-->
|
251 |
+
</div>
|
252 |
+
<?php }
|
253 |
+
}?>
|
254 |
+
|
255 |
+
|
256 |
+
<!-- Example to add fixed static share buttons in slider BEGIN -->
|
257 |
+
<!-- Remove it if no need -->
|
258 |
+
<!-- Share Button Styles -->
|
259 |
+
|
260 |
+
|
261 |
+
<div u="any" style="position: absolute; display: block; top: 6px; right: 16px; width: 280px; height: 40px;">
|
262 |
+
|
263 |
+
<a class="share-icon share-facebook" target="_blank" href="https://www.facebook.com/pages/Dataman-Computer-Systems-Pvt-Ltd/183729281657133" title="Share on Facebook"></a>
|
264 |
+
<a class="share-icon share-twitter" target="_blank" href="https://twitter.com/Datamanknp" title="Share on Twitter"></a>
|
265 |
+
<a class="share-icon share-googleplus" target="_blank" href="https://plus.google.com/u/0/117238765872717320790/posts" title="Share on Google Plus"></a>
|
266 |
+
<a class="share-icon share-linkedin" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=http://jssor.com" title="Share on LinkedIn"></a>
|
267 |
+
<a class="share-icon share-stumbleupon" target="_blank" href="http://www.stumbleupon.com/submit?url=http://jssor.com&title=JavaScript%20jQuery%20Image%20Slider/Slideshow/Carousel/Gallery/Banner%20html%20TOUCH%20SWIPE%20Responsive" title="Share on StumbleUpon"></a>
|
268 |
+
<a class="share-icon share-pinterest" target="_blank" href="http://pinterest.com/pin/create/button/?url=http://jssor.com&media=http://jssor.com/img/site/jssor.slider.jpg&description=JavaScript%20jQuery%20Image%20Slider/Slideshow/Carousel/Gallery/Banner%20html%20TOUCH%20SWIPE%20Responsive" title="Share on Pinterst"></a>
|
269 |
+
<a class="share-icon share-email" target="_blank" href="mailto:?Subject=Jssor%20Slider&Body=Highly%20recommended%20JavaScript%20jQuery%20Image%20Slider/Slideshow/Carousel/Gallery/Banner%20html%20TOUCH%20SWIPE%20Responsive%20http://jssor.com" title="Share by Email"></a>
|
270 |
+
</div>
|
271 |
+
<!-- Example to add fixed static share buttons in slider END -->
|
272 |
+
|
273 |
+
<!-- Example to add fixed static QR code in slider BEGIN -->
|
274 |
+
<!-- Remove it if no need -->
|
275 |
+
<!-- QR Code Style -->
|
276 |
+
<style>
|
277 |
+
@media only screen and (max-width: 980px) {
|
278 |
+
.qr_code {
|
279 |
+
display: none;
|
280 |
+
}
|
281 |
+
}
|
282 |
+
</style>
|
283 |
+
<div u="any" class="qr_code" style="position: absolute; width: 80px; height: 80px; bottom: 20px; right: 20px; opacity: .5; filter: alpha(opacity=50);"></div>
|
284 |
+
<!-- Example to add fixed static QR code in slider END -->
|
285 |
+
</div>
|
286 |
+
|
287 |
+
<!-- Bullet Navigator Skin Begin -->
|
288 |
+
|
289 |
+
<!-- bullet navigator container -->
|
290 |
+
<div u="navigator" class="jssorb03" style="position: absolute; bottom: 16px; left: 6px;">
|
291 |
+
<!-- bullet navigator item prototype -->
|
292 |
+
<div u="prototype" style="POSITION: absolute; WIDTH: 21px; HEIGHT: 21px; text-align:center; line-height:21px; color:White; font-size:12px;"><div u="numbertemplate"></div></div>
|
293 |
+
</div>
|
294 |
+
<!-- Bullet Navigator Skin End -->
|
295 |
+
|
296 |
+
<!-- Arrow Navigator Skin Begin -->
|
297 |
+
|
298 |
+
<!-- Arrow Left -->
|
299 |
+
<span u="arrowleft" class="jssora20l" style="width: 55px; height: 55px; top: 123px; left: 8px;">
|
300 |
+
</span>
|
301 |
+
<!-- Arrow Right -->
|
302 |
+
<span u="arrowright" class="jssora20r" style="width: 55px; height: 55px; top: 123px; right: 8px">
|
303 |
+
</span>
|
304 |
+
<!-- Arrow Navigator Skin End -->
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--list-slider.source-->
|
5 |
+
<script>
|
6 |
+
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
var _CaptionTransitions = [];
|
9 |
+
_CaptionTransitions["L"] = { $Duration: 900, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
10 |
+
_CaptionTransitions["R"] = { $Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
11 |
+
_CaptionTransitions["T"] = { $Duration: 900, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
12 |
+
_CaptionTransitions["B"] = { $Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
13 |
+
_CaptionTransitions["TR"] = { $Duration: 900, x: -0.6, y: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
14 |
+
|
15 |
+
_CaptionTransitions["L|IB"] = { $Duration: 1200, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
16 |
+
_CaptionTransitions["R|IB"] = { $Duration: 1200, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
17 |
+
_CaptionTransitions["T|IB"] = { $Duration: 1200, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
18 |
+
|
19 |
+
_CaptionTransitions["CLIP|LR"] = { $Duration: 900, $Clip: 3, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
20 |
+
_CaptionTransitions["CLIP|TB"] = { $Duration: 900, $Clip: 12, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
21 |
+
_CaptionTransitions["CLIP|L"] = { $Duration: 900, $Clip: 1, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
22 |
+
|
23 |
+
_CaptionTransitions["MCLIP|R"] = { $Duration: 900, $Clip: 2, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
24 |
+
_CaptionTransitions["MCLIP|T"] = { $Duration: 900, $Clip: 4, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
25 |
+
|
26 |
+
_CaptionTransitions["WV|B"] = { $Duration: 1200, x: -0.2, y: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Left: 1.5} };
|
27 |
+
|
28 |
+
_CaptionTransitions["TORTUOUS|VB"] = { $Duration: 1800, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} };
|
29 |
+
|
30 |
+
_CaptionTransitions["LISTH|R"] = { $Duration: 1500, x: -0.8, $Clip: 1, $Easing: $JssorEasing$.$EaseInOutCubic, $ScaleClip: 0.8, $Opacity: 2, $During: { $Left: [0.4, 0.6], $Clip: [0, 0.4], $Opacity: [0.4, 0.6]} };
|
31 |
+
|
32 |
+
_CaptionTransitions["RTT|360"] = { $Duration: 900, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 };
|
33 |
+
_CaptionTransitions["RTT|10"] = { $Duration: 900, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
34 |
+
|
35 |
+
_CaptionTransitions["RTTL|BR"] = { $Duration: 900, x: -0.6, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
36 |
+
|
37 |
+
_CaptionTransitions["T|IE*IE"] = { $Duration: 1800, y: 0.8, $Zoom: 11, $Rotate: -1.5, $Easing: { $Top: $JssorEasing$.$EaseInOutElastic, $Zoom: $JssorEasing$.$EaseInElastic, $Rotate: $JssorEasing$.$EaseInOutElastic }, $Opacity: 2, $During: { $Zoom: [0, 0.8], $Opacity: [0, 0.7] }, $Round: { $Rotate: 0.5} };
|
38 |
+
|
39 |
+
_CaptionTransitions["RTTS|R"] = { $Duration: 900, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
40 |
+
_CaptionTransitions["RTTS|T"] = { $Duration: 900, y: 0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
41 |
+
|
42 |
+
_CaptionTransitions["DDGDANCE|RB"] = { $Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} };
|
43 |
+
_CaptionTransitions["ZMF|10"] = { $Duration: 900, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 };
|
44 |
+
_CaptionTransitions["DDG|TR"] = { $Duration: 1200, x: -0.3, y: 0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 0.8} };
|
45 |
+
|
46 |
+
_CaptionTransitions["FLTTR|R"] = { $Duration: 900, x: -0.2, y: -0.1, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Top: 1.3} };
|
47 |
+
_CaptionTransitions["FLTTRWN|LT"] = { $Duration: 1800, x: 0.5, y: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.7], $Top: [0.1, 0.7] }, $Round: { $Top: 1.3} };
|
48 |
+
|
49 |
+
_CaptionTransitions["ATTACK|BR"] = { $Duration: 1500, x: -0.1, y: -0.5, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Top: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $During: { $Left: [0.3, 0.7], $Top: [0, 0.7] }, $Round: { $Left: 1.3} };
|
50 |
+
|
51 |
+
_CaptionTransitions["FADE"] = { $Duration: 900, $Opacity: 2 };
|
52 |
+
|
53 |
+
var options = {
|
54 |
+
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
|
55 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
|
56 |
+
$AutoPlayInterval: 4000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
|
57 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
58 |
+
$Loop: 0, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
|
59 |
+
|
60 |
+
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
|
61 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
|
62 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
|
63 |
+
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
|
64 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
|
65 |
+
$SlideSpacing: 5, //[Optional] Space between each slide in pixels, default value is 0
|
66 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
67 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
68 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
|
69 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
70 |
+
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
71 |
+
|
72 |
+
$ThumbnailNavigatorOptions: {
|
73 |
+
$Class: $JssorThumbnailNavigator$, //[Required] Class to create thumbnail navigator instance
|
74 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
75 |
+
|
76 |
+
$Loop: 2, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
|
77 |
+
$AutoCenter: 3, //[Optional] Auto center thumbnail items in the thumbnail navigator container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 3
|
78 |
+
$Lanes: 1, //[Optional] Specify lanes to arrange thumbnails, default value is 1
|
79 |
+
$SpacingX: 4, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
|
80 |
+
$SpacingY: 4, //[Optional] Vertical space between each thumbnail in pixel, default value is 0
|
81 |
+
$DisplayPieces: 4, //[Optional] Number of pieces to display, default value is 1
|
82 |
+
$ParkingPosition: 0, //[Optional] The offset position to park thumbnail
|
83 |
+
$Orientation: 2, //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1
|
84 |
+
$DisableDrag: false //[Optional] Disable drag or not, default value is false
|
85 |
+
},
|
86 |
+
|
87 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
88 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
89 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
90 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
91 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
92 |
+
}
|
93 |
+
};
|
94 |
+
|
95 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
96 |
+
|
97 |
+
//responsive code begin
|
98 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
99 |
+
function ScaleSlider() {
|
100 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
101 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
102 |
+
if(customWidth==0){
|
103 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
104 |
+
}
|
105 |
+
if (parentWidth) {
|
106 |
+
var sliderWidth = parentWidth;
|
107 |
+
|
108 |
+
//keep the slider width no more than 810
|
109 |
+
sliderWidth = Math.min(sliderWidth, customWidth);
|
110 |
+
|
111 |
+
jssor_slider1.$ScaleWidth(sliderWidth);
|
112 |
+
}
|
113 |
+
else
|
114 |
+
window.setTimeout(ScaleSlider, 30);
|
115 |
+
}
|
116 |
+
ScaleSlider();
|
117 |
+
|
118 |
+
$(window).bind("load", ScaleSlider);
|
119 |
+
$(window).bind("resize", ScaleSlider);
|
120 |
+
$(window).bind("orientationchange", ScaleSlider);
|
121 |
+
//responsive code end
|
122 |
+
});
|
123 |
+
</script>
|
124 |
+
<!-- Jssor Slider Begin -->
|
125 |
+
<!-- You can move inline styles to css file or css block. -->
|
126 |
+
<div class="slidercontainer">
|
127 |
+
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 810px; height: 300px; background: #000; overflow: hidden; ">
|
128 |
+
|
129 |
+
<!-- Loading Screen -->
|
130 |
+
<div u="loading" style="position: absolute; top: 0px; left: 0px;">
|
131 |
+
<div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
|
132 |
+
background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
|
133 |
+
</div>
|
134 |
+
<div style="position: absolute; display: block; background: url(../img/loading.gif) no-repeat center center;
|
135 |
+
top: 0px; left: 0px;width: 100%;height:100%;">
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<!-- Slides Container -->
|
140 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 600px; height: 300px;
|
141 |
+
overflow: hidden;">
|
142 |
+
<?php
|
143 |
+
|
144 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
145 |
+
|
146 |
+
$cnt = count($collection);
|
147 |
+
foreach ($collection as $item) {
|
148 |
+
if($item->getstatus()==1){
|
149 |
+
?>
|
150 |
+
<div>
|
151 |
+
<img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
152 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
153 |
+
<div u=caption t="CLIP|LR" du="1500" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:500px; height:30px;">
|
154 |
+
<?php echo $item->gettitle(); ?>
|
155 |
+
</div>
|
156 |
+
<?php }?>
|
157 |
+
<div u="thumb">
|
158 |
+
<img class="i" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
159 |
+
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
<?php }
|
163 |
+
}?>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<!-- ThumbnailNavigator Skin Begin -->
|
167 |
+
<div u="thumbnavigator" class="jssort11" style="position: absolute; width: 200px; height: 300px; left:605px; top:0px;">
|
168 |
+
<!-- Thumbnail Item Skin Begin -->
|
169 |
+
|
170 |
+
<div u="slides" style="cursor: move;">
|
171 |
+
<div u="prototype" class="p" style="position: absolute; width: 200px; height: 69px; top: 0; left: 0;">
|
172 |
+
<div u="thumbnailtemplate" style=" width: 100%; height: 100%; border: none;position:absolute; top: 0; left: 0;"></div>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
<!-- Thumbnail Item Skin End -->
|
176 |
+
</div>
|
177 |
+
<!-- ThumbnailNavigator Skin End -->
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
<!-- Jssor Slider End -->
|
app/design/frontend/base/default/template/bannerslider/slider9.phtml
ADDED
@@ -0,0 +1,140 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$banner_width=intval(Mage::getStoreConfig('tab1/general/text_field'));
|
3 |
+
?>
|
4 |
+
<!--nearby-image-partial-visible-slider.source-->
|
5 |
+
<script>
|
6 |
+
|
7 |
+
jQuery(document).ready(function ($) {
|
8 |
+
var _CaptionTransitions = [];
|
9 |
+
_CaptionTransitions["L"] = { $Duration: 900, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
10 |
+
_CaptionTransitions["R"] = { $Duration: 900, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
11 |
+
_CaptionTransitions["T"] = { $Duration: 900, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
12 |
+
_CaptionTransitions["B"] = { $Duration: 900, y: -0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
13 |
+
_CaptionTransitions["TR"] = { $Duration: 900, x: -0.6, y: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInOutSine }, $Opacity: 2 };
|
14 |
+
|
15 |
+
_CaptionTransitions["L|IB"] = { $Duration: 1200, x: 0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
16 |
+
_CaptionTransitions["R|IB"] = { $Duration: 1200, x: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
17 |
+
_CaptionTransitions["T|IB"] = { $Duration: 1200, y: 0.6, $Easing: { $Top: $JssorEasing$.$EaseInOutBack }, $Opacity: 2 };
|
18 |
+
|
19 |
+
_CaptionTransitions["CLIP|LR"] = { $Duration: 900, $Clip: 3, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
20 |
+
_CaptionTransitions["CLIP|TB"] = { $Duration: 900, $Clip: 12, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
21 |
+
_CaptionTransitions["CLIP|L"] = { $Duration: 900, $Clip: 1, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
22 |
+
|
23 |
+
_CaptionTransitions["MCLIP|R"] = { $Duration: 900, $Clip: 2, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
24 |
+
_CaptionTransitions["MCLIP|T"] = { $Duration: 900, $Clip: 4, $Move: true, $Easing: { $Clip: $JssorEasing$.$EaseInOutCubic }, $Opacity: 2 };
|
25 |
+
|
26 |
+
_CaptionTransitions["WV|B"] = { $Duration: 1200, x: -0.2, y: -0.6, $Easing: { $Left: $JssorEasing$.$EaseInWave, $Top: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Round: { $Left: 1.5} };
|
27 |
+
|
28 |
+
_CaptionTransitions["TORTUOUS|VB"] = { $Duration: 1800, y: -0.2, $Zoom: 1, $Easing: { $Top: $JssorEasing$.$EaseOutWave, $Zoom: $JssorEasing$.$EaseOutCubic }, $Opacity: 2, $During: { $Top: [0, 0.7] }, $Round: { $Top: 1.3} };
|
29 |
+
|
30 |
+
_CaptionTransitions["LISTH|R"] = { $Duration: 1500, x: -0.8, $Clip: 1, $Easing: $JssorEasing$.$EaseInOutCubic, $ScaleClip: 0.8, $Opacity: 2, $During: { $Left: [0.4, 0.6], $Clip: [0, 0.4], $Opacity: [0.4, 0.6]} };
|
31 |
+
|
32 |
+
_CaptionTransitions["RTT|360"] = { $Duration: 900, $Rotate: 1, $Easing: { $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInQuad }, $Opacity: 2 };
|
33 |
+
_CaptionTransitions["RTT|10"] = { $Duration: 900, $Zoom: 11, $Rotate: 1, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
34 |
+
|
35 |
+
_CaptionTransitions["RTTL|BR"] = { $Duration: 900, x: -0.6, y: -0.6, $Zoom: 11, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Zoom: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear, $Rotate: $JssorEasing$.$EaseInCubic }, $Opacity: 2, $Round: { $Rotate: 0.8} };
|
36 |
+
|
37 |
+
_CaptionTransitions["T|IE*IE"] = { $Duration: 1800, y: 0.8, $Zoom: 11, $Rotate: -1.5, $Easing: { $Top: $JssorEasing$.$EaseInOutElastic, $Zoom: $JssorEasing$.$EaseInElastic, $Rotate: $JssorEasing$.$EaseInOutElastic }, $Opacity: 2, $During: { $Zoom: [0, 0.8], $Opacity: [0, 0.7] }, $Round: { $Rotate: 0.5} };
|
38 |
+
|
39 |
+
_CaptionTransitions["RTTS|R"] = { $Duration: 900, x: -0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Left: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
40 |
+
_CaptionTransitions["RTTS|T"] = { $Duration: 900, y: 0.6, $Zoom: 1, $Rotate: 1, $Easing: { $Top: $JssorEasing$.$EaseInQuad, $Zoom: $JssorEasing$.$EaseInQuad, $Rotate: $JssorEasing$.$EaseInQuad, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $Round: { $Rotate: 1.2} };
|
41 |
+
|
42 |
+
_CaptionTransitions["DDGDANCE|RB"] = { $Duration: 1800, x: -0.3, y: -0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump, $Zoom: $JssorEasing$.$EaseOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 2.5} };
|
43 |
+
_CaptionTransitions["ZMF|10"] = { $Duration: 900, $Zoom: 11, $Easing: { $Zoom: $JssorEasing$.$EaseInExpo, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 };
|
44 |
+
_CaptionTransitions["DDG|TR"] = { $Duration: 1200, x: -0.3, y: 0.3, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInJump, $Top: $JssorEasing$.$EaseInJump }, $Opacity: 2, $During: { $Left: [0, 0.8], $Top: [0, 0.8] }, $Round: { $Left: 0.8, $Top: 0.8} };
|
45 |
+
|
46 |
+
_CaptionTransitions["FLTTR|R"] = { $Duration: 900, x: -0.2, y: -0.1, $Easing: { $Left: $JssorEasing$.$EaseLinear, $Top: $JssorEasing$.$EaseInWave }, $Opacity: 2, $Round: { $Top: 1.3} };
|
47 |
+
_CaptionTransitions["FLTTRWN|LT"] = { $Duration: 1800, x: 0.5, y: 0.2, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseInOutSine, $Top: $JssorEasing$.$EaseInWave, $Zoom: $JssorEasing$.$EaseInOutQuad }, $Opacity: 2, $During: { $Left: [0, 0.7], $Top: [0.1, 0.7] }, $Round: { $Top: 1.3} };
|
48 |
+
|
49 |
+
_CaptionTransitions["ATTACK|BR"] = { $Duration: 1500, x: -0.1, y: -0.5, $Zoom: 1, $Easing: { $Left: $JssorEasing$.$EaseOutWave, $Top: $JssorEasing$.$EaseInExpo }, $Opacity: 2, $During: { $Left: [0.3, 0.7], $Top: [0, 0.7] }, $Round: { $Left: 1.3} };
|
50 |
+
|
51 |
+
_CaptionTransitions["FADE"] = { $Duration: 900, $Opacity: 2 };
|
52 |
+
|
53 |
+
var options = {
|
54 |
+
$AutoPlay: true,
|
55 |
+
|
56 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slideshow is auto playing, default value is false
|
57 |
+
|
58 |
+
$ArrowKeyNavigation: true, //Allows arrow key to navigate or not
|
59 |
+
$SlideWidth: 600, //[Optional] Width of every slide in pixels, the default is width of 'slides' container
|
60 |
+
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, the default is width of 'slides' container
|
61 |
+
$SlideSpacing: 0, //Space between each slide in pixels
|
62 |
+
$DisplayPieces: 2, //Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
|
63 |
+
$ParkingPosition: 100, //The offset position to park slide (this options applys only when slideshow disabled).
|
64 |
+
|
65 |
+
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
|
66 |
+
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
|
67 |
+
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
|
68 |
+
$AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
|
69 |
+
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
|
70 |
+
},
|
71 |
+
|
72 |
+
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
|
73 |
+
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
|
74 |
+
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
|
75 |
+
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
|
76 |
+
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
|
77 |
+
}
|
78 |
+
};
|
79 |
+
|
80 |
+
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
|
81 |
+
|
82 |
+
//responsive code begin
|
83 |
+
//you can remove responsive code if you don't want the slider scales while window resizes
|
84 |
+
function ScaleSlider() {
|
85 |
+
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
86 |
+
var customWidth=<?php echo json_encode($banner_width); ?>;
|
87 |
+
if(customWidth==0){
|
88 |
+
customWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
|
89 |
+
}
|
90 |
+
if (parentWidth)
|
91 |
+
jssor_slider1.$ScaleWidth(Math.min(parentWidth, customWidth));
|
92 |
+
else
|
93 |
+
window.setTimeout(ScaleSlider, 30);
|
94 |
+
}
|
95 |
+
ScaleSlider();
|
96 |
+
|
97 |
+
$(window).bind("load", ScaleSlider);
|
98 |
+
$(window).bind("resize", ScaleSlider);
|
99 |
+
$(window).bind("orientationchange", ScaleSlider);
|
100 |
+
//responsive code end
|
101 |
+
});
|
102 |
+
</script>
|
103 |
+
<!-- Jssor Slider Begin -->
|
104 |
+
<!-- You can move inline styles to css file or css block. -->
|
105 |
+
<div class="slidercontainer">
|
106 |
+
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 800px;
|
107 |
+
height: 300px; overflow: hidden;">
|
108 |
+
<!-- Slides Container -->
|
109 |
+
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 800px; height: 300px;
|
110 |
+
overflow: hidden;">
|
111 |
+
<?php
|
112 |
+
$collection = Mage::getModel('bannerslider/bannerslider')->getCollection();
|
113 |
+
$cnt = count($collection);
|
114 |
+
foreach ($collection as $item) {
|
115 |
+
if($item->getstatus()==1){
|
116 |
+
?>
|
117 |
+
<div><img u="image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'bannerslider/images/'.$item->getfilename() ?>" />
|
118 |
+
<?php if($item->gettitlestatus()==1){ ?>
|
119 |
+
<div u=caption t="CLIP|LR" du="1500" class="captionOrange" style="position:absolute; left:20px; top: 30px; width:500px; height:30px;">
|
120 |
+
<?php echo $item->gettitle(); ?>
|
121 |
+
</div>
|
122 |
+
<?php }?>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<?php }
|
126 |
+
}?>
|
127 |
+
</div>
|
128 |
+
|
129 |
+
<!-- Arrow Navigator Skin Begin -->
|
130 |
+
|
131 |
+
<!-- Arrow Left -->
|
132 |
+
<span u="arrowleft" class="jssora13l" style="width: 40px; height: 50px; top: 123px; left: 30px;">
|
133 |
+
</span>
|
134 |
+
<!-- Arrow Right -->
|
135 |
+
<span u="arrowright" class="jssora13r" style="width: 40px; height: 50px; top: 123px; right: 30px">
|
136 |
+
</span>
|
137 |
+
<!-- Arrow Navigator Skin End -->
|
138 |
+
</div>
|
139 |
+
<!-- Jssor Slider End -->
|
140 |
+
</div>
|
app/etc/modules/Dataman_Bannerslider.xml
ADDED
@@ -0,0 +1,17 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Dataman
|
5 |
+
* @package Dataman_Bannerslider
|
6 |
+
* @author Priyanka_dataman
|
7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
*/
|
9 |
+
-->
|
10 |
+
<config>
|
11 |
+
<modules>
|
12 |
+
<Dataman_Bannerslider>
|
13 |
+
<active>true</active>
|
14 |
+
<codePool>local</codePool>
|
15 |
+
</Dataman_Bannerslider>
|
16 |
+
</modules>
|
17 |
+
</config>
|
js/bannerslider/jquery-1.9.1.min.js
ADDED
@@ -0,0 +1,20 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+

|
2 |
+
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
|
3 |
+
//@ sourceMappingURL=jquery.min.map
|
4 |
+
*/
|
5 |
+
(function (e, t) {
|
6 |
+
var n, r, i = typeof t, o = e.document, a = e.location, s = e.jQuery, u = e.$, l = {}, c = [], p = "1.9.1", f = c.concat, d = c.push, h = c.slice, g = c.indexOf, m = l.toString, y = l.hasOwnProperty, v = p.trim, b = function (e, t) { return new b.fn.init(e, t, r) }, x = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, w = /\S+/g, T = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, N = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, C = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, k = /^[\],:{}\s]*$/, E = /(?:^|:|,)(?:\s*\[)+/g, S = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, A = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, j = /^-ms-/, D = /-([\da-z])/gi, L = function (e, t) { return t.toUpperCase() }, H = function (e) { (o.addEventListener || "load" === e.type || "complete" === o.readyState) && (q(), b.ready()) }, q = function () { o.addEventListener ? (o.removeEventListener("DOMContentLoaded", H, !1), e.removeEventListener("load", H, !1)) : (o.detachEvent("onreadystatechange", H), e.detachEvent("onload", H)) }; b.fn = b.prototype = { jquery: p, constructor: b, init: function (e, n, r) { var i, a; if (!e) return this; if ("string" == typeof e) { if (i = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : N.exec(e), !i || !i[1] && n) return !n || n.jquery ? (n || r).find(e) : this.constructor(n).find(e); if (i[1]) { if (n = n instanceof b ? n[0] : n, b.merge(this, b.parseHTML(i[1], n && n.nodeType ? n.ownerDocument || n : o, !0)), C.test(i[1]) && b.isPlainObject(n)) for (i in n) b.isFunction(this[i]) ? this[i](n[i]) : this.attr(i, n[i]); return this } if (a = o.getElementById(i[2]), a && a.parentNode) { if (a.id !== i[2]) return r.find(e); this.length = 1, this[0] = a } return this.context = o, this.selector = e, this } return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : b.isFunction(e) ? r.ready(e) : (e.selector !== t && (this.selector = e.selector, this.context = e.context), b.makeArray(e, this)) }, selector: "", length: 0, size: function () { return this.length }, toArray: function () { return h.call(this) }, get: function (e) { return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e] }, pushStack: function (e) { var t = b.merge(this.constructor(), e); return t.prevObject = this, t.context = this.context, t }, each: function (e, t) { return b.each(this, e, t) }, ready: function (e) { return b.ready.promise().done(e), this }, slice: function () { return this.pushStack(h.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, eq: function (e) { var t = this.length, n = +e + (0 > e ? t : 0); return this.pushStack(n >= 0 && t > n ? [this[n]] : []) }, map: function (e) { return this.pushStack(b.map(this, function (t, n) { return e.call(t, n, t) })) }, end: function () { return this.prevObject || this.constructor(null) }, push: d, sort: [].sort, splice: [].splice }, b.fn.init.prototype = b.fn, b.extend = b.fn.extend = function () { var e, n, r, i, o, a, s = arguments[0] || {}, u = 1, l = arguments.length, c = !1; for ("boolean" == typeof s && (c = s, s = arguments[1] || {}, u = 2), "object" == typeof s || b.isFunction(s) || (s = {}), l === u && (s = this, --u); l > u; u++) if (null != (o = arguments[u])) for (i in o) e = s[i], r = o[i], s !== r && (c && r && (b.isPlainObject(r) || (n = b.isArray(r))) ? (n ? (n = !1, a = e && b.isArray(e) ? e : []) : a = e && b.isPlainObject(e) ? e : {}, s[i] = b.extend(c, a, r)) : r !== t && (s[i] = r)); return s }, b.extend({ noConflict: function (t) { return e.$ === b && (e.$ = u), t && e.jQuery === b && (e.jQuery = s), b }, isReady: !1, readyWait: 1, holdReady: function (e) { e ? b.readyWait++ : b.ready(!0) }, ready: function (e) { if (e === !0 ? ! --b.readyWait : !b.isReady) { if (!o.body) return setTimeout(b.ready); b.isReady = !0, e !== !0 && --b.readyWait > 0 || (n.resolveWith(o, [b]), b.fn.trigger && b(o).trigger("ready").off("ready")) } }, isFunction: function (e) { return "function" === b.type(e) }, isArray: Array.isArray || function (e) { return "array" === b.type(e) }, isWindow: function (e) { return null != e && e == e.window }, isNumeric: function (e) { return !isNaN(parseFloat(e)) && isFinite(e) }, type: function (e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? l[m.call(e)] || "object" : typeof e }, isPlainObject: function (e) { if (!e || "object" !== b.type(e) || e.nodeType || b.isWindow(e)) return !1; try { if (e.constructor && !y.call(e, "constructor") && !y.call(e.constructor.prototype, "isPrototypeOf")) return !1 } catch (n) { return !1 } var r; for (r in e); return r === t || y.call(e, r) }, isEmptyObject: function (e) { var t; for (t in e) return !1; return !0 }, error: function (e) { throw Error(e) }, parseHTML: function (e, t, n) { if (!e || "string" != typeof e) return null; "boolean" == typeof t && (n = t, t = !1), t = t || o; var r = C.exec(e), i = !n && []; return r ? [t.createElement(r[1])] : (r = b.buildFragment([e], t, i), i && b(i).remove(), b.merge([], r.childNodes)) }, parseJSON: function (n) { return e.JSON && e.JSON.parse ? e.JSON.parse(n) : null === n ? n : "string" == typeof n && (n = b.trim(n), n && k.test(n.replace(S, "@").replace(A, "]").replace(E, ""))) ? Function("return " + n)() : (b.error("Invalid JSON: " + n), t) }, parseXML: function (n) { var r, i; if (!n || "string" != typeof n) return null; try { e.DOMParser ? (i = new DOMParser, r = i.parseFromString(n, "text/xml")) : (r = new ActiveXObject("Microsoft.XMLDOM"), r.async = "false", r.loadXML(n)) } catch (o) { r = t } return r && r.documentElement && !r.getElementsByTagName("parsererror").length || b.error("Invalid XML: " + n), r }, noop: function () { }, globalEval: function (t) { t && b.trim(t) && (e.execScript || function (t) { e.eval.call(e, t) })(t) }, camelCase: function (e) { return e.replace(j, "ms-").replace(D, L) }, nodeName: function (e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() }, each: function (e, t, n) { var r, i = 0, o = e.length, a = M(e); if (n) { if (a) { for (; o > i; i++) if (r = t.apply(e[i], n), r === !1) break } else for (i in e) if (r = t.apply(e[i], n), r === !1) break } else if (a) { for (; o > i; i++) if (r = t.call(e[i], i, e[i]), r === !1) break } else for (i in e) if (r = t.call(e[i], i, e[i]), r === !1) break; return e }, trim: v && !v.call("\ufeff\u00a0") ? function (e) { return null == e ? "" : v.call(e) } : function (e) { return null == e ? "" : (e + "").replace(T, "") }, makeArray: function (e, t) { var n = t || []; return null != e && (M(Object(e)) ? b.merge(n, "string" == typeof e ? [e] : e) : d.call(n, e)), n }, inArray: function (e, t, n) { var r; if (t) { if (g) return g.call(t, e, n); for (r = t.length, n = n ? 0 > n ? Math.max(0, r + n) : n : 0; r > n; n++) if (n in t && t[n] === e) return n } return -1 }, merge: function (e, n) { var r = n.length, i = e.length, o = 0; if ("number" == typeof r) for (; r > o; o++) e[i++] = n[o]; else while (n[o] !== t) e[i++] = n[o++]; return e.length = i, e }, grep: function (e, t, n) { var r, i = [], o = 0, a = e.length; for (n = !!n; a > o; o++) r = !!t(e[o], o), n !== r && i.push(e[o]); return i }, map: function (e, t, n) { var r, i = 0, o = e.length, a = M(e), s = []; if (a) for (; o > i; i++) r = t(e[i], i, n), null != r && (s[s.length] = r); else for (i in e) r = t(e[i], i, n), null != r && (s[s.length] = r); return f.apply([], s) }, guid: 1, proxy: function (e, n) { var r, i, o; return "string" == typeof n && (o = e[n], n = e, e = o), b.isFunction(e) ? (r = h.call(arguments, 2), i = function () { return e.apply(n || this, r.concat(h.call(arguments))) }, i.guid = e.guid = e.guid || b.guid++, i) : t }, access: function (e, n, r, i, o, a, s) { var u = 0, l = e.length, c = null == r; if ("object" === b.type(r)) { o = !0; for (u in r) b.access(e, n, u, r[u], !0, a, s) } else if (i !== t && (o = !0, b.isFunction(i) || (s = !0), c && (s ? (n.call(e, i), n = null) : (c = n, n = function (e, t, n) { return c.call(b(e), n) })), n)) for (; l > u; u++) n(e[u], r, s ? i : i.call(e[u], u, n(e[u], r))); return o ? e : c ? n.call(e) : l ? n(e[0], r) : a }, now: function () { return (new Date).getTime() } }), b.ready.promise = function (t) { if (!n) if (n = b.Deferred(), "complete" === o.readyState) setTimeout(b.ready); else if (o.addEventListener) o.addEventListener("DOMContentLoaded", H, !1), e.addEventListener("load", H, !1); else { o.attachEvent("onreadystatechange", H), e.attachEvent("onload", H); var r = !1; try { r = null == e.frameElement && o.documentElement } catch (i) { } r && r.doScroll && function a() { if (!b.isReady) { try { r.doScroll("left") } catch (e) { return setTimeout(a, 50) } q(), b.ready() } } () } return n.promise(t) }, b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (e, t) { l["[object " + t + "]"] = t.toLowerCase() }); function M(e) { var t = e.length, n = b.type(e); return b.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e) } r = b(o); var _ = {}; function F(e) { var t = _[e] = {}; return b.each(e.match(w) || [], function (e, n) { t[n] = !0 }), t } b.Callbacks = function (e) { e = "string" == typeof e ? _[e] || F(e) : b.extend({}, e); var n, r, i, o, a, s, u = [], l = !e.once && [], c = function (t) { for (r = e.memory && t, i = !0, a = s || 0, s = 0, o = u.length, n = !0; u && o > a; a++) if (u[a].apply(t[0], t[1]) === !1 && e.stopOnFalse) { r = !1; break } n = !1, u && (l ? l.length && c(l.shift()) : r ? u = [] : p.disable()) }, p = { add: function () { if (u) { var t = u.length; (function i(t) { b.each(t, function (t, n) { var r = b.type(n); "function" === r ? e.unique && p.has(n) || u.push(n) : n && n.length && "string" !== r && i(n) }) })(arguments), n ? o = u.length : r && (s = t, c(r)) } return this }, remove: function () { return u && b.each(arguments, function (e, t) { var r; while ((r = b.inArray(t, u, r)) > -1) u.splice(r, 1), n && (o >= r && o--, a >= r && a--) }), this }, has: function (e) { return e ? b.inArray(e, u) > -1 : !(!u || !u.length) }, empty: function () { return u = [], this }, disable: function () { return u = l = r = t, this }, disabled: function () { return !u }, lock: function () { return l = t, r || p.disable(), this }, locked: function () { return !l }, fireWith: function (e, t) { return t = t || [], t = [e, t.slice ? t.slice() : t], !u || i && !l || (n ? l.push(t) : c(t)), this }, fire: function () { return p.fireWith(this, arguments), this }, fired: function () { return !!i } }; return p }, b.extend({ Deferred: function (e) { var t = [["resolve", "done", b.Callbacks("once memory"), "resolved"], ["reject", "fail", b.Callbacks("once memory"), "rejected"], ["notify", "progress", b.Callbacks("memory")]], n = "pending", r = { state: function () { return n }, always: function () { return i.done(arguments).fail(arguments), this }, then: function () { var e = arguments; return b.Deferred(function (n) { b.each(t, function (t, o) { var a = o[0], s = b.isFunction(e[t]) && e[t]; i[o[1]](function () { var e = s && s.apply(this, arguments); e && b.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === r ? n.promise() : this, s ? [e] : arguments) }) }), e = null }).promise() }, promise: function (e) { return null != e ? b.extend(e, r) : r } }, i = {}; return r.pipe = r.then, b.each(t, function (e, o) { var a = o[2], s = o[3]; r[o[1]] = a.add, s && a.add(function () { n = s }, t[1 ^ e][2].disable, t[2][2].lock), i[o[0]] = function () { return i[o[0] + "With"](this === i ? r : this, arguments), this }, i[o[0] + "With"] = a.fireWith }), r.promise(i), e && e.call(i, i), i }, when: function (e) { var t = 0, n = h.call(arguments), r = n.length, i = 1 !== r || e && b.isFunction(e.promise) ? r : 0, o = 1 === i ? e : b.Deferred(), a = function (e, t, n) { return function (r) { t[e] = this, n[e] = arguments.length > 1 ? h.call(arguments) : r, n === s ? o.notifyWith(t, n) : --i || o.resolveWith(t, n) } }, s, u, l; if (r > 1) for (s = Array(r), u = Array(r), l = Array(r); r > t; t++) n[t] && b.isFunction(n[t].promise) ? n[t].promise().done(a(t, l, n)).fail(o.reject).progress(a(t, u, s)) : --i; return i || o.resolveWith(l, n), o.promise() } }), b.support = function () { var t, n, r, a, s, u, l, c, p, f, d = o.createElement("div"); if (d.setAttribute("className", "t"), d.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", n = d.getElementsByTagName("*"), r = d.getElementsByTagName("a")[0], !n || !r || !n.length) return {}; s = o.createElement("select"), l = s.appendChild(o.createElement("option")), a = d.getElementsByTagName("input")[0], r.style.cssText = "top:1px;float:left;opacity:.5", t = { getSetAttribute: "t" !== d.className, leadingWhitespace: 3 === d.firstChild.nodeType, tbody: !d.getElementsByTagName("tbody").length, htmlSerialize: !!d.getElementsByTagName("link").length, style: /top/.test(r.getAttribute("style")), hrefNormalized: "/a" === r.getAttribute("href"), opacity: /^0.5/.test(r.style.opacity), cssFloat: !!r.style.cssFloat, checkOn: !!a.value, optSelected: l.selected, enctype: !!o.createElement("form").enctype, html5Clone: "<:nav></:nav>" !== o.createElement("nav").cloneNode(!0).outerHTML, boxModel: "CSS1Compat" === o.compatMode, deleteExpando: !0, noCloneEvent: !0, inlineBlockNeedsLayout: !1, shrinkWrapBlocks: !1, reliableMarginRight: !0, boxSizingReliable: !0, pixelPosition: !1 }, a.checked = !0, t.noCloneChecked = a.cloneNode(!0).checked, s.disabled = !0, t.optDisabled = !l.disabled; try { delete d.test } catch (h) { t.deleteExpando = !1 } a = o.createElement("input"), a.setAttribute("value", ""), t.input = "" === a.getAttribute("value"), a.value = "t", a.setAttribute("type", "radio"), t.radioValue = "t" === a.value, a.setAttribute("checked", "t"), a.setAttribute("name", "t"), u = o.createDocumentFragment(), u.appendChild(a), t.appendChecked = a.checked, t.checkClone = u.cloneNode(!0).cloneNode(!0).lastChild.checked, d.attachEvent && (d.attachEvent("onclick", function () { t.noCloneEvent = !1 }), d.cloneNode(!0).click()); for (f in { submit: !0, change: !0, focusin: !0 }) d.setAttribute(c = "on" + f, "t"), t[f + "Bubbles"] = c in e || d.attributes[c].expando === !1; return d.style.backgroundClip = "content-box", d.cloneNode(!0).style.backgroundClip = "", t.clearCloneStyle = "content-box" === d.style.backgroundClip, b(function () { var n, r, a, s = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", u = o.getElementsByTagName("body")[0]; u && (n = o.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", u.appendChild(n).appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", a = d.getElementsByTagName("td"), a[0].style.cssText = "padding:0;margin:0;border:0;display:none", p = 0 === a[0].offsetHeight, a[0].style.display = "", a[1].style.display = "none", t.reliableHiddenOffsets = p && 0 === a[0].offsetHeight, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", t.boxSizing = 4 === d.offsetWidth, t.doesNotIncludeMarginInBodyOffset = 1 !== u.offsetTop, e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(d, null) || {}).top, t.boxSizingReliable = "4px" === (e.getComputedStyle(d, null) || { width: "4px" }).width, r = d.appendChild(o.createElement("div")), r.style.cssText = d.style.cssText = s, r.style.marginRight = r.style.width = "0", d.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(r, null) || {}).marginRight)), typeof d.style.zoom !== i && (d.innerHTML = "", d.style.cssText = s + "width:1px;padding:1px;display:inline;zoom:1", t.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", t.shrinkWrapBlocks = 3 !== d.offsetWidth, t.inlineBlockNeedsLayout && (u.style.zoom = 1)), u.removeChild(n), n = d = a = r = null) }), n = s = u = l = r = a = null, t } (); var O = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, B = /([A-Z])/g; function P(e, n, r, i) { if (b.acceptData(e)) { var o, a, s = b.expando, u = "string" == typeof n, l = e.nodeType, p = l ? b.cache : e, f = l ? e[s] : e[s] && s; if (f && p[f] && (i || p[f].data) || !u || r !== t) return f || (l ? e[s] = f = c.pop() || b.guid++ : f = s), p[f] || (p[f] = {}, l || (p[f].toJSON = b.noop)), ("object" == typeof n || "function" == typeof n) && (i ? p[f] = b.extend(p[f], n) : p[f].data = b.extend(p[f].data, n)), o = p[f], i || (o.data || (o.data = {}), o = o.data), r !== t && (o[b.camelCase(n)] = r), u ? (a = o[n], null == a && (a = o[b.camelCase(n)])) : a = o, a } } function R(e, t, n) { if (b.acceptData(e)) { var r, i, o, a = e.nodeType, s = a ? b.cache : e, u = a ? e[b.expando] : b.expando; if (s[u]) { if (t && (o = n ? s[u] : s[u].data)) { b.isArray(t) ? t = t.concat(b.map(t, b.camelCase)) : t in o ? t = [t] : (t = b.camelCase(t), t = t in o ? [t] : t.split(" ")); for (r = 0, i = t.length; i > r; r++) delete o[t[r]]; if (!(n ? $ : b.isEmptyObject)(o)) return } (n || (delete s[u].data, $(s[u]))) && (a ? b.cleanData([e], !0) : b.support.deleteExpando || s != s.window ? delete s[u] : s[u] = null) } } } b.extend({ cache: {}, expando: "jQuery" + (p + Math.random()).replace(/\D/g, ""), noData: { embed: !0, object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet: !0 }, hasData: function (e) { return e = e.nodeType ? b.cache[e[b.expando]] : e[b.expando], !!e && !$(e) }, data: function (e, t, n) { return P(e, t, n) }, removeData: function (e, t) { return R(e, t) }, _data: function (e, t, n) { return P(e, t, n, !0) }, _removeData: function (e, t) { return R(e, t, !0) }, acceptData: function (e) { if (e.nodeType && 1 !== e.nodeType && 9 !== e.nodeType) return !1; var t = e.nodeName && b.noData[e.nodeName.toLowerCase()]; return !t || t !== !0 && e.getAttribute("classid") === t } }), b.fn.extend({ data: function (e, n) { var r, i, o = this[0], a = 0, s = null; if (e === t) { if (this.length && (s = b.data(o), 1 === o.nodeType && !b._data(o, "parsedAttrs"))) { for (r = o.attributes; r.length > a; a++) i = r[a].name, i.indexOf("data-") || (i = b.camelCase(i.slice(5)), W(o, i, s[i])); b._data(o, "parsedAttrs", !0) } return s } return "object" == typeof e ? this.each(function () { b.data(this, e) }) : b.access(this, function (n) { return n === t ? o ? W(o, e, b.data(o, e)) : null : (this.each(function () { b.data(this, e, n) }), t) }, null, n, arguments.length > 1, null, !0) }, removeData: function (e) { return this.each(function () { b.removeData(this, e) }) } }); function W(e, n, r) { if (r === t && 1 === e.nodeType) { var i = "data-" + n.replace(B, "-$1").toLowerCase(); if (r = e.getAttribute(i), "string" == typeof r) { try { r = "true" === r ? !0 : "false" === r ? !1 : "null" === r ? null : +r + "" === r ? +r : O.test(r) ? b.parseJSON(r) : r } catch (o) { } b.data(e, n, r) } else r = t } return r } function $(e) { var t; for (t in e) if (("data" !== t || !b.isEmptyObject(e[t])) && "toJSON" !== t) return !1; return !0 } b.extend({ queue: function (e, n, r) { var i; return e ? (n = (n || "fx") + "queue", i = b._data(e, n), r && (!i || b.isArray(r) ? i = b._data(e, n, b.makeArray(r)) : i.push(r)), i || []) : t }, dequeue: function (e, t) { t = t || "fx"; var n = b.queue(e, t), r = n.length, i = n.shift(), o = b._queueHooks(e, t), a = function () { b.dequeue(e, t) }; "inprogress" === i && (i = n.shift(), r--), o.cur = i, i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, a, o)), !r && o && o.empty.fire() }, _queueHooks: function (e, t) { var n = t + "queueHooks"; return b._data(e, n) || b._data(e, n, { empty: b.Callbacks("once memory").add(function () { b._removeData(e, t + "queue"), b._removeData(e, n) }) }) } }), b.fn.extend({ queue: function (e, n) { var r = 2; return "string" != typeof e && (n = e, e = "fx", r--), r > arguments.length ? b.queue(this[0], e) : n === t ? this : this.each(function () { var t = b.queue(this, e, n); b._queueHooks(this, e), "fx" === e && "inprogress" !== t[0] && b.dequeue(this, e) }) }, dequeue: function (e) { return this.each(function () { b.dequeue(this, e) }) }, delay: function (e, t) { return e = b.fx ? b.fx.speeds[e] || e : e, t = t || "fx", this.queue(t, function (t, n) { var r = setTimeout(t, e); n.stop = function () { clearTimeout(r) } }) }, clearQueue: function (e) { return this.queue(e || "fx", []) }, promise: function (e, n) { var r, i = 1, o = b.Deferred(), a = this, s = this.length, u = function () { --i || o.resolveWith(a, [a]) }; "string" != typeof e && (n = e, e = t), e = e || "fx"; while (s--) r = b._data(a[s], e + "queueHooks"), r && r.empty && (i++, r.empty.add(u)); return u(), o.promise(n) } }); var I, z, X = /[\t\r\n]/g, U = /\r/g, V = /^(?:input|select|textarea|button|object)$/i, Y = /^(?:a|area)$/i, J = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, G = /^(?:checked|selected)$/i, Q = b.support.getSetAttribute, K = b.support.input; b.fn.extend({ attr: function (e, t) { return b.access(this, b.attr, e, t, arguments.length > 1) }, removeAttr: function (e) { return this.each(function () { b.removeAttr(this, e) }) }, prop: function (e, t) { return b.access(this, b.prop, e, t, arguments.length > 1) }, removeProp: function (e) { return e = b.propFix[e] || e, this.each(function () { try { this[e] = t, delete this[e] } catch (n) { } }) }, addClass: function (e) { var t, n, r, i, o, a = 0, s = this.length, u = "string" == typeof e && e; if (b.isFunction(e)) return this.each(function (t) { b(this).addClass(e.call(this, t, this.className)) }); if (u) for (t = (e || "").match(w) || []; s > a; a++) if (n = this[a], r = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(X, " ") : " ")) { o = 0; while (i = t[o++]) 0 > r.indexOf(" " + i + " ") && (r += i + " "); n.className = b.trim(r) } return this }, removeClass: function (e) { var t, n, r, i, o, a = 0, s = this.length, u = 0 === arguments.length || "string" == typeof e && e; if (b.isFunction(e)) return this.each(function (t) { b(this).removeClass(e.call(this, t, this.className)) }); if (u) for (t = (e || "").match(w) || []; s > a; a++) if (n = this[a], r = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(X, " ") : "")) { o = 0; while (i = t[o++]) while (r.indexOf(" " + i + " ") >= 0) r = r.replace(" " + i + " ", " "); n.className = e ? b.trim(r) : "" } return this }, toggleClass: function (e, t) { var n = typeof e, r = "boolean" == typeof t; return b.isFunction(e) ? this.each(function (n) { b(this).toggleClass(e.call(this, n, this.className, t), t) }) : this.each(function () { if ("string" === n) { var o, a = 0, s = b(this), u = t, l = e.match(w) || []; while (o = l[a++]) u = r ? u : !s.hasClass(o), s[u ? "addClass" : "removeClass"](o) } else (n === i || "boolean" === n) && (this.className && b._data(this, "__className__", this.className), this.className = this.className || e === !1 ? "" : b._data(this, "__className__") || "") }) }, hasClass: function (e) { var t = " " + e + " ", n = 0, r = this.length; for (; r > n; n++) if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(X, " ").indexOf(t) >= 0) return !0; return !1 }, val: function (e) { var n, r, i, o = this[0]; { if (arguments.length) return i = b.isFunction(e), this.each(function (n) { var o, a = b(this); 1 === this.nodeType && (o = i ? e.call(this, n, a.val()) : e, null == o ? o = "" : "number" == typeof o ? o += "" : b.isArray(o) && (o = b.map(o, function (e) { return null == e ? "" : e + "" })), r = b.valHooks[this.type] || b.valHooks[this.nodeName.toLowerCase()], r && "set" in r && r.set(this, o, "value") !== t || (this.value = o)) }); if (o) return r = b.valHooks[o.type] || b.valHooks[o.nodeName.toLowerCase()], r && "get" in r && (n = r.get(o, "value")) !== t ? n : (n = o.value, "string" == typeof n ? n.replace(U, "") : null == n ? "" : n) } } }), b.extend({ valHooks: { option: { get: function (e) { var t = e.attributes.value; return !t || t.specified ? e.value : e.text } }, select: { get: function (e) { var t, n, r = e.options, i = e.selectedIndex, o = "select-one" === e.type || 0 > i, a = o ? null : [], s = o ? i + 1 : r.length, u = 0 > i ? s : o ? i : 0; for (; s > u; u++) if (n = r[u], !(!n.selected && u !== i || (b.support.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && b.nodeName(n.parentNode, "optgroup"))) { if (t = b(n).val(), o) return t; a.push(t) } return a }, set: function (e, t) { var n = b.makeArray(t); return b(e).find("option").each(function () { this.selected = b.inArray(b(this).val(), n) >= 0 }), n.length || (e.selectedIndex = -1), n } } }, attr: function (e, n, r) { var o, a, s, u = e.nodeType; if (e && 3 !== u && 8 !== u && 2 !== u) return typeof e.getAttribute === i ? b.prop(e, n, r) : (a = 1 !== u || !b.isXMLDoc(e), a && (n = n.toLowerCase(), o = b.attrHooks[n] || (J.test(n) ? z : I)), r === t ? o && a && "get" in o && null !== (s = o.get(e, n)) ? s : (typeof e.getAttribute !== i && (s = e.getAttribute(n)), null == s ? t : s) : null !== r ? o && a && "set" in o && (s = o.set(e, r, n)) !== t ? s : (e.setAttribute(n, r + ""), r) : (b.removeAttr(e, n), t)) }, removeAttr: function (e, t) { var n, r, i = 0, o = t && t.match(w); if (o && 1 === e.nodeType) while (n = o[i++]) r = b.propFix[n] || n, J.test(n) ? !Q && G.test(n) ? e[b.camelCase("default-" + n)] = e[r] = !1 : e[r] = !1 : b.attr(e, n, ""), e.removeAttribute(Q ? n : r) }, attrHooks: { type: { set: function (e, t) { if (!b.support.radioValue && "radio" === t && b.nodeName(e, "input")) { var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t } } } }, 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 (e, n, r) { var i, o, a, s = e.nodeType; if (e && 3 !== s && 8 !== s && 2 !== s) return a = 1 !== s || !b.isXMLDoc(e), a && (n = b.propFix[n] || n, o = b.propHooks[n]), r !== t ? o && "set" in o && (i = o.set(e, r, n)) !== t ? i : e[n] = r : o && "get" in o && null !== (i = o.get(e, n)) ? i : e[n] }, propHooks: { tabIndex: { get: function (e) { var n = e.getAttributeNode("tabindex"); return n && n.specified ? parseInt(n.value, 10) : V.test(e.nodeName) || Y.test(e.nodeName) && e.href ? 0 : t } }} }), z = { get: function (e, n) { var r = b.prop(e, n), i = "boolean" == typeof r && e.getAttribute(n), o = "boolean" == typeof r ? K && Q ? null != i : G.test(n) ? e[b.camelCase("default-" + n)] : !!i : e.getAttributeNode(n); return o && o.value !== !1 ? n.toLowerCase() : t }, set: function (e, t, n) { return t === !1 ? b.removeAttr(e, n) : K && Q || !G.test(n) ? e.setAttribute(!Q && b.propFix[n] || n, n) : e[b.camelCase("default-" + n)] = e[n] = !0, n } }, K && Q || (b.attrHooks.value = { get: function (e, n) { var r = e.getAttributeNode(n); return b.nodeName(e, "input") ? e.defaultValue : r && r.specified ? r.value : t }, set: function (e, n, r) { return b.nodeName(e, "input") ? (e.defaultValue = n, t) : I && I.set(e, n, r) } }), Q || (I = b.valHooks.button = { get: function (e, n) { var r = e.getAttributeNode(n); return r && ("id" === n || "name" === n || "coords" === n ? "" !== r.value : r.specified) ? r.value : t }, set: function (e, n, r) { var i = e.getAttributeNode(r); return i || e.setAttributeNode(i = e.ownerDocument.createAttribute(r)), i.value = n += "", "value" === r || n === e.getAttribute(r) ? n : t } }, b.attrHooks.contenteditable = { get: I.get, set: function (e, t, n) { I.set(e, "" === t ? !1 : t, n) } }, b.each(["width", "height"], function (e, n) { b.attrHooks[n] = b.extend(b.attrHooks[n], { set: function (e, r) { return "" === r ? (e.setAttribute(n, "auto"), r) : t } }) })), b.support.hrefNormalized || (b.each(["href", "src", "width", "height"], function (e, n) { b.attrHooks[n] = b.extend(b.attrHooks[n], { get: function (e) { var r = e.getAttribute(n, 2); return null == r ? t : r } }) }), b.each(["href", "src"], function (e, t) { b.propHooks[t] = { get: function (e) { return e.getAttribute(t, 4) } } })), b.support.style || (b.attrHooks.style = { get: function (e) { return e.style.cssText || t }, set: function (e, t) { return e.style.cssText = t + "" } }), b.support.optSelected || (b.propHooks.selected = b.extend(b.propHooks.selected, { get: function (e) { var t = e.parentNode; return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null } })), b.support.enctype || (b.propFix.enctype = "encoding"), b.support.checkOn || b.each(["radio", "checkbox"], function () { b.valHooks[this] = { get: function (e) { return null === e.getAttribute("value") ? "on" : e.value } } }), b.each(["radio", "checkbox"], function () { b.valHooks[this] = b.extend(b.valHooks[this], { set: function (e, n) { return b.isArray(n) ? e.checked = b.inArray(b(e).val(), n) >= 0 : t } }) }); var Z = /^(?:input|select|textarea)$/i, et = /^key/, tt = /^(?:mouse|contextmenu)|click/, nt = /^(?:focusinfocus|focusoutblur)$/, rt = /^([^.]*)(?:\.(.+)|)$/; function it() { return !0 } function ot() { return !1 } b.event = { global: {}, add: function (e, n, r, o, a) { var s, u, l, c, p, f, d, h, g, m, y, v = b._data(e); if (v) { r.handler && (c = r, r = c.handler, a = c.selector), r.guid || (r.guid = b.guid++), (u = v.events) || (u = v.events = {}), (f = v.handle) || (f = v.handle = function (e) { return typeof b === i || e && b.event.triggered === e.type ? t : b.event.dispatch.apply(f.elem, arguments) }, f.elem = e), n = (n || "").match(w) || [""], l = n.length; while (l--) s = rt.exec(n[l]) || [], g = y = s[1], m = (s[2] || "").split(".").sort(), p = b.event.special[g] || {}, g = (a ? p.delegateType : p.bindType) || g, p = b.event.special[g] || {}, d = b.extend({ type: g, origType: y, data: o, handler: r, guid: r.guid, selector: a, needsContext: a && b.expr.match.needsContext.test(a), namespace: m.join(".") }, c), (h = u[g]) || (h = u[g] = [], h.delegateCount = 0, p.setup && p.setup.call(e, o, m, f) !== !1 || (e.addEventListener ? e.addEventListener(g, f, !1) : e.attachEvent && e.attachEvent("on" + g, f))), p.add && (p.add.call(e, d), d.handler.guid || (d.handler.guid = r.guid)), a ? h.splice(h.delegateCount++, 0, d) : h.push(d), b.event.global[g] = !0; e = null } }, remove: function (e, t, n, r, i) { var o, a, s, u, l, c, p, f, d, h, g, m = b.hasData(e) && b._data(e); if (m && (c = m.events)) { t = (t || "").match(w) || [""], l = t.length; while (l--) if (s = rt.exec(t[l]) || [], d = g = s[1], h = (s[2] || "").split(".").sort(), d) { p = b.event.special[d] || {}, d = (r ? p.delegateType : p.bindType) || d, f = c[d] || [], s = s[2] && RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), u = o = f.length; while (o--) a = f[o], !i && g !== a.origType || n && n.guid !== a.guid || s && !s.test(a.namespace) || r && r !== a.selector && ("**" !== r || !a.selector) || (f.splice(o, 1), a.selector && f.delegateCount--, p.remove && p.remove.call(e, a)); u && !f.length && (p.teardown && p.teardown.call(e, h, m.handle) !== !1 || b.removeEvent(e, d, m.handle), delete c[d]) } else for (d in c) b.event.remove(e, d + t[l], n, r, !0); b.isEmptyObject(c) && (delete m.handle, b._removeData(e, "events")) } }, trigger: function (n, r, i, a) { var s, u, l, c, p, f, d, h = [i || o], g = y.call(n, "type") ? n.type : n, m = y.call(n, "namespace") ? n.namespace.split(".") : []; if (l = f = i = i || o, 3 !== i.nodeType && 8 !== i.nodeType && !nt.test(g + b.event.triggered) && (g.indexOf(".") >= 0 && (m = g.split("."), g = m.shift(), m.sort()), u = 0 > g.indexOf(":") && "on" + g, n = n[b.expando] ? n : new b.Event(g, "object" == typeof n && n), n.isTrigger = !0, n.namespace = m.join("."), n.namespace_re = n.namespace ? RegExp("(^|\\.)" + m.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, n.result = t, n.target || (n.target = i), r = null == r ? [n] : b.makeArray(r, [n]), p = b.event.special[g] || {}, a || !p.trigger || p.trigger.apply(i, r) !== !1)) { if (!a && !p.noBubble && !b.isWindow(i)) { for (c = p.delegateType || g, nt.test(c + g) || (l = l.parentNode); l; l = l.parentNode) h.push(l), f = l; f === (i.ownerDocument || o) && h.push(f.defaultView || f.parentWindow || e) } d = 0; while ((l = h[d++]) && !n.isPropagationStopped()) n.type = d > 1 ? c : p.bindType || g, s = (b._data(l, "events") || {})[n.type] && b._data(l, "handle"), s && s.apply(l, r), s = u && l[u], s && b.acceptData(l) && s.apply && s.apply(l, r) === !1 && n.preventDefault(); if (n.type = g, !(a || n.isDefaultPrevented() || p._default && p._default.apply(i.ownerDocument, r) !== !1 || "click" === g && b.nodeName(i, "a") || !b.acceptData(i) || !u || !i[g] || b.isWindow(i))) { f = i[u], f && (i[u] = null), b.event.triggered = g; try { i[g]() } catch (v) { } b.event.triggered = t, f && (i[u] = f) } return n.result } }, dispatch: function (e) { e = b.event.fix(e); var n, r, i, o, a, s = [], u = h.call(arguments), l = (b._data(this, "events") || {})[e.type] || [], c = b.event.special[e.type] || {}; if (u[0] = e, e.delegateTarget = this, !c.preDispatch || c.preDispatch.call(this, e) !== !1) { s = b.event.handlers.call(this, e, l), n = 0; while ((o = s[n++]) && !e.isPropagationStopped()) { e.currentTarget = o.elem, a = 0; while ((i = o.handlers[a++]) && !e.isImmediatePropagationStopped()) (!e.namespace_re || e.namespace_re.test(i.namespace)) && (e.handleObj = i, e.data = i.data, r = ((b.event.special[i.origType] || {}).handle || i.handler).apply(o.elem, u), r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation())) } return c.postDispatch && c.postDispatch.call(this, e), e.result } }, handlers: function (e, n) { var r, i, o, a, s = [], u = n.delegateCount, l = e.target; if (u && l.nodeType && (!e.button || "click" !== e.type)) for (; l != this; l = l.parentNode || this) if (1 === l.nodeType && (l.disabled !== !0 || "click" !== e.type)) { for (o = [], a = 0; u > a; a++) i = n[a], r = i.selector + " ", o[r] === t && (o[r] = i.needsContext ? b(r, this).index(l) >= 0 : b.find(r, this, null, [l]).length), o[r] && o.push(i); o.length && s.push({ elem: l, handlers: o }) } return n.length > u && s.push({ elem: this, handlers: n.slice(u) }), s }, fix: function (e) { if (e[b.expando]) return e; var t, n, r, i = e.type, a = e, s = this.fixHooks[i]; s || (this.fixHooks[i] = s = tt.test(i) ? this.mouseHooks : et.test(i) ? this.keyHooks : {}), r = s.props ? this.props.concat(s.props) : this.props, e = new b.Event(a), t = r.length; while (t--) n = r[t], e[n] = a[n]; return e.target || (e.target = a.srcElement || o), 3 === e.target.nodeType && (e.target = e.target.parentNode), e.metaKey = !!e.metaKey, s.filter ? s.filter(e, a) : e }, props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function (e, t) { return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function (e, n) { var r, i, a, s = n.button, u = n.fromElement; return null == e.pageX && null != n.clientX && (i = e.target.ownerDocument || o, a = i.documentElement, r = i.body, e.pageX = n.clientX + (a && a.scrollLeft || r && r.scrollLeft || 0) - (a && a.clientLeft || r && r.clientLeft || 0), e.pageY = n.clientY + (a && a.scrollTop || r && r.scrollTop || 0) - (a && a.clientTop || r && r.clientTop || 0)), !e.relatedTarget && u && (e.relatedTarget = u === e.target ? n.toElement : u), e.which || s === t || (e.which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0), e } }, special: { load: { noBubble: !0 }, click: { trigger: function () { return b.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : t } }, focus: { trigger: function () { if (this !== o.activeElement && this.focus) try { return this.focus(), !1 } catch (e) { } }, delegateType: "focusin" }, blur: { trigger: function () { return this === o.activeElement && this.blur ? (this.blur(), !1) : t }, delegateType: "focusout" }, beforeunload: { postDispatch: function (e) { e.result !== t && (e.originalEvent.returnValue = e.result) } } }, simulate: function (e, t, n, r) { var i = b.extend(new b.Event, n, { type: e, isSimulated: !0, originalEvent: {} }); r ? b.event.trigger(i, null, t) : b.event.dispatch.call(t, i), i.isDefaultPrevented() && n.preventDefault() } }, b.removeEvent = o.removeEventListener ? function (e, t, n) { e.removeEventListener && e.removeEventListener(t, n, !1) } : function (e, t, n) { var r = "on" + t; e.detachEvent && (typeof e[r] === i && (e[r] = null), e.detachEvent(r, n)) }, b.Event = function (e, n) { return this instanceof b.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault() ? it : ot) : this.type = e, n && b.extend(this, n), this.timeStamp = e && e.timeStamp || b.now(), this[b.expando] = !0, t) : new b.Event(e, n) }, b.Event.prototype = { isDefaultPrevented: ot, isPropagationStopped: ot, isImmediatePropagationStopped: ot, preventDefault: function () { var e = this.originalEvent; this.isDefaultPrevented = it, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1) }, stopPropagation: function () { var e = this.originalEvent; this.isPropagationStopped = it, e && (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0) }, stopImmediatePropagation: function () { this.isImmediatePropagationStopped = it, this.stopPropagation() } }, b.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function (e, t) {
|
7 |
+
b.event.special[e] = { delegateType: t, bindType: t, handle: function (e) {
|
8 |
+
var n, r = this, i = e.relatedTarget, o = e.handleObj;
|
9 |
+
return (!i || i !== r && !b.contains(r, i)) && (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n
|
10 |
+
}
|
11 |
+
}
|
12 |
+
}), b.support.submitBubbles || (b.event.special.submit = { setup: function () { return b.nodeName(this, "form") ? !1 : (b.event.add(this, "click._submit keypress._submit", function (e) { var n = e.target, r = b.nodeName(n, "input") || b.nodeName(n, "button") ? n.form : t; r && !b._data(r, "submitBubbles") && (b.event.add(r, "submit._submit", function (e) { e._submit_bubble = !0 }), b._data(r, "submitBubbles", !0)) }), t) }, postDispatch: function (e) { e._submit_bubble && (delete e._submit_bubble, this.parentNode && !e.isTrigger && b.event.simulate("submit", this.parentNode, e, !0)) }, teardown: function () { return b.nodeName(this, "form") ? !1 : (b.event.remove(this, "._submit"), t) } }), b.support.changeBubbles || (b.event.special.change = { setup: function () { return Z.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (b.event.add(this, "propertychange._change", function (e) { "checked" === e.originalEvent.propertyName && (this._just_changed = !0) }), b.event.add(this, "click._change", function (e) { this._just_changed && !e.isTrigger && (this._just_changed = !1), b.event.simulate("change", this, e, !0) })), !1) : (b.event.add(this, "beforeactivate._change", function (e) { var t = e.target; Z.test(t.nodeName) && !b._data(t, "changeBubbles") && (b.event.add(t, "change._change", function (e) { !this.parentNode || e.isSimulated || e.isTrigger || b.event.simulate("change", this.parentNode, e, !0) }), b._data(t, "changeBubbles", !0)) }), t) }, handle: function (e) { var n = e.target; return this !== n || e.isSimulated || e.isTrigger || "radio" !== n.type && "checkbox" !== n.type ? e.handleObj.handler.apply(this, arguments) : t }, teardown: function () { return b.event.remove(this, "._change"), !Z.test(this.nodeName) } }), b.support.focusinBubbles || b.each({ focus: "focusin", blur: "focusout" }, function (e, t) { var n = 0, r = function (e) { b.event.simulate(t, e.target, b.event.fix(e), !0) }; b.event.special[t] = { setup: function () { 0 === n++ && o.addEventListener(e, r, !0) }, teardown: function () { 0 === --n && o.removeEventListener(e, r, !0) } } }), b.fn.extend({ on: function (e, n, r, i, o) { var a, s; if ("object" == typeof e) { "string" != typeof n && (r = r || n, n = t); for (a in e) this.on(a, n, r, e[a], o); return this } if (null == r && null == i ? (i = n, r = n = t) : null == i && ("string" == typeof n ? (i = r, r = t) : (i = r, r = n, n = t)), i === !1) i = ot; else if (!i) return this; return 1 === o && (s = i, i = function (e) { return b().off(e), s.apply(this, arguments) }, i.guid = s.guid || (s.guid = b.guid++)), this.each(function () { b.event.add(this, e, i, r, n) }) }, one: function (e, t, n, r) { return this.on(e, t, n, r, 1) }, off: function (e, n, r) { var i, o; if (e && e.preventDefault && e.handleObj) return i = e.handleObj, b(e.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this; if ("object" == typeof e) { for (o in e) this.off(o, n, e[o]); return this } return (n === !1 || "function" == typeof n) && (r = n, n = t), r === !1 && (r = ot), this.each(function () { b.event.remove(this, e, r, n) }) }, bind: function (e, t, n) { return this.on(e, null, t, n) }, unbind: function (e, t) { return this.off(e, null, t) }, delegate: function (e, t, n, r) { return this.on(t, e, n, r) }, undelegate: function (e, t, n) { return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) }, trigger: function (e, t) { return this.each(function () { b.event.trigger(e, t, this) }) }, triggerHandler: function (e, n) { var r = this[0]; return r ? b.event.trigger(e, n, r, !0) : t } }), function (e, t) { var n, r, i, o, a, s, u, l, c, p, f, d, h, g, m, y, v, x = "sizzle" + -new Date, w = e.document, T = {}, N = 0, C = 0, k = it(), E = it(), S = it(), A = typeof t, j = 1 << 31, D = [], L = D.pop, H = D.push, q = D.slice, M = D.indexOf || function (e) { var t = 0, n = this.length; for (; n > t; t++) if (this[t] === e) return t; return -1 }, _ = "[\\x20\\t\\r\\n\\f]", F = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", O = F.replace("w", "w#"), B = "([*^$|!~]?=)", P = "\\[" + _ + "*(" + F + ")" + _ + "*(?:" + B + _ + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + O + ")|)|)" + _ + "*\\]", R = ":(" + F + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + P.replace(3, 8) + ")*)|.*)\\)|)", W = RegExp("^" + _ + "+|((?:^|[^\\\\])(?:\\\\.)*)" + _ + "+$", "g"), $ = RegExp("^" + _ + "*," + _ + "*"), I = RegExp("^" + _ + "*([\\x20\\t\\r\\n\\f>+~])" + _ + "*"), z = RegExp(R), X = RegExp("^" + O + "$"), U = { ID: RegExp("^#(" + F + ")"), CLASS: RegExp("^\\.(" + F + ")"), NAME: RegExp("^\\[name=['\"]?(" + F + ")['\"]?\\]"), TAG: RegExp("^(" + F.replace("w", "w*") + ")"), ATTR: RegExp("^" + P), PSEUDO: RegExp("^" + R), CHILD: RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + _ + "*(even|odd|(([+-]|)(\\d*)n|)" + _ + "*(?:([+-]|)" + _ + "*(\\d+)|))" + _ + "*\\)|)", "i"), needsContext: RegExp("^" + _ + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + _ + "*((?:-\\d)?\\d*)" + _ + "*\\)|)(?=[^-]|$)", "i") }, V = /[\x20\t\r\n\f]*[+~]/, Y = /^[^{]+\{\s*\[native code/, J = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, G = /^(?:input|select|textarea|button)$/i, Q = /^h\d$/i, K = /'|\\/g, Z = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, et = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, tt = function (e, t) { var n = "0x" + t - 65536; return n !== n ? t : 0 > n ? String.fromCharCode(n + 65536) : String.fromCharCode(55296 | n >> 10, 56320 | 1023 & n) }; try { q.call(w.documentElement.childNodes, 0)[0].nodeType } catch (nt) { q = function (e) { var t, n = []; while (t = this[e++]) n.push(t); return n } } function rt(e) { return Y.test(e + "") } function it() { var e, t = []; return e = function (n, r) { return t.push(n += " ") > i.cacheLength && delete e[t.shift()], e[n] = r } } function ot(e) { return e[x] = !0, e } function at(e) { var t = p.createElement("div"); try { return e(t) } catch (n) { return !1 } finally { t = null } } function st(e, t, n, r) { var i, o, a, s, u, l, f, g, m, v; if ((t ? t.ownerDocument || t : w) !== p && c(t), t = t || p, n = n || [], !e || "string" != typeof e) return n; if (1 !== (s = t.nodeType) && 9 !== s) return []; if (!d && !r) { if (i = J.exec(e)) if (a = i[1]) { if (9 === s) { if (o = t.getElementById(a), !o || !o.parentNode) return n; if (o.id === a) return n.push(o), n } else if (t.ownerDocument && (o = t.ownerDocument.getElementById(a)) && y(t, o) && o.id === a) return n.push(o), n } else { if (i[2]) return H.apply(n, q.call(t.getElementsByTagName(e), 0)), n; if ((a = i[3]) && T.getByClassName && t.getElementsByClassName) return H.apply(n, q.call(t.getElementsByClassName(a), 0)), n } if (T.qsa && !h.test(e)) { if (f = !0, g = x, m = t, v = 9 === s && e, 1 === s && "object" !== t.nodeName.toLowerCase()) { l = ft(e), (f = t.getAttribute("id")) ? g = f.replace(K, "\\$&") : t.setAttribute("id", g), g = "[id='" + g + "'] ", u = l.length; while (u--) l[u] = g + dt(l[u]); m = V.test(e) && t.parentNode || t, v = l.join(",") } if (v) try { return H.apply(n, q.call(m.querySelectorAll(v), 0)), n } catch (b) { } finally { f || t.removeAttribute("id") } } } return wt(e.replace(W, "$1"), t, n, r) } a = st.isXML = function (e) { var t = e && (e.ownerDocument || e).documentElement; return t ? "HTML" !== t.nodeName : !1 }, c = st.setDocument = function (e) { var n = e ? e.ownerDocument || e : w; return n !== p && 9 === n.nodeType && n.documentElement ? (p = n, f = n.documentElement, d = a(n), T.tagNameNoComments = at(function (e) { return e.appendChild(n.createComment("")), !e.getElementsByTagName("*").length }), T.attributes = at(function (e) { e.innerHTML = "<select></select>"; var t = typeof e.lastChild.getAttribute("multiple"); return "boolean" !== t && "string" !== t }), T.getByClassName = at(function (e) { return e.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>", e.getElementsByClassName && e.getElementsByClassName("e").length ? (e.lastChild.className = "e", 2 === e.getElementsByClassName("e").length) : !1 }), T.getByName = at(function (e) { e.id = x + 0, e.innerHTML = "<a name='" + x + "'></a><div name='" + x + "'></div>", f.insertBefore(e, f.firstChild); var t = n.getElementsByName && n.getElementsByName(x).length === 2 + n.getElementsByName(x + 0).length; return T.getIdNotName = !n.getElementById(x), f.removeChild(e), t }), i.attrHandle = at(function (e) { return e.innerHTML = "<a href='#'></a>", e.firstChild && typeof e.firstChild.getAttribute !== A && "#" === e.firstChild.getAttribute("href") }) ? {} : { href: function (e) { return e.getAttribute("href", 2) }, type: function (e) { return e.getAttribute("type") } }, T.getIdNotName ? (i.find.ID = function (e, t) { if (typeof t.getElementById !== A && !d) { var n = t.getElementById(e); return n && n.parentNode ? [n] : [] } }, i.filter.ID = function (e) { var t = e.replace(et, tt); return function (e) { return e.getAttribute("id") === t } }) : (i.find.ID = function (e, n) { if (typeof n.getElementById !== A && !d) { var r = n.getElementById(e); return r ? r.id === e || typeof r.getAttributeNode !== A && r.getAttributeNode("id").value === e ? [r] : t : [] } }, i.filter.ID = function (e) { var t = e.replace(et, tt); return function (e) { var n = typeof e.getAttributeNode !== A && e.getAttributeNode("id"); return n && n.value === t } }), i.find.TAG = T.tagNameNoComments ? function (e, n) { return typeof n.getElementsByTagName !== A ? n.getElementsByTagName(e) : t } : function (e, t) { var n, r = [], i = 0, o = t.getElementsByTagName(e); if ("*" === e) { while (n = o[i++]) 1 === n.nodeType && r.push(n); return r } return o }, i.find.NAME = T.getByName && function (e, n) { return typeof n.getElementsByName !== A ? n.getElementsByName(name) : t }, i.find.CLASS = T.getByClassName && function (e, n) { return typeof n.getElementsByClassName === A || d ? t : n.getElementsByClassName(e) }, g = [], h = [":focus"], (T.qsa = rt(n.querySelectorAll)) && (at(function (e) { e.innerHTML = "<select><option selected=''></option></select>", e.querySelectorAll("[selected]").length || h.push("\\[" + _ + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), e.querySelectorAll(":checked").length || h.push(":checked") }), at(function (e) { e.innerHTML = "<input type='hidden' i=''/>", e.querySelectorAll("[i^='']").length && h.push("[*^$]=" + _ + "*(?:\"\"|'')"), e.querySelectorAll(":enabled").length || h.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), h.push(",.*:") })), (T.matchesSelector = rt(m = f.matchesSelector || f.mozMatchesSelector || f.webkitMatchesSelector || f.oMatchesSelector || f.msMatchesSelector)) && at(function (e) { T.disconnectedMatch = m.call(e, "div"), m.call(e, "[s!='']:x"), g.push("!=", R) }), h = RegExp(h.join("|")), g = RegExp(g.join("|")), y = rt(f.contains) || f.compareDocumentPosition ? function (e, t) { var n = 9 === e.nodeType ? e.documentElement : e, r = t && t.parentNode; return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) } : function (e, t) { if (t) while (t = t.parentNode) if (t === e) return !0; return !1 }, v = f.compareDocumentPosition ? function (e, t) { var r; return e === t ? (u = !0, 0) : (r = t.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(t)) ? 1 & r || e.parentNode && 11 === e.parentNode.nodeType ? e === n || y(w, e) ? -1 : t === n || y(w, t) ? 1 : 0 : 4 & r ? -1 : 1 : e.compareDocumentPosition ? -1 : 1 } : function (e, t) { var r, i = 0, o = e.parentNode, a = t.parentNode, s = [e], l = [t]; if (e === t) return u = !0, 0; if (!o || !a) return e === n ? -1 : t === n ? 1 : o ? -1 : a ? 1 : 0; if (o === a) return ut(e, t); r = e; while (r = r.parentNode) s.unshift(r); r = t; while (r = r.parentNode) l.unshift(r); while (s[i] === l[i]) i++; return i ? ut(s[i], l[i]) : s[i] === w ? -1 : l[i] === w ? 1 : 0 }, u = !1, [0, 0].sort(v), T.detectDuplicates = u, p) : p }, st.matches = function (e, t) { return st(e, null, null, t) }, st.matchesSelector = function (e, t) { if ((e.ownerDocument || e) !== p && c(e), t = t.replace(Z, "='$1']"), !(!T.matchesSelector || d || g && g.test(t) || h.test(t))) try { var n = m.call(e, t); if (n || T.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n } catch (r) { } return st(t, p, null, [e]).length > 0 }, st.contains = function (e, t) { return (e.ownerDocument || e) !== p && c(e), y(e, t) }, st.attr = function (e, t) { var n; return (e.ownerDocument || e) !== p && c(e), d || (t = t.toLowerCase()), (n = i.attrHandle[t]) ? n(e) : d || T.attributes ? e.getAttribute(t) : ((n = e.getAttributeNode(t)) || e.getAttribute(t)) && e[t] === !0 ? t : n && n.specified ? n.value : null }, st.error = function (e) { throw Error("Syntax error, unrecognized expression: " + e) }, st.uniqueSort = function (e) { var t, n = [], r = 1, i = 0; if (u = !T.detectDuplicates, e.sort(v), u) { for (; t = e[r]; r++) t === e[r - 1] && (i = n.push(r)); while (i--) e.splice(n[i], 1) } return e }; function ut(e, t) { var n = t && e, r = n && (~t.sourceIndex || j) - (~e.sourceIndex || j); if (r) return r; if (n) while (n = n.nextSibling) if (n === t) return -1; return e ? 1 : -1 } function lt(e) { return function (t) { var n = t.nodeName.toLowerCase(); return "input" === n && t.type === e } } function ct(e) { return function (t) { var n = t.nodeName.toLowerCase(); return ("input" === n || "button" === n) && t.type === e } } function pt(e) { return ot(function (t) { return t = +t, ot(function (n, r) { var i, o = e([], n.length, t), a = o.length; while (a--) n[i = o[a]] && (n[i] = !(r[i] = n[i])) }) }) } o = st.getText = function (e) { var t, n = "", r = 0, i = e.nodeType; if (i) { if (1 === i || 9 === i || 11 === i) { if ("string" == typeof e.textContent) return e.textContent; for (e = e.firstChild; e; e = e.nextSibling) n += o(e) } else if (3 === i || 4 === i) return e.nodeValue } else for (; t = e[r]; r++) n += o(t); return n }, i = st.selectors = { cacheLength: 50, createPseudo: ot, match: U, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling"} }, preFilter: { ATTR: function (e) { return e[1] = e[1].replace(et, tt), e[3] = (e[4] || e[5] || "").replace(et, tt), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) }, CHILD: function (e) { return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || st.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && st.error(e[0]), e }, PSEUDO: function (e) { var t, n = !e[5] && e[2]; return U.CHILD.test(e[0]) ? null : (e[4] ? e[2] = e[4] : n && z.test(n) && (t = ft(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) } }, filter: { TAG: function (e) { return "*" === e ? function () { return !0 } : (e = e.replace(et, tt).toLowerCase(), function (t) { return t.nodeName && t.nodeName.toLowerCase() === e }) }, CLASS: function (e) { var t = k[e + " "]; return t || (t = RegExp("(^|" + _ + ")" + e + "(" + _ + "|$)")) && k(e, function (e) { return t.test(e.className || typeof e.getAttribute !== A && e.getAttribute("class") || "") }) }, ATTR: function (e, t, n) { return function (r) { var i = st.attr(r, e); return null == i ? "!=" === t : t ? (i += "", "=" === t ? i === n : "!=" === t ? i !== n : "^=" === t ? n && 0 === i.indexOf(n) : "*=" === t ? n && i.indexOf(n) > -1 : "$=" === t ? n && i.slice(-n.length) === n : "~=" === t ? (" " + i + " ").indexOf(n) > -1 : "|=" === t ? i === n || i.slice(0, n.length + 1) === n + "-" : !1) : !0 } }, CHILD: function (e, t, n, r, i) { var o = "nth" !== e.slice(0, 3), a = "last" !== e.slice(-4), s = "of-type" === t; return 1 === r && 0 === i ? function (e) { return !!e.parentNode } : function (t, n, u) { var l, c, p, f, d, h, g = o !== a ? "nextSibling" : "previousSibling", m = t.parentNode, y = s && t.nodeName.toLowerCase(), v = !u && !s; if (m) { if (o) { while (g) { p = t; while (p = p[g]) if (s ? p.nodeName.toLowerCase() === y : 1 === p.nodeType) return !1; h = g = "only" === e && !h && "nextSibling" } return !0 } if (h = [a ? m.firstChild : m.lastChild], a && v) { c = m[x] || (m[x] = {}), l = c[e] || [], d = l[0] === N && l[1], f = l[0] === N && l[2], p = d && m.childNodes[d]; while (p = ++d && p && p[g] || (f = d = 0) || h.pop()) if (1 === p.nodeType && ++f && p === t) { c[e] = [N, d, f]; break } } else if (v && (l = (t[x] || (t[x] = {}))[e]) && l[0] === N) f = l[1]; else while (p = ++d && p && p[g] || (f = d = 0) || h.pop()) if ((s ? p.nodeName.toLowerCase() === y : 1 === p.nodeType) && ++f && (v && ((p[x] || (p[x] = {}))[e] = [N, f]), p === t)) break; return f -= i, f === r || 0 === f % r && f / r >= 0 } } }, PSEUDO: function (e, t) { var n, r = i.pseudos[e] || i.setFilters[e.toLowerCase()] || st.error("unsupported pseudo: " + e); return r[x] ? r(t) : r.length > 1 ? (n = [e, e, "", t], i.setFilters.hasOwnProperty(e.toLowerCase()) ? ot(function (e, n) { var i, o = r(e, t), a = o.length; while (a--) i = M.call(e, o[a]), e[i] = !(n[i] = o[a]) }) : function (e) { return r(e, 0, n) }) : r } }, pseudos: { not: ot(function (e) { var t = [], n = [], r = s(e.replace(W, "$1")); return r[x] ? ot(function (e, t, n, i) { var o, a = r(e, null, i, []), s = e.length; while (s--) (o = a[s]) && (e[s] = !(t[s] = o)) }) : function (e, i, o) { return t[0] = e, r(t, null, o, n), !n.pop() } }), has: ot(function (e) { return function (t) { return st(e, t).length > 0 } }), contains: ot(function (e) { return function (t) { return (t.textContent || t.innerText || o(t)).indexOf(e) > -1 } }), lang: ot(function (e) { return X.test(e || "") || st.error("unsupported lang: " + e), e = e.replace(et, tt).toLowerCase(), function (t) { var n; do if (n = d ? t.getAttribute("xml:lang") || t.getAttribute("lang") : t.lang) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-"); while ((t = t.parentNode) && 1 === t.nodeType); return !1 } }), target: function (t) { var n = e.location && e.location.hash; return n && n.slice(1) === t.id }, root: function (e) { return e === f }, focus: function (e) { return e === p.activeElement && (!p.hasFocus || p.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) }, enabled: function (e) { return e.disabled === !1 }, disabled: function (e) { return e.disabled === !0 }, checked: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && !!e.checked || "option" === t && !!e.selected }, selected: function (e) { return e.parentNode && e.parentNode.selectedIndex, e.selected === !0 }, empty: function (e) { for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeName > "@" || 3 === e.nodeType || 4 === e.nodeType) return !1; return !0 }, parent: function (e) { return !i.pseudos.empty(e) }, header: function (e) { return Q.test(e.nodeName) }, input: function (e) { return G.test(e.nodeName) }, button: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && "button" === e.type || "button" === t }, text: function (e) { var t; return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || t.toLowerCase() === e.type) }, first: pt(function () { return [0] }), last: pt(function (e, t) { return [t - 1] }), eq: pt(function (e, t, n) { return [0 > n ? n + t : n] }), even: pt(function (e, t) { var n = 0; for (; t > n; n += 2) e.push(n); return e }), odd: pt(function (e, t) { var n = 1; for (; t > n; n += 2) e.push(n); return e }), lt: pt(function (e, t, n) { var r = 0 > n ? n + t : n; for (; --r >= 0; ) e.push(r); return e }), gt: pt(function (e, t, n) { var r = 0 > n ? n + t : n; for (; t > ++r; ) e.push(r); return e })} }; for (n in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) i.pseudos[n] = lt(n); for (n in { submit: !0, reset: !0 }) i.pseudos[n] = ct(n); function ft(e, t) { var n, r, o, a, s, u, l, c = E[e + " "]; if (c) return t ? 0 : c.slice(0); s = e, u = [], l = i.preFilter; while (s) { (!n || (r = $.exec(s))) && (r && (s = s.slice(r[0].length) || s), u.push(o = [])), n = !1, (r = I.exec(s)) && (n = r.shift(), o.push({ value: n, type: r[0].replace(W, " ") }), s = s.slice(n.length)); for (a in i.filter) !(r = U[a].exec(s)) || l[a] && !(r = l[a](r)) || (n = r.shift(), o.push({ value: n, type: a, matches: r }), s = s.slice(n.length)); if (!n) break } return t ? s.length : s ? st.error(e) : E(e, u).slice(0) } function dt(e) { var t = 0, n = e.length, r = ""; for (; n > t; t++) r += e[t].value; return r } function ht(e, t, n) { var i = t.dir, o = n && "parentNode" === i, a = C++; return t.first ? function (t, n, r) { while (t = t[i]) if (1 === t.nodeType || o) return e(t, n, r) } : function (t, n, s) { var u, l, c, p = N + " " + a; if (s) { while (t = t[i]) if ((1 === t.nodeType || o) && e(t, n, s)) return !0 } else while (t = t[i]) if (1 === t.nodeType || o) if (c = t[x] || (t[x] = {}), (l = c[i]) && l[0] === p) { if ((u = l[1]) === !0 || u === r) return u === !0 } else if (l = c[i] = [p], l[1] = e(t, n, s) || r, l[1] === !0) return !0 } } function gt(e) { return e.length > 1 ? function (t, n, r) { var i = e.length; while (i--) if (!e[i](t, n, r)) return !1; return !0 } : e[0] } function mt(e, t, n, r, i) { var o, a = [], s = 0, u = e.length, l = null != t; for (; u > s; s++) (o = e[s]) && (!n || n(o, r, i)) && (a.push(o), l && t.push(s)); return a } function yt(e, t, n, r, i, o) { return r && !r[x] && (r = yt(r)), i && !i[x] && (i = yt(i, o)), ot(function (o, a, s, u) { var l, c, p, f = [], d = [], h = a.length, g = o || xt(t || "*", s.nodeType ? [s] : s, []), m = !e || !o && t ? g : mt(g, f, e, s, u), y = n ? i || (o ? e : h || r) ? [] : a : m; if (n && n(m, y, s, u), r) { l = mt(y, d), r(l, [], s, u), c = l.length; while (c--) (p = l[c]) && (y[d[c]] = !(m[d[c]] = p)) } if (o) { if (i || e) { if (i) { l = [], c = y.length; while (c--) (p = y[c]) && l.push(m[c] = p); i(null, y = [], l, u) } c = y.length; while (c--) (p = y[c]) && (l = i ? M.call(o, p) : f[c]) > -1 && (o[l] = !(a[l] = p)) } } else y = mt(y === a ? y.splice(h, y.length) : y), i ? i(null, a, y, u) : H.apply(a, y) }) } function vt(e) { var t, n, r, o = e.length, a = i.relative[e[0].type], s = a || i.relative[" "], u = a ? 1 : 0, c = ht(function (e) { return e === t }, s, !0), p = ht(function (e) { return M.call(t, e) > -1 }, s, !0), f = [function (e, n, r) { return !a && (r || n !== l) || ((t = n).nodeType ? c(e, n, r) : p(e, n, r)) } ]; for (; o > u; u++) if (n = i.relative[e[u].type]) f = [ht(gt(f), n)]; else { if (n = i.filter[e[u].type].apply(null, e[u].matches), n[x]) { for (r = ++u; o > r; r++) if (i.relative[e[r].type]) break; return yt(u > 1 && gt(f), u > 1 && dt(e.slice(0, u - 1)).replace(W, "$1"), n, r > u && vt(e.slice(u, r)), o > r && vt(e = e.slice(r)), o > r && dt(e)) } f.push(n) } return gt(f) } function bt(e, t) { var n = 0, o = t.length > 0, a = e.length > 0, s = function (s, u, c, f, d) { var h, g, m, y = [], v = 0, b = "0", x = s && [], w = null != d, T = l, C = s || a && i.find.TAG("*", d && u.parentNode || u), k = N += null == T ? 1 : Math.random() || .1; for (w && (l = u !== p && u, r = n); null != (h = C[b]); b++) { if (a && h) { g = 0; while (m = e[g++]) if (m(h, u, c)) { f.push(h); break } w && (N = k, r = ++n) } o && ((h = !m && h) && v--, s && x.push(h)) } if (v += b, o && b !== v) { g = 0; while (m = t[g++]) m(x, y, u, c); if (s) { if (v > 0) while (b--) x[b] || y[b] || (y[b] = L.call(f)); y = mt(y) } H.apply(f, y), w && !s && y.length > 0 && v + t.length > 1 && st.uniqueSort(f) } return w && (N = k, l = T), x }; return o ? ot(s) : s } s = st.compile = function (e, t) { var n, r = [], i = [], o = S[e + " "]; if (!o) { t || (t = ft(e)), n = t.length; while (n--) o = vt(t[n]), o[x] ? r.push(o) : i.push(o); o = S(e, bt(i, r)) } return o }; function xt(e, t, n) { var r = 0, i = t.length; for (; i > r; r++) st(e, t[r], n); return n } function wt(e, t, n, r) { var o, a, u, l, c, p = ft(e); if (!r && 1 === p.length) { if (a = p[0] = p[0].slice(0), a.length > 2 && "ID" === (u = a[0]).type && 9 === t.nodeType && !d && i.relative[a[1].type]) { if (t = i.find.ID(u.matches[0].replace(et, tt), t)[0], !t) return n; e = e.slice(a.shift().value.length) } o = U.needsContext.test(e) ? 0 : a.length; while (o--) { if (u = a[o], i.relative[l = u.type]) break; if ((c = i.find[l]) && (r = c(u.matches[0].replace(et, tt), V.test(a[0].type) && t.parentNode || t))) { if (a.splice(o, 1), e = r.length && dt(a), !e) return H.apply(n, q.call(r, 0)), n; break } } } return s(e, p)(r, t, d, n, V.test(e)), n } i.pseudos.nth = i.pseudos.eq; function Tt() { } i.filters = Tt.prototype = i.pseudos, i.setFilters = new Tt, c(), st.attr = b.attr, b.find = st, b.expr = st.selectors, b.expr[":"] = b.expr.pseudos, b.unique = st.uniqueSort, b.text = st.getText, b.isXMLDoc = st.isXML, b.contains = st.contains } (e); var at = /Until$/, st = /^(?:parents|prev(?:Until|All))/, ut = /^.[^:#\[\.,]*$/, lt = b.expr.match.needsContext, ct = { children: !0, contents: !0, next: !0, prev: !0 }; b.fn.extend({ find: function (e) { var t, n, r, i = this.length; if ("string" != typeof e) return r = this, this.pushStack(b(e).filter(function () { for (t = 0; i > t; t++) if (b.contains(r[t], this)) return !0 })); for (n = [], t = 0; i > t; t++) b.find(e, this[t], n); return n = this.pushStack(i > 1 ? b.unique(n) : n), n.selector = (this.selector ? this.selector + " " : "") + e, n }, has: function (e) { var t, n = b(e, this), r = n.length; return this.filter(function () { for (t = 0; r > t; t++) if (b.contains(this, n[t])) return !0 }) }, not: function (e) { return this.pushStack(ft(this, e, !1)) }, filter: function (e) { return this.pushStack(ft(this, e, !0)) }, is: function (e) { return !!e && ("string" == typeof e ? lt.test(e) ? b(e, this.context).index(this[0]) >= 0 : b.filter(e, this).length > 0 : this.filter(e).length > 0) }, closest: function (e, t) { var n, r = 0, i = this.length, o = [], a = lt.test(e) || "string" != typeof e ? b(e, t || this.context) : 0; for (; i > r; r++) { n = this[r]; while (n && n.ownerDocument && n !== t && 11 !== n.nodeType) { if (a ? a.index(n) > -1 : b.find.matchesSelector(n, e)) { o.push(n); break } n = n.parentNode } } return this.pushStack(o.length > 1 ? b.unique(o) : o) }, index: function (e) { return e ? "string" == typeof e ? b.inArray(this[0], b(e)) : b.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (e, t) { var n = "string" == typeof e ? b(e, t) : b.makeArray(e && e.nodeType ? [e] : e), r = b.merge(this.get(), n); return this.pushStack(b.unique(r)) }, addBack: function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) } }), b.fn.andSelf = b.fn.addBack; function pt(e, t) { do e = e[t]; while (e && 1 !== e.nodeType); return e } b.each({ parent: function (e) { var t = e.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (e) { return b.dir(e, "parentNode") }, parentsUntil: function (e, t, n) { return b.dir(e, "parentNode", n) }, next: function (e) { return pt(e, "nextSibling") }, prev: function (e) { return pt(e, "previousSibling") }, nextAll: function (e) { return b.dir(e, "nextSibling") }, prevAll: function (e) { return b.dir(e, "previousSibling") }, nextUntil: function (e, t, n) { return b.dir(e, "nextSibling", n) }, prevUntil: function (e, t, n) { return b.dir(e, "previousSibling", n) }, siblings: function (e) { return b.sibling((e.parentNode || {}).firstChild, e) }, children: function (e) { return b.sibling(e.firstChild) }, contents: function (e) { return b.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : b.merge([], e.childNodes) } }, function (e, t) { b.fn[e] = function (n, r) { var i = b.map(this, t, n); return at.test(e) || (r = n), r && "string" == typeof r && (i = b.filter(r, i)), i = this.length > 1 && !ct[e] ? b.unique(i) : i, this.length > 1 && st.test(e) && (i = i.reverse()), this.pushStack(i) } }), b.extend({ filter: function (e, t, n) { return n && (e = ":not(" + e + ")"), 1 === t.length ? b.find.matchesSelector(t[0], e) ? [t[0]] : [] : b.find.matches(e, t) }, dir: function (e, n, r) { var i = [], o = e[n]; while (o && 9 !== o.nodeType && (r === t || 1 !== o.nodeType || !b(o).is(r))) 1 === o.nodeType && i.push(o), o = o[n]; return i }, sibling: function (e, t) { var n = []; for (; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); return n } }); function ft(e, t, n) { if (t = t || 0, b.isFunction(t)) return b.grep(e, function (e, r) { var i = !!t.call(e, r, e); return i === n }); if (t.nodeType) return b.grep(e, function (e) { return e === t === n }); if ("string" == typeof t) { var r = b.grep(e, function (e) { return 1 === e.nodeType }); if (ut.test(t)) return b.filter(t, r, !n); t = b.filter(t, r) } return b.grep(e, function (e) { return b.inArray(e, t) >= 0 === n }) } function dt(e) { var t = ht.split("|"), n = e.createDocumentFragment(); if (n.createElement) while (t.length) n.createElement(t.pop()); return n } var ht = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", gt = / jQuery\d+="(?:null|\d+)"/g, mt = RegExp("<(?:" + ht + ")[\\s/>]", "i"), yt = /^\s+/, vt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, bt = /<([\w:]+)/, xt = /<tbody/i, wt = /<|&#?\w+;/, Tt = /<(?:script|style|link)/i, Nt = /^(?:checkbox|radio)$/i, Ct = /checked\s*(?:[^=]|=\s*.checked.)/i, kt = /^$|\/(?:java|ecma)script/i, Et = /^true\/(.*)/, St = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, At = { option: [1, "<select multiple='multiple'>", "</select>"], legend: [1, "<fieldset>", "</fieldset>"], area: [1, "<map>", "</map>"], param: [1, "<object>", "</object>"], thead: [1, "<table>", "</table>"], tr: [2, "<table><tbody>", "</tbody></table>"], col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: b.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"] }, jt = dt(o), Dt = jt.appendChild(o.createElement("div")); At.optgroup = At.option, At.tbody = At.tfoot = At.colgroup = At.caption = At.thead, At.th = At.td, b.fn.extend({ text: function (e) { return b.access(this, function (e) { return e === t ? b.text(this) : this.empty().append((this[0] && this[0].ownerDocument || o).createTextNode(e)) }, null, e, arguments.length) }, wrapAll: function (e) { if (b.isFunction(e)) return this.each(function (t) { b(this).wrapAll(e.call(this, t)) }); if (this[0]) { var t = b(e, this[0].ownerDocument).eq(0).clone(!0); this[0].parentNode && t.insertBefore(this[0]), t.map(function () { var e = this; while (e.firstChild && 1 === e.firstChild.nodeType) e = e.firstChild; return e }).append(this) } return this }, wrapInner: function (e) { return b.isFunction(e) ? this.each(function (t) { b(this).wrapInner(e.call(this, t)) }) : this.each(function () { var t = b(this), n = t.contents(); n.length ? n.wrapAll(e) : t.append(e) }) }, wrap: function (e) { var t = b.isFunction(e); return this.each(function (n) { b(this).wrapAll(t ? e.call(this, n) : e) }) }, unwrap: function () { return this.parent().each(function () { b.nodeName(this, "body") || b(this).replaceWith(this.childNodes) }).end() }, append: function () { return this.domManip(arguments, !0, function (e) { (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.appendChild(e) }) }, prepend: function () { return this.domManip(arguments, !0, function (e) { (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && this.insertBefore(e, this.firstChild) }) }, before: function () { return this.domManip(arguments, !1, function (e) { this.parentNode && this.parentNode.insertBefore(e, this) }) }, after: function () { return this.domManip(arguments, !1, function (e) { this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) }) }, remove: function (e, t) { var n, r = 0; for (; null != (n = this[r]); r++) (!e || b.filter(e, [n]).length > 0) && (t || 1 !== n.nodeType || b.cleanData(Ot(n)), n.parentNode && (t && b.contains(n.ownerDocument, n) && Mt(Ot(n, "script")), n.parentNode.removeChild(n))); return this }, empty: function () { var e, t = 0; for (; null != (e = this[t]); t++) { 1 === e.nodeType && b.cleanData(Ot(e, !1)); while (e.firstChild) e.removeChild(e.firstChild); e.options && b.nodeName(e, "select") && (e.options.length = 0) } return this }, clone: function (e, t) { return e = null == e ? !1 : e, t = null == t ? e : t, this.map(function () { return b.clone(this, e, t) }) }, html: function (e) { return b.access(this, function (e) { var n = this[0] || {}, r = 0, i = this.length; if (e === t) return 1 === n.nodeType ? n.innerHTML.replace(gt, "") : t; if (!("string" != typeof e || Tt.test(e) || !b.support.htmlSerialize && mt.test(e) || !b.support.leadingWhitespace && yt.test(e) || At[(bt.exec(e) || ["", ""])[1].toLowerCase()])) { e = e.replace(vt, "<$1></$2>"); try { for (; i > r; r++) n = this[r] || {}, 1 === n.nodeType && (b.cleanData(Ot(n, !1)), n.innerHTML = e); n = 0 } catch (o) { } } n && this.empty().append(e) }, null, e, arguments.length) }, replaceWith: function (e) { var t = b.isFunction(e); return t || "string" == typeof e || (e = b(e).not(this).detach()), this.domManip([e], !0, function (e) { var t = this.nextSibling, n = this.parentNode; n && (b(this).remove(), n.insertBefore(e, t)) }) }, detach: function (e) { return this.remove(e, !0) }, domManip: function (e, n, r) { e = f.apply([], e); var i, o, a, s, u, l, c = 0, p = this.length, d = this, h = p - 1, g = e[0], m = b.isFunction(g); if (m || !(1 >= p || "string" != typeof g || b.support.checkClone) && Ct.test(g)) return this.each(function (i) { var o = d.eq(i); m && (e[0] = g.call(this, i, n ? o.html() : t)), o.domManip(e, n, r) }); if (p && (l = b.buildFragment(e, this[0].ownerDocument, !1, this), i = l.firstChild, 1 === l.childNodes.length && (l = i), i)) { for (n = n && b.nodeName(i, "tr"), s = b.map(Ot(l, "script"), Ht), a = s.length; p > c; c++) o = l, c !== h && (o = b.clone(o, !0, !0), a && b.merge(s, Ot(o, "script"))), r.call(n && b.nodeName(this[c], "table") ? Lt(this[c], "tbody") : this[c], o, c); if (a) for (u = s[s.length - 1].ownerDocument, b.map(s, qt), c = 0; a > c; c++) o = s[c], kt.test(o.type || "") && !b._data(o, "globalEval") && b.contains(u, o) && (o.src ? b.ajax({ url: o.src, type: "GET", dataType: "script", async: !1, global: !1, "throws": !0 }) : b.globalEval((o.text || o.textContent || o.innerHTML || "").replace(St, ""))); l = i = null } return this } }); function Lt(e, t) { return e.getElementsByTagName(t)[0] || e.appendChild(e.ownerDocument.createElement(t)) } function Ht(e) { var t = e.getAttributeNode("type"); return e.type = (t && t.specified) + "/" + e.type, e } function qt(e) { var t = Et.exec(e.type); return t ? e.type = t[1] : e.removeAttribute("type"), e } function Mt(e, t) { var n, r = 0; for (; null != (n = e[r]); r++) b._data(n, "globalEval", !t || b._data(t[r], "globalEval")) } function _t(e, t) { if (1 === t.nodeType && b.hasData(e)) { var n, r, i, o = b._data(e), a = b._data(t, o), s = o.events; if (s) { delete a.handle, a.events = {}; for (n in s) for (r = 0, i = s[n].length; i > r; r++) b.event.add(t, n, s[n][r]) } a.data && (a.data = b.extend({}, a.data)) } } function Ft(e, t) { var n, r, i; if (1 === t.nodeType) { if (n = t.nodeName.toLowerCase(), !b.support.noCloneEvent && t[b.expando]) { i = b._data(t); for (r in i.events) b.removeEvent(t, r, i.handle); t.removeAttribute(b.expando) } "script" === n && t.text !== e.text ? (Ht(t).text = e.text, qt(t)) : "object" === n ? (t.parentNode && (t.outerHTML = e.outerHTML), b.support.html5Clone && e.innerHTML && !b.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : "input" === n && Nt.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : "option" === n ? t.defaultSelected = t.selected = e.defaultSelected : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue) } } b.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (e, t) { b.fn[e] = function (e) { var n, r = 0, i = [], o = b(e), a = o.length - 1; for (; a >= r; r++) n = r === a ? this : this.clone(!0), b(o[r])[t](n), d.apply(i, n.get()); return this.pushStack(i) } }); function Ot(e, n) { var r, o, a = 0, s = typeof e.getElementsByTagName !== i ? e.getElementsByTagName(n || "*") : typeof e.querySelectorAll !== i ? e.querySelectorAll(n || "*") : t; if (!s) for (s = [], r = e.childNodes || e; null != (o = r[a]); a++) !n || b.nodeName(o, n) ? s.push(o) : b.merge(s, Ot(o, n)); return n === t || n && b.nodeName(e, n) ? b.merge([e], s) : s } function Bt(e) { Nt.test(e.type) && (e.defaultChecked = e.checked) } b.extend({ clone: function (e, t, n) { var r, i, o, a, s, u = b.contains(e.ownerDocument, e); if (b.support.html5Clone || b.isXMLDoc(e) || !mt.test("<" + e.nodeName + ">") ? o = e.cloneNode(!0) : (Dt.innerHTML = e.outerHTML, Dt.removeChild(o = Dt.firstChild)), !(b.support.noCloneEvent && b.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || b.isXMLDoc(e))) for (r = Ot(o), s = Ot(e), a = 0; null != (i = s[a]); ++a) r[a] && Ft(i, r[a]); if (t) if (n) for (s = s || Ot(e), r = r || Ot(o), a = 0; null != (i = s[a]); a++) _t(i, r[a]); else _t(e, o); return r = Ot(o, "script"), r.length > 0 && Mt(r, !u && Ot(e, "script")), r = s = i = null, o }, buildFragment: function (e, t, n, r) {
|
13 |
+
var i, o, a, s, u, l, c, p = e.length, f = dt(t), d = [], h = 0; for (; p > h; h++) if (o = e[h], o || 0 === o) if ("object" === b.type(o)) b.merge(d, o.nodeType ? [o] : o); else if (wt.test(o)) {
|
14 |
+
s = s || f.appendChild(t.createElement("div")), u = (bt.exec(o) || ["", ""])[1].toLowerCase(), c = At[u] || At._default, s.innerHTML = c[1] + o.replace(vt, "<$1></$2>") + c[2], i = c[0]; while (i--) s = s.lastChild; if (!b.support.leadingWhitespace && yt.test(o) && d.push(t.createTextNode(yt.exec(o)[0])), !b.support.tbody) {
|
15 |
+
o = "table" !== u || xt.test(o) ? "<table>" !== c[1] || xt.test(o) ? 0 : s : s.firstChild, i = o && o.childNodes.length; while (i--) b.nodeName(l = o.childNodes[i], "tbody") && !l.childNodes.length && o.removeChild(l)
|
16 |
+
} b.merge(d, s.childNodes), s.textContent = ""; while (s.firstChild) s.removeChild(s.firstChild); s = f.lastChild
|
17 |
+
} else d.push(t.createTextNode(o)); s && f.removeChild(s), b.support.appendChecked || b.grep(Ot(d, "input"), Bt), h = 0; while (o = d[h++]) if ((!r || -1 === b.inArray(o, r)) && (a = b.contains(o.ownerDocument, o), s = Ot(f.appendChild(o), "script"), a && Mt(s), n)) { i = 0; while (o = s[i++]) kt.test(o.type || "") && n.push(o) } return s = null, f
|
18 |
+
}, cleanData: function (e, t) { var n, r, o, a, s = 0, u = b.expando, l = b.cache, p = b.support.deleteExpando, f = b.event.special; for (; null != (n = e[s]); s++) if ((t || b.acceptData(n)) && (o = n[u], a = o && l[o])) { if (a.events) for (r in a.events) f[r] ? b.event.remove(n, r) : b.removeEvent(n, r, a.handle); l[o] && (delete l[o], p ? delete n[u] : typeof n.removeAttribute !== i ? n.removeAttribute(u) : n[u] = null, c.push(o)) } }
|
19 |
+
}); var Pt, Rt, Wt, $t = /alpha\([^)]*\)/i, It = /opacity\s*=\s*([^)]*)/, zt = /^(top|right|bottom|left)$/, Xt = /^(none|table(?!-c[ea]).+)/, Ut = /^margin/, Vt = RegExp("^(" + x + ")(.*)$", "i"), Yt = RegExp("^(" + x + ")(?!px)[a-z%]+$", "i"), Jt = RegExp("^([+-])=(" + x + ")", "i"), Gt = { BODY: "block" }, Qt = { position: "absolute", visibility: "hidden", display: "block" }, Kt = { letterSpacing: 0, fontWeight: 400 }, Zt = ["Top", "Right", "Bottom", "Left"], en = ["Webkit", "O", "Moz", "ms"]; function tn(e, t) { if (t in e) return t; var n = t.charAt(0).toUpperCase() + t.slice(1), r = t, i = en.length; while (i--) if (t = en[i] + n, t in e) return t; return r } function nn(e, t) { return e = t || e, "none" === b.css(e, "display") || !b.contains(e.ownerDocument, e) } function rn(e, t) { var n, r, i, o = [], a = 0, s = e.length; for (; s > a; a++) r = e[a], r.style && (o[a] = b._data(r, "olddisplay"), n = r.style.display, t ? (o[a] || "none" !== n || (r.style.display = ""), "" === r.style.display && nn(r) && (o[a] = b._data(r, "olddisplay", un(r.nodeName)))) : o[a] || (i = nn(r), (n && "none" !== n || !i) && b._data(r, "olddisplay", i ? n : b.css(r, "display")))); for (a = 0; s > a; a++) r = e[a], r.style && (t && "none" !== r.style.display && "" !== r.style.display || (r.style.display = t ? o[a] || "" : "none")); return e } b.fn.extend({ css: function (e, n) { return b.access(this, function (e, n, r) { var i, o, a = {}, s = 0; if (b.isArray(n)) { for (o = Rt(e), i = n.length; i > s; s++) a[n[s]] = b.css(e, n[s], !1, o); return a } return r !== t ? b.style(e, n, r) : b.css(e, n) }, e, n, arguments.length > 1) }, show: function () { return rn(this, !0) }, hide: function () { return rn(this) }, toggle: function (e) { var t = "boolean" == typeof e; return this.each(function () { (t ? e : nn(this)) ? b(this).show() : b(this).hide() }) } }), b.extend({ cssHooks: { opacity: { get: function (e, t) { if (t) { var n = Wt(e, "opacity"); return "" === n ? "1" : n } } } }, cssNumber: { columnCount: !0, fillOpacity: !0, fontWeight: !0, lineHeight: !0, opacity: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: { "float": b.support.cssFloat ? "cssFloat" : "styleFloat" }, style: function (e, n, r, i) { if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { var o, a, s, u = b.camelCase(n), l = e.style; if (n = b.cssProps[u] || (b.cssProps[u] = tn(l, u)), s = b.cssHooks[n] || b.cssHooks[u], r === t) return s && "get" in s && (o = s.get(e, !1, i)) !== t ? o : l[n]; if (a = typeof r, "string" === a && (o = Jt.exec(r)) && (r = (o[1] + 1) * o[2] + parseFloat(b.css(e, n)), a = "number"), !(null == r || "number" === a && isNaN(r) || ("number" !== a || b.cssNumber[u] || (r += "px"), b.support.clearCloneStyle || "" !== r || 0 !== n.indexOf("background") || (l[n] = "inherit"), s && "set" in s && (r = s.set(e, r, i)) === t))) try { l[n] = r } catch (c) { } } }, css: function (e, n, r, i) { var o, a, s, u = b.camelCase(n); return n = b.cssProps[u] || (b.cssProps[u] = tn(e.style, u)), s = b.cssHooks[n] || b.cssHooks[u], s && "get" in s && (a = s.get(e, !0, r)), a === t && (a = Wt(e, n, i)), "normal" === a && n in Kt && (a = Kt[n]), "" === r || r ? (o = parseFloat(a), r === !0 || b.isNumeric(o) ? o || 0 : a) : a }, swap: function (e, t, n, r) { var i, o, a = {}; for (o in t) a[o] = e.style[o], e.style[o] = t[o]; i = n.apply(e, r || []); for (o in t) e.style[o] = a[o]; return i } }), e.getComputedStyle ? (Rt = function (t) { return e.getComputedStyle(t, null) }, Wt = function (e, n, r) { var i, o, a, s = r || Rt(e), u = s ? s.getPropertyValue(n) || s[n] : t, l = e.style; return s && ("" !== u || b.contains(e.ownerDocument, e) || (u = b.style(e, n)), Yt.test(u) && Ut.test(n) && (i = l.width, o = l.minWidth, a = l.maxWidth, l.minWidth = l.maxWidth = l.width = u, u = s.width, l.width = i, l.minWidth = o, l.maxWidth = a)), u }) : o.documentElement.currentStyle && (Rt = function (e) { return e.currentStyle }, Wt = function (e, n, r) { var i, o, a, s = r || Rt(e), u = s ? s[n] : t, l = e.style; return null == u && l && l[n] && (u = l[n]), Yt.test(u) && !zt.test(n) && (i = l.left, o = e.runtimeStyle, a = o && o.left, a && (o.left = e.currentStyle.left), l.left = "fontSize" === n ? "1em" : u, u = l.pixelLeft + "px", l.left = i, a && (o.left = a)), "" === u ? "auto" : u }); function on(e, t, n) { var r = Vt.exec(t); return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t } function an(e, t, n, r, i) { var o = n === (r ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; for (; 4 > o; o += 2) "margin" === n && (a += b.css(e, n + Zt[o], !0, i)), r ? ("content" === n && (a -= b.css(e, "padding" + Zt[o], !0, i)), "margin" !== n && (a -= b.css(e, "border" + Zt[o] + "Width", !0, i))) : (a += b.css(e, "padding" + Zt[o], !0, i), "padding" !== n && (a += b.css(e, "border" + Zt[o] + "Width", !0, i))); return a } function sn(e, t, n) { var r = !0, i = "width" === t ? e.offsetWidth : e.offsetHeight, o = Rt(e), a = b.support.boxSizing && "border-box" === b.css(e, "boxSizing", !1, o); if (0 >= i || null == i) { if (i = Wt(e, t, o), (0 > i || null == i) && (i = e.style[t]), Yt.test(i)) return i; r = a && (b.support.boxSizingReliable || i === e.style[t]), i = parseFloat(i) || 0 } return i + an(e, t, n || (a ? "border" : "content"), r, o) + "px" } function un(e) { var t = o, n = Gt[e]; return n || (n = ln(e, t), "none" !== n && n || (Pt = (Pt || b("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(t.documentElement), t = (Pt[0].contentWindow || Pt[0].contentDocument).document, t.write("<!doctype html><html><body>"), t.close(), n = ln(e, t), Pt.detach()), Gt[e] = n), n } function ln(e, t) { var n = b(t.createElement(e)).appendTo(t.body), r = b.css(n[0], "display"); return n.remove(), r } b.each(["height", "width"], function (e, n) { b.cssHooks[n] = { get: function (e, r, i) { return r ? 0 === e.offsetWidth && Xt.test(b.css(e, "display")) ? b.swap(e, Qt, function () { return sn(e, n, i) }) : sn(e, n, i) : t }, set: function (e, t, r) { var i = r && Rt(e); return on(e, t, r ? an(e, n, r, b.support.boxSizing && "border-box" === b.css(e, "boxSizing", !1, i), i) : 0) } } }), b.support.opacity || (b.cssHooks.opacity = { get: function (e, t) { return It.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : "" }, set: function (e, t) { var n = e.style, r = e.currentStyle, i = b.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "", o = r && r.filter || n.filter || ""; n.zoom = 1, (t >= 1 || "" === t) && "" === b.trim(o.replace($t, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === t || r && !r.filter) || (n.filter = $t.test(o) ? o.replace($t, i) : o + " " + i) } }), b(function () { b.support.reliableMarginRight || (b.cssHooks.marginRight = { get: function (e, n) { return n ? b.swap(e, { display: "inline-block" }, Wt, [e, "marginRight"]) : t } }), !b.support.pixelPosition && b.fn.position && b.each(["top", "left"], function (e, n) { b.cssHooks[n] = { get: function (e, r) { return r ? (r = Wt(e, n), Yt.test(r) ? b(e).position()[n] + "px" : r) : t } } }) }), b.expr && b.expr.filters && (b.expr.filters.hidden = function (e) { return 0 >= e.offsetWidth && 0 >= e.offsetHeight || !b.support.reliableHiddenOffsets && "none" === (e.style && e.style.display || b.css(e, "display")) }, b.expr.filters.visible = function (e) { return !b.expr.filters.hidden(e) }), b.each({ margin: "", padding: "", border: "Width" }, function (e, t) { b.cssHooks[e + t] = { expand: function (n) { var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n]; for (; 4 > r; r++) i[e + Zt[r] + t] = o[r] || o[r - 2] || o[0]; return i } }, Ut.test(e) || (b.cssHooks[e + t].set = on) }); var cn = /%20/g, pn = /\[\]$/, fn = /\r?\n/g, dn = /^(?:submit|button|image|reset|file)$/i, hn = /^(?:input|select|textarea|keygen)/i; b.fn.extend({ serialize: function () { return b.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var e = b.prop(this, "elements"); return e ? b.makeArray(e) : this }).filter(function () { var e = this.type; return this.name && !b(this).is(":disabled") && hn.test(this.nodeName) && !dn.test(e) && (this.checked || !Nt.test(e)) }).map(function (e, t) { var n = b(this).val(); return null == n ? null : b.isArray(n) ? b.map(n, function (e) { return { name: t.name, value: e.replace(fn, "\r\n")} }) : { name: t.name, value: n.replace(fn, "\r\n")} }).get() } }), b.param = function (e, n) { var r, i = [], o = function (e, t) { t = b.isFunction(t) ? t() : null == t ? "" : t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t) }; if (n === t && (n = b.ajaxSettings && b.ajaxSettings.traditional), b.isArray(e) || e.jquery && !b.isPlainObject(e)) b.each(e, function () { o(this.name, this.value) }); else for (r in e) gn(r, e[r], n, o); return i.join("&").replace(cn, "+") }; function gn(e, t, n, r) { var i; if (b.isArray(t)) b.each(t, function (t, i) { n || pn.test(e) ? r(e, i) : gn(e + "[" + ("object" == typeof i ? t : "") + "]", i, n, r) }); else if (n || "object" !== b.type(t)) r(e, t); else for (i in t) gn(e + "[" + i + "]", t[i], n, r) } b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (e, t) { b.fn[t] = function (e, n) { return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) } }), b.fn.hover = function (e, t) { return this.mouseenter(e).mouseleave(t || e) }; var mn, yn, vn = b.now(), bn = /\?/, xn = /#.*$/, wn = /([?&])_=[^&]*/, Tn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, Nn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Cn = /^(?:GET|HEAD)$/, kn = /^\/\//, En = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, Sn = b.fn.load, An = {}, jn = {}, Dn = "*/".concat("*"); try { yn = a.href } catch (Ln) { yn = o.createElement("a"), yn.href = "", yn = yn.href } mn = En.exec(yn.toLowerCase()) || []; function Hn(e) { return function (t, n) { "string" != typeof t && (n = t, t = "*"); var r, i = 0, o = t.toLowerCase().match(w) || []; if (b.isFunction(n)) while (r = o[i++]) "+" === r[0] ? (r = r.slice(1) || "*", (e[r] = e[r] || []).unshift(n)) : (e[r] = e[r] || []).push(n) } } function qn(e, n, r, i) { var o = {}, a = e === jn; function s(u) { var l; return o[u] = !0, b.each(e[u] || [], function (e, u) { var c = u(n, r, i); return "string" != typeof c || a || o[c] ? a ? !(l = c) : t : (n.dataTypes.unshift(c), s(c), !1) }), l } return s(n.dataTypes[0]) || !o["*"] && s("*") } function Mn(e, n) { var r, i, o = b.ajaxSettings.flatOptions || {}; for (i in n) n[i] !== t && ((o[i] ? e : r || (r = {}))[i] = n[i]); return r && b.extend(!0, e, r), e } b.fn.load = function (e, n, r) { if ("string" != typeof e && Sn) return Sn.apply(this, arguments); var i, o, a, s = this, u = e.indexOf(" "); return u >= 0 && (i = e.slice(u, e.length), e = e.slice(0, u)), b.isFunction(n) ? (r = n, n = t) : n && "object" == typeof n && (a = "POST"), s.length > 0 && b.ajax({ url: e, type: a, dataType: "html", data: n }).done(function (e) { o = arguments, s.html(i ? b("<div>").append(b.parseHTML(e)).find(i) : e) }).complete(r && function (e, t) { s.each(r, o || [e.responseText, t, e]) }), this }, b.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) { b.fn[t] = function (e) { return this.on(t, e) } }), b.each(["get", "post"], function (e, n) { b[n] = function (e, r, i, o) { return b.isFunction(r) && (o = o || i, i = r, r = t), b.ajax({ url: e, type: n, dataType: o, data: r, success: i }) } }), b.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: yn, type: "GET", isLocal: Nn.test(mn[1]), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": Dn, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText" }, converters: { "* text": e.String, "text html": !0, "text json": b.parseJSON, "text xml": b.parseXML }, flatOptions: { url: !0, context: !0} }, ajaxSetup: function (e, t) { return t ? Mn(Mn(e, b.ajaxSettings), t) : Mn(b.ajaxSettings, e) }, ajaxPrefilter: Hn(An), ajaxTransport: Hn(jn), ajax: function (e, n) { "object" == typeof e && (n = e, e = t), n = n || {}; var r, i, o, a, s, u, l, c, p = b.ajaxSetup({}, n), f = p.context || p, d = p.context && (f.nodeType || f.jquery) ? b(f) : b.event, h = b.Deferred(), g = b.Callbacks("once memory"), m = p.statusCode || {}, y = {}, v = {}, x = 0, T = "canceled", N = { readyState: 0, getResponseHeader: function (e) { var t; if (2 === x) { if (!c) { c = {}; while (t = Tn.exec(a)) c[t[1].toLowerCase()] = t[2] } t = c[e.toLowerCase()] } return null == t ? null : t }, getAllResponseHeaders: function () { return 2 === x ? a : null }, setRequestHeader: function (e, t) { var n = e.toLowerCase(); return x || (e = v[n] = v[n] || e, y[e] = t), this }, overrideMimeType: function (e) { return x || (p.mimeType = e), this }, statusCode: function (e) { var t; if (e) if (2 > x) for (t in e) m[t] = [m[t], e[t]]; else N.always(e[N.status]); return this }, abort: function (e) { var t = e || T; return l && l.abort(t), k(0, t), this } }; if (h.promise(N).complete = g.add, N.success = N.done, N.error = N.fail, p.url = ((e || p.url || yn) + "").replace(xn, "").replace(kn, mn[1] + "//"), p.type = n.method || n.type || p.method || p.type, p.dataTypes = b.trim(p.dataType || "*").toLowerCase().match(w) || [""], null == p.crossDomain && (r = En.exec(p.url.toLowerCase()), p.crossDomain = !(!r || r[1] === mn[1] && r[2] === mn[2] && (r[3] || ("http:" === r[1] ? 80 : 443)) == (mn[3] || ("http:" === mn[1] ? 80 : 443)))), p.data && p.processData && "string" != typeof p.data && (p.data = b.param(p.data, p.traditional)), qn(An, p, n, N), 2 === x) return N; u = p.global, u && 0 === b.active++ && b.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(), p.hasContent = !Cn.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (bn.test(o) ? "&" : "?") + p.data, delete p.data), p.cache === !1 && (p.url = wn.test(o) ? o.replace(wn, "$1_=" + vn++) : o + (bn.test(o) ? "&" : "?") + "_=" + vn++)), p.ifModified && (b.lastModified[o] && N.setRequestHeader("If-Modified-Since", b.lastModified[o]), b.etag[o] && N.setRequestHeader("If-None-Match", b.etag[o])), (p.data && p.hasContent && p.contentType !== !1 || n.contentType) && N.setRequestHeader("Content-Type", p.contentType), N.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + Dn + "; q=0.01" : "") : p.accepts["*"]); for (i in p.headers) N.setRequestHeader(i, p.headers[i]); if (p.beforeSend && (p.beforeSend.call(f, N, p) === !1 || 2 === x)) return N.abort(); T = "abort"; for (i in { success: 1, error: 1, complete: 1 }) N[i](p[i]); if (l = qn(jn, p, n, N)) { N.readyState = 1, u && d.trigger("ajaxSend", [N, p]), p.async && p.timeout > 0 && (s = setTimeout(function () { N.abort("timeout") }, p.timeout)); try { x = 1, l.send(y, k) } catch (C) { if (!(2 > x)) throw C; k(-1, C) } } else k(-1, "No Transport"); function k(e, n, r, i) { var c, y, v, w, T, C = n; 2 !== x && (x = 2, s && clearTimeout(s), l = t, a = i || "", N.readyState = e > 0 ? 4 : 0, r && (w = _n(p, N, r)), e >= 200 && 300 > e || 304 === e ? (p.ifModified && (T = N.getResponseHeader("Last-Modified"), T && (b.lastModified[o] = T), T = N.getResponseHeader("etag"), T && (b.etag[o] = T)), 204 === e ? (c = !0, C = "nocontent") : 304 === e ? (c = !0, C = "notmodified") : (c = Fn(p, w), C = c.state, y = c.data, v = c.error, c = !v)) : (v = C, (e || !C) && (C = "error", 0 > e && (e = 0))), N.status = e, N.statusText = (n || C) + "", c ? h.resolveWith(f, [y, C, N]) : h.rejectWith(f, [N, C, v]), N.statusCode(m), m = t, u && d.trigger(c ? "ajaxSuccess" : "ajaxError", [N, p, c ? y : v]), g.fireWith(f, [N, C]), u && (d.trigger("ajaxComplete", [N, p]), --b.active || b.event.trigger("ajaxStop"))) } return N }, getScript: function (e, n) { return b.get(e, t, n, "script") }, getJSON: function (e, t, n) { return b.get(e, t, n, "json") } }); function _n(e, n, r) { var i, o, a, s, u = e.contents, l = e.dataTypes, c = e.responseFields; for (s in c) s in r && (n[c[s]] = r[s]); while ("*" === l[0]) l.shift(), o === t && (o = e.mimeType || n.getResponseHeader("Content-Type")); if (o) for (s in u) if (u[s] && u[s].test(o)) { l.unshift(s); break } if (l[0] in r) a = l[0]; else { for (s in r) { if (!l[0] || e.converters[s + " " + l[0]]) { a = s; break } i || (i = s) } a = a || i } return a ? (a !== l[0] && l.unshift(a), r[a]) : t } function Fn(e, t) { var n, r, i, o, a = {}, s = 0, u = e.dataTypes.slice(), l = u[0]; if (e.dataFilter && (t = e.dataFilter(t, e.dataType)), u[1]) for (i in e.converters) a[i.toLowerCase()] = e.converters[i]; for (; r = u[++s]; ) if ("*" !== r) { if ("*" !== l && l !== r) { if (i = a[l + " " + r] || a["* " + r], !i) for (n in a) if (o = n.split(" "), o[1] === r && (i = a[l + " " + o[0]] || a["* " + o[0]])) { i === !0 ? i = a[n] : a[n] !== !0 && (r = o[0], u.splice(s--, 0, r)); break } if (i !== !0) if (i && e["throws"]) t = i(t); else try { t = i(t) } catch (c) { return { state: "parsererror", error: i ? c : "No conversion from " + l + " to " + r} } } l = r } return { state: "success", data: t} } b.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /(?:java|ecma)script/ }, converters: { "text script": function (e) { return b.globalEval(e), e } } }), b.ajaxPrefilter("script", function (e) { e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1) }), b.ajaxTransport("script", function (e) { if (e.crossDomain) { var n, r = o.head || b("head")[0] || o.documentElement; return { send: function (t, i) { n = o.createElement("script"), n.async = !0, e.scriptCharset && (n.charset = e.scriptCharset), n.src = e.url, n.onload = n.onreadystatechange = function (e, t) { (t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, n.parentNode && n.parentNode.removeChild(n), n = null, t || i(200, "success")) }, r.insertBefore(n, r.firstChild) }, abort: function () { n && n.onload(t, !0) } } } }); var On = [], Bn = /(=)\?(?=&|$)|\?\?/; b.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var e = On.pop() || b.expando + "_" + vn++; return this[e] = !0, e } }), b.ajaxPrefilter("json jsonp", function (n, r, i) { var o, a, s, u = n.jsonp !== !1 && (Bn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Bn.test(n.data) && "data"); return u || "jsonp" === n.dataTypes[0] ? (o = n.jsonpCallback = b.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, u ? n[u] = n[u].replace(Bn, "$1" + o) : n.jsonp !== !1 && (n.url += (bn.test(n.url) ? "&" : "?") + n.jsonp + "=" + o), n.converters["script json"] = function () { return s || b.error(o + " was not called"), s[0] }, n.dataTypes[0] = "json", a = e[o], e[o] = function () { s = arguments }, i.always(function () { e[o] = a, n[o] && (n.jsonpCallback = r.jsonpCallback, On.push(o)), s && b.isFunction(a) && a(s[0]), s = a = t }), "script") : t }); var Pn, Rn, Wn = 0, $n = e.ActiveXObject && function () { var e; for (e in Pn) Pn[e](t, !0) }; function In() { try { return new e.XMLHttpRequest } catch (t) { } } function zn() { try { return new e.ActiveXObject("Microsoft.XMLHTTP") } catch (t) { } } b.ajaxSettings.xhr = e.ActiveXObject ? function () { return !this.isLocal && In() || zn() } : In, Rn = b.ajaxSettings.xhr(), b.support.cors = !!Rn && "withCredentials" in Rn, Rn = b.support.ajax = !!Rn, Rn && b.ajaxTransport(function (n) { if (!n.crossDomain || b.support.cors) { var r; return { send: function (i, o) { var a, s, u = n.xhr(); if (n.username ? u.open(n.type, n.url, n.async, n.username, n.password) : u.open(n.type, n.url, n.async), n.xhrFields) for (s in n.xhrFields) u[s] = n.xhrFields[s]; n.mimeType && u.overrideMimeType && u.overrideMimeType(n.mimeType), n.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest"); try { for (s in i) u.setRequestHeader(s, i[s]) } catch (l) { } u.send(n.hasContent && n.data || null), r = function (e, i) { var s, l, c, p; try { if (r && (i || 4 === u.readyState)) if (r = t, a && (u.onreadystatechange = b.noop, $n && delete Pn[a]), i) 4 !== u.readyState && u.abort(); else { p = {}, s = u.status, l = u.getAllResponseHeaders(), "string" == typeof u.responseText && (p.text = u.responseText); try { c = u.statusText } catch (f) { c = "" } s || !n.isLocal || n.crossDomain ? 1223 === s && (s = 204) : s = p.text ? 200 : 404 } } catch (d) { i || o(-1, d) } p && o(s, c, p, l) }, n.async ? 4 === u.readyState ? setTimeout(r) : (a = ++Wn, $n && (Pn || (Pn = {}, b(e).unload($n)), Pn[a] = r), u.onreadystatechange = r) : r() }, abort: function () { r && r(t, !0) } } } }); var Xn, Un, Vn = /^(?:toggle|show|hide)$/, Yn = RegExp("^(?:([+-])=|)(" + x + ")([a-z%]*)$", "i"), Jn = /queueHooks$/, Gn = [nr], Qn = { "*": [function (e, t) { var n, r, i = this.createTween(e, t), o = Yn.exec(t), a = i.cur(), s = +a || 0, u = 1, l = 20; if (o) { if (n = +o[2], r = o[3] || (b.cssNumber[e] ? "" : "px"), "px" !== r && s) { s = b.css(i.elem, e, !0) || n || 1; do u = u || ".5", s /= u, b.style(i.elem, e, s + r); while (u !== (u = i.cur() / a) && 1 !== u && --l) } i.unit = r, i.start = s, i.end = o[1] ? s + (o[1] + 1) * n : n } return i } ] }; function Kn() { return setTimeout(function () { Xn = t }), Xn = b.now() } function Zn(e, t) { b.each(t, function (t, n) { var r = (Qn[t] || []).concat(Qn["*"]), i = 0, o = r.length; for (; o > i; i++) if (r[i].call(e, t, n)) return }) } function er(e, t, n) { var r, i, o = 0, a = Gn.length, s = b.Deferred().always(function () { delete u.elem }), u = function () { if (i) return !1; var t = Xn || Kn(), n = Math.max(0, l.startTime + l.duration - t), r = n / l.duration || 0, o = 1 - r, a = 0, u = l.tweens.length; for (; u > a; a++) l.tweens[a].run(o); return s.notifyWith(e, [l, o, n]), 1 > o && u ? n : (s.resolveWith(e, [l]), !1) }, l = s.promise({ elem: e, props: b.extend({}, t), opts: b.extend(!0, { specialEasing: {} }, n), originalProperties: t, originalOptions: n, startTime: Xn || Kn(), duration: n.duration, tweens: [], createTween: function (t, n) { var r = b.Tween(e, l.opts, t, n, l.opts.specialEasing[t] || l.opts.easing); return l.tweens.push(r), r }, stop: function (t) { var n = 0, r = t ? l.tweens.length : 0; if (i) return this; for (i = !0; r > n; n++) l.tweens[n].run(1); return t ? s.resolveWith(e, [l, t]) : s.rejectWith(e, [l, t]), this } }), c = l.props; for (tr(c, l.opts.specialEasing); a > o; o++) if (r = Gn[o].call(l, e, c, l.opts)) return r; return Zn(l, c), b.isFunction(l.opts.start) && l.opts.start.call(e, l), b.fx.timer(b.extend(u, { elem: e, anim: l, queue: l.opts.queue })), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always) } function tr(e, t) { var n, r, i, o, a; for (i in e) if (r = b.camelCase(i), o = t[r], n = e[i], b.isArray(n) && (o = n[1], n = e[i] = n[0]), i !== r && (e[r] = n, delete e[i]), a = b.cssHooks[r], a && "expand" in a) { n = a.expand(n), delete e[r]; for (i in n) i in e || (e[i] = n[i], t[i] = o) } else t[r] = o } b.Animation = b.extend(er, { tweener: function (e, t) { b.isFunction(e) ? (t = e, e = ["*"]) : e = e.split(" "); var n, r = 0, i = e.length; for (; i > r; r++) n = e[r], Qn[n] = Qn[n] || [], Qn[n].unshift(t) }, prefilter: function (e, t) { t ? Gn.unshift(e) : Gn.push(e) } }); function nr(e, t, n) { var r, i, o, a, s, u, l, c, p, f = this, d = e.style, h = {}, g = [], m = e.nodeType && nn(e); n.queue || (c = b._queueHooks(e, "fx"), null == c.unqueued && (c.unqueued = 0, p = c.empty.fire, c.empty.fire = function () { c.unqueued || p() }), c.unqueued++, f.always(function () { f.always(function () { c.unqueued--, b.queue(e, "fx").length || c.empty.fire() }) })), 1 === e.nodeType && ("height" in t || "width" in t) && (n.overflow = [d.overflow, d.overflowX, d.overflowY], "inline" === b.css(e, "display") && "none" === b.css(e, "float") && (b.support.inlineBlockNeedsLayout && "inline" !== un(e.nodeName) ? d.zoom = 1 : d.display = "inline-block")), n.overflow && (d.overflow = "hidden", b.support.shrinkWrapBlocks || f.always(function () { d.overflow = n.overflow[0], d.overflowX = n.overflow[1], d.overflowY = n.overflow[2] })); for (i in t) if (a = t[i], Vn.exec(a)) { if (delete t[i], u = u || "toggle" === a, a === (m ? "hide" : "show")) continue; g.push(i) } if (o = g.length) { s = b._data(e, "fxshow") || b._data(e, "fxshow", {}), "hidden" in s && (m = s.hidden), u && (s.hidden = !m), m ? b(e).show() : f.done(function () { b(e).hide() }), f.done(function () { var t; b._removeData(e, "fxshow"); for (t in h) b.style(e, t, h[t]) }); for (i = 0; o > i; i++) r = g[i], l = f.createTween(r, m ? s[r] : 0), h[r] = s[r] || b.style(e, r), r in s || (s[r] = l.start, m && (l.end = l.start, l.start = "width" === r || "height" === r ? 1 : 0)) } } function rr(e, t, n, r, i) { return new rr.prototype.init(e, t, n, r, i) } b.Tween = rr, rr.prototype = { constructor: rr, init: function (e, t, n, r, i, o) { this.elem = e, this.prop = n, this.easing = i || "swing", this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (b.cssNumber[n] ? "" : "px") }, cur: function () { var e = rr.propHooks[this.prop]; return e && e.get ? e.get(this) : rr.propHooks._default.get(this) }, run: function (e) { var t, n = rr.propHooks[this.prop]; return this.pos = t = this.options.duration ? b.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : rr.propHooks._default.set(this), this } }, rr.prototype.init.prototype = rr.prototype, rr.propHooks = { _default: { get: function (e) { var t; return null == e.elem[e.prop] || e.elem.style && null != e.elem.style[e.prop] ? (t = b.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0) : e.elem[e.prop] }, set: function (e) { b.fx.step[e.prop] ? b.fx.step[e.prop](e) : e.elem.style && (null != e.elem.style[b.cssProps[e.prop]] || b.cssHooks[e.prop]) ? b.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now } } }, rr.propHooks.scrollTop = rr.propHooks.scrollLeft = { set: function (e) { e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) } }, b.each(["toggle", "show", "hide"], function (e, t) { var n = b.fn[t]; b.fn[t] = function (e, r, i) { return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(ir(t, !0), e, r, i) } }), b.fn.extend({ fadeTo: function (e, t, n, r) { return this.filter(nn).css("opacity", 0).show().end().animate({ opacity: t }, e, n, r) }, animate: function (e, t, n, r) { var i = b.isEmptyObject(e), o = b.speed(t, n, r), a = function () { var t = er(this, b.extend({}, e), o); a.finish = function () { t.stop(!0) }, (i || b._data(this, "finish")) && t.stop(!0) }; return a.finish = a, i || o.queue === !1 ? this.each(a) : this.queue(o.queue, a) }, stop: function (e, n, r) { var i = function (e) { var t = e.stop; delete e.stop, t(r) }; return "string" != typeof e && (r = n, n = e, e = t), n && e !== !1 && this.queue(e || "fx", []), this.each(function () { var t = !0, n = null != e && e + "queueHooks", o = b.timers, a = b._data(this); if (n) a[n] && a[n].stop && i(a[n]); else for (n in a) a[n] && a[n].stop && Jn.test(n) && i(a[n]); for (n = o.length; n--; ) o[n].elem !== this || null != e && o[n].queue !== e || (o[n].anim.stop(r), t = !1, o.splice(n, 1)); (t || !r) && b.dequeue(this, e) }) }, finish: function (e) { return e !== !1 && (e = e || "fx"), this.each(function () { var t, n = b._data(this), r = n[e + "queue"], i = n[e + "queueHooks"], o = b.timers, a = r ? r.length : 0; for (n.finish = !0, b.queue(this, e, []), i && i.cur && i.cur.finish && i.cur.finish.call(this), t = o.length; t--; ) o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1)); for (t = 0; a > t; t++) r[t] && r[t].finish && r[t].finish.call(this); delete n.finish }) } }); function ir(e, t) { var n, r = { height: e }, i = 0; for (t = t ? 1 : 0; 4 > i; i += 2 - t) n = Zt[i], r["margin" + n] = r["padding" + n] = e; return t && (r.opacity = r.width = e), r } b.each({ slideDown: ir("show"), slideUp: ir("hide"), slideToggle: ir("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle"} }, function (e, t) { b.fn[e] = function (e, n, r) { return this.animate(t, e, n, r) } }), b.speed = function (e, t, n) { var r = e && "object" == typeof e ? b.extend({}, e) : { complete: n || !n && t || b.isFunction(e) && e, duration: e, easing: n && t || t && !b.isFunction(t) && t }; return r.duration = b.fx.off ? 0 : "number" == typeof r.duration ? r.duration : r.duration in b.fx.speeds ? b.fx.speeds[r.duration] : b.fx.speeds._default, (null == r.queue || r.queue === !0) && (r.queue = "fx"), r.old = r.complete, r.complete = function () { b.isFunction(r.old) && r.old.call(this), r.queue && b.dequeue(this, r.queue) }, r }, b.easing = { linear: function (e) { return e }, swing: function (e) { return .5 - Math.cos(e * Math.PI) / 2 } }, b.timers = [], b.fx = rr.prototype.init, b.fx.tick = function () { var e, n = b.timers, r = 0; for (Xn = b.now(); n.length > r; r++) e = n[r], e() || n[r] !== e || n.splice(r--, 1); n.length || b.fx.stop(), Xn = t }, b.fx.timer = function (e) { e() && b.timers.push(e) && b.fx.start() }, b.fx.interval = 13, b.fx.start = function () { Un || (Un = setInterval(b.fx.tick, b.fx.interval)) }, b.fx.stop = function () { clearInterval(Un), Un = null }, b.fx.speeds = { slow: 600, fast: 200, _default: 400 }, b.fx.step = {}, b.expr && b.expr.filters && (b.expr.filters.animated = function (e) { return b.grep(b.timers, function (t) { return e === t.elem }).length }), b.fn.offset = function (e) { if (arguments.length) return e === t ? this : this.each(function (t) { b.offset.setOffset(this, e, t) }); var n, r, o = { top: 0, left: 0 }, a = this[0], s = a && a.ownerDocument; if (s) return n = s.documentElement, b.contains(n, a) ? (typeof a.getBoundingClientRect !== i && (o = a.getBoundingClientRect()), r = or(s), { top: o.top + (r.pageYOffset || n.scrollTop) - (n.clientTop || 0), left: o.left + (r.pageXOffset || n.scrollLeft) - (n.clientLeft || 0) }) : o }, b.offset = { setOffset: function (e, t, n) { var r = b.css(e, "position"); "static" === r && (e.style.position = "relative"); var i = b(e), o = i.offset(), a = b.css(e, "top"), s = b.css(e, "left"), u = ("absolute" === r || "fixed" === r) && b.inArray("auto", [a, s]) > -1, l = {}, c = {}, p, f; u ? (c = i.position(), p = c.top, f = c.left) : (p = parseFloat(a) || 0, f = parseFloat(s) || 0), b.isFunction(t) && (t = t.call(e, n, o)), null != t.top && (l.top = t.top - o.top + p), null != t.left && (l.left = t.left - o.left + f), "using" in t ? t.using.call(e, l) : i.css(l) } }, b.fn.extend({ position: function () { if (this[0]) { var e, t, n = { top: 0, left: 0 }, r = this[0]; return "fixed" === b.css(r, "position") ? t = r.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), b.nodeName(e[0], "html") || (n = e.offset()), n.top += b.css(e[0], "borderTopWidth", !0), n.left += b.css(e[0], "borderLeftWidth", !0)), { top: t.top - n.top - b.css(r, "marginTop", !0), left: t.left - n.left - b.css(r, "marginLeft", !0)} } }, offsetParent: function () { return this.map(function () { var e = this.offsetParent || o.documentElement; while (e && !b.nodeName(e, "html") && "static" === b.css(e, "position")) e = e.offsetParent; return e || o.documentElement }) } }), b.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (e, n) { var r = /Y/.test(n); b.fn[e] = function (i) { return b.access(this, function (e, i, o) { var a = or(e); return o === t ? a ? n in a ? a[n] : a.document.documentElement[i] : e[i] : (a ? a.scrollTo(r ? b(a).scrollLeft() : o, r ? o : b(a).scrollTop()) : e[i] = o, t) }, e, i, arguments.length, null) } }); function or(e) { return b.isWindow(e) ? e : 9 === e.nodeType ? e.defaultView || e.parentWindow : !1 } b.each({ Height: "height", Width: "width" }, function (e, n) { b.each({ padding: "inner" + e, content: n, "": "outer" + e }, function (r, i) { b.fn[i] = function (i, o) { var a = arguments.length && (r || "boolean" != typeof i), s = r || (i === !0 || o === !0 ? "margin" : "border"); return b.access(this, function (n, r, i) { var o; return b.isWindow(n) ? n.document.documentElement["client" + e] : 9 === n.nodeType ? (o = n.documentElement, Math.max(n.body["scroll" + e], o["scroll" + e], n.body["offset" + e], o["offset" + e], o["client" + e])) : i === t ? b.css(n, r, s) : b.style(n, r, i, s) }, n, a ? i : t, a, null) } }) }), e.jQuery = e.$ = b, "function" == typeof define && define.amd && define.amd.jQuery && define("jquery", [], function () { return b })
|
20 |
+
})(window);
|
js/bannerslider/jssor.js
ADDED
@@ -0,0 +1,2850 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* Jssor 18.0
|
3 |
+
* http://www.jssor.com/
|
4 |
+
*
|
5 |
+
* Licensed under the MIT license:
|
6 |
+
* http://www.opensource.org/licenses/MIT
|
7 |
+
*
|
8 |
+
* TERMS OF USE - Jssor
|
9 |
+
*
|
10 |
+
* Copyright 2014 Jssor
|
11 |
+
*
|
12 |
+
* Permission is hereby granted, free of charge, to any person obtaining
|
13 |
+
* a copy of this software and associated documentation files (the
|
14 |
+
* "Software"), to deal in the Software without restriction, including
|
15 |
+
* without limitation the rights to use, copy, modify, merge, publish,
|
16 |
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
17 |
+
* permit persons to whom the Software is furnished to do so, subject to
|
18 |
+
* the following conditions:
|
19 |
+
*
|
20 |
+
* The above copyright notice and this permission notice shall be
|
21 |
+
* included in all copies or substantial portions of the Software.
|
22 |
+
*
|
23 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
24 |
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
25 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
26 |
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
27 |
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
28 |
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
29 |
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
30 |
+
*/
|
31 |
+
|
32 |
+
/*! Jssor */
|
33 |
+
|
34 |
+
//$JssorDebug$
|
35 |
+
var $JssorDebug$ = new function () {
|
36 |
+
|
37 |
+
this.$DebugMode = true;
|
38 |
+
|
39 |
+
// Methods
|
40 |
+
|
41 |
+
this.$Log = function (msg, important) {
|
42 |
+
var console = window.console || {};
|
43 |
+
var debug = this.$DebugMode;
|
44 |
+
|
45 |
+
if (debug && console.log) {
|
46 |
+
console.log(msg);
|
47 |
+
} else if (debug && important) {
|
48 |
+
alert(msg);
|
49 |
+
}
|
50 |
+
};
|
51 |
+
|
52 |
+
this.$Error = function (msg, e) {
|
53 |
+
var console = window.console || {};
|
54 |
+
var debug = this.$DebugMode;
|
55 |
+
|
56 |
+
if (debug && console.error) {
|
57 |
+
console.error(msg);
|
58 |
+
} else if (debug) {
|
59 |
+
alert(msg);
|
60 |
+
}
|
61 |
+
|
62 |
+
if (debug) {
|
63 |
+
// since we're debugging, fail fast by crashing
|
64 |
+
throw e || new Error(msg);
|
65 |
+
}
|
66 |
+
};
|
67 |
+
|
68 |
+
this.$Fail = function (msg) {
|
69 |
+
throw new Error(msg);
|
70 |
+
};
|
71 |
+
|
72 |
+
this.$Assert = function (value, msg) {
|
73 |
+
var debug = this.$DebugMode;
|
74 |
+
if (debug) {
|
75 |
+
if (!value)
|
76 |
+
throw new Error("Assert failed " + msg || "");
|
77 |
+
}
|
78 |
+
};
|
79 |
+
|
80 |
+
this.$Trace = function (msg) {
|
81 |
+
var console = window.console || {};
|
82 |
+
var debug = this.$DebugMode;
|
83 |
+
|
84 |
+
if (debug && console.log) {
|
85 |
+
console.log(msg);
|
86 |
+
}
|
87 |
+
};
|
88 |
+
|
89 |
+
this.$Execute = function (func) {
|
90 |
+
var debug = this.$DebugMode;
|
91 |
+
if (debug)
|
92 |
+
func();
|
93 |
+
};
|
94 |
+
|
95 |
+
this.$LiveStamp = function (obj, id) {
|
96 |
+
var debug = this.$DebugMode;
|
97 |
+
if (debug) {
|
98 |
+
var stamp = document.createElement("DIV");
|
99 |
+
stamp.setAttribute("id", id);
|
100 |
+
|
101 |
+
obj.$Live = stamp;
|
102 |
+
}
|
103 |
+
};
|
104 |
+
|
105 |
+
this.$C_AbstractMethod = function () {
|
106 |
+
/// <summary>
|
107 |
+
/// Tells compiler the method is abstract, it should be implemented by subclass.
|
108 |
+
/// </summary>
|
109 |
+
|
110 |
+
throw new Error("The method is abstract, it should be implemented by subclass.");
|
111 |
+
};
|
112 |
+
|
113 |
+
function C_AbstractClass (instance) {
|
114 |
+
/// <summary>
|
115 |
+
/// Tells compiler the class is abstract, it should be implemented by subclass.
|
116 |
+
/// </summary>
|
117 |
+
|
118 |
+
if(instance.constructor === C_AbstractClass.caller)
|
119 |
+
throw new Error("Cannot create instance of an abstract class.");
|
120 |
+
}
|
121 |
+
|
122 |
+
this.$C_AbstractClass = C_AbstractClass;
|
123 |
+
};
|
124 |
+
|
125 |
+
//$JssorEasing$
|
126 |
+
var $JssorEasing$ = window.$JssorEasing$ = {
|
127 |
+
$EaseLinear: function (t) {
|
128 |
+
return t;
|
129 |
+
},
|
130 |
+
$EaseGoBack: function (t) {
|
131 |
+
return 1 - Math.abs((t *= 2) - 1);
|
132 |
+
},
|
133 |
+
$EaseSwing: function (t) {
|
134 |
+
return -Math.cos(t * Math.PI) / 2 + .5;
|
135 |
+
},
|
136 |
+
$EaseInQuad: function (t) {
|
137 |
+
return t * t;
|
138 |
+
},
|
139 |
+
$EaseOutQuad: function (t) {
|
140 |
+
return -t * (t - 2);
|
141 |
+
},
|
142 |
+
$EaseInOutQuad: function (t) {
|
143 |
+
return (t *= 2) < 1 ? 1 / 2 * t * t : -1 / 2 * (--t * (t - 2) - 1);
|
144 |
+
},
|
145 |
+
$EaseInCubic: function (t) {
|
146 |
+
return t * t * t;
|
147 |
+
},
|
148 |
+
$EaseOutCubic: function (t) {
|
149 |
+
return (t -= 1) * t * t + 1;
|
150 |
+
},
|
151 |
+
$EaseInOutCubic: function (t) {
|
152 |
+
return (t *= 2) < 1 ? 1 / 2 * t * t * t : 1 / 2 * ((t -= 2) * t * t + 2);
|
153 |
+
},
|
154 |
+
$EaseInQuart: function (t) {
|
155 |
+
return t * t * t * t;
|
156 |
+
},
|
157 |
+
$EaseOutQuart: function (t) {
|
158 |
+
return -((t -= 1) * t * t * t - 1);
|
159 |
+
},
|
160 |
+
$EaseInOutQuart: function (t) {
|
161 |
+
return (t *= 2) < 1 ? 1 / 2 * t * t * t * t : -1 / 2 * ((t -= 2) * t * t * t - 2);
|
162 |
+
},
|
163 |
+
$EaseInQuint: function (t) {
|
164 |
+
return t * t * t * t * t;
|
165 |
+
},
|
166 |
+
$EaseOutQuint: function (t) {
|
167 |
+
return (t -= 1) * t * t * t * t + 1;
|
168 |
+
},
|
169 |
+
$EaseInOutQuint: function (t) {
|
170 |
+
return (t *= 2) < 1 ? 1 / 2 * t * t * t * t * t : 1 / 2 * ((t -= 2) * t * t * t * t + 2);
|
171 |
+
},
|
172 |
+
$EaseInSine: function (t) {
|
173 |
+
return 1 - Math.cos(t * Math.PI / 2);
|
174 |
+
},
|
175 |
+
$EaseOutSine: function (t) {
|
176 |
+
return Math.sin(t * Math.PI / 2);
|
177 |
+
},
|
178 |
+
$EaseInOutSine: function (t) {
|
179 |
+
return -1 / 2 * (Math.cos(Math.PI * t) - 1);
|
180 |
+
},
|
181 |
+
$EaseInExpo: function (t) {
|
182 |
+
return t == 0 ? 0 : Math.pow(2, 10 * (t - 1));
|
183 |
+
},
|
184 |
+
$EaseOutExpo: function (t) {
|
185 |
+
return t == 1 ? 1 : -Math.pow(2, -10 * t) + 1;
|
186 |
+
},
|
187 |
+
$EaseInOutExpo: function (t) {
|
188 |
+
return t == 0 || t == 1 ? t : (t *= 2) < 1 ? 1 / 2 * Math.pow(2, 10 * (t - 1)) : 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
|
189 |
+
},
|
190 |
+
$EaseInCirc: function (t) {
|
191 |
+
return -(Math.sqrt(1 - t * t) - 1);
|
192 |
+
},
|
193 |
+
$EaseOutCirc: function (t) {
|
194 |
+
return Math.sqrt(1 - (t -= 1) * t);
|
195 |
+
},
|
196 |
+
$EaseInOutCirc: function (t) {
|
197 |
+
return (t *= 2) < 1 ? -1 / 2 * (Math.sqrt(1 - t * t) - 1) : 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
|
198 |
+
},
|
199 |
+
$EaseInElastic: function (t) {
|
200 |
+
if (!t || t == 1)
|
201 |
+
return t;
|
202 |
+
var p = .3, s = .075;
|
203 |
+
return -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p));
|
204 |
+
},
|
205 |
+
$EaseOutElastic: function (t) {
|
206 |
+
if (!t || t == 1)
|
207 |
+
return t;
|
208 |
+
var p = .3, s = .075;
|
209 |
+
return Math.pow(2, -10 * t) * Math.sin((t - s) * 2 * Math.PI / p) + 1;
|
210 |
+
},
|
211 |
+
$EaseInOutElastic: function (t) {
|
212 |
+
if (!t || t == 1)
|
213 |
+
return t;
|
214 |
+
var p = .45, s = .1125;
|
215 |
+
return (t *= 2) < 1 ? -.5 * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) : Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * 2 * Math.PI / p) * .5 + 1;
|
216 |
+
},
|
217 |
+
$EaseInBack: function (t) {
|
218 |
+
var s = 1.70158;
|
219 |
+
return t * t * ((s + 1) * t - s);
|
220 |
+
},
|
221 |
+
$EaseOutBack: function (t) {
|
222 |
+
var s = 1.70158;
|
223 |
+
return (t -= 1) * t * ((s + 1) * t + s) + 1;
|
224 |
+
},
|
225 |
+
$EaseInOutBack: function (t) {
|
226 |
+
var s = 1.70158;
|
227 |
+
return (t *= 2) < 1 ? 1 / 2 * t * t * (((s *= 1.525) + 1) * t - s) : 1 / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);
|
228 |
+
},
|
229 |
+
$EaseInBounce: function (t) {
|
230 |
+
return 1 - $JssorEasing$.$EaseOutBounce(1 - t)
|
231 |
+
},
|
232 |
+
$EaseOutBounce: function (t) {
|
233 |
+
return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
|
234 |
+
},
|
235 |
+
$EaseInOutBounce: function (t) {
|
236 |
+
return t < 1 / 2 ? $JssorEasing$.$EaseInBounce(t * 2) * .5 : $JssorEasing$.$EaseOutBounce(t * 2 - 1) * .5 + .5;
|
237 |
+
},
|
238 |
+
$EaseInWave: function (t) {
|
239 |
+
return 1 - Math.cos(t * Math.PI * 2)
|
240 |
+
},
|
241 |
+
$EaseOutWave: function (t) {
|
242 |
+
return Math.sin(t * Math.PI * 2);
|
243 |
+
},
|
244 |
+
$EaseOutJump: function (t) {
|
245 |
+
return 1 - (((t *= 2) < 1) ? (t = 1 - t) * t * t : (t -= 1) * t * t);
|
246 |
+
},
|
247 |
+
$EaseInJump: function (t) {
|
248 |
+
return ((t *= 2) < 1) ? t * t * t : (t = 2 - t) * t * t;
|
249 |
+
}
|
250 |
+
};
|
251 |
+
|
252 |
+
var $JssorDirection$ = window.$JssorDirection$ = {
|
253 |
+
$TO_LEFT: 0x0001,
|
254 |
+
$TO_RIGHT: 0x0002,
|
255 |
+
$TO_TOP: 0x0004,
|
256 |
+
$TO_BOTTOM: 0x0008,
|
257 |
+
$HORIZONTAL: 0x0003,
|
258 |
+
$VERTICAL: 0x000C,
|
259 |
+
$LEFTRIGHT: 0x0003,
|
260 |
+
$TOPBOTOM: 0x000C,
|
261 |
+
$TOPLEFT: 0x0005,
|
262 |
+
$TOPRIGHT: 0x0006,
|
263 |
+
$BOTTOMLEFT: 0x0009,
|
264 |
+
$BOTTOMRIGHT: 0x000A,
|
265 |
+
$AROUND: 0x000F,
|
266 |
+
|
267 |
+
$GetDirectionHorizontal: function (direction) {
|
268 |
+
return direction & 0x0003;
|
269 |
+
},
|
270 |
+
$GetDirectionVertical: function (direction) {
|
271 |
+
return direction & 0x000C;
|
272 |
+
},
|
273 |
+
$ChessHorizontal: function (direction) {
|
274 |
+
return (~direction & 0x0003) + (direction & 0x000C);
|
275 |
+
},
|
276 |
+
$ChessVertical: function (direction) {
|
277 |
+
return (~direction & 0x000C) + (direction & 0x0003);
|
278 |
+
},
|
279 |
+
$IsToLeft: function (direction) {
|
280 |
+
return (direction & 0x0003) == 0x0001;
|
281 |
+
},
|
282 |
+
$IsToRight: function (direction) {
|
283 |
+
return (direction & 0x0003) == 0x0002;
|
284 |
+
},
|
285 |
+
$IsToTop: function (direction) {
|
286 |
+
return (direction & 0x000C) == 0x0004;
|
287 |
+
},
|
288 |
+
$IsToBottom: function (direction) {
|
289 |
+
return (direction & 0x000C) == 0x0008;
|
290 |
+
},
|
291 |
+
$IsHorizontal: function (direction) {
|
292 |
+
return (direction & 0x0003) > 0;
|
293 |
+
},
|
294 |
+
$IsVertical: function (direction) {
|
295 |
+
return (direction & 0x000C) > 0;
|
296 |
+
}
|
297 |
+
};
|
298 |
+
|
299 |
+
var $JssorKeyCode$ = {
|
300 |
+
$BACKSPACE: 8,
|
301 |
+
$COMMA: 188,
|
302 |
+
$DELETE: 46,
|
303 |
+
$DOWN: 40,
|
304 |
+
$END: 35,
|
305 |
+
$ENTER: 13,
|
306 |
+
$ESCAPE: 27,
|
307 |
+
$HOME: 36,
|
308 |
+
$LEFT: 37,
|
309 |
+
$NUMPAD_ADD: 107,
|
310 |
+
$NUMPAD_DECIMAL: 110,
|
311 |
+
$NUMPAD_DIVIDE: 111,
|
312 |
+
$NUMPAD_ENTER: 108,
|
313 |
+
$NUMPAD_MULTIPLY: 106,
|
314 |
+
$NUMPAD_SUBTRACT: 109,
|
315 |
+
$PAGE_DOWN: 34,
|
316 |
+
$PAGE_UP: 33,
|
317 |
+
$PERIOD: 190,
|
318 |
+
$RIGHT: 39,
|
319 |
+
$SPACE: 32,
|
320 |
+
$TAB: 9,
|
321 |
+
$UP: 38
|
322 |
+
};
|
323 |
+
|
324 |
+
var $JssorAlignment$ = {
|
325 |
+
$TopLeft: 0x11,
|
326 |
+
$TopCenter: 0x12,
|
327 |
+
$TopRight: 0x14,
|
328 |
+
$MiddleLeft: 0x21,
|
329 |
+
$MiddleCenter: 0x22,
|
330 |
+
$MiddleRight: 0x24,
|
331 |
+
$BottomLeft: 0x41,
|
332 |
+
$BottomCenter: 0x42,
|
333 |
+
$BottomRight: 0x44,
|
334 |
+
|
335 |
+
$IsTop: function (aligment) {
|
336 |
+
return aligment & 0x10 > 0;
|
337 |
+
},
|
338 |
+
$IsMiddle: function (alignment) {
|
339 |
+
return alignment & 0x20 > 0;
|
340 |
+
},
|
341 |
+
$IsBottom: function (alignment) {
|
342 |
+
return alignment & 0x40 > 0;
|
343 |
+
},
|
344 |
+
$IsLeft: function (alignment) {
|
345 |
+
return alignment & 0x01 > 0;
|
346 |
+
},
|
347 |
+
$IsCenter: function (alignment) {
|
348 |
+
return alignment & 0x02 > 0;
|
349 |
+
},
|
350 |
+
$IsRight: function (alignment) {
|
351 |
+
return alignment & 0x04 > 0;
|
352 |
+
}
|
353 |
+
};
|
354 |
+
|
355 |
+
var $JssorMatrix$;
|
356 |
+
|
357 |
+
var $JssorAnimator$;
|
358 |
+
|
359 |
+
// $Jssor$ is a static class, so make it singleton instance
|
360 |
+
var $Jssor$ = window.$Jssor$ = new function () {
|
361 |
+
// Fields
|
362 |
+
var _This = this;
|
363 |
+
|
364 |
+
var REGEX_WHITESPACE_GLOBAL = /\S+/g;
|
365 |
+
|
366 |
+
var ROWSER_UNKNOWN = 0;
|
367 |
+
var BROWSER_IE = 1;
|
368 |
+
var BROWSER_FIREFOX = 2;
|
369 |
+
var BROWSER_FIREFOX = 3;
|
370 |
+
var BROWSER_CHROME = 4;
|
371 |
+
var BROWSER_OPERA = 5;
|
372 |
+
|
373 |
+
//var arrActiveX = ["Msxml2.XMLHTTP", "Msxml3.XMLHTTP", "Microsoft.XMLHTTP"];
|
374 |
+
|
375 |
+
var browser = 0;
|
376 |
+
var browserRuntimeVersion = 0;
|
377 |
+
var browserEngineVersion = 0;
|
378 |
+
var browserJavascriptVersion = 0;
|
379 |
+
var webkitVersion = 0;
|
380 |
+
|
381 |
+
var app = navigator.appName;
|
382 |
+
var ver = navigator.appVersion;
|
383 |
+
var ua = navigator.userAgent;
|
384 |
+
|
385 |
+
var _DocElmt = document.documentElement;
|
386 |
+
var _TransformProperty;
|
387 |
+
|
388 |
+
function DetectBrowser() {
|
389 |
+
if (!browser) {
|
390 |
+
if (app == "Microsoft Internet Explorer" &&
|
391 |
+
!!window.attachEvent && !!window.ActiveXObject) {
|
392 |
+
|
393 |
+
var ieOffset = ua.indexOf("MSIE");
|
394 |
+
browser = BROWSER_IE;
|
395 |
+
browserEngineVersion = ParseFloat(ua.substring(ieOffset + 5, ua.indexOf(";", ieOffset)));
|
396 |
+
|
397 |
+
//check IE javascript version
|
398 |
+
/*@cc_on
|
399 |
+
browserJavascriptVersion = @_jscript_version;
|
400 |
+
@*/
|
401 |
+
|
402 |
+
// update: for intranet sites and compat view list sites, IE sends
|
403 |
+
// an IE7 User-Agent to the server to be interoperable, and even if
|
404 |
+
// the page requests a later IE version, IE will still report the
|
405 |
+
// IE7 UA to JS. we should be robust to self
|
406 |
+
//var docMode = document.documentMode;
|
407 |
+
//if (typeof docMode !== "undefined") {
|
408 |
+
// browserRuntimeVersion = docMode;
|
409 |
+
//}
|
410 |
+
|
411 |
+
browserRuntimeVersion = document.documentMode || browserEngineVersion;
|
412 |
+
|
413 |
+
}
|
414 |
+
else if (app == "Netscape" && !!window.addEventListener) {
|
415 |
+
|
416 |
+
var ffOffset = ua.indexOf("Firefox");
|
417 |
+
var saOffset = ua.indexOf("Safari");
|
418 |
+
var chOffset = ua.indexOf("Chrome");
|
419 |
+
var webkitOffset = ua.indexOf("AppleWebKit");
|
420 |
+
|
421 |
+
if (ffOffset >= 0) {
|
422 |
+
browser = BROWSER_FIREFOX;
|
423 |
+
browserRuntimeVersion = ParseFloat(ua.substring(ffOffset + 8));
|
424 |
+
}
|
425 |
+
else if (saOffset >= 0) {
|
426 |
+
var slash = ua.substring(0, saOffset).lastIndexOf("/");
|
427 |
+
browser = (chOffset >= 0) ? BROWSER_CHROME : BROWSER_FIREFOX;
|
428 |
+
browserRuntimeVersion = ParseFloat(ua.substring(slash + 1, saOffset));
|
429 |
+
}
|
430 |
+
|
431 |
+
if (webkitOffset >= 0)
|
432 |
+
webkitVersion = ParseFloat(ua.substring(webkitOffset + 12));
|
433 |
+
}
|
434 |
+
else {
|
435 |
+
var match = /(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(ua);
|
436 |
+
if (match) {
|
437 |
+
browser = BROWSER_OPERA;
|
438 |
+
browserRuntimeVersion = ParseFloat(match[2]);
|
439 |
+
}
|
440 |
+
}
|
441 |
+
}
|
442 |
+
}
|
443 |
+
|
444 |
+
function IsBrowserIE() {
|
445 |
+
DetectBrowser();
|
446 |
+
return browser == BROWSER_IE;
|
447 |
+
}
|
448 |
+
|
449 |
+
function IsBrowserIeQuirks() {
|
450 |
+
return IsBrowserIE() && (browserRuntimeVersion < 6 || document.compatMode == "BackCompat"); //Composite to "CSS1Compat"
|
451 |
+
}
|
452 |
+
|
453 |
+
function IsBrowserFireFox() {
|
454 |
+
DetectBrowser();
|
455 |
+
return browser == BROWSER_FIREFOX;
|
456 |
+
}
|
457 |
+
|
458 |
+
function IsBrowserSafari() {
|
459 |
+
DetectBrowser();
|
460 |
+
return browser == BROWSER_FIREFOX;
|
461 |
+
}
|
462 |
+
|
463 |
+
function IsBrowserChrome() {
|
464 |
+
DetectBrowser();
|
465 |
+
return browser == BROWSER_CHROME;
|
466 |
+
}
|
467 |
+
|
468 |
+
function IsBrowserOpera() {
|
469 |
+
DetectBrowser();
|
470 |
+
return browser == BROWSER_OPERA;
|
471 |
+
}
|
472 |
+
|
473 |
+
function IsBrowserBadTransform() {
|
474 |
+
return IsBrowserSafari() && (webkitVersion > 534) && (webkitVersion < 535);
|
475 |
+
}
|
476 |
+
|
477 |
+
function IsBrowserIe9Earlier() {
|
478 |
+
return IsBrowserIE() && browserRuntimeVersion < 9;
|
479 |
+
}
|
480 |
+
|
481 |
+
function GetTransformProperty(elmt) {
|
482 |
+
|
483 |
+
if (!_TransformProperty) {
|
484 |
+
// Note that in some versions of IE9 it is critical that
|
485 |
+
// msTransform appear in this list before MozTransform
|
486 |
+
|
487 |
+
each(['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'], function (property) {
|
488 |
+
if (elmt.style[property] != undefined) {
|
489 |
+
_TransformProperty = property;
|
490 |
+
return true;
|
491 |
+
}
|
492 |
+
});
|
493 |
+
|
494 |
+
_TransformProperty = _TransformProperty || "transform";
|
495 |
+
}
|
496 |
+
|
497 |
+
return _TransformProperty;
|
498 |
+
}
|
499 |
+
|
500 |
+
// Helpers
|
501 |
+
function getOffsetParent(elmt, isFixed) {
|
502 |
+
// IE and Opera "fixed" position elements don't have offset parents.
|
503 |
+
// regardless, if it's fixed, its offset parent is the body.
|
504 |
+
if (isFixed && elmt != document.body) {
|
505 |
+
return document.body;
|
506 |
+
} else {
|
507 |
+
return elmt.offsetParent;
|
508 |
+
}
|
509 |
+
}
|
510 |
+
|
511 |
+
function toString(obj) {
|
512 |
+
return Object.prototype.toString.call(obj);
|
513 |
+
}
|
514 |
+
|
515 |
+
// [[Class]] -> type pairs
|
516 |
+
var class2type;
|
517 |
+
|
518 |
+
function each(object, callback) {
|
519 |
+
if (toString(object) == "[object Array]") {
|
520 |
+
for (var i = 0; i < object.length; i++) {
|
521 |
+
if (callback(object[i], i, object)) {
|
522 |
+
return true;
|
523 |
+
}
|
524 |
+
}
|
525 |
+
}
|
526 |
+
else {
|
527 |
+
for (var name in object) {
|
528 |
+
if (callback(object[name], name, object)) {
|
529 |
+
return true;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
}
|
533 |
+
}
|
534 |
+
|
535 |
+
function GetClass2Type() {
|
536 |
+
if (!class2type) {
|
537 |
+
class2type = {};
|
538 |
+
each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object"], function (name) {
|
539 |
+
class2type["[object " + name + "]"] = name.toLowerCase();
|
540 |
+
});
|
541 |
+
}
|
542 |
+
|
543 |
+
return class2type;
|
544 |
+
}
|
545 |
+
|
546 |
+
function type(obj) {
|
547 |
+
return obj == null ? String(obj) : GetClass2Type()[toString(obj)] || "object";
|
548 |
+
}
|
549 |
+
|
550 |
+
function isPlainObject(obj) {
|
551 |
+
// Must be an Object.
|
552 |
+
// Because of IE, we also have to check the presence of the constructor property.
|
553 |
+
// Make sure that DOM nodes and window objects don't pass through, as well
|
554 |
+
if (!obj || type(obj) !== "object" || obj.nodeType || _This.$IsWindow(obj)) {
|
555 |
+
return false;
|
556 |
+
}
|
557 |
+
|
558 |
+
var hasOwn = Object.prototype.hasOwnProperty;
|
559 |
+
|
560 |
+
try {
|
561 |
+
// Not own constructor property must be Object
|
562 |
+
if (obj.constructor &&
|
563 |
+
!hasOwn.call(obj, "constructor") &&
|
564 |
+
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
|
565 |
+
return false;
|
566 |
+
}
|
567 |
+
} catch (e) {
|
568 |
+
// IE8,9 Will throw exceptions on certain host objects #9897
|
569 |
+
return false;
|
570 |
+
}
|
571 |
+
|
572 |
+
// Own properties are enumerated firstly, so to speed up,
|
573 |
+
// if last one is own, then all properties are own.
|
574 |
+
|
575 |
+
var key;
|
576 |
+
for (key in obj) { }
|
577 |
+
|
578 |
+
return key === undefined || hasOwn.call(obj, key);
|
579 |
+
}
|
580 |
+
|
581 |
+
function Point(x, y) {
|
582 |
+
return { x: x, y: y };
|
583 |
+
}
|
584 |
+
|
585 |
+
function Delay(code, delay) {
|
586 |
+
setTimeout(code, delay || 0);
|
587 |
+
}
|
588 |
+
|
589 |
+
function RemoveByReg(str, reg) {
|
590 |
+
var m = reg.exec(str);
|
591 |
+
|
592 |
+
if (m) {
|
593 |
+
var header = str.substr(0, m.index);
|
594 |
+
var tailer = str.substr(m.lastIndex + 1, str.length - (m.lastIndex + 1));
|
595 |
+
str = header + tailer;
|
596 |
+
}
|
597 |
+
|
598 |
+
return str;
|
599 |
+
}
|
600 |
+
|
601 |
+
function BuildNewCss(oldCss, removeRegs, replaceValue) {
|
602 |
+
var css = (!oldCss || oldCss == "inherit") ? "" : oldCss;
|
603 |
+
|
604 |
+
each(removeRegs, function (removeReg) {
|
605 |
+
var m = removeReg.exec(css);
|
606 |
+
|
607 |
+
if (m) {
|
608 |
+
var header = css.substr(0, m.index);
|
609 |
+
var tailer = css.substr(m.lastIndex + 1, css.length - (m.lastIndex + 1));
|
610 |
+
css = header + tailer;
|
611 |
+
}
|
612 |
+
});
|
613 |
+
|
614 |
+
css = replaceValue + (css.indexOf(" ") != 0 ? " " : "") + css;
|
615 |
+
|
616 |
+
return css;
|
617 |
+
}
|
618 |
+
|
619 |
+
function SetStyleFilterIE(elmt, value) {
|
620 |
+
if (browserRuntimeVersion < 9) {
|
621 |
+
elmt.style.filter = value;
|
622 |
+
}
|
623 |
+
}
|
624 |
+
|
625 |
+
function SetStyleMatrixIE(elmt, matrix, offset) {
|
626 |
+
//matrix is not for ie9+ running in ie8- mode
|
627 |
+
if (browserJavascriptVersion < 9) {
|
628 |
+
var oldFilterValue = elmt.style.filter;
|
629 |
+
var matrixReg = new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g);
|
630 |
+
var matrixValue = matrix ? "progid:DXImageTransform.Microsoft.Matrix(" + "M11=" + matrix[0][0] + ", M12=" + matrix[0][1] + ", M21=" + matrix[1][0] + ", M22=" + matrix[1][1] + ", SizingMethod='auto expand')" : "";
|
631 |
+
|
632 |
+
var newFilterValue = BuildNewCss(oldFilterValue, [matrixReg], matrixValue);
|
633 |
+
|
634 |
+
SetStyleFilterIE(elmt, newFilterValue);
|
635 |
+
|
636 |
+
_This.$CssMarginTop(elmt, offset.y);
|
637 |
+
_This.$CssMarginLeft(elmt, offset.x);
|
638 |
+
}
|
639 |
+
}
|
640 |
+
|
641 |
+
// Methods
|
642 |
+
|
643 |
+
_This.$IsBrowserIE = IsBrowserIE;
|
644 |
+
|
645 |
+
_This.$IsBrowserIeQuirks = IsBrowserIeQuirks;
|
646 |
+
|
647 |
+
_This.$IsBrowserFireFox = IsBrowserFireFox;
|
648 |
+
|
649 |
+
_This.$IsBrowserSafari = IsBrowserSafari;
|
650 |
+
|
651 |
+
_This.$IsBrowserChrome = IsBrowserChrome;
|
652 |
+
|
653 |
+
_This.$IsBrowserOpera = IsBrowserOpera;
|
654 |
+
|
655 |
+
_This.$IsBrowserBadTransform = IsBrowserBadTransform;
|
656 |
+
|
657 |
+
_This.$IsBrowserIe9Earlier = IsBrowserIe9Earlier;
|
658 |
+
|
659 |
+
_This.$BrowserVersion = function () {
|
660 |
+
return browserRuntimeVersion;
|
661 |
+
};
|
662 |
+
|
663 |
+
_This.$BrowserEngineVersion = function () {
|
664 |
+
return browserEngineVersion || browserRuntimeVersion;
|
665 |
+
};
|
666 |
+
|
667 |
+
_This.$WebKitVersion = function () {
|
668 |
+
DetectBrowser();
|
669 |
+
|
670 |
+
return webkitVersion;
|
671 |
+
};
|
672 |
+
|
673 |
+
_This.$Delay = Delay;
|
674 |
+
|
675 |
+
_This.$Inherit = function (instance, baseClass) {
|
676 |
+
baseClass.apply(instance, [].slice.call(arguments, 2));
|
677 |
+
return Extend({}, instance);
|
678 |
+
};
|
679 |
+
|
680 |
+
function Construct(instance, constructor) {
|
681 |
+
instance.constructor === Construct.caller && instance.$Construct && instance.$Construct();
|
682 |
+
}
|
683 |
+
|
684 |
+
_This.$Construct = Construct;
|
685 |
+
|
686 |
+
_This.$GetElement = function (elmt) {
|
687 |
+
if (_This.$IsString(elmt)) {
|
688 |
+
elmt = document.getElementById(elmt);
|
689 |
+
}
|
690 |
+
|
691 |
+
return elmt;
|
692 |
+
};
|
693 |
+
|
694 |
+
function GetEvent(event) {
|
695 |
+
return event || window.event;
|
696 |
+
}
|
697 |
+
|
698 |
+
_This.$GetEvent = GetEvent;
|
699 |
+
|
700 |
+
_This.$EventSrc = function (event) {
|
701 |
+
event = GetEvent(event);
|
702 |
+
return event.target || event.srcElement || document;
|
703 |
+
};
|
704 |
+
|
705 |
+
_This.$EventDst = function (event) {
|
706 |
+
event = GetEvent(event);
|
707 |
+
return event.relatedTarget || event.toElement;
|
708 |
+
};
|
709 |
+
|
710 |
+
_This.$MousePosition = function (event) {
|
711 |
+
event = GetEvent(event);
|
712 |
+
var body = document.body;
|
713 |
+
|
714 |
+
return {
|
715 |
+
x: event.pageX || event.clientX + (_DocElmt.scrollLeft || body.scrollLeft || 0) - (_DocElmt.clientLeft || body.clientLeft || 0) || 0,
|
716 |
+
y: event.pageY || event.clientY + (_DocElmt.scrollTop || body.scrollTop || 0) - (_DocElmt.clientTop || body.clientTop || 0) || 0
|
717 |
+
};
|
718 |
+
};
|
719 |
+
|
720 |
+
_This.$PageScroll = function () {
|
721 |
+
var body = document.body;
|
722 |
+
|
723 |
+
return {
|
724 |
+
x: (window.pageXOffset || _DocElmt.scrollLeft || body.scrollLeft || 0) - (_DocElmt.clientLeft || body.clientLeft || 0),
|
725 |
+
y: (window.pageYOffset || _DocElmt.scrollTop || body.scrollTop || 0) - (_DocElmt.clientTop || body.clientTop || 0)
|
726 |
+
};
|
727 |
+
};
|
728 |
+
|
729 |
+
_This.$WindowSize = function () {
|
730 |
+
var body = document.body;
|
731 |
+
|
732 |
+
return {
|
733 |
+
x: body.clientWidth || _DocElmt.clientWidth,
|
734 |
+
y: body.clientHeight || _DocElmt.clientHeight
|
735 |
+
};
|
736 |
+
};
|
737 |
+
|
738 |
+
//_This.$GetElementPosition = function (elmt) {
|
739 |
+
// elmt = _This.$GetElement(elmt);
|
740 |
+
// var result = Point();
|
741 |
+
|
742 |
+
// // technique from:
|
743 |
+
// // http://www.quirksmode.org/js/findpos.html
|
744 |
+
// // with special check for "fixed" elements.
|
745 |
+
|
746 |
+
// while (elmt) {
|
747 |
+
// result.x += elmt.offsetLeft;
|
748 |
+
// result.y += elmt.offsetTop;
|
749 |
+
|
750 |
+
// var isFixed = _This.$GetElementStyle(elmt).position == "fixed";
|
751 |
+
|
752 |
+
// if (isFixed) {
|
753 |
+
// result = result.$Plus(_This.$PageScroll(window));
|
754 |
+
// }
|
755 |
+
|
756 |
+
// elmt = getOffsetParent(elmt, isFixed);
|
757 |
+
// }
|
758 |
+
|
759 |
+
// return result;
|
760 |
+
//};
|
761 |
+
|
762 |
+
//_This.$GetMouseScroll = function (event) {
|
763 |
+
// event = GetEvent(event);
|
764 |
+
// var delta = 0; // default value
|
765 |
+
|
766 |
+
// // technique from:
|
767 |
+
// // http://blog.paranoidferret.com/index.php/2007/10/31/javascript-tutorial-the-scroll-wheel/
|
768 |
+
|
769 |
+
// if (typeof (event.wheelDelta) == "number") {
|
770 |
+
// delta = event.wheelDelta;
|
771 |
+
// } else if (typeof (event.detail) == "number") {
|
772 |
+
// delta = event.detail * -1;
|
773 |
+
// } else {
|
774 |
+
// $JssorDebug$.$Fail("Unknown event mouse scroll, no known technique.");
|
775 |
+
// }
|
776 |
+
|
777 |
+
// // normalize value to [-1, 1]
|
778 |
+
// return delta ? delta / Math.abs(delta) : 0;
|
779 |
+
//};
|
780 |
+
|
781 |
+
//_This.$MakeAjaxRequest = function (url, callback) {
|
782 |
+
// var async = typeof (callback) == "function";
|
783 |
+
// var req = null;
|
784 |
+
|
785 |
+
// if (async) {
|
786 |
+
// var actual = callback;
|
787 |
+
// var callback = function () {
|
788 |
+
// Delay($Jssor$.$CreateCallback(null, actual, req), 1);
|
789 |
+
// };
|
790 |
+
// }
|
791 |
+
|
792 |
+
// if (window.ActiveXObject) {
|
793 |
+
// for (var i = 0; i < arrActiveX.length; i++) {
|
794 |
+
// try {
|
795 |
+
// req = new ActiveXObject(arrActiveX[i]);
|
796 |
+
// break;
|
797 |
+
// } catch (e) {
|
798 |
+
// continue;
|
799 |
+
// }
|
800 |
+
// }
|
801 |
+
// } else if (window.XMLHttpRequest) {
|
802 |
+
// req = new XMLHttpRequest();
|
803 |
+
// }
|
804 |
+
|
805 |
+
// if (!req) {
|
806 |
+
// $JssorDebug$.$Fail("Browser doesn't support XMLHttpRequest.");
|
807 |
+
// }
|
808 |
+
|
809 |
+
// if (async) {
|
810 |
+
// req.onreadystatechange = function () {
|
811 |
+
// if (req.readyState == 4) {
|
812 |
+
// // prevent memory leaks by breaking circular reference now
|
813 |
+
// req.onreadystatechange = new Function();
|
814 |
+
// callback();
|
815 |
+
// }
|
816 |
+
// };
|
817 |
+
// }
|
818 |
+
|
819 |
+
// try {
|
820 |
+
// req.open("GET", url, async);
|
821 |
+
// req.send(null);
|
822 |
+
// } catch (e) {
|
823 |
+
// $JssorDebug$.$Log(e.name + " while making AJAX request: " + e.message);
|
824 |
+
|
825 |
+
// req.onreadystatechange = null;
|
826 |
+
// req = null;
|
827 |
+
|
828 |
+
// if (async) {
|
829 |
+
// callback();
|
830 |
+
// }
|
831 |
+
// }
|
832 |
+
|
833 |
+
// return async ? null : req;
|
834 |
+
//};
|
835 |
+
|
836 |
+
//_This.$ParseXml = function (string) {
|
837 |
+
// var xmlDoc = null;
|
838 |
+
|
839 |
+
// if (window.ActiveXObject) {
|
840 |
+
// try {
|
841 |
+
// xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
|
842 |
+
// xmlDoc.async = false;
|
843 |
+
// xmlDoc.loadXML(string);
|
844 |
+
// } catch (e) {
|
845 |
+
// $JssorDebug$.$Log(e.name + " while parsing XML (ActiveX): " + e.message);
|
846 |
+
// }
|
847 |
+
// } else if (window.DOMParser) {
|
848 |
+
// try {
|
849 |
+
// var parser = new DOMParser();
|
850 |
+
// xmlDoc = parser.parseFromString(string, "text/xml");
|
851 |
+
// } catch (e) {
|
852 |
+
// $JssorDebug$.$Log(e.name + " while parsing XML (DOMParser): " + e.message);
|
853 |
+
// }
|
854 |
+
// } else {
|
855 |
+
// $JssorDebug$.$Fail("Browser doesn't support XML DOM.");
|
856 |
+
// }
|
857 |
+
|
858 |
+
// return xmlDoc;
|
859 |
+
//};
|
860 |
+
|
861 |
+
function Css(elmt, name, value) {
|
862 |
+
/// <summary>
|
863 |
+
/// access css
|
864 |
+
/// $Jssor$.$Css(elmt, name); //get css value
|
865 |
+
/// $Jssor$.$Css(elmt, name, value); //set css value
|
866 |
+
/// </summary>
|
867 |
+
/// <param name="elmt" type="HTMLElement">
|
868 |
+
/// the element to access css
|
869 |
+
/// </param>
|
870 |
+
/// <param name="name" type="String">
|
871 |
+
/// the name of css property
|
872 |
+
/// </param>
|
873 |
+
/// <param name="value" optional="true">
|
874 |
+
/// the value to set
|
875 |
+
/// </param>
|
876 |
+
if (value != undefined) {
|
877 |
+
elmt.style[name] = value;
|
878 |
+
}
|
879 |
+
else {
|
880 |
+
var style = elmt.currentStyle || elmt.style;
|
881 |
+
value = style[name];
|
882 |
+
|
883 |
+
if (value == "" && window.getComputedStyle) {
|
884 |
+
style = elmt.ownerDocument.defaultView.getComputedStyle(elmt, null);
|
885 |
+
|
886 |
+
style && (value = style.getPropertyValue(name) || style[name]);
|
887 |
+
}
|
888 |
+
|
889 |
+
return value;
|
890 |
+
}
|
891 |
+
}
|
892 |
+
|
893 |
+
function CssN(elmt, name, value, isDimensional) {
|
894 |
+
/// <summary>
|
895 |
+
/// access css as numeric
|
896 |
+
/// $Jssor$.$CssN(elmt, name); //get css value
|
897 |
+
/// $Jssor$.$CssN(elmt, name, value); //set css value
|
898 |
+
/// </summary>
|
899 |
+
/// <param name="elmt" type="HTMLElement">
|
900 |
+
/// the element to access css
|
901 |
+
/// </param>
|
902 |
+
/// <param name="name" type="String">
|
903 |
+
/// the name of css property
|
904 |
+
/// </param>
|
905 |
+
/// <param name="value" type="Number" optional="true">
|
906 |
+
/// the value to set
|
907 |
+
/// </param>
|
908 |
+
if (value != undefined) {
|
909 |
+
isDimensional && (value += "px");
|
910 |
+
Css(elmt, name, value);
|
911 |
+
}
|
912 |
+
else {
|
913 |
+
return ParseFloat(Css(elmt, name));
|
914 |
+
}
|
915 |
+
}
|
916 |
+
|
917 |
+
function CssP(elmt, name, value) {
|
918 |
+
/// <summary>
|
919 |
+
/// access css in pixel as numeric, like 'top', 'left', 'width', 'height'
|
920 |
+
/// $Jssor$.$CssP(elmt, name); //get css value
|
921 |
+
/// $Jssor$.$CssP(elmt, name, value); //set css value
|
922 |
+
/// </summary>
|
923 |
+
/// <param name="elmt" type="HTMLElement">
|
924 |
+
/// the element to access css
|
925 |
+
/// </param>
|
926 |
+
/// <param name="name" type="String">
|
927 |
+
/// the name of css property
|
928 |
+
/// </param>
|
929 |
+
/// <param name="value" type="Number" optional="true">
|
930 |
+
/// the value to set
|
931 |
+
/// </param>
|
932 |
+
return CssN(elmt, name, value, true);
|
933 |
+
}
|
934 |
+
|
935 |
+
function CssProxy(name, numericOrDimension) {
|
936 |
+
/// <summary>
|
937 |
+
/// create proxy to access css, CssProxy(name[, numericOrDimension]);
|
938 |
+
/// </summary>
|
939 |
+
/// <param name="elmt" type="HTMLElement">
|
940 |
+
/// the element to access css
|
941 |
+
/// </param>
|
942 |
+
/// <param name="numericOrDimension" type="Number" optional="true">
|
943 |
+
/// not set: access original css, 1: access css as numeric, 2: access css in pixel as numeric
|
944 |
+
/// </param>
|
945 |
+
var isDimensional = numericOrDimension & 2;
|
946 |
+
var cssAccessor = numericOrDimension ? CssN : Css;
|
947 |
+
return function (elmt, value) {
|
948 |
+
return cssAccessor(elmt, name, value, isDimensional);
|
949 |
+
};
|
950 |
+
}
|
951 |
+
|
952 |
+
function GetStyleOpacity(elmt) {
|
953 |
+
if (IsBrowserIE() && browserEngineVersion < 9) {
|
954 |
+
var match = /opacity=([^)]*)/.exec(elmt.style.filter || "");
|
955 |
+
return match ? (ParseFloat(match[1]) / 100) : 1;
|
956 |
+
}
|
957 |
+
else
|
958 |
+
return ParseFloat(elmt.style.opacity || "1");
|
959 |
+
}
|
960 |
+
|
961 |
+
function SetStyleOpacity(elmt, opacity, ie9EarlierForce) {
|
962 |
+
|
963 |
+
if (IsBrowserIE() && browserEngineVersion < 9) {
|
964 |
+
//var filterName = "filter"; // browserEngineVersion < 8 ? "filter" : "-ms-filter";
|
965 |
+
var finalFilter = elmt.style.filter || "";
|
966 |
+
|
967 |
+
// for CSS filter browsers (IE), remove alpha filter if it's unnecessary.
|
968 |
+
// update: doing _This always since IE9 beta seems to have broken the
|
969 |
+
// behavior if we rely on the programmatic filters collection.
|
970 |
+
var alphaReg = new RegExp(/[\s]*alpha\([^\)]*\)/g);
|
971 |
+
|
972 |
+
// important: note the lazy star! _This protects against
|
973 |
+
// multiple filters; we don't want to delete the other ones.
|
974 |
+
// update: also trimming extra whitespace around filter.
|
975 |
+
|
976 |
+
var ieOpacity = Math.round(100 * opacity);
|
977 |
+
var alphaFilter = "";
|
978 |
+
if (ieOpacity < 100 || ie9EarlierForce) {
|
979 |
+
alphaFilter = "alpha(opacity=" + ieOpacity + ") ";
|
980 |
+
//elmt.style["-ms-filter"] = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + ieOpacity + ") ";
|
981 |
+
}
|
982 |
+
|
983 |
+
var newFilterValue = BuildNewCss(finalFilter, [alphaReg], alphaFilter);
|
984 |
+
|
985 |
+
SetStyleFilterIE(elmt, newFilterValue);
|
986 |
+
}
|
987 |
+
|
988 |
+
//if (!IsBrowserIE() || browserEngineVersion >= 9)
|
989 |
+
else {
|
990 |
+
elmt.style.opacity = opacity == 1 ? "" : Math.round(opacity * 100) / 100;
|
991 |
+
}
|
992 |
+
}
|
993 |
+
|
994 |
+
function SetStyleTransformInternal(elmt, transform) {
|
995 |
+
var rotate = transform.$Rotate || 0;
|
996 |
+
var scale = transform.$Scale == undefined ? 1 : transform.$Scale;
|
997 |
+
|
998 |
+
if (IsBrowserIe9Earlier()) {
|
999 |
+
var matrix = _This.$CreateMatrix(rotate / 180 * Math.PI, scale, scale);
|
1000 |
+
SetStyleMatrixIE(elmt, (!rotate && scale == 1) ? null : matrix, _This.$GetMatrixOffset(matrix, transform.$OriginalWidth, transform.$OriginalHeight));
|
1001 |
+
}
|
1002 |
+
else {
|
1003 |
+
//rotate(15deg) scale(.5) translateZ(0)
|
1004 |
+
var transformProperty = GetTransformProperty(elmt);
|
1005 |
+
if (transformProperty) {
|
1006 |
+
var transformValue = "rotate(" + rotate % 360 + "deg) scale(" + scale + ")";
|
1007 |
+
|
1008 |
+
//needed for touch device, no need for desktop device
|
1009 |
+
if (IsBrowserChrome() && webkitVersion > 535 && "ontouchstart" in window)
|
1010 |
+
transformValue += " perspective(2000px)";
|
1011 |
+
|
1012 |
+
elmt.style[transformProperty] = transformValue;
|
1013 |
+
}
|
1014 |
+
}
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
_This.$SetStyleTransform = function (elmt, transform) {
|
1018 |
+
if (IsBrowserBadTransform()) {
|
1019 |
+
Delay(_This.$CreateCallback(null, SetStyleTransformInternal, elmt, transform));
|
1020 |
+
}
|
1021 |
+
else {
|
1022 |
+
SetStyleTransformInternal(elmt, transform);
|
1023 |
+
}
|
1024 |
+
};
|
1025 |
+
|
1026 |
+
_This.$SetStyleTransformOrigin = function (elmt, transformOrigin) {
|
1027 |
+
var transformProperty = GetTransformProperty(elmt);
|
1028 |
+
|
1029 |
+
if (transformProperty)
|
1030 |
+
elmt.style[transformProperty + "Origin"] = transformOrigin;
|
1031 |
+
};
|
1032 |
+
|
1033 |
+
_This.$CssScale = function (elmt, scale) {
|
1034 |
+
|
1035 |
+
if (IsBrowserIE() && browserEngineVersion < 9 || (browserEngineVersion < 10 && IsBrowserIeQuirks())) {
|
1036 |
+
elmt.style.zoom = (scale == 1) ? "" : scale;
|
1037 |
+
}
|
1038 |
+
else {
|
1039 |
+
var transformProperty = GetTransformProperty(elmt);
|
1040 |
+
|
1041 |
+
if (transformProperty) {
|
1042 |
+
//rotate(15deg) scale(.5)
|
1043 |
+
var transformValue = "scale(" + scale + ")";
|
1044 |
+
|
1045 |
+
var oldTransformValue = elmt.style[transformProperty];
|
1046 |
+
var scaleReg = new RegExp(/[\s]*scale\(.*?\)/g);
|
1047 |
+
|
1048 |
+
var newTransformValue = BuildNewCss(oldTransformValue, [scaleReg], transformValue);
|
1049 |
+
|
1050 |
+
elmt.style[transformProperty] = newTransformValue;
|
1051 |
+
}
|
1052 |
+
}
|
1053 |
+
};
|
1054 |
+
|
1055 |
+
_This.$EnableHWA = function (elmt) {
|
1056 |
+
if (!elmt.style[GetTransformProperty(elmt)] || elmt.style[GetTransformProperty(elmt)] == "none")
|
1057 |
+
elmt.style[GetTransformProperty(elmt)] = "perspective(2000px)";
|
1058 |
+
};
|
1059 |
+
|
1060 |
+
_This.$DisableHWA = function (elmt) {
|
1061 |
+
//if (force || elmt.style[GetTransformProperty(elmt)] == "perspective(2000px)")
|
1062 |
+
elmt.style[GetTransformProperty(elmt)] = "none";
|
1063 |
+
};
|
1064 |
+
|
1065 |
+
var ie8OffsetWidth = 0;
|
1066 |
+
var ie8OffsetHeight = 0;
|
1067 |
+
//var ie8WindowResizeCallbackHandlers;
|
1068 |
+
//var ie8LastVerticalScrollbar;
|
1069 |
+
//var toggleInfo = "";
|
1070 |
+
|
1071 |
+
//function Ie8WindowResizeFilter(window, handler) {
|
1072 |
+
|
1073 |
+
// var trigger = true;
|
1074 |
+
|
1075 |
+
// var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement);
|
1076 |
+
// if (checkElement) {
|
1077 |
+
// //check vertical bar
|
1078 |
+
// //var hasVerticalBar = checkElement.scrollHeight > checkElement.clientHeight;
|
1079 |
+
// //var verticalBarToggle = hasVerticalBar != ie8LastVerticalScrollbar;
|
1080 |
+
// //ie8LastVerticalScrollbar = hasVerticalBar;
|
1081 |
+
|
1082 |
+
// var widthChange = checkElement.offsetWidth - ie8OffsetWidth;
|
1083 |
+
// var heightChange = checkElement.offsetHeight - ie8OffsetHeight;
|
1084 |
+
// if (widthChange || heightChange) {
|
1085 |
+
|
1086 |
+
// ie8OffsetWidth += widthChange;
|
1087 |
+
// ie8OffsetHeight += heightChange;
|
1088 |
+
// }
|
1089 |
+
// else
|
1090 |
+
// trigger = false;
|
1091 |
+
// }
|
1092 |
+
|
1093 |
+
// trigger && handler();
|
1094 |
+
//}
|
1095 |
+
|
1096 |
+
//_This.$OnWindowResize = function (window, handler) {
|
1097 |
+
|
1098 |
+
// if (IsBrowserIE() && browserEngineVersion < 9) {
|
1099 |
+
// if (!ie8WindowResizeCallbackHandlers) {
|
1100 |
+
// ie8WindowResizeCallbackHandlers = [handler];
|
1101 |
+
// handler = _This.$CreateCallback(null, Ie8WindowResizeFilter, window);
|
1102 |
+
// }
|
1103 |
+
// else {
|
1104 |
+
// ie8WindowResizeCallbackHandlers.push(handler);
|
1105 |
+
// return;
|
1106 |
+
// }
|
1107 |
+
// }
|
1108 |
+
|
1109 |
+
// _This.$AddEvent(window, "resize", handler);
|
1110 |
+
//};
|
1111 |
+
|
1112 |
+
_This.$WindowResizeFilter = function (window, handler) {
|
1113 |
+
return IsBrowserIe9Earlier() ? function () {
|
1114 |
+
|
1115 |
+
var trigger = true;
|
1116 |
+
|
1117 |
+
var checkElement = (IsBrowserIeQuirks() ? window.document.body : window.document.documentElement);
|
1118 |
+
if (checkElement) {
|
1119 |
+
//check vertical bar
|
1120 |
+
//var hasVerticalBar = checkElement.scrollHeight > checkElement.clientHeight;
|
1121 |
+
//var verticalBarToggle = hasVerticalBar != ie8LastVerticalScrollbar;
|
1122 |
+
//ie8LastVerticalScrollbar = hasVerticalBar;
|
1123 |
+
|
1124 |
+
var widthChange = checkElement.offsetWidth - ie8OffsetWidth;
|
1125 |
+
var heightChange = checkElement.offsetHeight - ie8OffsetHeight;
|
1126 |
+
if (widthChange || heightChange) {
|
1127 |
+
ie8OffsetWidth += widthChange;
|
1128 |
+
ie8OffsetHeight += heightChange;
|
1129 |
+
}
|
1130 |
+
else
|
1131 |
+
trigger = false;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
trigger && handler();
|
1135 |
+
|
1136 |
+
} : handler;
|
1137 |
+
};
|
1138 |
+
|
1139 |
+
_This.$MouseOverOutFilter = function (handler, target) {
|
1140 |
+
/// <param name="target" type="HTMLDomElement">
|
1141 |
+
/// The target element to detect mouse over/out events. (for ie < 9 compatibility)
|
1142 |
+
/// </param>
|
1143 |
+
|
1144 |
+
$JssorDebug$.$Execute(function () {
|
1145 |
+
if (!target) {
|
1146 |
+
throw new Error("Null reference, parameter \"target\".");
|
1147 |
+
}
|
1148 |
+
});
|
1149 |
+
|
1150 |
+
return function (event) {
|
1151 |
+
event = GetEvent(event);
|
1152 |
+
|
1153 |
+
var eventName = event.type;
|
1154 |
+
var related = event.relatedTarget || (eventName == "mouseout" ? event.toElement : event.fromElement);
|
1155 |
+
|
1156 |
+
if (!related || (related !== target && !_This.$IsChild(target, related))) {
|
1157 |
+
handler(event);
|
1158 |
+
}
|
1159 |
+
};
|
1160 |
+
};
|
1161 |
+
|
1162 |
+
_This.$AddEvent = function (elmt, eventName, handler, useCapture) {
|
1163 |
+
elmt = _This.$GetElement(elmt);
|
1164 |
+
|
1165 |
+
// technique from:
|
1166 |
+
// http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
|
1167 |
+
|
1168 |
+
if (elmt.addEventListener) {
|
1169 |
+
if (eventName == "mousewheel") {
|
1170 |
+
elmt.addEventListener("DOMMouseScroll", handler, useCapture);
|
1171 |
+
}
|
1172 |
+
// we are still going to add the mousewheel -- not a mistake!
|
1173 |
+
// _This is for opera, since it uses onmousewheel but needs addEventListener.
|
1174 |
+
elmt.addEventListener(eventName, handler, useCapture);
|
1175 |
+
}
|
1176 |
+
else if (elmt.attachEvent) {
|
1177 |
+
elmt.attachEvent("on" + eventName, handler);
|
1178 |
+
if (useCapture && elmt.setCapture) {
|
1179 |
+
elmt.setCapture();
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
$JssorDebug$.$Execute(function () {
|
1184 |
+
if (!elmt.addEventListener && !elmt.attachEvent) {
|
1185 |
+
$JssorDebug$.$Fail("Unable to attach event handler, no known technique.");
|
1186 |
+
}
|
1187 |
+
});
|
1188 |
+
|
1189 |
+
};
|
1190 |
+
|
1191 |
+
_This.$RemoveEvent = function (elmt, eventName, handler, useCapture) {
|
1192 |
+
elmt = _This.$GetElement(elmt);
|
1193 |
+
|
1194 |
+
// technique from:
|
1195 |
+
// http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
|
1196 |
+
|
1197 |
+
if (elmt.removeEventListener) {
|
1198 |
+
if (eventName == "mousewheel") {
|
1199 |
+
elmt.removeEventListener("DOMMouseScroll", handler, useCapture);
|
1200 |
+
}
|
1201 |
+
// we are still going to remove the mousewheel -- not a mistake!
|
1202 |
+
// _This is for opera, since it uses onmousewheel but needs removeEventListener.
|
1203 |
+
elmt.removeEventListener(eventName, handler, useCapture);
|
1204 |
+
}
|
1205 |
+
else if (elmt.detachEvent) {
|
1206 |
+
elmt.detachEvent("on" + eventName, handler);
|
1207 |
+
if (useCapture && elmt.releaseCapture) {
|
1208 |
+
elmt.releaseCapture();
|
1209 |
+
}
|
1210 |
+
}
|
1211 |
+
};
|
1212 |
+
|
1213 |
+
_This.$FireEvent = function (elmt, eventName) {
|
1214 |
+
//var document = elmt.document;
|
1215 |
+
|
1216 |
+
$JssorDebug$.$Execute(function () {
|
1217 |
+
if (!document.createEvent && !document.createEventObject) {
|
1218 |
+
$JssorDebug$.$Fail("Unable to fire event, no known technique.");
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
if (!elmt.dispatchEvent && !elmt.fireEvent) {
|
1222 |
+
$JssorDebug$.$Fail("Unable to fire event, no known technique.");
|
1223 |
+
}
|
1224 |
+
});
|
1225 |
+
|
1226 |
+
var evento;
|
1227 |
+
|
1228 |
+
if (document.createEvent) {
|
1229 |
+
evento = document.createEvent("HTMLEvents");
|
1230 |
+
evento.initEvent(eventName, false, false);
|
1231 |
+
elmt.dispatchEvent(evento);
|
1232 |
+
}
|
1233 |
+
else {
|
1234 |
+
var ieEventName = "on" + eventName;
|
1235 |
+
evento = document.createEventObject();
|
1236 |
+
//event.eventType = ieEventName;
|
1237 |
+
//event.eventName = ieEventName;
|
1238 |
+
|
1239 |
+
elmt.fireEvent(ieEventName, evento);
|
1240 |
+
}
|
1241 |
+
};
|
1242 |
+
|
1243 |
+
_This.$AddEventBrowserMouseUp = function (handler, userCapture) {
|
1244 |
+
_This.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture);
|
1245 |
+
};
|
1246 |
+
|
1247 |
+
_This.$RemoveEventBrowserMouseUp = function (handler, userCapture) {
|
1248 |
+
_This.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mouseup", handler, userCapture);
|
1249 |
+
};
|
1250 |
+
|
1251 |
+
//_This.$AddEventBrowserMouseDown = function (handler, userCapture) {
|
1252 |
+
// _This.$AddEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture);
|
1253 |
+
//};
|
1254 |
+
|
1255 |
+
//_This.$RemoveEventBrowserMouseDown = function (handler, userCapture) {
|
1256 |
+
// _This.$RemoveEvent((IsBrowserIe9Earlier()) ? document : window, "mousedown", handler, userCapture);
|
1257 |
+
//};
|
1258 |
+
|
1259 |
+
_This.$CancelEvent = function (event) {
|
1260 |
+
event = GetEvent(event);
|
1261 |
+
|
1262 |
+
// technique from:
|
1263 |
+
// http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
|
1264 |
+
|
1265 |
+
if (event.preventDefault) {
|
1266 |
+
event.preventDefault(); // W3C for preventing default
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
event.cancel = true; // legacy for preventing default
|
1270 |
+
event.returnValue = false; // IE for preventing default
|
1271 |
+
};
|
1272 |
+
|
1273 |
+
_This.$StopEvent = function (event) {
|
1274 |
+
event = GetEvent(event);
|
1275 |
+
|
1276 |
+
// technique from:
|
1277 |
+
// http://blog.paranoidferret.com/index.php/2007/08/10/javascript-working-with-events/
|
1278 |
+
|
1279 |
+
if (event.stopPropagation) {
|
1280 |
+
event.stopPropagation(); // W3C for stopping propagation
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
event.cancelBubble = true; // IE for stopping propagation
|
1284 |
+
};
|
1285 |
+
|
1286 |
+
_This.$CreateCallback = function (object, method) {
|
1287 |
+
// create callback args
|
1288 |
+
var initialArgs = [].slice.call(arguments, 2);
|
1289 |
+
|
1290 |
+
// create closure to apply method
|
1291 |
+
var callback = function () {
|
1292 |
+
// concatenate new args, but make a copy of initialArgs first
|
1293 |
+
var args = initialArgs.concat([].slice.call(arguments, 0));
|
1294 |
+
|
1295 |
+
return method.apply(object, args);
|
1296 |
+
};
|
1297 |
+
|
1298 |
+
//$JssorDebug$.$LiveStamp(callback, "callback_" + ($Jssor$.$GetNow() & 0xFFFFFF));
|
1299 |
+
|
1300 |
+
return callback;
|
1301 |
+
};
|
1302 |
+
|
1303 |
+
var _Freeer;
|
1304 |
+
_This.$FreeElement = function (elmt) {
|
1305 |
+
if (!_Freeer)
|
1306 |
+
_Freeer = _This.$CreateDiv();
|
1307 |
+
|
1308 |
+
if (elmt) {
|
1309 |
+
$Jssor$.$AppendChild(_Freeer, elmt);
|
1310 |
+
$Jssor$.$ClearInnerHtml(_Freeer);
|
1311 |
+
}
|
1312 |
+
};
|
1313 |
+
|
1314 |
+
_This.$InnerText = function (elmt, text) {
|
1315 |
+
if (text == undefined)
|
1316 |
+
return elmt.textContent || elmt.innerText;
|
1317 |
+
|
1318 |
+
var textNode = document.createTextNode(text);
|
1319 |
+
_This.$ClearInnerHtml(elmt);
|
1320 |
+
elmt.appendChild(textNode);
|
1321 |
+
};
|
1322 |
+
|
1323 |
+
_This.$InnerHtml = function (elmt, html) {
|
1324 |
+
if (html == undefined)
|
1325 |
+
return elmt.innerHTML;
|
1326 |
+
|
1327 |
+
elmt.innerHTML = html;
|
1328 |
+
};
|
1329 |
+
|
1330 |
+
_This.$GetClientRect = function (elmt) {
|
1331 |
+
var rect = elmt.getBoundingClientRect();
|
1332 |
+
|
1333 |
+
return { x: rect.left, y: rect.top, w: rect.right - rect.left, h: rect.bottom - rect.top };
|
1334 |
+
};
|
1335 |
+
|
1336 |
+
_This.$ClearInnerHtml = function (elmt) {
|
1337 |
+
elmt.innerHTML = "";
|
1338 |
+
};
|
1339 |
+
|
1340 |
+
_This.$EncodeHtml = function (text) {
|
1341 |
+
var div = _This.$CreateDiv();
|
1342 |
+
_This.$InnerText(div, text);
|
1343 |
+
return _This.$InnerHtml(div);
|
1344 |
+
};
|
1345 |
+
|
1346 |
+
_This.$DecodeHtml = function (html) {
|
1347 |
+
var div = _This.$CreateDiv();
|
1348 |
+
_This.$InnerHtml(div, html);
|
1349 |
+
return _This.$InnerText(div);
|
1350 |
+
};
|
1351 |
+
|
1352 |
+
_This.$SelectElement = function (elmt) {
|
1353 |
+
var userSelection;
|
1354 |
+
if (window.getSelection) {
|
1355 |
+
//W3C default
|
1356 |
+
userSelection = window.getSelection();
|
1357 |
+
}
|
1358 |
+
var theRange = null;
|
1359 |
+
if (document.createRange) {
|
1360 |
+
theRange = document.createRange();
|
1361 |
+
theRange.selectNode(elmt);
|
1362 |
+
}
|
1363 |
+
else {
|
1364 |
+
theRange = document.body.createTextRange();
|
1365 |
+
theRange.moveToElementText(elmt);
|
1366 |
+
theRange.select();
|
1367 |
+
}
|
1368 |
+
//set user selection
|
1369 |
+
if (userSelection)
|
1370 |
+
userSelection.addRange(theRange);
|
1371 |
+
};
|
1372 |
+
|
1373 |
+
_This.$DeselectElements = function () {
|
1374 |
+
if (document.selection) {
|
1375 |
+
document.selection.empty();
|
1376 |
+
} else if (window.getSelection) {
|
1377 |
+
window.getSelection().removeAllRanges();
|
1378 |
+
}
|
1379 |
+
};
|
1380 |
+
|
1381 |
+
_This.$Children = function (elmt) {
|
1382 |
+
var children = [];
|
1383 |
+
|
1384 |
+
for (var tmpEl = elmt.firstChild; tmpEl; tmpEl = tmpEl.nextSibling) {
|
1385 |
+
if (tmpEl.nodeType == 1) {
|
1386 |
+
children.push(tmpEl);
|
1387 |
+
}
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
return children;
|
1391 |
+
};
|
1392 |
+
|
1393 |
+
function FindChild(elmt, attrValue, noDeep, attrName) {
|
1394 |
+
attrName = attrName || "u";
|
1395 |
+
|
1396 |
+
for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
|
1397 |
+
if (elmt.nodeType == 1) {
|
1398 |
+
if (AttributeEx(elmt, attrName) == attrValue)
|
1399 |
+
return elmt;
|
1400 |
+
|
1401 |
+
if (!noDeep) {
|
1402 |
+
var childRet = FindChild(elmt, attrValue, noDeep, attrName);
|
1403 |
+
if (childRet)
|
1404 |
+
return childRet;
|
1405 |
+
}
|
1406 |
+
}
|
1407 |
+
}
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
_This.$FindChild = FindChild;
|
1411 |
+
|
1412 |
+
function FindChildren(elmt, attrValue, noDeep, attrName) {
|
1413 |
+
attrName = attrName || "u";
|
1414 |
+
|
1415 |
+
var ret = [];
|
1416 |
+
|
1417 |
+
for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
|
1418 |
+
if (elmt.nodeType == 1) {
|
1419 |
+
if (AttributeEx(elmt, attrName) == attrValue)
|
1420 |
+
ret.push(elmt);
|
1421 |
+
|
1422 |
+
if (!noDeep) {
|
1423 |
+
var childRet = FindChildren(elmt, attrValue, noDeep, attrName);
|
1424 |
+
if (childRet.length)
|
1425 |
+
ret = ret.concat(childRet);
|
1426 |
+
}
|
1427 |
+
}
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
return ret;
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
_This.$FindChildren = FindChildren;
|
1434 |
+
|
1435 |
+
function FindChildByTag(elmt, tagName, noDeep) {
|
1436 |
+
|
1437 |
+
for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
|
1438 |
+
if (elmt.nodeType == 1) {
|
1439 |
+
if (elmt.tagName == tagName)
|
1440 |
+
return elmt;
|
1441 |
+
|
1442 |
+
if (!noDeep) {
|
1443 |
+
var childRet = FindChildByTag(elmt, tagName, noDeep);
|
1444 |
+
if (childRet)
|
1445 |
+
return childRet;
|
1446 |
+
}
|
1447 |
+
}
|
1448 |
+
}
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
_This.$FindChildByTag = FindChildByTag;
|
1452 |
+
|
1453 |
+
function FindChildrenByTag(elmt, tagName, noDeep) {
|
1454 |
+
var ret = [];
|
1455 |
+
|
1456 |
+
for (elmt = elmt ? elmt.firstChild : null; elmt; elmt = elmt.nextSibling) {
|
1457 |
+
if (elmt.nodeType == 1) {
|
1458 |
+
if (!tagName || elmt.tagName == tagName)
|
1459 |
+
ret.push(elmt);
|
1460 |
+
|
1461 |
+
if (!noDeep) {
|
1462 |
+
var childRet = FindChildrenByTag(elmt, tagName, noDeep);
|
1463 |
+
if (childRet.length)
|
1464 |
+
ret = ret.concat(childRet);
|
1465 |
+
}
|
1466 |
+
}
|
1467 |
+
}
|
1468 |
+
|
1469 |
+
return ret;
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
_This.$FindChildrenByTag = FindChildrenByTag;
|
1473 |
+
|
1474 |
+
_This.$GetElementsByTag = function (elmt, tagName) {
|
1475 |
+
return elmt.getElementsByTagName(tagName);
|
1476 |
+
};
|
1477 |
+
|
1478 |
+
function Extend(target) {
|
1479 |
+
for (var i = 1; i < arguments.length; i++) {
|
1480 |
+
|
1481 |
+
var options = arguments[i];
|
1482 |
+
|
1483 |
+
// Only deal with non-null/undefined values
|
1484 |
+
if (options) {
|
1485 |
+
// Extend the base object
|
1486 |
+
for (var name in options) {
|
1487 |
+
target[name] = options[name];
|
1488 |
+
}
|
1489 |
+
}
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
// Return the modified object
|
1493 |
+
return target;
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
_This.$Extend = Extend;
|
1497 |
+
|
1498 |
+
function Unextend(target, options) {
|
1499 |
+
$JssorDebug$.$Assert(options);
|
1500 |
+
|
1501 |
+
var unextended = {};
|
1502 |
+
|
1503 |
+
// Extend the base object
|
1504 |
+
for (var name in target) {
|
1505 |
+
if (target[name] != options[name]) {
|
1506 |
+
unextended[name] = target[name];
|
1507 |
+
}
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
// Return the modified object
|
1511 |
+
return unextended;
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
_This.$Unextend = Unextend;
|
1515 |
+
|
1516 |
+
_This.$IsUndefined = function (obj) {
|
1517 |
+
return type(obj) == "undefined";
|
1518 |
+
};
|
1519 |
+
|
1520 |
+
_This.$IsFunction = function (obj) {
|
1521 |
+
return type(obj) == "function";
|
1522 |
+
};
|
1523 |
+
|
1524 |
+
_This.$IsArray = function (obj) {
|
1525 |
+
return type(obj) == "array";
|
1526 |
+
};
|
1527 |
+
|
1528 |
+
_This.$IsString = function (obj) {
|
1529 |
+
return type(obj) == "string";
|
1530 |
+
};
|
1531 |
+
|
1532 |
+
_This.$IsNumeric = function (obj) {
|
1533 |
+
return !isNaN(ParseFloat(obj)) && isFinite(obj);
|
1534 |
+
};
|
1535 |
+
|
1536 |
+
_This.$IsWindow = function (obj) {
|
1537 |
+
return obj && obj == obj.window;
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
_This.$Type = type;
|
1541 |
+
|
1542 |
+
// args is for internal usage only
|
1543 |
+
_This.$Each = each;
|
1544 |
+
|
1545 |
+
_This.$IsPlainObject = isPlainObject;
|
1546 |
+
|
1547 |
+
function CreateElement(tagName) {
|
1548 |
+
return document.createElement(tagName);
|
1549 |
+
}
|
1550 |
+
|
1551 |
+
_This.$CreateElement = CreateElement;
|
1552 |
+
|
1553 |
+
_This.$CreateDiv = function () {
|
1554 |
+
return CreateElement("DIV", document);
|
1555 |
+
};
|
1556 |
+
|
1557 |
+
_This.$CreateSpan = function () {
|
1558 |
+
return CreateElement("SPAN", document);
|
1559 |
+
};
|
1560 |
+
|
1561 |
+
_This.$EmptyFunction = function () { };
|
1562 |
+
|
1563 |
+
function Attribute(elmt, name, value) {
|
1564 |
+
if (value == undefined)
|
1565 |
+
return elmt.getAttribute(name);
|
1566 |
+
|
1567 |
+
elmt.setAttribute(name, value);
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
function AttributeEx(elmt, name) {
|
1571 |
+
return Attribute(elmt, name) || Attribute(elmt, "data-" + name);
|
1572 |
+
}
|
1573 |
+
|
1574 |
+
_This.$Attribute = Attribute;
|
1575 |
+
_This.$AttributeEx = AttributeEx;
|
1576 |
+
|
1577 |
+
function ClassName(elmt, className) {
|
1578 |
+
if (className == undefined)
|
1579 |
+
return elmt.className;
|
1580 |
+
|
1581 |
+
elmt.className = className;
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
_This.$ClassName = ClassName;
|
1585 |
+
|
1586 |
+
function ToHash(array) {
|
1587 |
+
var hash = {};
|
1588 |
+
|
1589 |
+
each(array, function (item) {
|
1590 |
+
hash[item] = item;
|
1591 |
+
});
|
1592 |
+
|
1593 |
+
return hash;
|
1594 |
+
}
|
1595 |
+
|
1596 |
+
_This.$ToHash = ToHash;
|
1597 |
+
|
1598 |
+
function Join(separator, strings) {
|
1599 |
+
/// <param name="separator" type="String">
|
1600 |
+
/// The element to show the dialog around
|
1601 |
+
/// </param>
|
1602 |
+
/// <param name="strings" type="Array" value="['1']">
|
1603 |
+
/// The element to show the dialog around
|
1604 |
+
/// </param>
|
1605 |
+
|
1606 |
+
var joined = "";
|
1607 |
+
|
1608 |
+
each(strings, function (str) {
|
1609 |
+
joined && (joined += separator);
|
1610 |
+
joined += str;
|
1611 |
+
});
|
1612 |
+
|
1613 |
+
return joined;
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
_This.$Join = Join;
|
1617 |
+
|
1618 |
+
_This.$AddClass = function (elmt, className) {
|
1619 |
+
var newClassName = ClassName(elmt) + " " + className;
|
1620 |
+
ClassName(elmt, Join(" ", ToHash(newClassName.match(REGEX_WHITESPACE_GLOBAL))));
|
1621 |
+
};
|
1622 |
+
|
1623 |
+
_This.$RemoveClass = function (elmt, className) {
|
1624 |
+
ClassName(elmt, Join(" ", _This.$Unextend(ToHash(ClassName(elmt).match(REGEX_WHITESPACE_GLOBAL)), ToHash(className.match(REGEX_WHITESPACE_GLOBAL)))));
|
1625 |
+
};
|
1626 |
+
|
1627 |
+
_This.$ParentNode = function (elmt) {
|
1628 |
+
return elmt.parentNode;
|
1629 |
+
};
|
1630 |
+
|
1631 |
+
_This.$HideElement = function (elmt) {
|
1632 |
+
_This.$CssDisplay(elmt, "none");
|
1633 |
+
};
|
1634 |
+
|
1635 |
+
_This.$EnableElement = function (elmt, notEnable) {
|
1636 |
+
if (notEnable) {
|
1637 |
+
_This.$Attribute(elmt, "disabled", true);
|
1638 |
+
}
|
1639 |
+
else {
|
1640 |
+
_This.$RemoveAttribute(elmt, "disabled");
|
1641 |
+
}
|
1642 |
+
};
|
1643 |
+
|
1644 |
+
_This.$HideElements = function (elmts) {
|
1645 |
+
for (var i = 0; i < elmts.length; i++) {
|
1646 |
+
_This.$HideElement(elmts[i]);
|
1647 |
+
}
|
1648 |
+
};
|
1649 |
+
|
1650 |
+
_This.$ShowElement = function (elmt, hide) {
|
1651 |
+
_This.$CssDisplay(elmt, hide ? "none" : "");
|
1652 |
+
};
|
1653 |
+
|
1654 |
+
_This.$ShowElements = function (elmts, hide) {
|
1655 |
+
for (var i = 0; i < elmts.length; i++) {
|
1656 |
+
_This.$ShowElement(elmts[i], hide);
|
1657 |
+
}
|
1658 |
+
};
|
1659 |
+
|
1660 |
+
_This.$RemoveAttribute = function (elmt, attrbuteName) {
|
1661 |
+
elmt.removeAttribute(attrbuteName);
|
1662 |
+
};
|
1663 |
+
|
1664 |
+
_This.$CanClearClip = function () {
|
1665 |
+
return IsBrowserIE() && browserRuntimeVersion < 10;
|
1666 |
+
};
|
1667 |
+
|
1668 |
+
_This.$SetStyleClip = function (elmt, clip) {
|
1669 |
+
if (clip) {
|
1670 |
+
elmt.style.clip = "rect(" + Math.round(clip.$Top) + "px " + Math.round(clip.$Right) + "px " + Math.round(clip.$Bottom) + "px " + Math.round(clip.$Left) + "px)";
|
1671 |
+
}
|
1672 |
+
else {
|
1673 |
+
var cssText = elmt.style.cssText;
|
1674 |
+
var clipRegs = [
|
1675 |
+
new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),
|
1676 |
+
new RegExp(/[\s]*cliptop: .*?[;]?/i),
|
1677 |
+
new RegExp(/[\s]*clipright: .*?[;]?/i),
|
1678 |
+
new RegExp(/[\s]*clipbottom: .*?[;]?/i),
|
1679 |
+
new RegExp(/[\s]*clipleft: .*?[;]?/i)
|
1680 |
+
];
|
1681 |
+
|
1682 |
+
var newCssText = BuildNewCss(cssText, clipRegs, "");
|
1683 |
+
|
1684 |
+
$Jssor$.$CssCssText(elmt, newCssText);
|
1685 |
+
}
|
1686 |
+
};
|
1687 |
+
|
1688 |
+
_This.$GetNow = function () {
|
1689 |
+
return new Date().getTime();
|
1690 |
+
};
|
1691 |
+
|
1692 |
+
_This.$AppendChild = function (elmt, child) {
|
1693 |
+
elmt.appendChild(child);
|
1694 |
+
};
|
1695 |
+
|
1696 |
+
_This.$AppendChildren = function (elmt, children) {
|
1697 |
+
each(children, function (child) {
|
1698 |
+
_This.$AppendChild(elmt, child);
|
1699 |
+
});
|
1700 |
+
};
|
1701 |
+
|
1702 |
+
_This.$InsertBefore = function (elmt, child, refObject) {
|
1703 |
+
elmt.insertBefore(child, refObject);
|
1704 |
+
};
|
1705 |
+
|
1706 |
+
_This.$InsertAdjacentHtml = function (elmt, where, text) {
|
1707 |
+
elmt.insertAdjacentHTML(where, text);
|
1708 |
+
};
|
1709 |
+
|
1710 |
+
_This.$RemoveChild = function (elmt, child) {
|
1711 |
+
elmt.removeChild(child);
|
1712 |
+
};
|
1713 |
+
|
1714 |
+
_This.$RemoveChildren = function (elmt, children) {
|
1715 |
+
each(children, function (child) {
|
1716 |
+
_This.$RemoveChild(elmt, child);
|
1717 |
+
});
|
1718 |
+
};
|
1719 |
+
|
1720 |
+
_This.$ClearChildren = function (elmt) {
|
1721 |
+
_This.$RemoveChildren(elmt, _This.$Children(elmt));
|
1722 |
+
};
|
1723 |
+
|
1724 |
+
_This.$ParseInt = function (str, radix) {
|
1725 |
+
return parseInt(str, radix || 10);
|
1726 |
+
};
|
1727 |
+
|
1728 |
+
function ParseFloat(str) {
|
1729 |
+
return parseFloat(str);
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
_This.$ParseFloat = ParseFloat;
|
1733 |
+
|
1734 |
+
_This.$IsChild = function (elmtA, elmtB) {
|
1735 |
+
var body = document.body;
|
1736 |
+
while (elmtB && elmtA != elmtB && body != elmtB) {
|
1737 |
+
try {
|
1738 |
+
elmtB = elmtB.parentNode;
|
1739 |
+
} catch (e) {
|
1740 |
+
// Firefox sometimes fires events for XUL elements, which throws
|
1741 |
+
// a "permission denied" error. so this is not a child.
|
1742 |
+
return false;
|
1743 |
+
}
|
1744 |
+
}
|
1745 |
+
return elmtA == elmtB;
|
1746 |
+
};
|
1747 |
+
|
1748 |
+
function CloneNode(elmt, noDeep) {
|
1749 |
+
return elmt.cloneNode(!noDeep);
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
_This.$CloneNode = CloneNode;
|
1753 |
+
|
1754 |
+
function TranslateTransition(transition) {
|
1755 |
+
if (transition) {
|
1756 |
+
var flyDirection = transition.$FlyDirection;
|
1757 |
+
|
1758 |
+
if (flyDirection & 1) {
|
1759 |
+
transition.x = transition.$ScaleHorizontal || 1;
|
1760 |
+
}
|
1761 |
+
if (flyDirection & 2) {
|
1762 |
+
transition.x = -transition.$ScaleHorizontal || -1;
|
1763 |
+
}
|
1764 |
+
if (flyDirection & 4) {
|
1765 |
+
transition.y = transition.$ScaleVertical || 1;
|
1766 |
+
}
|
1767 |
+
if (flyDirection & 8) {
|
1768 |
+
transition.y = -transition.$ScaleVertical || -1;
|
1769 |
+
}
|
1770 |
+
|
1771 |
+
if (transition.$Rotate == true)
|
1772 |
+
transition.$Rotate = 1;
|
1773 |
+
|
1774 |
+
TranslateTransition(transition.$Brother);
|
1775 |
+
}
|
1776 |
+
}
|
1777 |
+
|
1778 |
+
_This.$TranslateTransitions = function (transitions) {
|
1779 |
+
/// <summary>
|
1780 |
+
/// For backward compatibility only.
|
1781 |
+
/// </summary>
|
1782 |
+
if (transitions) {
|
1783 |
+
for (var i = 0; i < transitions.length; i++) {
|
1784 |
+
TranslateTransition(transitions[i]);
|
1785 |
+
}
|
1786 |
+
for (var name in transitions) {
|
1787 |
+
TranslateTransition(transitions[name]);
|
1788 |
+
}
|
1789 |
+
}
|
1790 |
+
};
|
1791 |
+
|
1792 |
+
//function ImageLoader() {
|
1793 |
+
// var _ThisImageLoader = this;
|
1794 |
+
// var _BaseImageLoader = _This.$Inherit(_ThisImageLoader, $JssorObject$);
|
1795 |
+
|
1796 |
+
// var _ImageLoading = 1;
|
1797 |
+
// var _MainImageSrc;
|
1798 |
+
// var _MainImage;
|
1799 |
+
// var _CompleteCallback;
|
1800 |
+
// var _MainImageAbort;
|
1801 |
+
|
1802 |
+
// function LoadCompleteCallback(image, abort) {
|
1803 |
+
// _ImageLoading--;
|
1804 |
+
|
1805 |
+
// if (image) {
|
1806 |
+
// _This.$RemoveEvent(image, "load");
|
1807 |
+
// _This.$RemoveEvent(image, "abort");
|
1808 |
+
// _This.$RemoveEvent(image, "error");
|
1809 |
+
|
1810 |
+
// if (_MainImageSrc == image.src) {
|
1811 |
+
// _MainImage = image;
|
1812 |
+
// _MainImageAbort = abort;
|
1813 |
+
// }
|
1814 |
+
// }
|
1815 |
+
|
1816 |
+
// _CompleteCallback && _CompleteCallback(_MainImage, _MainImageAbort);
|
1817 |
+
// }
|
1818 |
+
|
1819 |
+
// function LoadImage(src) {
|
1820 |
+
// _ImageLoading++;
|
1821 |
+
|
1822 |
+
// if (IsBrowserOpera() && browserRuntimeVersion < 11.6 || !src) {
|
1823 |
+
// LoadImageCallback(callback, null, !src);
|
1824 |
+
// }
|
1825 |
+
// else {
|
1826 |
+
// var image = new Image();
|
1827 |
+
|
1828 |
+
// _This.$AddEvent(image, "load", _This.$CreateCallback(null, LoadImageCallback, image, false));
|
1829 |
+
|
1830 |
+
// var abortHandler = _This.$CreateCallback(null, LoadImageCallback, image, true);
|
1831 |
+
// _This.$AddEvent(image, "abort", abortHandler);
|
1832 |
+
// _This.$AddEvent(image, "error", abortHandler);
|
1833 |
+
|
1834 |
+
// image.src = src;
|
1835 |
+
// }
|
1836 |
+
// }
|
1837 |
+
|
1838 |
+
// _ThisImageLoader.$LoadImage = function (src, callback) {
|
1839 |
+
// _MainImageSrc = src;
|
1840 |
+
// _CompleteCallback = callback;
|
1841 |
+
|
1842 |
+
// LoadImage(src);
|
1843 |
+
// LoadComplete();
|
1844 |
+
// };
|
1845 |
+
|
1846 |
+
// _ThisImageLoader.$LoadImages = function (imageElmts, mainImageElmt, callback) {
|
1847 |
+
// mainImageElmt && (_MainImageSrc = mainImageElmt.src);
|
1848 |
+
// _CompleteCallback = callback;
|
1849 |
+
|
1850 |
+
// each(imageElmts, function (imageElmt) {
|
1851 |
+
// LoadImage(imageElmt.src);
|
1852 |
+
// });
|
1853 |
+
// LoadComplete();
|
1854 |
+
// };
|
1855 |
+
//}
|
1856 |
+
|
1857 |
+
_This.$LoadImage = function (src, callback) {
|
1858 |
+
var image = new Image();
|
1859 |
+
|
1860 |
+
function LoadImageCompleteHandler(abort) {
|
1861 |
+
_This.$RemoveEvent(image, "load", LoadImageCompleteHandler);
|
1862 |
+
_This.$RemoveEvent(image, "abort", ErrorOrAbortHandler);
|
1863 |
+
_This.$RemoveEvent(image, "error", ErrorOrAbortHandler);
|
1864 |
+
|
1865 |
+
if (callback)
|
1866 |
+
callback(image, abort);
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
function ErrorOrAbortHandler() {
|
1870 |
+
LoadImageCompleteHandler(true);
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
if (IsBrowserOpera() && browserRuntimeVersion < 11.6 || !src) {
|
1874 |
+
LoadImageCompleteHandler(!src);
|
1875 |
+
}
|
1876 |
+
else {
|
1877 |
+
|
1878 |
+
_This.$AddEvent(image, "load", LoadImageCompleteHandler);
|
1879 |
+
_This.$AddEvent(image, "abort", ErrorOrAbortHandler);
|
1880 |
+
_This.$AddEvent(image, "error", ErrorOrAbortHandler);
|
1881 |
+
|
1882 |
+
image.src = src;
|
1883 |
+
}
|
1884 |
+
};
|
1885 |
+
|
1886 |
+
_This.$LoadImages = function (imageElmts, mainImageElmt, callback) {
|
1887 |
+
|
1888 |
+
var _ImageLoading = imageElmts.length + 1;
|
1889 |
+
|
1890 |
+
function LoadImageCompleteEventHandler(image, abort) {
|
1891 |
+
_ImageLoading--;
|
1892 |
+
if (mainImageElmt && image && image.src == mainImageElmt.src)
|
1893 |
+
mainImageElmt = image;
|
1894 |
+
!_ImageLoading && callback && callback(mainImageElmt);
|
1895 |
+
}
|
1896 |
+
|
1897 |
+
each(imageElmts, function (imageElmt) {
|
1898 |
+
_This.$LoadImage(imageElmt.src, LoadImageCompleteEventHandler);
|
1899 |
+
});
|
1900 |
+
|
1901 |
+
LoadImageCompleteEventHandler();
|
1902 |
+
};
|
1903 |
+
|
1904 |
+
_This.$BuildElement = function (template, tagName, replacer, createCopy) {
|
1905 |
+
if (createCopy)
|
1906 |
+
template = CloneNode(template);
|
1907 |
+
|
1908 |
+
var templateHolders = FindChildren(template, tagName);
|
1909 |
+
if (!templateHolders.length)
|
1910 |
+
templateHolders = $Jssor$.$GetElementsByTag(template, tagName);
|
1911 |
+
|
1912 |
+
for (var j = templateHolders.length -1; j > -1; j--) {
|
1913 |
+
var templateHolder = templateHolders[j];
|
1914 |
+
var replaceItem = CloneNode(replacer);
|
1915 |
+
ClassName(replaceItem, ClassName(templateHolder));
|
1916 |
+
$Jssor$.$CssCssText(replaceItem, templateHolder.style.cssText);
|
1917 |
+
|
1918 |
+
var thumbnailPlaceHolderParent = $Jssor$.$ParentNode(templateHolder);
|
1919 |
+
$Jssor$.$InsertBefore(thumbnailPlaceHolderParent, replaceItem, templateHolder);
|
1920 |
+
$Jssor$.$RemoveChild(thumbnailPlaceHolderParent, templateHolder);
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
return template;
|
1924 |
+
};
|
1925 |
+
|
1926 |
+
var _MouseDownButtons;
|
1927 |
+
function JssorButtonEx(elmt) {
|
1928 |
+
var _Self = this;
|
1929 |
+
|
1930 |
+
var _OriginClassName;
|
1931 |
+
|
1932 |
+
var _IsMouseDown; //class name 'dn'
|
1933 |
+
var _IsActive; //class name 'av'
|
1934 |
+
var _IsDisabled; //class name 'ds'
|
1935 |
+
|
1936 |
+
function Highlight() {
|
1937 |
+
var className = _OriginClassName;
|
1938 |
+
|
1939 |
+
if (_IsDisabled) {
|
1940 |
+
className += 'ds';
|
1941 |
+
}
|
1942 |
+
else if (_IsMouseDown) {
|
1943 |
+
className += 'dn';
|
1944 |
+
}
|
1945 |
+
else if (_IsActive) {
|
1946 |
+
className += "av";
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
ClassName(elmt, className);
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
function OnMouseDown(event) {
|
1953 |
+
if (_IsDisabled) {
|
1954 |
+
_This.$CancelEvent(event);
|
1955 |
+
}
|
1956 |
+
else {
|
1957 |
+
_MouseDownButtons.push(_Self);
|
1958 |
+
|
1959 |
+
_IsMouseDown = true;
|
1960 |
+
|
1961 |
+
Highlight();
|
1962 |
+
}
|
1963 |
+
}
|
1964 |
+
|
1965 |
+
_Self.$MouseUp = function () {
|
1966 |
+
/// <summary>
|
1967 |
+
/// Internal member function, do not use it.
|
1968 |
+
/// </summary>
|
1969 |
+
/// <private />
|
1970 |
+
|
1971 |
+
_IsMouseDown = false;
|
1972 |
+
|
1973 |
+
Highlight();
|
1974 |
+
};
|
1975 |
+
|
1976 |
+
_Self.$Activate = function (activate) {
|
1977 |
+
if (activate != undefined) {
|
1978 |
+
_IsActive = activate;
|
1979 |
+
|
1980 |
+
Highlight();
|
1981 |
+
}
|
1982 |
+
else {
|
1983 |
+
return _IsActive;
|
1984 |
+
}
|
1985 |
+
};
|
1986 |
+
|
1987 |
+
_Self.$Enable = function (enable) {
|
1988 |
+
if (enable != undefined) {
|
1989 |
+
_IsDisabled = !enable;
|
1990 |
+
|
1991 |
+
Highlight();
|
1992 |
+
}
|
1993 |
+
else {
|
1994 |
+
return !_IsDisabled;
|
1995 |
+
}
|
1996 |
+
};
|
1997 |
+
|
1998 |
+
//JssorButtonEx Constructor
|
1999 |
+
{
|
2000 |
+
elmt = _This.$GetElement(elmt);
|
2001 |
+
|
2002 |
+
if (!_MouseDownButtons) {
|
2003 |
+
_This.$AddEventBrowserMouseUp(function () {
|
2004 |
+
var oldMouseDownButtons = _MouseDownButtons;
|
2005 |
+
_MouseDownButtons = [];
|
2006 |
+
|
2007 |
+
each(oldMouseDownButtons, function (button) {
|
2008 |
+
button.$MouseUp();
|
2009 |
+
});
|
2010 |
+
});
|
2011 |
+
|
2012 |
+
_MouseDownButtons = [];
|
2013 |
+
}
|
2014 |
+
|
2015 |
+
_OriginClassName = ClassName(elmt);
|
2016 |
+
|
2017 |
+
$Jssor$.$AddEvent(elmt, "mousedown", OnMouseDown);
|
2018 |
+
}
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
_This.$Buttonize = function (elmt) {
|
2022 |
+
return new JssorButtonEx(elmt);
|
2023 |
+
};
|
2024 |
+
|
2025 |
+
_This.$Css = Css;
|
2026 |
+
_This.$CssN = CssN;
|
2027 |
+
_This.$CssP = CssP;
|
2028 |
+
|
2029 |
+
_This.$CssOverflow = CssProxy("overflow");
|
2030 |
+
|
2031 |
+
_This.$CssTop = CssProxy("top", 2);
|
2032 |
+
_This.$CssLeft = CssProxy("left", 2);
|
2033 |
+
_This.$CssWidth = CssProxy("width", 2);
|
2034 |
+
_This.$CssHeight = CssProxy("height", 2);
|
2035 |
+
_This.$CssMarginLeft = CssProxy("marginLeft", 2);
|
2036 |
+
_This.$CssMarginTop = CssProxy("marginTop", 2);
|
2037 |
+
_This.$CssPosition = CssProxy("position");
|
2038 |
+
_This.$CssDisplay = CssProxy("display");
|
2039 |
+
_This.$CssZIndex = CssProxy("zIndex", 1);
|
2040 |
+
_This.$CssFloat = function (elmt, float) {
|
2041 |
+
return Css(elmt, IsBrowserIE() ? "styleFloat" : "cssFloat", float);
|
2042 |
+
};
|
2043 |
+
_This.$CssOpacity = function (elmt, opacity, ie9EarlierForce) {
|
2044 |
+
if (opacity != undefined) {
|
2045 |
+
SetStyleOpacity(elmt, opacity, ie9EarlierForce);
|
2046 |
+
}
|
2047 |
+
else {
|
2048 |
+
return GetStyleOpacity(elmt);
|
2049 |
+
}
|
2050 |
+
};
|
2051 |
+
|
2052 |
+
_This.$CssCssText = function (elmt, text) {
|
2053 |
+
if (text != undefined) {
|
2054 |
+
elmt.style.cssText = text;
|
2055 |
+
}
|
2056 |
+
else {
|
2057 |
+
return elmt.style.cssText;
|
2058 |
+
}
|
2059 |
+
};
|
2060 |
+
|
2061 |
+
var _StyleGetter = {
|
2062 |
+
$Opacity: _This.$CssOpacity,
|
2063 |
+
$Top: _This.$CssTop,
|
2064 |
+
$Left: _This.$CssLeft,
|
2065 |
+
$Width: _This.$CssWidth,
|
2066 |
+
$Height: _This.$CssHeight,
|
2067 |
+
$Position: _This.$CssPosition,
|
2068 |
+
$Display: _This.$CssDisplay,
|
2069 |
+
$ZIndex: _This.$CssZIndex
|
2070 |
+
};
|
2071 |
+
|
2072 |
+
var _StyleSetterReserved;
|
2073 |
+
|
2074 |
+
function StyleSetter() {
|
2075 |
+
if (!_StyleSetterReserved) {
|
2076 |
+
_StyleSetterReserved = Extend({
|
2077 |
+
$MarginTop: _This.$CssMarginTop,
|
2078 |
+
$MarginLeft: _This.$CssMarginLeft,
|
2079 |
+
$Clip: _This.$SetStyleClip,
|
2080 |
+
$Transform: _This.$SetStyleTransform
|
2081 |
+
}, _StyleGetter);
|
2082 |
+
}
|
2083 |
+
return _StyleSetterReserved;
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
function StyleSetterEx() {
|
2087 |
+
StyleSetter();
|
2088 |
+
|
2089 |
+
//For Compression Only
|
2090 |
+
_StyleSetterReserved.$Transform = _StyleSetterReserved.$Transform;
|
2091 |
+
|
2092 |
+
return _StyleSetterReserved;
|
2093 |
+
}
|
2094 |
+
|
2095 |
+
_This.$StyleSetter = StyleSetter;
|
2096 |
+
|
2097 |
+
_This.$StyleSetterEx = StyleSetterEx;
|
2098 |
+
|
2099 |
+
_This.$GetStyles = function (elmt, originStyles) {
|
2100 |
+
StyleSetter();
|
2101 |
+
|
2102 |
+
var styles = {};
|
2103 |
+
|
2104 |
+
each(originStyles, function (value, key) {
|
2105 |
+
if (_StyleGetter[key]) {
|
2106 |
+
styles[key] = _StyleGetter[key](elmt);
|
2107 |
+
}
|
2108 |
+
});
|
2109 |
+
|
2110 |
+
return styles;
|
2111 |
+
};
|
2112 |
+
|
2113 |
+
_This.$SetStyles = function (elmt, styles) {
|
2114 |
+
var styleSetter = StyleSetter();
|
2115 |
+
|
2116 |
+
each(styles, function (value, key) {
|
2117 |
+
styleSetter[key] && styleSetter[key](elmt, value);
|
2118 |
+
});
|
2119 |
+
};
|
2120 |
+
|
2121 |
+
_This.$SetStylesEx = function (elmt, styles) {
|
2122 |
+
StyleSetterEx();
|
2123 |
+
|
2124 |
+
_This.$SetStyles(elmt, styles);
|
2125 |
+
};
|
2126 |
+
|
2127 |
+
$JssorMatrix$ = new function () {
|
2128 |
+
var _ThisMatrix = this;
|
2129 |
+
|
2130 |
+
function Multiply(ma, mb) {
|
2131 |
+
var acs = ma[0].length;
|
2132 |
+
var rows = ma.length;
|
2133 |
+
var cols = mb[0].length;
|
2134 |
+
|
2135 |
+
var matrix = [];
|
2136 |
+
|
2137 |
+
for (var r = 0; r < rows; r++) {
|
2138 |
+
var row = matrix[r] = [];
|
2139 |
+
for (var c = 0; c < cols; c++) {
|
2140 |
+
var unitValue = 0;
|
2141 |
+
|
2142 |
+
for (var ac = 0; ac < acs; ac++) {
|
2143 |
+
unitValue += ma[r][ac] * mb[ac][c];
|
2144 |
+
}
|
2145 |
+
|
2146 |
+
row[c] = unitValue;
|
2147 |
+
}
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
return matrix;
|
2151 |
+
}
|
2152 |
+
|
2153 |
+
_ThisMatrix.$ScaleX = function (matrix, sx) {
|
2154 |
+
return _ThisMatrix.$ScaleXY(matrix, sx, 0);
|
2155 |
+
};
|
2156 |
+
|
2157 |
+
_ThisMatrix.$ScaleY = function (matrix, sy) {
|
2158 |
+
return _ThisMatrix.$ScaleXY(matrix, 0, sy);
|
2159 |
+
};
|
2160 |
+
|
2161 |
+
_ThisMatrix.$ScaleXY = function (matrix, sx, sy) {
|
2162 |
+
return Multiply(matrix, [[sx, 0], [0, sy]]);
|
2163 |
+
};
|
2164 |
+
|
2165 |
+
_ThisMatrix.$TransformPoint = function (matrix, p) {
|
2166 |
+
var pMatrix = Multiply(matrix, [[p.x], [p.y]]);
|
2167 |
+
|
2168 |
+
return Point(pMatrix[0][0], pMatrix[1][0]);
|
2169 |
+
};
|
2170 |
+
};
|
2171 |
+
|
2172 |
+
_This.$CreateMatrix = function (alpha, scaleX, scaleY) {
|
2173 |
+
var cos = Math.cos(alpha);
|
2174 |
+
var sin = Math.sin(alpha);
|
2175 |
+
//var r11 = cos;
|
2176 |
+
//var r21 = sin;
|
2177 |
+
//var r12 = -sin;
|
2178 |
+
//var r22 = cos;
|
2179 |
+
|
2180 |
+
//var m11 = cos * scaleX;
|
2181 |
+
//var m12 = -sin * scaleY;
|
2182 |
+
//var m21 = sin * scaleX;
|
2183 |
+
//var m22 = cos * scaleY;
|
2184 |
+
|
2185 |
+
return [[cos * scaleX, -sin * scaleY], [sin * scaleX, cos * scaleY]];
|
2186 |
+
};
|
2187 |
+
|
2188 |
+
_This.$GetMatrixOffset = function (matrix, width, height) {
|
2189 |
+
var p1 = $JssorMatrix$.$TransformPoint(matrix, Point(-width / 2, -height / 2));
|
2190 |
+
var p2 = $JssorMatrix$.$TransformPoint(matrix, Point(width / 2, -height / 2));
|
2191 |
+
var p3 = $JssorMatrix$.$TransformPoint(matrix, Point(width / 2, height / 2));
|
2192 |
+
var p4 = $JssorMatrix$.$TransformPoint(matrix, Point(-width / 2, height / 2));
|
2193 |
+
|
2194 |
+
return Point(Math.min(p1.x, p2.x, p3.x, p4.x) + width / 2, Math.min(p1.y, p2.y, p3.y, p4.y) + height / 2);
|
2195 |
+
};
|
2196 |
+
|
2197 |
+
_This.$Transform = function (fromStyles, toStyles, interPosition, easings, durings, rounds, options) {
|
2198 |
+
|
2199 |
+
var currentStyles = toStyles;
|
2200 |
+
|
2201 |
+
if (fromStyles) {
|
2202 |
+
currentStyles = {};
|
2203 |
+
|
2204 |
+
for (var key in toStyles) {
|
2205 |
+
var round = rounds[key] || 1;
|
2206 |
+
var during = durings[key] || [0, 1];
|
2207 |
+
var propertyInterPosition = (interPosition - during[0]) / during[1];
|
2208 |
+
propertyInterPosition = Math.min(Math.max(propertyInterPosition, 0), 1);
|
2209 |
+
propertyInterPosition = propertyInterPosition * round;
|
2210 |
+
var floorPosition = Math.floor(propertyInterPosition);
|
2211 |
+
if (propertyInterPosition != floorPosition)
|
2212 |
+
propertyInterPosition -= floorPosition;
|
2213 |
+
|
2214 |
+
var easing = easings[key] || easings.$Default;
|
2215 |
+
var easingValue = easing(propertyInterPosition);
|
2216 |
+
var currentPropertyValue;
|
2217 |
+
var value = fromStyles[key];
|
2218 |
+
var toValue = toStyles[key];
|
2219 |
+
|
2220 |
+
if ($Jssor$.$IsNumeric(toValue)) {
|
2221 |
+
currentPropertyValue = value + (toValue - value) * easingValue;
|
2222 |
+
}
|
2223 |
+
else {
|
2224 |
+
currentPropertyValue = $Jssor$.$Extend({ $Offset: {} }, fromStyles[key]);
|
2225 |
+
|
2226 |
+
$Jssor$.$Each(toValue.$Offset, function (rectX, n) {
|
2227 |
+
var offsetValue = rectX * easingValue;
|
2228 |
+
currentPropertyValue.$Offset[n] = offsetValue;
|
2229 |
+
currentPropertyValue[n] += offsetValue;
|
2230 |
+
});
|
2231 |
+
}
|
2232 |
+
currentStyles[key] = currentPropertyValue;
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
if (fromStyles.$Zoom) {
|
2236 |
+
currentStyles.$Transform = { $Rotate: currentStyles.$Rotate || 0, $Scale: currentStyles.$Zoom, $OriginalWidth: options.$OriginalWidth, $OriginalHeight: options.$OriginalHeight };
|
2237 |
+
}
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
if (toStyles.$Clip && options.$Move) {
|
2241 |
+
var styleFrameNClipOffset = currentStyles.$Clip.$Offset;
|
2242 |
+
|
2243 |
+
var offsetY = (styleFrameNClipOffset.$Top || 0) + (styleFrameNClipOffset.$Bottom || 0);
|
2244 |
+
var offsetX = (styleFrameNClipOffset.$Left || 0) + (styleFrameNClipOffset.$Right || 0);
|
2245 |
+
|
2246 |
+
currentStyles.$Left = (currentStyles.$Left || 0) + offsetX;
|
2247 |
+
currentStyles.$Top = (currentStyles.$Top || 0) + offsetY;
|
2248 |
+
currentStyles.$Clip.$Left -= offsetX;
|
2249 |
+
currentStyles.$Clip.$Right -= offsetX;
|
2250 |
+
currentStyles.$Clip.$Top -= offsetY;
|
2251 |
+
currentStyles.$Clip.$Bottom -= offsetY;
|
2252 |
+
}
|
2253 |
+
|
2254 |
+
if (currentStyles.$Clip && $Jssor$.$CanClearClip() && !currentStyles.$Clip.$Top && !currentStyles.$Clip.$Left && (currentStyles.$Clip.$Right == options.$OriginalWidth) && (currentStyles.$Clip.$Bottom == options.$OriginalHeight))
|
2255 |
+
currentStyles.$Clip = null;
|
2256 |
+
|
2257 |
+
return currentStyles;
|
2258 |
+
};
|
2259 |
+
};
|
2260 |
+
|
2261 |
+
//$JssorObject$
|
2262 |
+
var $JssorObject$ = window.$JssorObject$ = function () {
|
2263 |
+
var _ThisObject = this;
|
2264 |
+
// Fields
|
2265 |
+
|
2266 |
+
var _Listeners = []; // dictionary of eventName --> array of handlers
|
2267 |
+
var _Listenees = [];
|
2268 |
+
|
2269 |
+
// Private Methods
|
2270 |
+
function AddListener(eventName, handler) {
|
2271 |
+
|
2272 |
+
$JssorDebug$.$Execute(function () {
|
2273 |
+
if (eventName == undefined || eventName == null)
|
2274 |
+
throw new Error("param 'eventName' is null or empty.");
|
2275 |
+
|
2276 |
+
if (typeof (handler) != "function") {
|
2277 |
+
throw "param 'handler' must be a function.";
|
2278 |
+
}
|
2279 |
+
|
2280 |
+
$Jssor$.$Each(_Listeners, function (listener) {
|
2281 |
+
if (listener.$EventName == eventName && listener.$Handler === handler) {
|
2282 |
+
throw new Error("The handler listened to the event already, cannot listen to the same event of the same object with the same handler twice.");
|
2283 |
+
}
|
2284 |
+
});
|
2285 |
+
});
|
2286 |
+
|
2287 |
+
_Listeners.push({ $EventName: eventName, $Handler: handler });
|
2288 |
+
}
|
2289 |
+
|
2290 |
+
function RemoveListener(eventName, handler) {
|
2291 |
+
|
2292 |
+
$JssorDebug$.$Execute(function () {
|
2293 |
+
if (eventName == undefined || eventName == null)
|
2294 |
+
throw new Error("param 'eventName' is null or empty.");
|
2295 |
+
|
2296 |
+
if (typeof (handler) != "function") {
|
2297 |
+
throw "param 'handler' must be a function.";
|
2298 |
+
}
|
2299 |
+
});
|
2300 |
+
|
2301 |
+
$Jssor$.$Each(_Listeners, function (listener, index) {
|
2302 |
+
if (listener.$EventName == eventName && listener.$Handler === handler) {
|
2303 |
+
_Listeners.splice(index, 1);
|
2304 |
+
}
|
2305 |
+
});
|
2306 |
+
}
|
2307 |
+
|
2308 |
+
function ClearListeners() {
|
2309 |
+
_Listeners = [];
|
2310 |
+
}
|
2311 |
+
|
2312 |
+
function ClearListenees() {
|
2313 |
+
|
2314 |
+
$Jssor$.$Each(_Listenees, function (listenee) {
|
2315 |
+
$Jssor$.$RemoveEvent(listenee.$Obj, listenee.$EventName, listenee.$Handler);
|
2316 |
+
});
|
2317 |
+
|
2318 |
+
_Listenees = [];
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
//Protected Methods
|
2322 |
+
_ThisObject.$Listen = function (obj, eventName, handler, useCapture) {
|
2323 |
+
|
2324 |
+
$JssorDebug$.$Execute(function () {
|
2325 |
+
if (!obj)
|
2326 |
+
throw new Error("param 'obj' is null or empty.");
|
2327 |
+
|
2328 |
+
if (eventName == undefined || eventName == null)
|
2329 |
+
throw new Error("param 'eventName' is null or empty.");
|
2330 |
+
|
2331 |
+
if (typeof (handler) != "function") {
|
2332 |
+
throw "param 'handler' must be a function.";
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
$Jssor$.$Each(_Listenees, function (listenee) {
|
2336 |
+
if (listenee.$Obj === obj && listenee.$EventName == eventName && listenee.$Handler === handler) {
|
2337 |
+
throw new Error("The handler listened to the event already, cannot listen to the same event of the same object with the same handler twice.");
|
2338 |
+
}
|
2339 |
+
});
|
2340 |
+
});
|
2341 |
+
|
2342 |
+
$Jssor$.$AddEvent(obj, eventName, handler, useCapture);
|
2343 |
+
_Listenees.push({ $Obj: obj, $EventName: eventName, $Handler: handler });
|
2344 |
+
};
|
2345 |
+
|
2346 |
+
_ThisObject.$Unlisten = function (obj, eventName, handler) {
|
2347 |
+
|
2348 |
+
$JssorDebug$.$Execute(function () {
|
2349 |
+
if (!obj)
|
2350 |
+
throw new Error("param 'obj' is null or empty.");
|
2351 |
+
|
2352 |
+
if (eventName == undefined || eventName == null)
|
2353 |
+
throw new Error("param 'eventName' is null or empty.");
|
2354 |
+
|
2355 |
+
if (typeof (handler) != "function") {
|
2356 |
+
throw "param 'handler' must be a function.";
|
2357 |
+
}
|
2358 |
+
});
|
2359 |
+
|
2360 |
+
$Jssor$.$Each(_Listenees, function (listenee, index) {
|
2361 |
+
if (listenee.$Obj === obj && listenee.$EventName == eventName && listenee.$Handler === handler) {
|
2362 |
+
$Jssor$.$RemoveEvent(obj, eventName, handler);
|
2363 |
+
_Listenees.splice(index, 1);
|
2364 |
+
}
|
2365 |
+
});
|
2366 |
+
};
|
2367 |
+
|
2368 |
+
_ThisObject.$UnlistenAll = ClearListenees;
|
2369 |
+
|
2370 |
+
// Public Methods
|
2371 |
+
_ThisObject.$On = _ThisObject.addEventListener = AddListener;
|
2372 |
+
|
2373 |
+
_ThisObject.$Off = _ThisObject.removeEventListener = RemoveListener;
|
2374 |
+
|
2375 |
+
_ThisObject.$TriggerEvent = function (eventName) {
|
2376 |
+
|
2377 |
+
var args = [].slice.call(arguments, 1);
|
2378 |
+
|
2379 |
+
$Jssor$.$Each(_Listeners, function (listener) {
|
2380 |
+
try {
|
2381 |
+
listener.$EventName == eventName && listener.$Handler.apply(window, args);
|
2382 |
+
} catch (e) {
|
2383 |
+
// handler threw an error, ignore, go on to next one
|
2384 |
+
$JssorDebug$.$Error(e.name + " while executing " + eventName +
|
2385 |
+
" handler: " + e.message, e);
|
2386 |
+
}
|
2387 |
+
});
|
2388 |
+
};
|
2389 |
+
|
2390 |
+
_ThisObject.$Destroy = function () {
|
2391 |
+
ClearListenees();
|
2392 |
+
ClearListeners();
|
2393 |
+
|
2394 |
+
for (var name in _ThisObject)
|
2395 |
+
delete _ThisObject[name];
|
2396 |
+
};
|
2397 |
+
|
2398 |
+
$JssorDebug$.$C_AbstractClass(_ThisObject);
|
2399 |
+
};
|
2400 |
+
|
2401 |
+
$JssorAnimator$ = function (delay, duration, options, elmt, fromStyles, toStyles) {
|
2402 |
+
delay = delay || 0;
|
2403 |
+
|
2404 |
+
var _ThisAnimator = this;
|
2405 |
+
var _AutoPlay;
|
2406 |
+
var _Hiden;
|
2407 |
+
var _CombineMode;
|
2408 |
+
var _PlayToPosition;
|
2409 |
+
var _PlayDirection;
|
2410 |
+
var _NoStop;
|
2411 |
+
var _TimeStampLastFrame = 0;
|
2412 |
+
|
2413 |
+
var _SubEasings;
|
2414 |
+
var _SubRounds;
|
2415 |
+
var _SubDurings;
|
2416 |
+
var _Callback;
|
2417 |
+
|
2418 |
+
var _Position_Current = 0;
|
2419 |
+
var _Position_Display = 0;
|
2420 |
+
var _Hooked;
|
2421 |
+
|
2422 |
+
var _Position_InnerBegin = delay;
|
2423 |
+
var _Position_InnerEnd = delay + duration;
|
2424 |
+
var _Position_OuterBegin;
|
2425 |
+
var _Position_OuterEnd;
|
2426 |
+
var _LoopLength;
|
2427 |
+
|
2428 |
+
var _NestedAnimators = [];
|
2429 |
+
var _StyleSetter;
|
2430 |
+
|
2431 |
+
function GetPositionRange(position, begin, end) {
|
2432 |
+
var range = 0;
|
2433 |
+
|
2434 |
+
if (position < begin)
|
2435 |
+
range = -1;
|
2436 |
+
|
2437 |
+
else if (position > end)
|
2438 |
+
range = 1;
|
2439 |
+
|
2440 |
+
return range;
|
2441 |
+
}
|
2442 |
+
|
2443 |
+
function GetInnerPositionRange(position) {
|
2444 |
+
return GetPositionRange(position, _Position_InnerBegin, _Position_InnerEnd);
|
2445 |
+
}
|
2446 |
+
|
2447 |
+
function GetOuterPositionRange(position) {
|
2448 |
+
return GetPositionRange(position, _Position_OuterBegin, _Position_OuterEnd);
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
function Shift(offset) {
|
2452 |
+
_Position_OuterBegin += offset;
|
2453 |
+
_Position_OuterEnd += offset;
|
2454 |
+
_Position_InnerBegin += offset;
|
2455 |
+
_Position_InnerEnd += offset;
|
2456 |
+
|
2457 |
+
_Position_Current += offset;
|
2458 |
+
_Position_Display += offset;
|
2459 |
+
|
2460 |
+
$Jssor$.$Each(_NestedAnimators, function (animator) {
|
2461 |
+
animator, animator.$Shift(offset);
|
2462 |
+
});
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
function Locate(position, relative) {
|
2466 |
+
var offset = position - _Position_OuterBegin + delay * relative;
|
2467 |
+
|
2468 |
+
Shift(offset);
|
2469 |
+
|
2470 |
+
//$JssorDebug$.$Execute(function () {
|
2471 |
+
// _ThisAnimator.$Position_InnerBegin = _Position_InnerBegin;
|
2472 |
+
// _ThisAnimator.$Position_InnerEnd = _Position_InnerEnd;
|
2473 |
+
// _ThisAnimator.$Position_OuterBegin = _Position_OuterBegin;
|
2474 |
+
// _ThisAnimator.$Position_OuterEnd = _Position_OuterEnd;
|
2475 |
+
//});
|
2476 |
+
|
2477 |
+
return _Position_OuterEnd;
|
2478 |
+
}
|
2479 |
+
|
2480 |
+
function GoToPosition(positionOuter, force) {
|
2481 |
+
var trimedPositionOuter = positionOuter;
|
2482 |
+
|
2483 |
+
if (_LoopLength && (trimedPositionOuter >= _Position_OuterEnd || trimedPositionOuter <= _Position_OuterBegin)) {
|
2484 |
+
trimedPositionOuter = ((trimedPositionOuter - _Position_OuterBegin) % _LoopLength + _LoopLength) % _LoopLength + _Position_OuterBegin;
|
2485 |
+
}
|
2486 |
+
|
2487 |
+
if (!_Hooked || _NoStop || force || _Position_Current != trimedPositionOuter) {
|
2488 |
+
|
2489 |
+
var positionToDisplay = Math.min(trimedPositionOuter, _Position_OuterEnd);
|
2490 |
+
positionToDisplay = Math.max(positionToDisplay, _Position_OuterBegin);
|
2491 |
+
|
2492 |
+
if (!_Hooked || _NoStop || force || positionToDisplay != _Position_Display) {
|
2493 |
+
if (toStyles) {
|
2494 |
+
|
2495 |
+
var interPosition = (positionToDisplay - _Position_InnerBegin) / (duration || 1);
|
2496 |
+
|
2497 |
+
//if (options.$Optimize && $Jssor$.$IsBrowserChrome() && duration) {
|
2498 |
+
// interPosition = Math.round(interPosition / 8 * duration) * 8 / duration;
|
2499 |
+
//}
|
2500 |
+
|
2501 |
+
if (options.$Reverse)
|
2502 |
+
interPosition = 1 - interPosition;
|
2503 |
+
|
2504 |
+
var currentStyles = $Jssor$.$Transform(fromStyles, toStyles, interPosition, _SubEasings, _SubDurings, _SubRounds, options);
|
2505 |
+
|
2506 |
+
$Jssor$.$Each(currentStyles, function (value, key) {
|
2507 |
+
_StyleSetter[key] && _StyleSetter[key](elmt, value);
|
2508 |
+
});
|
2509 |
+
}
|
2510 |
+
|
2511 |
+
_ThisAnimator.$OnInnerOffsetChange(_Position_Display - _Position_InnerBegin, positionToDisplay - _Position_InnerBegin);
|
2512 |
+
}
|
2513 |
+
|
2514 |
+
_Position_Display = positionToDisplay;
|
2515 |
+
|
2516 |
+
$Jssor$.$Each(_NestedAnimators, function (animator, i) {
|
2517 |
+
var nestedAnimator = positionOuter < _Position_Current ? _NestedAnimators[_NestedAnimators.length - i - 1] : animator;
|
2518 |
+
nestedAnimator.$GoToPosition(positionOuter, force);
|
2519 |
+
});
|
2520 |
+
|
2521 |
+
var positionOld = _Position_Current;
|
2522 |
+
var positionNew = positionOuter;
|
2523 |
+
|
2524 |
+
_Position_Current = trimedPositionOuter;
|
2525 |
+
_Hooked = true;
|
2526 |
+
|
2527 |
+
_ThisAnimator.$OnPositionChange(positionOld, positionNew);
|
2528 |
+
}
|
2529 |
+
}
|
2530 |
+
|
2531 |
+
function Join(animator, combineMode) {
|
2532 |
+
/// <summary>
|
2533 |
+
/// Combine another animator as nested animator
|
2534 |
+
/// </summary>
|
2535 |
+
/// <param name="animator" type="$JssorAnimator$">
|
2536 |
+
/// An instance of $JssorAnimator$
|
2537 |
+
/// </param>
|
2538 |
+
/// <param name="combineMode" type="int">
|
2539 |
+
/// 0: parallel - place the animator parallel to this animator.
|
2540 |
+
/// 1: chain - chain the animator at the _Position_InnerEnd of this animator.
|
2541 |
+
/// </param>
|
2542 |
+
$JssorDebug$.$Execute(function () {
|
2543 |
+
if (combineMode !== 0 && combineMode !== 1)
|
2544 |
+
$JssorDebug$.$Fail("Argument out of range, the value of 'combineMode' should be either 0 or 1.");
|
2545 |
+
});
|
2546 |
+
|
2547 |
+
if (combineMode)
|
2548 |
+
animator.$Locate(_Position_OuterEnd, 1);
|
2549 |
+
|
2550 |
+
_Position_OuterEnd = Math.max(_Position_OuterEnd, animator.$GetPosition_OuterEnd());
|
2551 |
+
_NestedAnimators.push(animator);
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
var RequestAnimationFrame = window.requestAnimationFrame
|
2555 |
+
|| window.webkitRequestAnimationFrame
|
2556 |
+
|| window.mozRequestAnimationFrame
|
2557 |
+
|| window.msRequestAnimationFrame;
|
2558 |
+
|
2559 |
+
if ($Jssor$.$IsBrowserSafari() && $Jssor$.$BrowserVersion() < 7) {
|
2560 |
+
RequestAnimationFrame = null;
|
2561 |
+
|
2562 |
+
$JssorDebug$.$Log("Custom animation frame for safari before 7.");
|
2563 |
+
}
|
2564 |
+
|
2565 |
+
RequestAnimationFrame = RequestAnimationFrame || function (callback) {
|
2566 |
+
$Jssor$.$Delay(callback, options.$Interval);
|
2567 |
+
};
|
2568 |
+
|
2569 |
+
function ShowFrame() {
|
2570 |
+
if (_AutoPlay) {
|
2571 |
+
var now = $Jssor$.$GetNow();
|
2572 |
+
var timeOffset = Math.min(now - _TimeStampLastFrame, options.$IntervalMax);
|
2573 |
+
var timePosition = _Position_Current + timeOffset * _PlayDirection;
|
2574 |
+
_TimeStampLastFrame = now;
|
2575 |
+
|
2576 |
+
if (timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection)
|
2577 |
+
timePosition = _PlayToPosition;
|
2578 |
+
|
2579 |
+
GoToPosition(timePosition);
|
2580 |
+
|
2581 |
+
if (!_NoStop && timePosition * _PlayDirection >= _PlayToPosition * _PlayDirection) {
|
2582 |
+
Stop(_Callback);
|
2583 |
+
}
|
2584 |
+
else {
|
2585 |
+
RequestAnimationFrame(ShowFrame);
|
2586 |
+
}
|
2587 |
+
}
|
2588 |
+
}
|
2589 |
+
|
2590 |
+
function PlayToPosition(toPosition, callback, noStop) {
|
2591 |
+
if (!_AutoPlay) {
|
2592 |
+
_AutoPlay = true;
|
2593 |
+
_NoStop = noStop
|
2594 |
+
_Callback = callback;
|
2595 |
+
toPosition = Math.max(toPosition, _Position_OuterBegin);
|
2596 |
+
toPosition = Math.min(toPosition, _Position_OuterEnd);
|
2597 |
+
_PlayToPosition = toPosition;
|
2598 |
+
_PlayDirection = _PlayToPosition < _Position_Current ? -1 : 1;
|
2599 |
+
_ThisAnimator.$OnStart();
|
2600 |
+
_TimeStampLastFrame = $Jssor$.$GetNow();
|
2601 |
+
RequestAnimationFrame(ShowFrame);
|
2602 |
+
}
|
2603 |
+
}
|
2604 |
+
|
2605 |
+
function Stop(callback) {
|
2606 |
+
if (_AutoPlay) {
|
2607 |
+
_NoStop = _AutoPlay = _Callback = false;
|
2608 |
+
_ThisAnimator.$OnStop();
|
2609 |
+
|
2610 |
+
if (callback)
|
2611 |
+
callback();
|
2612 |
+
}
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
_ThisAnimator.$Play = function (positionLength, callback, noStop) {
|
2616 |
+
PlayToPosition(positionLength ? _Position_Current + positionLength : _Position_OuterEnd, callback, noStop);
|
2617 |
+
};
|
2618 |
+
|
2619 |
+
_ThisAnimator.$PlayToPosition = PlayToPosition;
|
2620 |
+
|
2621 |
+
_ThisAnimator.$PlayToBegin = function (callback, noStop) {
|
2622 |
+
PlayToPosition(_Position_OuterBegin, callback, noStop);
|
2623 |
+
};
|
2624 |
+
|
2625 |
+
_ThisAnimator.$PlayToEnd = function (callback, noStop) {
|
2626 |
+
PlayToPosition(_Position_OuterEnd, callback, noStop);
|
2627 |
+
};
|
2628 |
+
|
2629 |
+
_ThisAnimator.$Stop = Stop;
|
2630 |
+
|
2631 |
+
_ThisAnimator.$Continue = function (toPosition) {
|
2632 |
+
PlayToPosition(toPosition);
|
2633 |
+
};
|
2634 |
+
|
2635 |
+
_ThisAnimator.$GetPosition = function () {
|
2636 |
+
return _Position_Current;
|
2637 |
+
};
|
2638 |
+
|
2639 |
+
_ThisAnimator.$GetPlayToPosition = function () {
|
2640 |
+
return _PlayToPosition;
|
2641 |
+
};
|
2642 |
+
|
2643 |
+
_ThisAnimator.$GetPosition_Display = function () {
|
2644 |
+
return _Position_Display;
|
2645 |
+
};
|
2646 |
+
|
2647 |
+
_ThisAnimator.$GoToPosition = GoToPosition;
|
2648 |
+
|
2649 |
+
_ThisAnimator.$GoToBegin = function () {
|
2650 |
+
GoToPosition(_Position_OuterBegin, true);
|
2651 |
+
};
|
2652 |
+
|
2653 |
+
_ThisAnimator.$GoToEnd = function () {
|
2654 |
+
GoToPosition(_Position_OuterEnd, true);
|
2655 |
+
};
|
2656 |
+
|
2657 |
+
_ThisAnimator.$Move = function (offset) {
|
2658 |
+
GoToPosition(_Position_Current + offset);
|
2659 |
+
};
|
2660 |
+
|
2661 |
+
_ThisAnimator.$CombineMode = function () {
|
2662 |
+
return _CombineMode;
|
2663 |
+
};
|
2664 |
+
|
2665 |
+
_ThisAnimator.$GetDuration = function () {
|
2666 |
+
return duration;
|
2667 |
+
};
|
2668 |
+
|
2669 |
+
_ThisAnimator.$IsPlaying = function () {
|
2670 |
+
return _AutoPlay;
|
2671 |
+
};
|
2672 |
+
|
2673 |
+
_ThisAnimator.$IsOnTheWay = function () {
|
2674 |
+
return _Position_Current > _Position_InnerBegin && _Position_Current <= _Position_InnerEnd;
|
2675 |
+
};
|
2676 |
+
|
2677 |
+
_ThisAnimator.$SetLoopLength = function (length) {
|
2678 |
+
_LoopLength = length;
|
2679 |
+
};
|
2680 |
+
|
2681 |
+
_ThisAnimator.$Locate = Locate;
|
2682 |
+
|
2683 |
+
_ThisAnimator.$Shift = Shift;
|
2684 |
+
|
2685 |
+
_ThisAnimator.$Join = Join;
|
2686 |
+
|
2687 |
+
_ThisAnimator.$Combine = function (animator) {
|
2688 |
+
/// <summary>
|
2689 |
+
/// Combine another animator parallel to this animator
|
2690 |
+
/// </summary>
|
2691 |
+
/// <param name="animator" type="$JssorAnimator$">
|
2692 |
+
/// An instance of $JssorAnimator$
|
2693 |
+
/// </param>
|
2694 |
+
Join(animator, 0);
|
2695 |
+
};
|
2696 |
+
|
2697 |
+
_ThisAnimator.$Chain = function (animator) {
|
2698 |
+
/// <summary>
|
2699 |
+
/// Chain another animator at the _Position_InnerEnd of this animator
|
2700 |
+
/// </summary>
|
2701 |
+
/// <param name="animator" type="$JssorAnimator$">
|
2702 |
+
/// An instance of $JssorAnimator$
|
2703 |
+
/// </param>
|
2704 |
+
Join(animator, 1);
|
2705 |
+
};
|
2706 |
+
|
2707 |
+
_ThisAnimator.$GetPosition_InnerBegin = function () {
|
2708 |
+
/// <summary>
|
2709 |
+
/// Internal member function, do not use it.
|
2710 |
+
/// </summary>
|
2711 |
+
/// <private />
|
2712 |
+
/// <returns type="int" />
|
2713 |
+
return _Position_InnerBegin;
|
2714 |
+
};
|
2715 |
+
|
2716 |
+
_ThisAnimator.$GetPosition_InnerEnd = function () {
|
2717 |
+
/// <summary>
|
2718 |
+
/// Internal member function, do not use it.
|
2719 |
+
/// </summary>
|
2720 |
+
/// <private />
|
2721 |
+
/// <returns type="int" />
|
2722 |
+
return _Position_InnerEnd;
|
2723 |
+
};
|
2724 |
+
|
2725 |
+
_ThisAnimator.$GetPosition_OuterBegin = function () {
|
2726 |
+
/// <summary>
|
2727 |
+
/// Internal member function, do not use it.
|
2728 |
+
/// </summary>
|
2729 |
+
/// <private />
|
2730 |
+
/// <returns type="int" />
|
2731 |
+
return _Position_OuterBegin;
|
2732 |
+
};
|
2733 |
+
|
2734 |
+
_ThisAnimator.$GetPosition_OuterEnd = function () {
|
2735 |
+
/// <summary>
|
2736 |
+
/// Internal member function, do not use it.
|
2737 |
+
/// </summary>
|
2738 |
+
/// <private />
|
2739 |
+
/// <returns type="int" />
|
2740 |
+
return _Position_OuterEnd;
|
2741 |
+
};
|
2742 |
+
|
2743 |
+
_ThisAnimator.$OnPositionChange = _ThisAnimator.$OnStart = _ThisAnimator.$OnStop = _ThisAnimator.$OnInnerOffsetChange = $Jssor$.$EmptyFunction;
|
2744 |
+
_ThisAnimator.$Version = $Jssor$.$GetNow();
|
2745 |
+
|
2746 |
+
//Constructor 1
|
2747 |
+
{
|
2748 |
+
options = $Jssor$.$Extend({
|
2749 |
+
$Interval: 16,
|
2750 |
+
$IntervalMax: 50
|
2751 |
+
}, options);
|
2752 |
+
|
2753 |
+
//Sodo statement, for development time intellisence only
|
2754 |
+
$JssorDebug$.$Execute(function () {
|
2755 |
+
options = $Jssor$.$Extend({
|
2756 |
+
$LoopLength: undefined,
|
2757 |
+
$Setter: undefined,
|
2758 |
+
$Easing: undefined
|
2759 |
+
}, options);
|
2760 |
+
});
|
2761 |
+
|
2762 |
+
_LoopLength = options.$LoopLength;
|
2763 |
+
|
2764 |
+
_StyleSetter = $Jssor$.$Extend({}, $Jssor$.$StyleSetter(), options.$Setter);
|
2765 |
+
|
2766 |
+
_Position_OuterBegin = _Position_InnerBegin = delay;
|
2767 |
+
_Position_OuterEnd = _Position_InnerEnd = delay + duration;
|
2768 |
+
|
2769 |
+
_SubRounds = options.$Round || {};
|
2770 |
+
_SubDurings = options.$During || {};
|
2771 |
+
_SubEasings = $Jssor$.$Extend({ $Default: $Jssor$.$IsFunction(options.$Easing) && options.$Easing || $JssorEasing$.$EaseSwing }, options.$Easing);
|
2772 |
+
}
|
2773 |
+
};
|
2774 |
+
|
2775 |
+
function $JssorPlayerClass$() {
|
2776 |
+
|
2777 |
+
var _ThisPlayer = this;
|
2778 |
+
var _PlayerControllers = [];
|
2779 |
+
|
2780 |
+
function PlayerController(playerElement) {
|
2781 |
+
var _SelfPlayerController = this;
|
2782 |
+
var _PlayerInstance;
|
2783 |
+
var _PlayerInstantces = [];
|
2784 |
+
|
2785 |
+
function OnPlayerInstanceDataAvailable(event) {
|
2786 |
+
var srcElement = $Jssor$.$EventSrc(event);
|
2787 |
+
_PlayerInstance = srcElement.pInstance;
|
2788 |
+
|
2789 |
+
$Jssor$.$RemoveEvent(srcElement, "dataavailable", OnPlayerInstanceDataAvailable);
|
2790 |
+
$Jssor$.$Each(_PlayerInstantces, function (playerInstance) {
|
2791 |
+
if (playerInstance != _PlayerInstance) {
|
2792 |
+
playerInstance.$Remove();
|
2793 |
+
}
|
2794 |
+
});
|
2795 |
+
|
2796 |
+
playerElement.pTagName = _PlayerInstance.tagName;
|
2797 |
+
_PlayerInstantces = null;
|
2798 |
+
}
|
2799 |
+
|
2800 |
+
function HandlePlayerInstance(playerInstanceElement) {
|
2801 |
+
var playerHandler;
|
2802 |
+
|
2803 |
+
if (!playerInstanceElement.pInstance) {
|
2804 |
+
var playerHandlerAttribute = $Jssor$.$AttributeEx(playerInstanceElement, "pHandler");
|
2805 |
+
|
2806 |
+
if ($JssorPlayer$[playerHandlerAttribute]) {
|
2807 |
+
$Jssor$.$AddEvent(playerInstanceElement, "dataavailable", OnPlayerInstanceDataAvailable);
|
2808 |
+
playerHandler = new $JssorPlayer$[playerHandlerAttribute](playerElement, playerInstanceElement);
|
2809 |
+
_PlayerInstantces.push(playerHandler);
|
2810 |
+
|
2811 |
+
$JssorDebug$.$Execute(function () {
|
2812 |
+
if ($Jssor$.$Type(playerHandler.$Remove) != "function") {
|
2813 |
+
$JssorDebug$.$Fail("'pRemove' interface not implemented for player handler '" + playerHandlerAttribute + "'.");
|
2814 |
+
}
|
2815 |
+
});
|
2816 |
+
}
|
2817 |
+
}
|
2818 |
+
|
2819 |
+
return playerHandler;
|
2820 |
+
}
|
2821 |
+
|
2822 |
+
_SelfPlayerController.$InitPlayerController = function () {
|
2823 |
+
if (!playerElement.pInstance && !HandlePlayerInstance(playerElement)) {
|
2824 |
+
|
2825 |
+
var playerInstanceElements = $Jssor$.$Children(playerElement);
|
2826 |
+
|
2827 |
+
$Jssor$.$Each(playerInstanceElements, function (playerInstanceElement) {
|
2828 |
+
HandlePlayerInstance(playerInstanceElement);
|
2829 |
+
});
|
2830 |
+
}
|
2831 |
+
};
|
2832 |
+
}
|
2833 |
+
|
2834 |
+
_ThisPlayer.$EVT_SWITCH = 21;
|
2835 |
+
|
2836 |
+
_ThisPlayer.$FetchPlayers = function (elmt) {
|
2837 |
+
elmt = elmt || document.body;
|
2838 |
+
|
2839 |
+
var playerElements = $Jssor$.$FindChildren(elmt, "player");
|
2840 |
+
|
2841 |
+
$Jssor$.$Each(playerElements, function (playerElement) {
|
2842 |
+
if (!_PlayerControllers[playerElement.pId]) {
|
2843 |
+
playerElement.pId = _PlayerControllers.length;
|
2844 |
+
_PlayerControllers.push(new PlayerController(playerElement));
|
2845 |
+
}
|
2846 |
+
var playerController = _PlayerControllers[playerElement.pId];
|
2847 |
+
playerController.$InitPlayerController();
|
2848 |
+
});
|
2849 |
+
};
|
2850 |
+
}
|
js/bannerslider/jssor.slider.js
ADDED
@@ -0,0 +1,4088 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/// <reference path="Jssor.js" />
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Jssor.Slider 18.0
|
5 |
+
* http://www.jssor.com/
|
6 |
+
*
|
7 |
+
* Licensed under the MIT license:
|
8 |
+
* http://www.opensource.org/licenses/MIT
|
9 |
+
*
|
10 |
+
* TERMS OF USE - Jssor.Slider
|
11 |
+
*
|
12 |
+
* Copyright 2014 Jssor
|
13 |
+
*
|
14 |
+
* Permission is hereby granted, free of charge, to any person obtaining
|
15 |
+
* a copy of this software and associated documentation files (the
|
16 |
+
* "Software"), to deal in the Software without restriction, including
|
17 |
+
* without limitation the rights to use, copy, modify, merge, publish,
|
18 |
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
19 |
+
* permit persons to whom the Software is furnished to do so, subject to
|
20 |
+
* the following conditions:
|
21 |
+
*
|
22 |
+
* The above copyright notice and this permission notice shall be
|
23 |
+
* included in all copies or substantial portions of the Software.
|
24 |
+
*
|
25 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
26 |
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
27 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
28 |
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
29 |
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
30 |
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
31 |
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
32 |
+
*/
|
33 |
+
|
34 |
+
var $JssorSlider$;
|
35 |
+
var $JssorSlideshowFormations$ = window.$JssorSlideshowFormations$ = {};
|
36 |
+
var $JssorSlideshowRunner$;
|
37 |
+
|
38 |
+
new function () {
|
39 |
+
//Constants +++++++
|
40 |
+
|
41 |
+
var COLUMN_INCREASE = 0;
|
42 |
+
var COLUMN_DECREASE = 1;
|
43 |
+
var ROW_INCREASE = 2;
|
44 |
+
var ROW_DECREASE = 3;
|
45 |
+
|
46 |
+
var DIRECTION_HORIZONTAL = 0x0003;
|
47 |
+
var DIRECTION_VERTICAL = 0x000C;
|
48 |
+
|
49 |
+
var TO_LEFT = 0x0001;
|
50 |
+
var TO_RIGHT = 0x0002;
|
51 |
+
var TO_TOP = 0x0004;
|
52 |
+
var TO_BOTTOM = 0x0008;
|
53 |
+
|
54 |
+
var FROM_LEFT = 0x0100;
|
55 |
+
var FROM_TOP = 0x0200;
|
56 |
+
var FROM_RIGHT = 0x0400;
|
57 |
+
var FROM_BOTTOM = 0x0800;
|
58 |
+
|
59 |
+
var ASSEMBLY_BOTTOM_LEFT = FROM_BOTTOM + TO_LEFT;
|
60 |
+
var ASSEMBLY_BOTTOM_RIGHT = FROM_BOTTOM + TO_RIGHT;
|
61 |
+
var ASSEMBLY_TOP_LEFT = FROM_TOP + TO_LEFT;
|
62 |
+
var ASSEMBLY_TOP_RIGHT = FROM_TOP + TO_RIGHT;
|
63 |
+
var ASSEMBLY_LEFT_TOP = FROM_LEFT + TO_TOP;
|
64 |
+
var ASSEMBLY_LEFT_BOTTOM = FROM_LEFT + TO_BOTTOM;
|
65 |
+
var ASSEMBLY_RIGHT_TOP = FROM_RIGHT + TO_TOP;
|
66 |
+
var ASSEMBLY_RIGHT_BOTTOM = FROM_RIGHT + TO_BOTTOM;
|
67 |
+
|
68 |
+
//Constants -------
|
69 |
+
|
70 |
+
//Formation Definition +++++++
|
71 |
+
function isToLeft(roadValue) {
|
72 |
+
return (roadValue & TO_LEFT) == TO_LEFT;
|
73 |
+
}
|
74 |
+
|
75 |
+
function isToRight(roadValue) {
|
76 |
+
return (roadValue & TO_RIGHT) == TO_RIGHT;
|
77 |
+
}
|
78 |
+
|
79 |
+
function isToTop(roadValue) {
|
80 |
+
return (roadValue & TO_TOP) == TO_TOP;
|
81 |
+
}
|
82 |
+
|
83 |
+
function isToBottom(roadValue) {
|
84 |
+
return (roadValue & TO_BOTTOM) == TO_BOTTOM;
|
85 |
+
}
|
86 |
+
|
87 |
+
function PushFormationOrder(arr, order, formationItem) {
|
88 |
+
formationItem.push(order);
|
89 |
+
arr[order] = arr[order] || [];
|
90 |
+
arr[order].push(formationItem);
|
91 |
+
}
|
92 |
+
|
93 |
+
$JssorSlideshowFormations$.$FormationStraight = function (transition) {
|
94 |
+
var cols = transition.$Cols;
|
95 |
+
var rows = transition.$Rows;
|
96 |
+
var formationDirection = transition.$Assembly;
|
97 |
+
var count = transition.$Count;
|
98 |
+
var a = [];
|
99 |
+
var i = 0;
|
100 |
+
var col = 0;
|
101 |
+
var r = 0;
|
102 |
+
var cl = cols - 1;
|
103 |
+
var rl = rows - 1;
|
104 |
+
var il = count - 1;
|
105 |
+
var cr;
|
106 |
+
var order;
|
107 |
+
for (r = 0; r < rows; r++) {
|
108 |
+
for (col = 0; col < cols; col++) {
|
109 |
+
cr = r + ',' + col;
|
110 |
+
switch (formationDirection) {
|
111 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
112 |
+
order = il - (col * rows + (rl - r));
|
113 |
+
break;
|
114 |
+
case ASSEMBLY_RIGHT_TOP:
|
115 |
+
order = il - (r * cols + (cl - col));
|
116 |
+
break;
|
117 |
+
case ASSEMBLY_TOP_LEFT:
|
118 |
+
order = il - (col * rows + r);
|
119 |
+
case ASSEMBLY_LEFT_TOP:
|
120 |
+
order = il - (r * cols + col);
|
121 |
+
break;
|
122 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
123 |
+
order = col * rows + r;
|
124 |
+
break;
|
125 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
126 |
+
order = r * cols + (cl - col);
|
127 |
+
break;
|
128 |
+
case ASSEMBLY_TOP_RIGHT:
|
129 |
+
order = col * rows + (rl - r);
|
130 |
+
break;
|
131 |
+
default:
|
132 |
+
order = r * cols + col;
|
133 |
+
break; //ASSEMBLY_RIGHT_BOTTOM
|
134 |
+
}
|
135 |
+
PushFormationOrder(a, order, [r, col]);
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
return a;
|
140 |
+
};
|
141 |
+
|
142 |
+
$JssorSlideshowFormations$.$FormationSwirl = function (transition) {
|
143 |
+
var cols = transition.$Cols;
|
144 |
+
var rows = transition.$Rows;
|
145 |
+
var formationDirection = transition.$Assembly;
|
146 |
+
var count = transition.$Count;
|
147 |
+
var a = [];
|
148 |
+
var hit = [];
|
149 |
+
var i = 0;
|
150 |
+
var col = 0;
|
151 |
+
var r = 0;
|
152 |
+
var cl = cols - 1;
|
153 |
+
var rl = rows - 1;
|
154 |
+
var il = count - 1;
|
155 |
+
var cr;
|
156 |
+
var courses;
|
157 |
+
var course = 0;
|
158 |
+
switch (formationDirection) {
|
159 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
160 |
+
col = cl;
|
161 |
+
r = 0;
|
162 |
+
courses = [ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE];
|
163 |
+
break;
|
164 |
+
case ASSEMBLY_RIGHT_TOP:
|
165 |
+
col = 0;
|
166 |
+
r = rl;
|
167 |
+
courses = [COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE];
|
168 |
+
break;
|
169 |
+
case ASSEMBLY_TOP_LEFT:
|
170 |
+
col = cl;
|
171 |
+
r = rl;
|
172 |
+
courses = [ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE];
|
173 |
+
break;
|
174 |
+
case ASSEMBLY_LEFT_TOP:
|
175 |
+
col = cl;
|
176 |
+
r = rl;
|
177 |
+
courses = [COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE];
|
178 |
+
break;
|
179 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
180 |
+
col = 0;
|
181 |
+
r = 0;
|
182 |
+
courses = [ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE];
|
183 |
+
break;
|
184 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
185 |
+
col = cl;
|
186 |
+
r = 0;
|
187 |
+
courses = [COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE];
|
188 |
+
break;
|
189 |
+
case ASSEMBLY_TOP_RIGHT:
|
190 |
+
col = 0;
|
191 |
+
r = rl;
|
192 |
+
courses = [ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE];
|
193 |
+
break;
|
194 |
+
default:
|
195 |
+
col = 0;
|
196 |
+
r = 0;
|
197 |
+
courses = [COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE];
|
198 |
+
break; //ASSEMBLY_RIGHT_BOTTOM
|
199 |
+
}
|
200 |
+
i = 0;
|
201 |
+
while (i < count) {
|
202 |
+
cr = r + ',' + col;
|
203 |
+
if (col >= 0 && col < cols && r >= 0 && r < rows && !hit[cr]) {
|
204 |
+
//a[cr] = i++;
|
205 |
+
hit[cr] = true;
|
206 |
+
PushFormationOrder(a, i++, [r, col]);
|
207 |
+
}
|
208 |
+
else {
|
209 |
+
switch (courses[course++ % courses.length]) {
|
210 |
+
case COLUMN_INCREASE:
|
211 |
+
col--;
|
212 |
+
break;
|
213 |
+
case ROW_INCREASE:
|
214 |
+
r--;
|
215 |
+
break;
|
216 |
+
case COLUMN_DECREASE:
|
217 |
+
col++;
|
218 |
+
break;
|
219 |
+
case ROW_DECREASE:
|
220 |
+
r++;
|
221 |
+
break;
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
switch (courses[course % courses.length]) {
|
226 |
+
case COLUMN_INCREASE:
|
227 |
+
col++;
|
228 |
+
break;
|
229 |
+
case ROW_INCREASE:
|
230 |
+
r++;
|
231 |
+
break;
|
232 |
+
case COLUMN_DECREASE:
|
233 |
+
col--;
|
234 |
+
break;
|
235 |
+
case ROW_DECREASE:
|
236 |
+
r--;
|
237 |
+
break;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
return a;
|
241 |
+
};
|
242 |
+
|
243 |
+
$JssorSlideshowFormations$.$FormationZigZag = function (transition) {
|
244 |
+
var cols = transition.$Cols;
|
245 |
+
var rows = transition.$Rows;
|
246 |
+
var formationDirection = transition.$Assembly;
|
247 |
+
var count = transition.$Count;
|
248 |
+
var a = [];
|
249 |
+
var i = 0;
|
250 |
+
var col = 0;
|
251 |
+
var r = 0;
|
252 |
+
var cl = cols - 1;
|
253 |
+
var rl = rows - 1;
|
254 |
+
var il = count - 1;
|
255 |
+
var cr;
|
256 |
+
var courses;
|
257 |
+
var course = 0;
|
258 |
+
switch (formationDirection) {
|
259 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
260 |
+
col = cl;
|
261 |
+
r = 0;
|
262 |
+
courses = [ROW_INCREASE, COLUMN_DECREASE, ROW_DECREASE, COLUMN_DECREASE];
|
263 |
+
break;
|
264 |
+
case ASSEMBLY_RIGHT_TOP:
|
265 |
+
col = 0;
|
266 |
+
r = rl;
|
267 |
+
courses = [COLUMN_INCREASE, ROW_DECREASE, COLUMN_DECREASE, ROW_DECREASE];
|
268 |
+
break;
|
269 |
+
case ASSEMBLY_TOP_LEFT:
|
270 |
+
col = cl;
|
271 |
+
r = rl;
|
272 |
+
courses = [ROW_DECREASE, COLUMN_DECREASE, ROW_INCREASE, COLUMN_DECREASE];
|
273 |
+
break;
|
274 |
+
case ASSEMBLY_LEFT_TOP:
|
275 |
+
col = cl;
|
276 |
+
r = rl;
|
277 |
+
courses = [COLUMN_DECREASE, ROW_DECREASE, COLUMN_INCREASE, ROW_DECREASE];
|
278 |
+
break;
|
279 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
280 |
+
col = 0;
|
281 |
+
r = 0;
|
282 |
+
courses = [ROW_INCREASE, COLUMN_INCREASE, ROW_DECREASE, COLUMN_INCREASE];
|
283 |
+
break;
|
284 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
285 |
+
col = cl;
|
286 |
+
r = 0;
|
287 |
+
courses = [COLUMN_DECREASE, ROW_INCREASE, COLUMN_INCREASE, ROW_INCREASE];
|
288 |
+
break;
|
289 |
+
case ASSEMBLY_TOP_RIGHT:
|
290 |
+
col = 0;
|
291 |
+
r = rl;
|
292 |
+
courses = [ROW_DECREASE, COLUMN_INCREASE, ROW_INCREASE, COLUMN_INCREASE];
|
293 |
+
break;
|
294 |
+
default:
|
295 |
+
col = 0;
|
296 |
+
r = 0;
|
297 |
+
courses = [COLUMN_INCREASE, ROW_INCREASE, COLUMN_DECREASE, ROW_INCREASE];
|
298 |
+
break; //ASSEMBLY_RIGHT_BOTTOM
|
299 |
+
}
|
300 |
+
i = 0;
|
301 |
+
while (i < count) {
|
302 |
+
cr = r + ',' + col;
|
303 |
+
if (col >= 0 && col < cols && r >= 0 && r < rows && typeof (a[cr]) == 'undefined') {
|
304 |
+
PushFormationOrder(a, i++, [r, col]);
|
305 |
+
//a[cr] = i++;
|
306 |
+
switch (courses[course % courses.length]) {
|
307 |
+
case COLUMN_INCREASE:
|
308 |
+
col++;
|
309 |
+
break;
|
310 |
+
case ROW_INCREASE:
|
311 |
+
r++;
|
312 |
+
break;
|
313 |
+
case COLUMN_DECREASE:
|
314 |
+
col--;
|
315 |
+
break;
|
316 |
+
case ROW_DECREASE:
|
317 |
+
r--;
|
318 |
+
break;
|
319 |
+
}
|
320 |
+
}
|
321 |
+
else {
|
322 |
+
switch (courses[course++ % courses.length]) {
|
323 |
+
case COLUMN_INCREASE:
|
324 |
+
col--;
|
325 |
+
break;
|
326 |
+
case ROW_INCREASE:
|
327 |
+
r--;
|
328 |
+
break;
|
329 |
+
case COLUMN_DECREASE:
|
330 |
+
col++;
|
331 |
+
break;
|
332 |
+
case ROW_DECREASE:
|
333 |
+
r++;
|
334 |
+
break;
|
335 |
+
}
|
336 |
+
switch (courses[course++ % courses.length]) {
|
337 |
+
case COLUMN_INCREASE:
|
338 |
+
col++;
|
339 |
+
break;
|
340 |
+
case ROW_INCREASE:
|
341 |
+
r++;
|
342 |
+
break;
|
343 |
+
case COLUMN_DECREASE:
|
344 |
+
col--;
|
345 |
+
break;
|
346 |
+
case ROW_DECREASE:
|
347 |
+
r--;
|
348 |
+
break;
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
return a;
|
353 |
+
};
|
354 |
+
|
355 |
+
$JssorSlideshowFormations$.$FormationStraightStairs = function (transition) {
|
356 |
+
var cols = transition.$Cols;
|
357 |
+
var rows = transition.$Rows;
|
358 |
+
var formationDirection = transition.$Assembly;
|
359 |
+
var count = transition.$Count;
|
360 |
+
var a = [];
|
361 |
+
var i = 0;
|
362 |
+
var col = 0;
|
363 |
+
var r = 0;
|
364 |
+
var cl = cols - 1;
|
365 |
+
var rl = rows - 1;
|
366 |
+
var il = count - 1;
|
367 |
+
var cr;
|
368 |
+
switch (formationDirection) {
|
369 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
370 |
+
case ASSEMBLY_TOP_RIGHT:
|
371 |
+
case ASSEMBLY_TOP_LEFT:
|
372 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
373 |
+
var C = 0;
|
374 |
+
var R = 0;
|
375 |
+
break;
|
376 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
377 |
+
case ASSEMBLY_RIGHT_TOP:
|
378 |
+
case ASSEMBLY_LEFT_TOP:
|
379 |
+
case ASSEMBLY_RIGHT_BOTTOM:
|
380 |
+
var C = cl;
|
381 |
+
var R = 0;
|
382 |
+
break;
|
383 |
+
default:
|
384 |
+
formationDirection = ASSEMBLY_RIGHT_BOTTOM;
|
385 |
+
var C = cl;
|
386 |
+
var R = 0;
|
387 |
+
break;
|
388 |
+
}
|
389 |
+
col = C;
|
390 |
+
r = R;
|
391 |
+
while (i < count) {
|
392 |
+
cr = r + ',' + col;
|
393 |
+
if (isToTop(formationDirection) || isToRight(formationDirection)) {
|
394 |
+
PushFormationOrder(a, il - i++, [r, col]);
|
395 |
+
//a[cr] = il - i++;
|
396 |
+
}
|
397 |
+
else {
|
398 |
+
PushFormationOrder(a, i++, [r, col]);
|
399 |
+
//a[cr] = i++;
|
400 |
+
}
|
401 |
+
switch (formationDirection) {
|
402 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
403 |
+
case ASSEMBLY_TOP_RIGHT:
|
404 |
+
col--;
|
405 |
+
r++;
|
406 |
+
break;
|
407 |
+
case ASSEMBLY_TOP_LEFT:
|
408 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
409 |
+
col++;
|
410 |
+
r--;
|
411 |
+
break;
|
412 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
413 |
+
case ASSEMBLY_RIGHT_TOP:
|
414 |
+
col--;
|
415 |
+
r--;
|
416 |
+
break;
|
417 |
+
case ASSEMBLY_RIGHT_BOTTOM:
|
418 |
+
case ASSEMBLY_LEFT_TOP:
|
419 |
+
default:
|
420 |
+
col++;
|
421 |
+
r++;
|
422 |
+
break;
|
423 |
+
}
|
424 |
+
if (col < 0 || r < 0 || col > cl || r > rl) {
|
425 |
+
switch (formationDirection) {
|
426 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
427 |
+
case ASSEMBLY_TOP_RIGHT:
|
428 |
+
C++;
|
429 |
+
break;
|
430 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
431 |
+
case ASSEMBLY_RIGHT_TOP:
|
432 |
+
case ASSEMBLY_TOP_LEFT:
|
433 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
434 |
+
R++;
|
435 |
+
break;
|
436 |
+
case ASSEMBLY_RIGHT_BOTTOM:
|
437 |
+
case ASSEMBLY_LEFT_TOP:
|
438 |
+
default:
|
439 |
+
C--;
|
440 |
+
break;
|
441 |
+
}
|
442 |
+
if (C < 0 || R < 0 || C > cl || R > rl) {
|
443 |
+
switch (formationDirection) {
|
444 |
+
case ASSEMBLY_BOTTOM_LEFT:
|
445 |
+
case ASSEMBLY_TOP_RIGHT:
|
446 |
+
C = cl;
|
447 |
+
R++;
|
448 |
+
break;
|
449 |
+
case ASSEMBLY_TOP_LEFT:
|
450 |
+
case ASSEMBLY_BOTTOM_RIGHT:
|
451 |
+
R = rl;
|
452 |
+
C++;
|
453 |
+
break;
|
454 |
+
case ASSEMBLY_LEFT_BOTTOM:
|
455 |
+
case ASSEMBLY_RIGHT_TOP: R = rl; C--;
|
456 |
+
break;
|
457 |
+
case ASSEMBLY_RIGHT_BOTTOM:
|
458 |
+
case ASSEMBLY_LEFT_TOP:
|
459 |
+
default:
|
460 |
+
C = 0;
|
461 |
+
R++;
|
462 |
+
break;
|
463 |
+
}
|
464 |
+
if (R > rl)
|
465 |
+
R = rl;
|
466 |
+
else if (R < 0)
|
467 |
+
R = 0;
|
468 |
+
else if (C > cl)
|
469 |
+
C = cl;
|
470 |
+
else if (C < 0)
|
471 |
+
C = 0;
|
472 |
+
}
|
473 |
+
r = R;
|
474 |
+
col = C;
|
475 |
+
}
|
476 |
+
}
|
477 |
+
return a;
|
478 |
+
};
|
479 |
+
|
480 |
+
$JssorSlideshowFormations$.$FormationSquare = function (transition) {
|
481 |
+
var cols = transition.$Cols || 1;
|
482 |
+
var rows = transition.$Rows || 1;
|
483 |
+
var arr = [];
|
484 |
+
var i = 0;
|
485 |
+
var col;
|
486 |
+
var r;
|
487 |
+
var dc;
|
488 |
+
var dr;
|
489 |
+
var cr;
|
490 |
+
dc = cols < rows ? (rows - cols) / 2 : 0;
|
491 |
+
dr = cols > rows ? (cols - rows) / 2 : 0;
|
492 |
+
cr = Math.round(Math.max(cols / 2, rows / 2)) + 1;
|
493 |
+
for (col = 0; col < cols; col++) {
|
494 |
+
for (r = 0; r < rows; r++)
|
495 |
+
PushFormationOrder(arr, cr - Math.min(col + 1 + dc, r + 1 + dr, cols - col + dc, rows - r + dr), [r, col]);
|
496 |
+
}
|
497 |
+
return arr;
|
498 |
+
};
|
499 |
+
|
500 |
+
$JssorSlideshowFormations$.$FormationRectangle = function (transition) {
|
501 |
+
var cols = transition.$Cols || 1;
|
502 |
+
var rows = transition.$Rows || 1;
|
503 |
+
var arr = [];
|
504 |
+
var i = 0;
|
505 |
+
var col;
|
506 |
+
var r;
|
507 |
+
var cr;
|
508 |
+
cr = Math.round(Math.min(cols / 2, rows / 2)) + 1;
|
509 |
+
for (col = 0; col < cols; col++) {
|
510 |
+
for (r = 0; r < rows; r++)
|
511 |
+
PushFormationOrder(arr, cr - Math.min(col + 1, r + 1, cols - col, rows - r), [r, col]);
|
512 |
+
}
|
513 |
+
return arr;
|
514 |
+
};
|
515 |
+
|
516 |
+
$JssorSlideshowFormations$.$FormationRandom = function (transition) {
|
517 |
+
var a = [];
|
518 |
+
var r, col, i;
|
519 |
+
for (r = 0; r < transition.$Rows; r++) {
|
520 |
+
for (col = 0; col < transition.$Cols; col++)
|
521 |
+
PushFormationOrder(a, Math.ceil(100000 * Math.random()) % 13, [r, col]);
|
522 |
+
}
|
523 |
+
|
524 |
+
return a;
|
525 |
+
};
|
526 |
+
|
527 |
+
$JssorSlideshowFormations$.$FormationCircle = function (transition) {
|
528 |
+
var cols = transition.$Cols || 1;
|
529 |
+
var rows = transition.$Rows || 1;
|
530 |
+
var arr = [];
|
531 |
+
var i = 0;
|
532 |
+
var col;
|
533 |
+
var r;
|
534 |
+
var hc = cols / 2 - 0.5;
|
535 |
+
var hr = rows / 2 - 0.5;
|
536 |
+
for (col = 0; col < cols; col++) {
|
537 |
+
for (r = 0; r < rows; r++)
|
538 |
+
PushFormationOrder(arr, Math.round(Math.sqrt(Math.pow(col - hc, 2) + Math.pow(r - hr, 2))), [r, col]);
|
539 |
+
}
|
540 |
+
return arr;
|
541 |
+
};
|
542 |
+
|
543 |
+
$JssorSlideshowFormations$.$FormationCross = function (transition) {
|
544 |
+
var cols = transition.$Cols || 1;
|
545 |
+
var rows = transition.$Rows || 1;
|
546 |
+
var arr = [];
|
547 |
+
var i = 0;
|
548 |
+
var col;
|
549 |
+
var r;
|
550 |
+
var hc = cols / 2 - 0.5;
|
551 |
+
var hr = rows / 2 - 0.5;
|
552 |
+
for (col = 0; col < cols; col++) {
|
553 |
+
for (r = 0; r < rows; r++)
|
554 |
+
PushFormationOrder(arr, Math.round(Math.min(Math.abs(col - hc), Math.abs(r - hr))), [r, col]);
|
555 |
+
}
|
556 |
+
return arr;
|
557 |
+
};
|
558 |
+
|
559 |
+
$JssorSlideshowFormations$.$FormationRectangleCross = function (transition) {
|
560 |
+
var cols = transition.$Cols || 1;
|
561 |
+
var rows = transition.$Rows || 1;
|
562 |
+
var arr = [];
|
563 |
+
var i = 0;
|
564 |
+
var col;
|
565 |
+
var r;
|
566 |
+
var hc = cols / 2 - 0.5;
|
567 |
+
var hr = rows / 2 - 0.5;
|
568 |
+
var cr = Math.max(hc, hr) + 1;
|
569 |
+
for (col = 0; col < cols; col++) {
|
570 |
+
for (r = 0; r < rows; r++)
|
571 |
+
PushFormationOrder(arr, Math.round(cr - Math.max(hc - Math.abs(col - hc), hr - Math.abs(r - hr))) - 1, [r, col]);
|
572 |
+
}
|
573 |
+
return arr;
|
574 |
+
};
|
575 |
+
|
576 |
+
function GetFormation(transition) {
|
577 |
+
|
578 |
+
var formationInstance = transition.$Formation(transition);
|
579 |
+
|
580 |
+
return transition.$Reverse ? formationInstance.reverse() : formationInstance;
|
581 |
+
|
582 |
+
} //GetFormation
|
583 |
+
|
584 |
+
//var _PrototypeTransitions = [];
|
585 |
+
function EnsureTransitionInstance(options, slideshowInterval) {
|
586 |
+
|
587 |
+
var _SlideshowTransition = {
|
588 |
+
$Interval: slideshowInterval, //Delay to play next frame
|
589 |
+
$Duration: 1, //Duration to finish the entire transition
|
590 |
+
$Delay: 0, //Delay to assembly blocks
|
591 |
+
$Cols: 1, //Number of columns
|
592 |
+
$Rows: 1, //Number of rows
|
593 |
+
$Opacity: 0, //Fade block or not
|
594 |
+
$Zoom: 0, //Zoom block or not
|
595 |
+
$Clip: 0, //Clip block or not
|
596 |
+
$Move: false, //Move block or not
|
597 |
+
$SlideOut: false, //Slide the previous slide out to display next slide instead
|
598 |
+
//$FlyDirection: 0, //Specify fly transform with direction
|
599 |
+
$Reverse: false, //Reverse the assembly or not
|
600 |
+
$Formation: $JssorSlideshowFormations$.$FormationRandom, //Shape that assembly blocks as
|
601 |
+
$Assembly: ASSEMBLY_RIGHT_BOTTOM, //The way to assembly blocks
|
602 |
+
$ChessMode: { $Column: 0, $Row: 0 }, //Chess move or fly direction
|
603 |
+
$Easing: $JssorEasing$.$EaseSwing, //Specify variation of speed during transition
|
604 |
+
$Round: {},
|
605 |
+
$Blocks: [],
|
606 |
+
$During: {}
|
607 |
+
};
|
608 |
+
|
609 |
+
$Jssor$.$Extend(_SlideshowTransition, options);
|
610 |
+
|
611 |
+
_SlideshowTransition.$Count = _SlideshowTransition.$Cols * _SlideshowTransition.$Rows;
|
612 |
+
if ($Jssor$.$IsFunction(_SlideshowTransition.$Easing))
|
613 |
+
_SlideshowTransition.$Easing = { $Default: _SlideshowTransition.$Easing };
|
614 |
+
|
615 |
+
_SlideshowTransition.$FramesCount = Math.ceil(_SlideshowTransition.$Duration / _SlideshowTransition.$Interval);
|
616 |
+
_SlideshowTransition.$EasingInstance = GetEasing(_SlideshowTransition);
|
617 |
+
|
618 |
+
_SlideshowTransition.$GetBlocks = function (width, height) {
|
619 |
+
width /= _SlideshowTransition.$Cols;
|
620 |
+
height /= _SlideshowTransition.$Rows;
|
621 |
+
var wh = width + 'x' + height;
|
622 |
+
if (!_SlideshowTransition.$Blocks[wh]) {
|
623 |
+
_SlideshowTransition.$Blocks[wh] = { $Width: width, $Height: height };
|
624 |
+
for (var col = 0; col < _SlideshowTransition.$Cols; col++) {
|
625 |
+
for (var r = 0; r < _SlideshowTransition.$Rows; r++)
|
626 |
+
_SlideshowTransition.$Blocks[wh][r + ',' + col] = { $Top: r * height, $Right: col * width + width, $Bottom: r * height + height, $Left: col * width };
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
return _SlideshowTransition.$Blocks[wh];
|
631 |
+
};
|
632 |
+
|
633 |
+
if (_SlideshowTransition.$Brother) {
|
634 |
+
_SlideshowTransition.$Brother = EnsureTransitionInstance(_SlideshowTransition.$Brother, slideshowInterval);
|
635 |
+
_SlideshowTransition.$SlideOut = true;
|
636 |
+
}
|
637 |
+
|
638 |
+
return _SlideshowTransition;
|
639 |
+
}
|
640 |
+
|
641 |
+
function GetEasing(transition) {
|
642 |
+
var easing = transition.$Easing;
|
643 |
+
if (!easing.$Default)
|
644 |
+
easing.$Default = $JssorEasing$.$EaseSwing;
|
645 |
+
|
646 |
+
var duration = transition.$FramesCount;
|
647 |
+
|
648 |
+
var cache = easing.$Cache;
|
649 |
+
if (!cache) {
|
650 |
+
var enumerator = $Jssor$.$Extend({}, transition.$Easing, transition.$Round);
|
651 |
+
cache = easing.$Cache = {};
|
652 |
+
|
653 |
+
$Jssor$.$Each(enumerator, function (v, easingName) {
|
654 |
+
var easingFunction = easing[easingName] || easing.$Default;
|
655 |
+
var round = transition.$Round[easingName] || 1;
|
656 |
+
|
657 |
+
if (!$Jssor$.$IsArray(easingFunction.$Cache))
|
658 |
+
easingFunction.$Cache = [];
|
659 |
+
|
660 |
+
var easingFunctionCache = easingFunction.$Cache[duration] = easingFunction.$Cache[duration] || [];
|
661 |
+
|
662 |
+
if (!easingFunctionCache[round]) {
|
663 |
+
easingFunctionCache[round] = [0];
|
664 |
+
for (var t = 1; t <= duration; t++) {
|
665 |
+
var tRound = t / duration * round;
|
666 |
+
var tRoundFloor = Math.floor(tRound);
|
667 |
+
if (tRound != tRoundFloor)
|
668 |
+
tRound -= tRoundFloor;
|
669 |
+
easingFunctionCache[round][t] = easingFunction(tRound);
|
670 |
+
}
|
671 |
+
}
|
672 |
+
|
673 |
+
cache[easingName] = easingFunctionCache;
|
674 |
+
|
675 |
+
});
|
676 |
+
}
|
677 |
+
|
678 |
+
return cache;
|
679 |
+
} //GetEasing
|
680 |
+
|
681 |
+
//Formation Definition -------
|
682 |
+
|
683 |
+
function JssorSlideshowPlayer(slideContainer, slideElement, slideTransition, beginTime, slideContainerWidth, slideContainerHeight) {
|
684 |
+
var _Self = this;
|
685 |
+
|
686 |
+
var _Block;
|
687 |
+
var _StartStylesArr = {};
|
688 |
+
var _AnimationStylesArrs = {};
|
689 |
+
var _AnimationBlockItems = [];
|
690 |
+
var _StyleStart;
|
691 |
+
var _StyleEnd;
|
692 |
+
var _StyleDif;
|
693 |
+
var _ChessModeColumn = slideTransition.$ChessMode.$Column || 0;
|
694 |
+
var _ChessModeRow = slideTransition.$ChessMode.$Row || 0;
|
695 |
+
|
696 |
+
var _Blocks = slideTransition.$GetBlocks(slideContainerWidth, slideContainerHeight);
|
697 |
+
var _FormationInstance = GetFormation(slideTransition);
|
698 |
+
var _MaxOrder = _FormationInstance.length - 1;
|
699 |
+
var _Period = slideTransition.$Duration + slideTransition.$Delay * _MaxOrder;
|
700 |
+
var _EndTime = beginTime + _Period;
|
701 |
+
|
702 |
+
var _SlideOut = slideTransition.$SlideOut;
|
703 |
+
var _IsIn;
|
704 |
+
|
705 |
+
_EndTime += $Jssor$.$IsBrowserChrome() ? 260 : 50;
|
706 |
+
|
707 |
+
_Self.$EndTime = _EndTime;
|
708 |
+
|
709 |
+
_Self.$ShowFrame = function (time) {
|
710 |
+
time -= beginTime;
|
711 |
+
|
712 |
+
var isIn = time < _Period;
|
713 |
+
|
714 |
+
if (isIn || _IsIn) {
|
715 |
+
_IsIn = isIn;
|
716 |
+
|
717 |
+
if (!_SlideOut)
|
718 |
+
time = _Period - time;
|
719 |
+
|
720 |
+
var frameIndex = Math.ceil(time / slideTransition.$Interval);
|
721 |
+
|
722 |
+
$Jssor$.$Each(_AnimationStylesArrs, function (value, index) {
|
723 |
+
|
724 |
+
var itemFrameIndex = Math.max(frameIndex, value.$Min);
|
725 |
+
itemFrameIndex = Math.min(itemFrameIndex, value.length - 1);
|
726 |
+
|
727 |
+
if (value.$LastFrameIndex != itemFrameIndex) {
|
728 |
+
if (!value.$LastFrameIndex && !_SlideOut) {
|
729 |
+
$Jssor$.$ShowElement(_AnimationBlockItems[index]);
|
730 |
+
}
|
731 |
+
else if (itemFrameIndex == value.$Max && _SlideOut) {
|
732 |
+
$Jssor$.$HideElement(_AnimationBlockItems[index]);
|
733 |
+
}
|
734 |
+
value.$LastFrameIndex = itemFrameIndex;
|
735 |
+
$Jssor$.$SetStylesEx(_AnimationBlockItems[index], value[itemFrameIndex]);
|
736 |
+
}
|
737 |
+
});
|
738 |
+
}
|
739 |
+
};
|
740 |
+
|
741 |
+
function DisableHWA(elmt) {
|
742 |
+
$Jssor$.$DisableHWA(elmt);
|
743 |
+
|
744 |
+
var children = $Jssor$.$Children(elmt);
|
745 |
+
|
746 |
+
$Jssor$.$Each(children, function (child) {
|
747 |
+
DisableHWA(child);
|
748 |
+
});
|
749 |
+
}
|
750 |
+
|
751 |
+
//constructor
|
752 |
+
{
|
753 |
+
slideElement = $Jssor$.$CloneNode(slideElement);
|
754 |
+
DisableHWA(slideElement);
|
755 |
+
if ($Jssor$.$IsBrowserIe9Earlier()) {
|
756 |
+
var hasImage = !slideElement["no-image"];
|
757 |
+
var slideChildElements = $Jssor$.$FindChildrenByTag(slideElement);
|
758 |
+
$Jssor$.$Each(slideChildElements, function (slideChildElement) {
|
759 |
+
if (hasImage || slideChildElement["jssor-slider"])
|
760 |
+
$Jssor$.$CssOpacity(slideChildElement, $Jssor$.$CssOpacity(slideChildElement), true);
|
761 |
+
});
|
762 |
+
}
|
763 |
+
|
764 |
+
$Jssor$.$Each(_FormationInstance, function (formationItems, order) {
|
765 |
+
$Jssor$.$Each(formationItems, function (formationItem) {
|
766 |
+
var row = formationItem[0];
|
767 |
+
var col = formationItem[1];
|
768 |
+
{
|
769 |
+
var columnRow = row + ',' + col;
|
770 |
+
|
771 |
+
var chessHorizontal = false;
|
772 |
+
var chessVertical = false;
|
773 |
+
var chessRotate = false;
|
774 |
+
|
775 |
+
if (_ChessModeColumn && col % 2) {
|
776 |
+
if ($JssorDirection$.$IsHorizontal(_ChessModeColumn)) {
|
777 |
+
chessHorizontal = !chessHorizontal;
|
778 |
+
}
|
779 |
+
if ($JssorDirection$.$IsVertical(_ChessModeColumn)) {
|
780 |
+
chessVertical = !chessVertical;
|
781 |
+
}
|
782 |
+
|
783 |
+
if (_ChessModeColumn & 16)
|
784 |
+
chessRotate = !chessRotate;
|
785 |
+
}
|
786 |
+
|
787 |
+
if (_ChessModeRow && row % 2) {
|
788 |
+
if ($JssorDirection$.$IsHorizontal(_ChessModeRow)) {
|
789 |
+
chessHorizontal = !chessHorizontal;
|
790 |
+
}
|
791 |
+
if ($JssorDirection$.$IsVertical(_ChessModeRow)) {
|
792 |
+
chessVertical = !chessVertical;
|
793 |
+
}
|
794 |
+
if (_ChessModeRow & 16)
|
795 |
+
chessRotate = !chessRotate;
|
796 |
+
}
|
797 |
+
|
798 |
+
slideTransition.$Top = slideTransition.$Top || (slideTransition.$Clip & 4);
|
799 |
+
slideTransition.$Bottom = slideTransition.$Bottom || (slideTransition.$Clip & 8);
|
800 |
+
slideTransition.$Left = slideTransition.$Left || (slideTransition.$Clip & 1);
|
801 |
+
slideTransition.$Right = slideTransition.$Right || (slideTransition.$Clip & 2);
|
802 |
+
|
803 |
+
var topBenchmark = chessVertical ? slideTransition.$Bottom : slideTransition.$Top;
|
804 |
+
var bottomBenchmark = chessVertical ? slideTransition.$Top : slideTransition.$Bottom;
|
805 |
+
var leftBenchmark = chessHorizontal ? slideTransition.$Right : slideTransition.$Left;
|
806 |
+
var rightBenchmark = chessHorizontal ? slideTransition.$Left : slideTransition.$Right;
|
807 |
+
|
808 |
+
//$JssorDebug$.$Execute(function () {
|
809 |
+
// topBenchmark = bottomBenchmark = leftBenchmark = rightBenchmark = false;
|
810 |
+
//});
|
811 |
+
|
812 |
+
slideTransition.$Clip = topBenchmark || bottomBenchmark || leftBenchmark || rightBenchmark;
|
813 |
+
|
814 |
+
_StyleDif = {};
|
815 |
+
_StyleEnd = { $Top: 0, $Left: 0, $Opacity: 1, $Width: slideContainerWidth, $Height: slideContainerHeight };
|
816 |
+
_StyleStart = $Jssor$.$Extend({}, _StyleEnd);
|
817 |
+
_Block = $Jssor$.$Extend({}, _Blocks[columnRow]);
|
818 |
+
|
819 |
+
if (slideTransition.$Opacity) {
|
820 |
+
_StyleEnd.$Opacity = 2 - slideTransition.$Opacity;
|
821 |
+
}
|
822 |
+
|
823 |
+
if (slideTransition.$ZIndex) {
|
824 |
+
_StyleEnd.$ZIndex = slideTransition.$ZIndex;
|
825 |
+
_StyleStart.$ZIndex = 0;
|
826 |
+
}
|
827 |
+
|
828 |
+
var allowClip = slideTransition.$Cols * slideTransition.$Rows > 1 || slideTransition.$Clip;
|
829 |
+
|
830 |
+
if (slideTransition.$Zoom || slideTransition.$Rotate) {
|
831 |
+
var allowRotate = true;
|
832 |
+
if ($Jssor$.$IsBrowserIE() && $Jssor$.$BrowserEngineVersion() < 9) {
|
833 |
+
if (slideTransition.$Cols * slideTransition.$Rows > 1)
|
834 |
+
allowRotate = false;
|
835 |
+
else
|
836 |
+
allowClip = false;
|
837 |
+
}
|
838 |
+
|
839 |
+
if (allowRotate) {
|
840 |
+
_StyleEnd.$Zoom = slideTransition.$Zoom ? slideTransition.$Zoom - 1 : 1;
|
841 |
+
_StyleStart.$Zoom = 1;
|
842 |
+
|
843 |
+
if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera())
|
844 |
+
_StyleEnd.$Zoom = Math.min(_StyleEnd.$Zoom, 2);
|
845 |
+
|
846 |
+
var rotate = slideTransition.$Rotate;
|
847 |
+
|
848 |
+
_StyleEnd.$Rotate = rotate * 360 * ((chessRotate) ? -1 : 1);
|
849 |
+
_StyleStart.$Rotate = 0;
|
850 |
+
}
|
851 |
+
}
|
852 |
+
|
853 |
+
if (allowClip) {
|
854 |
+
if (slideTransition.$Clip) {
|
855 |
+
var clipScale = slideTransition.$ScaleClip || 1;
|
856 |
+
var blockOffset = _Block.$Offset = {};
|
857 |
+
if (topBenchmark && bottomBenchmark) {
|
858 |
+
blockOffset.$Top = _Blocks.$Height / 2 * clipScale;
|
859 |
+
blockOffset.$Bottom = -blockOffset.$Top;
|
860 |
+
}
|
861 |
+
else if (topBenchmark) {
|
862 |
+
blockOffset.$Bottom = -_Blocks.$Height * clipScale;
|
863 |
+
}
|
864 |
+
else if (bottomBenchmark) {
|
865 |
+
blockOffset.$Top = _Blocks.$Height * clipScale;
|
866 |
+
}
|
867 |
+
|
868 |
+
if (leftBenchmark && rightBenchmark) {
|
869 |
+
blockOffset.$Left = _Blocks.$Width / 2 * clipScale;
|
870 |
+
blockOffset.$Right = -blockOffset.$Left;
|
871 |
+
}
|
872 |
+
else if (leftBenchmark) {
|
873 |
+
blockOffset.$Right = -_Blocks.$Width * clipScale;
|
874 |
+
}
|
875 |
+
else if (rightBenchmark) {
|
876 |
+
blockOffset.$Left = _Blocks.$Width * clipScale;
|
877 |
+
}
|
878 |
+
}
|
879 |
+
|
880 |
+
_StyleDif.$Clip = _Block;
|
881 |
+
_StyleStart.$Clip = _Blocks[columnRow];
|
882 |
+
}
|
883 |
+
|
884 |
+
//fly
|
885 |
+
{
|
886 |
+
var chessHor = chessHorizontal ? 1 : -1;
|
887 |
+
var chessVer = chessVertical ? 1 : -1;
|
888 |
+
|
889 |
+
if (slideTransition.x)
|
890 |
+
_StyleEnd.$Left += slideContainerWidth * slideTransition.x * chessHor;
|
891 |
+
|
892 |
+
if (slideTransition.y)
|
893 |
+
_StyleEnd.$Top += slideContainerHeight * slideTransition.y * chessVer;
|
894 |
+
}
|
895 |
+
|
896 |
+
$Jssor$.$Each(_StyleEnd, function (propertyEnd, property) {
|
897 |
+
if ($Jssor$.$IsNumeric(propertyEnd)) {
|
898 |
+
if (propertyEnd != _StyleStart[property]) {
|
899 |
+
_StyleDif[property] = propertyEnd - _StyleStart[property];
|
900 |
+
}
|
901 |
+
}
|
902 |
+
});
|
903 |
+
|
904 |
+
_StartStylesArr[columnRow] = _SlideOut ? _StyleStart : _StyleEnd;
|
905 |
+
|
906 |
+
var animationStylesArr = [];
|
907 |
+
var virtualFrameCount = Math.round(order * slideTransition.$Delay / slideTransition.$Interval);
|
908 |
+
_AnimationStylesArrs[columnRow] = new Array(virtualFrameCount);
|
909 |
+
_AnimationStylesArrs[columnRow].$Min = virtualFrameCount;
|
910 |
+
|
911 |
+
var framesCount = slideTransition.$FramesCount;
|
912 |
+
for (var frameN = 0; frameN <= framesCount; frameN++) {
|
913 |
+
var styleFrameN = {};
|
914 |
+
|
915 |
+
$Jssor$.$Each(_StyleDif, function (propertyDiff, property) {
|
916 |
+
var propertyEasings = slideTransition.$EasingInstance[property] || slideTransition.$EasingInstance.$Default;
|
917 |
+
var propertyEasingArray = propertyEasings[slideTransition.$Round[property] || 1];
|
918 |
+
|
919 |
+
var propertyDuring = slideTransition.$During[property] || [0, 1];
|
920 |
+
var propertyFrameN = (frameN / framesCount - propertyDuring[0]) / propertyDuring[1] * framesCount;
|
921 |
+
propertyFrameN = Math.round(Math.min(framesCount, Math.max(propertyFrameN, 0)));
|
922 |
+
|
923 |
+
var propertyEasingValue = propertyEasingArray[propertyFrameN];
|
924 |
+
|
925 |
+
if ($Jssor$.$IsNumeric(propertyDiff)) {
|
926 |
+
styleFrameN[property] = _StyleStart[property] + propertyDiff * propertyEasingValue;
|
927 |
+
}
|
928 |
+
else {
|
929 |
+
var value = styleFrameN[property] = $Jssor$.$Extend({}, _StyleStart[property]);
|
930 |
+
value.$Offset = [];
|
931 |
+
$Jssor$.$Each(propertyDiff.$Offset, function (rectX, n) {
|
932 |
+
var offsetValue = rectX * propertyEasingValue;
|
933 |
+
value.$Offset[n] = offsetValue;
|
934 |
+
value[n] += offsetValue;
|
935 |
+
});
|
936 |
+
}
|
937 |
+
});
|
938 |
+
|
939 |
+
if (_StyleStart.$Zoom) {
|
940 |
+
styleFrameN.$Transform = { $Rotate: styleFrameN.$Rotate || 0, $Scale: styleFrameN.$Zoom, $OriginalWidth: slideContainerWidth, $OriginalHeight: slideContainerHeight };
|
941 |
+
}
|
942 |
+
if (styleFrameN.$Clip && slideTransition.$Move) {
|
943 |
+
var styleFrameNClipOffset = styleFrameN.$Clip.$Offset;
|
944 |
+
var offsetY = (styleFrameNClipOffset.$Top || 0) + (styleFrameNClipOffset.$Bottom || 0);
|
945 |
+
var offsetX = (styleFrameNClipOffset.$Left || 0) + (styleFrameNClipOffset.$Right || 0);
|
946 |
+
|
947 |
+
styleFrameN.$Left = (styleFrameN.$Left || 0) + offsetX;
|
948 |
+
styleFrameN.$Top = (styleFrameN.$Top || 0) + offsetY;
|
949 |
+
styleFrameN.$Clip.$Left -= offsetX;
|
950 |
+
styleFrameN.$Clip.$Right -= offsetX;
|
951 |
+
styleFrameN.$Clip.$Top -= offsetY;
|
952 |
+
styleFrameN.$Clip.$Bottom -= offsetY;
|
953 |
+
}
|
954 |
+
|
955 |
+
styleFrameN.$ZIndex = styleFrameN.$ZIndex || 1;
|
956 |
+
|
957 |
+
_AnimationStylesArrs[columnRow].push(styleFrameN);
|
958 |
+
}
|
959 |
+
|
960 |
+
} //for
|
961 |
+
});
|
962 |
+
});
|
963 |
+
|
964 |
+
_FormationInstance.reverse();
|
965 |
+
$Jssor$.$Each(_FormationInstance, function (formationItems) {
|
966 |
+
$Jssor$.$Each(formationItems, function (formationItem) {
|
967 |
+
var row = formationItem[0];
|
968 |
+
var col = formationItem[1];
|
969 |
+
|
970 |
+
var columnRow = row + ',' + col;
|
971 |
+
|
972 |
+
var image = slideElement;
|
973 |
+
if (col || row)
|
974 |
+
image = $Jssor$.$CloneNode(slideElement);
|
975 |
+
|
976 |
+
$Jssor$.$SetStyles(image, _StartStylesArr[columnRow]);
|
977 |
+
$Jssor$.$CssOverflow(image, "hidden");
|
978 |
+
|
979 |
+
$Jssor$.$CssPosition(image, "absolute");
|
980 |
+
slideContainer.$AddClipElement(image);
|
981 |
+
_AnimationBlockItems[columnRow] = image;
|
982 |
+
$Jssor$.$ShowElement(image, !_SlideOut);
|
983 |
+
});
|
984 |
+
});
|
985 |
+
}
|
986 |
+
}
|
987 |
+
|
988 |
+
//JssorSlideshowRunner++++++++
|
989 |
+
var _SlideshowRunnerCount = 1;
|
990 |
+
$JssorSlideshowRunner$ = window.$JssorSlideshowRunner$ = function (slideContainer, slideContainerWidth, slideContainerHeight, slideshowOptions, handleTouchEventOnly) {
|
991 |
+
|
992 |
+
var _SelfSlideshowRunner = this;
|
993 |
+
|
994 |
+
//var _State = 0; //-1 fullfill, 0 clean, 1 initializing, 2 stay, 3 playing
|
995 |
+
var _EndTime;
|
996 |
+
|
997 |
+
var _SliderFrameCount;
|
998 |
+
|
999 |
+
var _SlideshowPlayerBelow;
|
1000 |
+
var _SlideshowPlayerAbove;
|
1001 |
+
|
1002 |
+
var _PrevItem;
|
1003 |
+
var _SlideItem;
|
1004 |
+
|
1005 |
+
var _TransitionIndex = 0;
|
1006 |
+
var _TransitionsOrder = slideshowOptions.$TransitionsOrder;
|
1007 |
+
|
1008 |
+
var _SlideshowTransition;
|
1009 |
+
|
1010 |
+
var _SlideshowPerformance = 8;
|
1011 |
+
|
1012 |
+
function SlideshowProcessor() {
|
1013 |
+
var _SelfSlideshowProcessor = this;
|
1014 |
+
var _CurrentTime = 0;
|
1015 |
+
|
1016 |
+
$JssorAnimator$.call(_SelfSlideshowProcessor, 0, _EndTime);
|
1017 |
+
|
1018 |
+
_SelfSlideshowProcessor.$OnPositionChange = function (oldPosition, newPosition) {
|
1019 |
+
if ((newPosition - _CurrentTime) > _SlideshowPerformance) {
|
1020 |
+
_CurrentTime = newPosition;
|
1021 |
+
|
1022 |
+
_SlideshowPlayerAbove && _SlideshowPlayerAbove.$ShowFrame(newPosition);
|
1023 |
+
_SlideshowPlayerBelow && _SlideshowPlayerBelow.$ShowFrame(newPosition);
|
1024 |
+
}
|
1025 |
+
};
|
1026 |
+
|
1027 |
+
_SelfSlideshowProcessor.$Transition = _SlideshowTransition;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
//member functions
|
1031 |
+
_SelfSlideshowRunner.$GetTransition = function (slideCount) {
|
1032 |
+
var n = 0;
|
1033 |
+
|
1034 |
+
var transitions = slideshowOptions.$Transitions;
|
1035 |
+
|
1036 |
+
var transitionCount = transitions.length;
|
1037 |
+
|
1038 |
+
if (_TransitionsOrder) { /*Sequence*/
|
1039 |
+
//if (transitionCount > slideCount && ($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserSafari() || $Jssor$.$IsBrowserFireFox())) {
|
1040 |
+
// transitionCount -= transitionCount % slideCount;
|
1041 |
+
//}
|
1042 |
+
n = _TransitionIndex++ % transitionCount;
|
1043 |
+
}
|
1044 |
+
else { /*Random*/
|
1045 |
+
n = Math.floor(Math.random() * transitionCount);
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
transitions[n] && (transitions[n].$Index = n);
|
1049 |
+
|
1050 |
+
return transitions[n];
|
1051 |
+
};
|
1052 |
+
|
1053 |
+
_SelfSlideshowRunner.$Initialize = function (slideIndex, prevIndex, slideItem, prevItem, slideshowTransition) {
|
1054 |
+
$JssorDebug$.$Execute(function () {
|
1055 |
+
if (_SlideshowPlayerBelow) {
|
1056 |
+
$JssorDebug$.$Fail("slideshow runner has not been cleared.");
|
1057 |
+
}
|
1058 |
+
});
|
1059 |
+
|
1060 |
+
_SlideshowTransition = slideshowTransition;
|
1061 |
+
|
1062 |
+
slideshowTransition = EnsureTransitionInstance(slideshowTransition, _SlideshowPerformance);
|
1063 |
+
|
1064 |
+
_SlideItem = slideItem;
|
1065 |
+
_PrevItem = prevItem;
|
1066 |
+
|
1067 |
+
var prevSlideElement = prevItem.$Item;
|
1068 |
+
var currentSlideElement = slideItem.$Item;
|
1069 |
+
prevSlideElement["no-image"] = !prevItem.$Image;
|
1070 |
+
currentSlideElement["no-image"] = !slideItem.$Image;
|
1071 |
+
|
1072 |
+
var slideElementAbove = prevSlideElement;
|
1073 |
+
var slideElementBelow = currentSlideElement;
|
1074 |
+
|
1075 |
+
var slideTransitionAbove = slideshowTransition;
|
1076 |
+
var slideTransitionBelow = slideshowTransition.$Brother || EnsureTransitionInstance({}, _SlideshowPerformance);
|
1077 |
+
|
1078 |
+
if (!slideshowTransition.$SlideOut) {
|
1079 |
+
slideElementAbove = currentSlideElement;
|
1080 |
+
slideElementBelow = prevSlideElement;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
var shift = slideTransitionBelow.$Shift || 0;
|
1084 |
+
|
1085 |
+
_SlideshowPlayerBelow = new JssorSlideshowPlayer(slideContainer, slideElementBelow, slideTransitionBelow, Math.max(shift - slideTransitionBelow.$Interval, 0), slideContainerWidth, slideContainerHeight);
|
1086 |
+
_SlideshowPlayerAbove = new JssorSlideshowPlayer(slideContainer, slideElementAbove, slideTransitionAbove, Math.max(slideTransitionBelow.$Interval - shift, 0), slideContainerWidth, slideContainerHeight);
|
1087 |
+
|
1088 |
+
_SlideshowPlayerBelow.$ShowFrame(0);
|
1089 |
+
_SlideshowPlayerAbove.$ShowFrame(0);
|
1090 |
+
|
1091 |
+
_EndTime = Math.max(_SlideshowPlayerBelow.$EndTime, _SlideshowPlayerAbove.$EndTime);
|
1092 |
+
|
1093 |
+
_SelfSlideshowRunner.$Index = slideIndex;
|
1094 |
+
};
|
1095 |
+
|
1096 |
+
_SelfSlideshowRunner.$Clear = function () {
|
1097 |
+
slideContainer.$Clear();
|
1098 |
+
_SlideshowPlayerBelow = null;
|
1099 |
+
_SlideshowPlayerAbove = null;
|
1100 |
+
};
|
1101 |
+
|
1102 |
+
_SelfSlideshowRunner.$GetProcessor = function () {
|
1103 |
+
var slideshowProcessor = null;
|
1104 |
+
|
1105 |
+
if (_SlideshowPlayerAbove)
|
1106 |
+
slideshowProcessor = new SlideshowProcessor();
|
1107 |
+
|
1108 |
+
return slideshowProcessor;
|
1109 |
+
};
|
1110 |
+
|
1111 |
+
//Constructor
|
1112 |
+
{
|
1113 |
+
if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera() || (handleTouchEventOnly && $Jssor$.$WebKitVersion() < 537)) {
|
1114 |
+
_SlideshowPerformance = 16;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
$JssorObject$.call(_SelfSlideshowRunner);
|
1118 |
+
$JssorAnimator$.call(_SelfSlideshowRunner, -10000000, 10000000);
|
1119 |
+
|
1120 |
+
$JssorDebug$.$LiveStamp(_SelfSlideshowRunner, "slideshow_runner_" + _SlideshowRunnerCount++);
|
1121 |
+
}
|
1122 |
+
};
|
1123 |
+
//JssorSlideshowRunner--------
|
1124 |
+
|
1125 |
+
//JssorSlider
|
1126 |
+
function JssorSlider(elmt, options) {
|
1127 |
+
var _SelfSlider = this;
|
1128 |
+
|
1129 |
+
//private classes
|
1130 |
+
function Conveyor() {
|
1131 |
+
var _SelfConveyor = this;
|
1132 |
+
$JssorAnimator$.call(_SelfConveyor, -100000000, 200000000);
|
1133 |
+
|
1134 |
+
_SelfConveyor.$GetCurrentSlideInfo = function () {
|
1135 |
+
var positionDisplay = _SelfConveyor.$GetPosition_Display();
|
1136 |
+
var virtualIndex = Math.floor(positionDisplay);
|
1137 |
+
var slideIndex = GetRealIndex(virtualIndex);
|
1138 |
+
var slidePosition = positionDisplay - Math.floor(positionDisplay);
|
1139 |
+
|
1140 |
+
return { $Index: slideIndex, $VirtualIndex: virtualIndex, $Position: slidePosition };
|
1141 |
+
};
|
1142 |
+
|
1143 |
+
_SelfConveyor.$OnPositionChange = function (oldPosition, newPosition) {
|
1144 |
+
|
1145 |
+
var index = Math.floor(newPosition);
|
1146 |
+
if (index != newPosition && newPosition > oldPosition)
|
1147 |
+
index++;
|
1148 |
+
|
1149 |
+
ResetNavigator(index, true);
|
1150 |
+
|
1151 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_POSITION_CHANGE, GetRealIndex(newPosition), GetRealIndex(oldPosition), newPosition, oldPosition);
|
1152 |
+
};
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
//Carousel
|
1156 |
+
function Carousel() {
|
1157 |
+
var _SelfCarousel = this;
|
1158 |
+
|
1159 |
+
$JssorAnimator$.call(_SelfCarousel, 0, 0, { $LoopLength: _SlideCount });
|
1160 |
+
|
1161 |
+
//Carousel Constructor
|
1162 |
+
{
|
1163 |
+
$Jssor$.$Each(_SlideItems, function (slideItem) {
|
1164 |
+
(_Loop & 1) && slideItem.$SetLoopLength(_SlideCount);
|
1165 |
+
_SelfCarousel.$Chain(slideItem);
|
1166 |
+
slideItem.$Shift(_ParkingPosition / _StepLength);
|
1167 |
+
});
|
1168 |
+
}
|
1169 |
+
}
|
1170 |
+
//Carousel
|
1171 |
+
|
1172 |
+
//Slideshow
|
1173 |
+
function Slideshow() {
|
1174 |
+
var _SelfSlideshow = this;
|
1175 |
+
var _Wrapper = _SlideContainer.$Elmt;
|
1176 |
+
|
1177 |
+
$JssorAnimator$.call(_SelfSlideshow, -1, 2, { $Easing: $JssorEasing$.$EaseLinear, $Setter: { $Position: SetPosition }, $LoopLength: _SlideCount }, _Wrapper, { $Position: 1 }, { $Position: -1 });
|
1178 |
+
|
1179 |
+
_SelfSlideshow.$Wrapper = _Wrapper;
|
1180 |
+
|
1181 |
+
//Slideshow Constructor
|
1182 |
+
{
|
1183 |
+
$JssorDebug$.$Execute(function () {
|
1184 |
+
$Jssor$.$Attribute(_SlideContainer.$Elmt, "debug-id", "slide_container");
|
1185 |
+
});
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
//Slideshow
|
1189 |
+
|
1190 |
+
//CarouselPlayer
|
1191 |
+
function CarouselPlayer(carousel, slideshow) {
|
1192 |
+
var _SelfCarouselPlayer = this;
|
1193 |
+
var _FromPosition;
|
1194 |
+
var _ToPosition;
|
1195 |
+
var _Duration;
|
1196 |
+
var _StandBy;
|
1197 |
+
var _StandByPosition;
|
1198 |
+
|
1199 |
+
$JssorAnimator$.call(_SelfCarouselPlayer, -100000000, 200000000, { $IntervalMax: 100 });
|
1200 |
+
|
1201 |
+
_SelfCarouselPlayer.$OnStart = function () {
|
1202 |
+
_IsSliding = true;
|
1203 |
+
_LoadingTicket = null;
|
1204 |
+
|
1205 |
+
//EVT_SWIPE_START
|
1206 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_SWIPE_START, GetRealIndex(_Conveyor.$GetPosition()), _Conveyor.$GetPosition());
|
1207 |
+
};
|
1208 |
+
|
1209 |
+
_SelfCarouselPlayer.$OnStop = function () {
|
1210 |
+
|
1211 |
+
_IsSliding = false;
|
1212 |
+
_StandBy = false;
|
1213 |
+
|
1214 |
+
var currentSlideInfo = _Conveyor.$GetCurrentSlideInfo();
|
1215 |
+
|
1216 |
+
//EVT_SWIPE_END
|
1217 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_SWIPE_END, GetRealIndex(_Conveyor.$GetPosition()), _Conveyor.$GetPosition());
|
1218 |
+
|
1219 |
+
if (!currentSlideInfo.$Position) {
|
1220 |
+
OnPark(currentSlideInfo.$VirtualIndex, _CurrentSlideIndex);
|
1221 |
+
}
|
1222 |
+
};
|
1223 |
+
|
1224 |
+
_SelfCarouselPlayer.$OnPositionChange = function (oldPosition, newPosition) {
|
1225 |
+
|
1226 |
+
var toPosition;
|
1227 |
+
|
1228 |
+
if (_StandBy)
|
1229 |
+
toPosition = _StandByPosition;
|
1230 |
+
else {
|
1231 |
+
toPosition = _ToPosition;
|
1232 |
+
|
1233 |
+
if (_Duration) {
|
1234 |
+
var interPosition = newPosition / _Duration;
|
1235 |
+
//if ($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserFireFox()) {
|
1236 |
+
// Math.round(interPosition * 8 / _Duration) / 8 * _Duration;
|
1237 |
+
|
1238 |
+
// if ($Jssor$.$BrowserVersion() < 38)
|
1239 |
+
// interPosition = parseFloat(interPosition.toFixed(4));
|
1240 |
+
//}
|
1241 |
+
toPosition = _Options.$SlideEasing(interPosition) * (_ToPosition - _FromPosition) + _FromPosition;
|
1242 |
+
}
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
_Conveyor.$GoToPosition(toPosition);
|
1246 |
+
};
|
1247 |
+
|
1248 |
+
_SelfCarouselPlayer.$PlayCarousel = function (fromPosition, toPosition, duration, callback) {
|
1249 |
+
$JssorDebug$.$Execute(function () {
|
1250 |
+
if (_SelfCarouselPlayer.$IsPlaying())
|
1251 |
+
$JssorDebug$.$Fail("The carousel is already playing.");
|
1252 |
+
});
|
1253 |
+
|
1254 |
+
_FromPosition = fromPosition;
|
1255 |
+
_ToPosition = toPosition;
|
1256 |
+
_Duration = duration;
|
1257 |
+
|
1258 |
+
_Conveyor.$GoToPosition(fromPosition);
|
1259 |
+
_SelfCarouselPlayer.$GoToPosition(0);
|
1260 |
+
|
1261 |
+
_SelfCarouselPlayer.$PlayToPosition(duration, callback);
|
1262 |
+
};
|
1263 |
+
|
1264 |
+
_SelfCarouselPlayer.$StandBy = function (standByPosition) {
|
1265 |
+
_StandBy = true;
|
1266 |
+
_StandByPosition = standByPosition;
|
1267 |
+
_SelfCarouselPlayer.$Play(standByPosition, null, true);
|
1268 |
+
};
|
1269 |
+
|
1270 |
+
_SelfCarouselPlayer.$SetStandByPosition = function (standByPosition) {
|
1271 |
+
_StandByPosition = standByPosition;
|
1272 |
+
};
|
1273 |
+
|
1274 |
+
_SelfCarouselPlayer.$MoveCarouselTo = function (position) {
|
1275 |
+
_Conveyor.$GoToPosition(position);
|
1276 |
+
};
|
1277 |
+
|
1278 |
+
//CarouselPlayer Constructor
|
1279 |
+
{
|
1280 |
+
_Conveyor = new Conveyor();
|
1281 |
+
|
1282 |
+
_Conveyor.$Combine(carousel);
|
1283 |
+
_Conveyor.$Combine(slideshow);
|
1284 |
+
}
|
1285 |
+
}
|
1286 |
+
//CarouselPlayer
|
1287 |
+
|
1288 |
+
//SlideContainer
|
1289 |
+
function SlideContainer() {
|
1290 |
+
var _Self = this;
|
1291 |
+
var elmt = CreatePanel();
|
1292 |
+
|
1293 |
+
$Jssor$.$CssZIndex(elmt, 0);
|
1294 |
+
$Jssor$.$Css(elmt, "pointerEvents", "none");
|
1295 |
+
|
1296 |
+
_Self.$Elmt = elmt;
|
1297 |
+
|
1298 |
+
_Self.$AddClipElement = function (clipElement) {
|
1299 |
+
$Jssor$.$AppendChild(elmt, clipElement);
|
1300 |
+
$Jssor$.$ShowElement(elmt);
|
1301 |
+
};
|
1302 |
+
|
1303 |
+
_Self.$Clear = function () {
|
1304 |
+
$Jssor$.$HideElement(elmt);
|
1305 |
+
$Jssor$.$ClearInnerHtml(elmt);
|
1306 |
+
};
|
1307 |
+
}
|
1308 |
+
//SlideContainer
|
1309 |
+
|
1310 |
+
//SlideItem
|
1311 |
+
function SlideItem(slideElmt, slideIndex) {
|
1312 |
+
|
1313 |
+
var _SelfSlideItem = this;
|
1314 |
+
|
1315 |
+
var _CaptionSliderIn;
|
1316 |
+
var _CaptionSliderOut;
|
1317 |
+
var _CaptionSliderCurrent;
|
1318 |
+
var _IsCaptionSliderPlayingWhenDragStart;
|
1319 |
+
|
1320 |
+
var _Wrapper;
|
1321 |
+
var _BaseElement = slideElmt;
|
1322 |
+
|
1323 |
+
var _LoadingScreen;
|
1324 |
+
|
1325 |
+
var _ImageItem;
|
1326 |
+
var _ImageElmts = [];
|
1327 |
+
var _LinkItemOrigin;
|
1328 |
+
var _LinkItem;
|
1329 |
+
var _ImageLoading;
|
1330 |
+
var _ImageLoaded;
|
1331 |
+
var _ImageLazyLoading;
|
1332 |
+
var _ContentRefreshed;
|
1333 |
+
|
1334 |
+
var _Processor;
|
1335 |
+
|
1336 |
+
var _PlayerInstanceElement;
|
1337 |
+
var _PlayerInstance;
|
1338 |
+
|
1339 |
+
var _SequenceNumber; //for debug only
|
1340 |
+
|
1341 |
+
$JssorAnimator$.call(_SelfSlideItem, -_DisplayPieces, _DisplayPieces + 1, { $SlideItemAnimator: true });
|
1342 |
+
|
1343 |
+
function ResetCaptionSlider(fresh) {
|
1344 |
+
_CaptionSliderOut && _CaptionSliderOut.$Revert();
|
1345 |
+
_CaptionSliderIn && _CaptionSliderIn.$Revert();
|
1346 |
+
|
1347 |
+
RefreshContent(slideElmt, fresh);
|
1348 |
+
_ContentRefreshed = true;
|
1349 |
+
|
1350 |
+
_CaptionSliderIn = new _CaptionSliderOptions.$Class(slideElmt, _CaptionSliderOptions, 1);
|
1351 |
+
$JssorDebug$.$LiveStamp(_CaptionSliderIn, "caption_slider_" + _CaptionSliderCount + "_in");
|
1352 |
+
_CaptionSliderOut = new _CaptionSliderOptions.$Class(slideElmt, _CaptionSliderOptions);
|
1353 |
+
$JssorDebug$.$LiveStamp(_CaptionSliderOut, "caption_slider_" + _CaptionSliderCount + "_out");
|
1354 |
+
|
1355 |
+
$JssorDebug$.$Execute(function () {
|
1356 |
+
_CaptionSliderCount++;
|
1357 |
+
});
|
1358 |
+
|
1359 |
+
_CaptionSliderOut.$GoToBegin();
|
1360 |
+
_CaptionSliderIn.$GoToBegin();
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
function EnsureCaptionSliderVersion() {
|
1364 |
+
if (_CaptionSliderIn.$Version < _CaptionSliderOptions.$Version) {
|
1365 |
+
ResetCaptionSlider();
|
1366 |
+
}
|
1367 |
+
}
|
1368 |
+
|
1369 |
+
//event handling begin
|
1370 |
+
function LoadImageCompleteEventHandler(completeCallback, loadingScreen, image) {
|
1371 |
+
if (!_ImageLoaded) {
|
1372 |
+
_ImageLoaded = true;
|
1373 |
+
|
1374 |
+
if (_ImageItem && image) {
|
1375 |
+
var imageWidth = image.width;
|
1376 |
+
var imageHeight = image.height;
|
1377 |
+
var fillWidth = imageWidth;
|
1378 |
+
var fillHeight = imageHeight;
|
1379 |
+
|
1380 |
+
if (imageWidth && imageHeight && _Options.$FillMode) {
|
1381 |
+
|
1382 |
+
//0 stretch, 1 contain (keep aspect ratio and put all inside slide), 2 cover (keep aspect ratio and cover whole slide), 4 actual size, 5 contain for large image, actual size for small image, default value is 0
|
1383 |
+
if (_Options.$FillMode & 3 && (!(_Options.$FillMode & 4) || imageWidth > _SlideWidth || imageHeight > _SlideHeight)) {
|
1384 |
+
var fitHeight = false;
|
1385 |
+
var ratio = _SlideWidth / _SlideHeight * imageHeight / imageWidth;
|
1386 |
+
|
1387 |
+
if (_Options.$FillMode & 1) {
|
1388 |
+
fitHeight = (ratio > 1);
|
1389 |
+
}
|
1390 |
+
else if (_Options.$FillMode & 2) {
|
1391 |
+
fitHeight = (ratio < 1);
|
1392 |
+
}
|
1393 |
+
fillWidth = fitHeight ? imageWidth * _SlideHeight / imageHeight : _SlideWidth;
|
1394 |
+
fillHeight = fitHeight ? _SlideHeight : imageHeight * _SlideWidth / imageWidth;
|
1395 |
+
}
|
1396 |
+
|
1397 |
+
$Jssor$.$CssWidth(_ImageItem, fillWidth);
|
1398 |
+
$Jssor$.$CssHeight(_ImageItem, fillHeight);
|
1399 |
+
$Jssor$.$CssTop(_ImageItem, (_SlideHeight - fillHeight) / 2);
|
1400 |
+
$Jssor$.$CssLeft(_ImageItem, (_SlideWidth - fillWidth) / 2);
|
1401 |
+
}
|
1402 |
+
|
1403 |
+
$Jssor$.$CssPosition(_ImageItem, "absolute");
|
1404 |
+
|
1405 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_LOAD_END, slideItem);
|
1406 |
+
}
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
$Jssor$.$HideElement(loadingScreen);
|
1410 |
+
completeCallback && completeCallback(_SelfSlideItem);
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
function LoadSlideshowImageCompleteEventHandler(nextIndex, nextItem, slideshowTransition, loadingTicket) {
|
1414 |
+
if (loadingTicket == _LoadingTicket && _CurrentSlideIndex == slideIndex && _AutoPlay) {
|
1415 |
+
if (!_Frozen) {
|
1416 |
+
var nextRealIndex = GetRealIndex(nextIndex);
|
1417 |
+
_SlideshowRunner.$Initialize(nextRealIndex, slideIndex, nextItem, _SelfSlideItem, slideshowTransition);
|
1418 |
+
nextItem.$HideContentForSlideshow();
|
1419 |
+
_Slideshow.$Locate(nextRealIndex, 1);
|
1420 |
+
_Slideshow.$GoToPosition(nextRealIndex);
|
1421 |
+
_CarouselPlayer.$PlayCarousel(nextIndex, nextIndex, 0);
|
1422 |
+
}
|
1423 |
+
}
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
function SlideReadyEventHandler(loadingTicket) {
|
1427 |
+
if (loadingTicket == _LoadingTicket && _CurrentSlideIndex == slideIndex) {
|
1428 |
+
|
1429 |
+
if (!_Processor) {
|
1430 |
+
var slideshowProcessor = null;
|
1431 |
+
if (_SlideshowRunner) {
|
1432 |
+
if (_SlideshowRunner.$Index == slideIndex)
|
1433 |
+
slideshowProcessor = _SlideshowRunner.$GetProcessor();
|
1434 |
+
else
|
1435 |
+
_SlideshowRunner.$Clear();
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
EnsureCaptionSliderVersion();
|
1439 |
+
|
1440 |
+
_Processor = new Processor(slideElmt, slideIndex, slideshowProcessor, _SelfSlideItem.$GetCaptionSliderIn(), _SelfSlideItem.$GetCaptionSliderOut());
|
1441 |
+
_Processor.$SetPlayer(_PlayerInstance);
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
!_Processor.$IsPlaying() && _Processor.$Replay();
|
1445 |
+
}
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
function ParkEventHandler(currentIndex, previousIndex, manualActivate) {
|
1449 |
+
if (currentIndex == slideIndex) {
|
1450 |
+
|
1451 |
+
if (currentIndex != previousIndex)
|
1452 |
+
_SlideItems[previousIndex] && _SlideItems[previousIndex].$ParkOut();
|
1453 |
+
else
|
1454 |
+
!manualActivate && _Processor && _Processor.$AdjustIdleOnPark();
|
1455 |
+
|
1456 |
+
_PlayerInstance && _PlayerInstance.$Enable();
|
1457 |
+
|
1458 |
+
//park in
|
1459 |
+
var loadingTicket = _LoadingTicket = $Jssor$.$GetNow();
|
1460 |
+
_SelfSlideItem.$LoadImage($Jssor$.$CreateCallback(null, SlideReadyEventHandler, loadingTicket));
|
1461 |
+
}
|
1462 |
+
else {
|
1463 |
+
var distance = Math.abs(slideIndex - currentIndex);
|
1464 |
+
var loadRange = _DisplayPieces + _Options.$LazyLoading;
|
1465 |
+
if (!_ImageLazyLoading || distance <= loadRange || _SlideCount - distance <= loadRange) {
|
1466 |
+
_SelfSlideItem.$LoadImage();
|
1467 |
+
}
|
1468 |
+
}
|
1469 |
+
}
|
1470 |
+
|
1471 |
+
function SwipeStartEventHandler() {
|
1472 |
+
if (_CurrentSlideIndex == slideIndex && _Processor) {
|
1473 |
+
_Processor.$Stop();
|
1474 |
+
_PlayerInstance && _PlayerInstance.$Quit();
|
1475 |
+
_PlayerInstance && _PlayerInstance.$Disable();
|
1476 |
+
_Processor.$OpenSlideshowPanel();
|
1477 |
+
}
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
function FreezeEventHandler() {
|
1481 |
+
if (_CurrentSlideIndex == slideIndex && _Processor) {
|
1482 |
+
_Processor.$Stop();
|
1483 |
+
}
|
1484 |
+
}
|
1485 |
+
|
1486 |
+
function LinkClickEventHandler(event) {
|
1487 |
+
if (_LastDragSucceded) {
|
1488 |
+
$Jssor$.$CancelEvent(event);
|
1489 |
+
}
|
1490 |
+
else {
|
1491 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_CLICK, slideIndex, event);
|
1492 |
+
}
|
1493 |
+
}
|
1494 |
+
|
1495 |
+
function PlayerAvailableEventHandler() {
|
1496 |
+
_PlayerInstance = _PlayerInstanceElement.pInstance;
|
1497 |
+
_Processor && _Processor.$SetPlayer(_PlayerInstance);
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
_SelfSlideItem.$LoadImage = function (completeCallback, loadingScreen) {
|
1501 |
+
loadingScreen = loadingScreen || _LoadingScreen;
|
1502 |
+
|
1503 |
+
if (_ImageElmts.length && !_ImageLoaded) {
|
1504 |
+
|
1505 |
+
$Jssor$.$ShowElement(loadingScreen);
|
1506 |
+
|
1507 |
+
if (!_ImageLoading) {
|
1508 |
+
_ImageLoading = true;
|
1509 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_LOAD_START);
|
1510 |
+
|
1511 |
+
$Jssor$.$Each(_ImageElmts, function (imageElmt) {
|
1512 |
+
|
1513 |
+
if (!imageElmt.src) {
|
1514 |
+
imageElmt.src = $Jssor$.$AttributeEx(imageElmt, "src2");
|
1515 |
+
$Jssor$.$CssDisplay(imageElmt, imageElmt["display-origin"]);
|
1516 |
+
}
|
1517 |
+
});
|
1518 |
+
}
|
1519 |
+
$Jssor$.$LoadImages(_ImageElmts, _ImageItem, $Jssor$.$CreateCallback(null, LoadImageCompleteEventHandler, completeCallback, loadingScreen));
|
1520 |
+
}
|
1521 |
+
else {
|
1522 |
+
LoadImageCompleteEventHandler(completeCallback, loadingScreen);
|
1523 |
+
}
|
1524 |
+
};
|
1525 |
+
|
1526 |
+
_SelfSlideItem.$GoForNextSlide = function () {
|
1527 |
+
if (_SlideshowRunner) {
|
1528 |
+
var slideshowTransition = _SlideshowRunner.$GetTransition(_SlideCount);
|
1529 |
+
|
1530 |
+
if (slideshowTransition) {
|
1531 |
+
var loadingTicket = _LoadingTicket = $Jssor$.$GetNow();
|
1532 |
+
|
1533 |
+
var nextIndex = slideIndex + _PlayReverse;
|
1534 |
+
var nextItem = _SlideItems[GetRealIndex(nextIndex)];
|
1535 |
+
return nextItem.$LoadImage($Jssor$.$CreateCallback(null, LoadSlideshowImageCompleteEventHandler, nextIndex, nextItem, slideshowTransition, loadingTicket), _LoadingScreen);
|
1536 |
+
}
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
PlayTo(_CurrentSlideIndex + _Options.$AutoPlaySteps * _PlayReverse);
|
1540 |
+
};
|
1541 |
+
|
1542 |
+
_SelfSlideItem.$TryActivate = function () {
|
1543 |
+
ParkEventHandler(slideIndex, slideIndex, true);
|
1544 |
+
};
|
1545 |
+
|
1546 |
+
_SelfSlideItem.$ParkOut = function () {
|
1547 |
+
//park out
|
1548 |
+
_PlayerInstance && _PlayerInstance.$Quit();
|
1549 |
+
_PlayerInstance && _PlayerInstance.$Disable();
|
1550 |
+
_SelfSlideItem.$UnhideContentForSlideshow();
|
1551 |
+
_Processor && _Processor.$Abort();
|
1552 |
+
_Processor = null;
|
1553 |
+
ResetCaptionSlider();
|
1554 |
+
};
|
1555 |
+
|
1556 |
+
//for debug only
|
1557 |
+
_SelfSlideItem.$StampSlideItemElements = function (stamp) {
|
1558 |
+
stamp = _SequenceNumber + "_" + stamp;
|
1559 |
+
|
1560 |
+
$JssorDebug$.$Execute(function () {
|
1561 |
+
if (_ImageItem)
|
1562 |
+
$Jssor$.$Attribute(_ImageItem, "debug-id", stamp + "_slide_item_image_id");
|
1563 |
+
|
1564 |
+
$Jssor$.$Attribute(slideElmt, "debug-id", stamp + "_slide_item_item_id");
|
1565 |
+
});
|
1566 |
+
|
1567 |
+
$JssorDebug$.$Execute(function () {
|
1568 |
+
$Jssor$.$Attribute(_Wrapper, "debug-id", stamp + "_slide_item_wrapper_id");
|
1569 |
+
});
|
1570 |
+
|
1571 |
+
$JssorDebug$.$Execute(function () {
|
1572 |
+
$Jssor$.$Attribute(_LoadingScreen, "debug-id", stamp + "_loading_container_id");
|
1573 |
+
});
|
1574 |
+
};
|
1575 |
+
|
1576 |
+
_SelfSlideItem.$HideContentForSlideshow = function () {
|
1577 |
+
$Jssor$.$HideElement(slideElmt);
|
1578 |
+
};
|
1579 |
+
|
1580 |
+
_SelfSlideItem.$UnhideContentForSlideshow = function () {
|
1581 |
+
$Jssor$.$ShowElement(slideElmt);
|
1582 |
+
};
|
1583 |
+
|
1584 |
+
_SelfSlideItem.$EnablePlayer = function () {
|
1585 |
+
_PlayerInstance && _PlayerInstance.$Enable();
|
1586 |
+
};
|
1587 |
+
|
1588 |
+
function RefreshContent(elmt, fresh, level) {
|
1589 |
+
if (elmt["jssor-slider"])
|
1590 |
+
return;
|
1591 |
+
|
1592 |
+
level = level || 0;
|
1593 |
+
|
1594 |
+
if (!_ContentRefreshed) {
|
1595 |
+
if (elmt.tagName == "IMG") {
|
1596 |
+
_ImageElmts.push(elmt);
|
1597 |
+
|
1598 |
+
if (!elmt.src) {
|
1599 |
+
_ImageLazyLoading = true;
|
1600 |
+
elmt["display-origin"] = $Jssor$.$CssDisplay(elmt);
|
1601 |
+
$Jssor$.$HideElement(elmt);
|
1602 |
+
}
|
1603 |
+
}
|
1604 |
+
if ($Jssor$.$IsBrowserIe9Earlier()) {
|
1605 |
+
$Jssor$.$CssZIndex(elmt, ($Jssor$.$CssZIndex(elmt) || 0) + 1);
|
1606 |
+
}
|
1607 |
+
if (_Options.$HWA && $Jssor$.$WebKitVersion()) {
|
1608 |
+
if (!_IsTouchDevice || $Jssor$.$WebKitVersion() < 534 || (!_SlideshowEnabled && !$Jssor$.$IsBrowserChrome())) {
|
1609 |
+
$Jssor$.$EnableHWA(elmt);
|
1610 |
+
}
|
1611 |
+
}
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
var childElements = $Jssor$.$Children(elmt);
|
1615 |
+
|
1616 |
+
$Jssor$.$Each(childElements, function (childElement, i) {
|
1617 |
+
|
1618 |
+
var uAttribute = $Jssor$.$AttributeEx(childElement, "u");
|
1619 |
+
if (uAttribute == "player" && !_PlayerInstanceElement) {
|
1620 |
+
_PlayerInstanceElement = childElement;
|
1621 |
+
if (_PlayerInstanceElement.pInstance) {
|
1622 |
+
PlayerAvailableEventHandler();
|
1623 |
+
}
|
1624 |
+
else {
|
1625 |
+
$Jssor$.$AddEvent(_PlayerInstanceElement, "dataavailable", PlayerAvailableEventHandler);
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
if (uAttribute == "caption") {
|
1630 |
+
if (!$Jssor$.$IsBrowserIE() && !fresh) {
|
1631 |
+
var captionElement = $Jssor$.$CloneNode(childElement);
|
1632 |
+
$Jssor$.$InsertBefore(elmt, captionElement, childElement);
|
1633 |
+
$Jssor$.$RemoveChild(elmt, childElement);
|
1634 |
+
childElement = captionElement;
|
1635 |
+
|
1636 |
+
fresh = true;
|
1637 |
+
}
|
1638 |
+
}
|
1639 |
+
else if (!_ContentRefreshed && !level && !_ImageItem && $Jssor$.$AttributeEx(childElement, "u") == "image") {
|
1640 |
+
_ImageItem = childElement;
|
1641 |
+
|
1642 |
+
if (_ImageItem) {
|
1643 |
+
if (_ImageItem.tagName == "A") {
|
1644 |
+
_LinkItemOrigin = _ImageItem;
|
1645 |
+
$Jssor$.$SetStyles(_LinkItemOrigin, _StyleDef);
|
1646 |
+
|
1647 |
+
_LinkItem = $Jssor$.$CloneNode(_ImageItem, true);
|
1648 |
+
//cancel click event on <A> element when a drag of slide succeeded
|
1649 |
+
$Jssor$.$AddEvent(_LinkItem, "click", LinkClickEventHandler);
|
1650 |
+
|
1651 |
+
$Jssor$.$SetStyles(_LinkItem, _StyleDef);
|
1652 |
+
$Jssor$.$CssDisplay(_LinkItem, "block");
|
1653 |
+
$Jssor$.$CssOpacity(_LinkItem, 0);
|
1654 |
+
$Jssor$.$Css(_LinkItem, "backgroundColor", "#000");
|
1655 |
+
|
1656 |
+
_ImageItem = $Jssor$.$FindChildByTag(_ImageItem, "IMG");
|
1657 |
+
|
1658 |
+
$JssorDebug$.$Execute(function () {
|
1659 |
+
if (!_ImageItem) {
|
1660 |
+
$JssorDebug$.$Error("slide html code definition error, no 'IMG' found in a 'image with link' slide.\r\n" + elmt.outerHTML);
|
1661 |
+
}
|
1662 |
+
});
|
1663 |
+
}
|
1664 |
+
_ImageItem.border = 0;
|
1665 |
+
|
1666 |
+
$Jssor$.$SetStyles(_ImageItem, _StyleDef);
|
1667 |
+
}
|
1668 |
+
}
|
1669 |
+
|
1670 |
+
RefreshContent(childElement, fresh, level + 1);
|
1671 |
+
});
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
_SelfSlideItem.$OnInnerOffsetChange = function (oldOffset, newOffset) {
|
1675 |
+
var slidePosition = _DisplayPieces - newOffset;
|
1676 |
+
|
1677 |
+
SetPosition(_Wrapper, slidePosition);
|
1678 |
+
|
1679 |
+
//following lines are for future usage, not ready yet
|
1680 |
+
//if (!_IsDragging || !_IsCaptionSliderPlayingWhenDragStart) {
|
1681 |
+
// var _DealWithParallax;
|
1682 |
+
// if (IsCurrentSlideIndex(slideIndex)) {
|
1683 |
+
// if (_CaptionSliderOptions.$PlayOutMode == 2)
|
1684 |
+
// _DealWithParallax = true;
|
1685 |
+
// }
|
1686 |
+
// else {
|
1687 |
+
// if (!_CaptionSliderOptions.$PlayInMode) {
|
1688 |
+
// //PlayInMode: 0 none
|
1689 |
+
// _CaptionSliderIn.$GoToEnd();
|
1690 |
+
// }
|
1691 |
+
// //else if (_CaptionSliderOptions.$PlayInMode == 1) {
|
1692 |
+
// // //PlayInMode: 1 chain
|
1693 |
+
// // _CaptionSliderIn.$GoToBegin();
|
1694 |
+
// //}
|
1695 |
+
// else if (_CaptionSliderOptions.$PlayInMode == 2) {
|
1696 |
+
// //PlayInMode: 2 parallel
|
1697 |
+
// _DealWithParallax = true;
|
1698 |
+
// }
|
1699 |
+
// }
|
1700 |
+
|
1701 |
+
// if (_DealWithParallax) {
|
1702 |
+
// _CaptionSliderIn.$GoToPosition((_CaptionSliderIn.$GetPosition_OuterEnd() - _CaptionSliderIn.$GetPosition_OuterBegin()) * Math.abs(newOffset - 1) * .8 + _CaptionSliderIn.$GetPosition_OuterBegin());
|
1703 |
+
// }
|
1704 |
+
//}
|
1705 |
+
};
|
1706 |
+
|
1707 |
+
_SelfSlideItem.$GetCaptionSliderIn = function () {
|
1708 |
+
return _CaptionSliderIn;
|
1709 |
+
};
|
1710 |
+
|
1711 |
+
_SelfSlideItem.$GetCaptionSliderOut = function () {
|
1712 |
+
return _CaptionSliderOut;
|
1713 |
+
};
|
1714 |
+
|
1715 |
+
_SelfSlideItem.$Index = slideIndex;
|
1716 |
+
|
1717 |
+
$JssorObject$.call(_SelfSlideItem);
|
1718 |
+
|
1719 |
+
//SlideItem Constructor
|
1720 |
+
{
|
1721 |
+
|
1722 |
+
var thumb = $Jssor$.$FindChild(slideElmt, "thumb", true);
|
1723 |
+
if (thumb) {
|
1724 |
+
_SelfSlideItem.$Thumb = $Jssor$.$CloneNode(thumb);
|
1725 |
+
$Jssor$.$RemoveAttribute(thumb, "id");
|
1726 |
+
$Jssor$.$HideElement(thumb);
|
1727 |
+
}
|
1728 |
+
$Jssor$.$ShowElement(slideElmt);
|
1729 |
+
|
1730 |
+
_LoadingScreen = $Jssor$.$CloneNode(_LoadingContainer);
|
1731 |
+
$Jssor$.$CssZIndex(_LoadingScreen, 1000);
|
1732 |
+
|
1733 |
+
//cancel click event on <A> element when a drag of slide succeeded
|
1734 |
+
$Jssor$.$AddEvent(slideElmt, "click", LinkClickEventHandler);
|
1735 |
+
|
1736 |
+
ResetCaptionSlider(true);
|
1737 |
+
|
1738 |
+
_SelfSlideItem.$Image = _ImageItem;
|
1739 |
+
_SelfSlideItem.$Link = _LinkItem;
|
1740 |
+
|
1741 |
+
_SelfSlideItem.$Item = slideElmt;
|
1742 |
+
|
1743 |
+
_SelfSlideItem.$Wrapper = _Wrapper = slideElmt;
|
1744 |
+
$Jssor$.$AppendChild(_Wrapper, _LoadingScreen);
|
1745 |
+
|
1746 |
+
_SelfSlider.$On(203, ParkEventHandler);
|
1747 |
+
_SelfSlider.$On(28, FreezeEventHandler);
|
1748 |
+
_SelfSlider.$On(24, SwipeStartEventHandler);
|
1749 |
+
|
1750 |
+
$JssorDebug$.$Execute(function () {
|
1751 |
+
_SequenceNumber = _SlideItemCreatedCount++;
|
1752 |
+
});
|
1753 |
+
|
1754 |
+
$JssorDebug$.$Execute(function () {
|
1755 |
+
$Jssor$.$Attribute(_Wrapper, "debug-id", "slide-" + slideIndex);
|
1756 |
+
});
|
1757 |
+
}
|
1758 |
+
}
|
1759 |
+
//SlideItem
|
1760 |
+
|
1761 |
+
//Processor
|
1762 |
+
function Processor(slideElmt, slideIndex, slideshowProcessor, captionSliderIn, captionSliderOut) {
|
1763 |
+
|
1764 |
+
var _SelfProcessor = this;
|
1765 |
+
|
1766 |
+
var _ProgressBegin = 0;
|
1767 |
+
var _SlideshowBegin = 0;
|
1768 |
+
var _SlideshowEnd;
|
1769 |
+
var _CaptionInBegin;
|
1770 |
+
var _IdleBegin;
|
1771 |
+
var _IdleEnd;
|
1772 |
+
var _ProgressEnd;
|
1773 |
+
|
1774 |
+
var _IsSlideshowRunning;
|
1775 |
+
var _IsRollingBack;
|
1776 |
+
|
1777 |
+
var _PlayerInstance;
|
1778 |
+
var _IsPlayerOnService;
|
1779 |
+
|
1780 |
+
var slideItem = _SlideItems[slideIndex];
|
1781 |
+
|
1782 |
+
$JssorAnimator$.call(_SelfProcessor, 0, 0);
|
1783 |
+
|
1784 |
+
function UpdateLink() {
|
1785 |
+
|
1786 |
+
$Jssor$.$ClearChildren(_LinkContainer);
|
1787 |
+
|
1788 |
+
if (_ShowLink && _IsSlideshowRunning && slideItem.$Link) {
|
1789 |
+
$Jssor$.$AppendChild(_LinkContainer, slideItem.$Link);
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
$Jssor$.$ShowElement(_LinkContainer, !_IsSlideshowRunning && slideItem.$Image);
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
function ProcessCompleteEventHandler() {
|
1796 |
+
|
1797 |
+
if (_IsRollingBack) {
|
1798 |
+
_IsRollingBack = false;
|
1799 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_ROLLBACK_END, slideIndex, _IdleEnd, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
|
1800 |
+
_SelfProcessor.$GoToPosition(_IdleBegin);
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
_SelfProcessor.$Replay();
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
function PlayerSwitchEventHandler(isOnService) {
|
1807 |
+
_IsPlayerOnService = isOnService;
|
1808 |
+
|
1809 |
+
_SelfProcessor.$Stop();
|
1810 |
+
_SelfProcessor.$Replay();
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
_SelfProcessor.$Replay = function () {
|
1814 |
+
|
1815 |
+
var currentPosition = _SelfProcessor.$GetPosition_Display();
|
1816 |
+
|
1817 |
+
if (!_IsDragging && !_IsSliding && !_IsPlayerOnService && _CurrentSlideIndex == slideIndex) {
|
1818 |
+
|
1819 |
+
if (!currentPosition) {
|
1820 |
+
if (_SlideshowEnd && !_IsSlideshowRunning) {
|
1821 |
+
_IsSlideshowRunning = true;
|
1822 |
+
|
1823 |
+
_SelfProcessor.$OpenSlideshowPanel(true);
|
1824 |
+
|
1825 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_SLIDESHOW_START, slideIndex, _ProgressBegin, _SlideshowBegin, _SlideshowEnd, _ProgressEnd);
|
1826 |
+
}
|
1827 |
+
|
1828 |
+
UpdateLink();
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
var toPosition;
|
1832 |
+
var stateEvent = JssorSlider.$EVT_STATE_CHANGE;
|
1833 |
+
|
1834 |
+
if (currentPosition != _ProgressEnd) {
|
1835 |
+
if (currentPosition == _IdleEnd) {
|
1836 |
+
toPosition = _ProgressEnd;
|
1837 |
+
}
|
1838 |
+
else if (currentPosition == _IdleBegin) {
|
1839 |
+
toPosition = _IdleEnd;
|
1840 |
+
}
|
1841 |
+
else if (!currentPosition) {
|
1842 |
+
toPosition = _IdleBegin;
|
1843 |
+
}
|
1844 |
+
else if (currentPosition > _IdleEnd) {
|
1845 |
+
_IsRollingBack = true;
|
1846 |
+
toPosition = _IdleEnd;
|
1847 |
+
stateEvent = JssorSlider.$EVT_ROLLBACK_START;
|
1848 |
+
}
|
1849 |
+
else {
|
1850 |
+
//continue from break (by drag or lock)
|
1851 |
+
toPosition = _SelfProcessor.$GetPlayToPosition();
|
1852 |
+
}
|
1853 |
+
}
|
1854 |
+
|
1855 |
+
//$JssorDebug$.$Execute(function () {
|
1856 |
+
// if (currentPosition == _ProgressEnd) {
|
1857 |
+
// debugger;
|
1858 |
+
// }
|
1859 |
+
//});
|
1860 |
+
|
1861 |
+
_SelfSlider.$TriggerEvent(stateEvent, slideIndex, currentPosition, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
|
1862 |
+
|
1863 |
+
var allowAutoPlay = _AutoPlay && (!_HoverToPause || _NotOnHover);
|
1864 |
+
|
1865 |
+
if (currentPosition == _ProgressEnd) {
|
1866 |
+
(_IdleEnd != _ProgressEnd && !(_HoverToPause & 12) || allowAutoPlay) && slideItem.$GoForNextSlide();
|
1867 |
+
}
|
1868 |
+
else if (allowAutoPlay || currentPosition != _IdleEnd) {
|
1869 |
+
_SelfProcessor.$PlayToPosition(toPosition, ProcessCompleteEventHandler);
|
1870 |
+
}
|
1871 |
+
}
|
1872 |
+
};
|
1873 |
+
|
1874 |
+
_SelfProcessor.$AdjustIdleOnPark = function () {
|
1875 |
+
if (_IdleEnd == _ProgressEnd && _IdleEnd == _SelfProcessor.$GetPosition_Display())
|
1876 |
+
_SelfProcessor.$GoToPosition(_IdleBegin);
|
1877 |
+
};
|
1878 |
+
|
1879 |
+
_SelfProcessor.$Abort = function () {
|
1880 |
+
_SlideshowRunner && _SlideshowRunner.$Index == slideIndex && _SlideshowRunner.$Clear();
|
1881 |
+
|
1882 |
+
var currentPosition = _SelfProcessor.$GetPosition_Display();
|
1883 |
+
if (currentPosition < _ProgressEnd) {
|
1884 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_STATE_CHANGE, slideIndex, -currentPosition -1, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
|
1885 |
+
}
|
1886 |
+
};
|
1887 |
+
|
1888 |
+
_SelfProcessor.$OpenSlideshowPanel = function (open) {
|
1889 |
+
if (slideshowProcessor) {
|
1890 |
+
$Jssor$.$CssOverflow(_SlideshowPanel, open && slideshowProcessor.$Transition.$Outside ? "" : "hidden");
|
1891 |
+
}
|
1892 |
+
};
|
1893 |
+
|
1894 |
+
_SelfProcessor.$OnInnerOffsetChange = function (oldPosition, newPosition) {
|
1895 |
+
|
1896 |
+
if (_IsSlideshowRunning && newPosition >= _SlideshowEnd) {
|
1897 |
+
_IsSlideshowRunning = false;
|
1898 |
+
UpdateLink();
|
1899 |
+
slideItem.$UnhideContentForSlideshow();
|
1900 |
+
_SlideshowRunner.$Clear();
|
1901 |
+
|
1902 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_SLIDESHOW_END, slideIndex, _ProgressBegin, _SlideshowBegin, _SlideshowEnd, _ProgressEnd);
|
1903 |
+
}
|
1904 |
+
|
1905 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_PROGRESS_CHANGE, slideIndex, newPosition, _ProgressBegin, _IdleBegin, _IdleEnd, _ProgressEnd);
|
1906 |
+
};
|
1907 |
+
|
1908 |
+
_SelfProcessor.$SetPlayer = function (playerInstance) {
|
1909 |
+
if (playerInstance && !_PlayerInstance) {
|
1910 |
+
_PlayerInstance = playerInstance;
|
1911 |
+
|
1912 |
+
playerInstance.$On($JssorPlayer$.$EVT_SWITCH, PlayerSwitchEventHandler);
|
1913 |
+
}
|
1914 |
+
};
|
1915 |
+
|
1916 |
+
//Processor Constructor
|
1917 |
+
{
|
1918 |
+
if (slideshowProcessor) {
|
1919 |
+
_SelfProcessor.$Chain(slideshowProcessor);
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
_SlideshowEnd = _SelfProcessor.$GetPosition_OuterEnd();
|
1923 |
+
_CaptionInBegin = _SelfProcessor.$GetPosition_OuterEnd();
|
1924 |
+
_SelfProcessor.$Chain(captionSliderIn);
|
1925 |
+
_IdleBegin = captionSliderIn.$GetPosition_OuterEnd();
|
1926 |
+
_IdleEnd = _IdleBegin + ($Jssor$.$ParseFloat($Jssor$.$AttributeEx(slideElmt, "idle")) || _Options.$AutoPlayInterval);
|
1927 |
+
|
1928 |
+
captionSliderOut.$Shift(_IdleEnd);
|
1929 |
+
_SelfProcessor.$Combine(captionSliderOut);
|
1930 |
+
_ProgressEnd = _SelfProcessor.$GetPosition_OuterEnd();
|
1931 |
+
}
|
1932 |
+
}
|
1933 |
+
//Processor
|
1934 |
+
//private classes
|
1935 |
+
|
1936 |
+
function SetPosition(elmt, position) {
|
1937 |
+
var orientation = _DragOrientation > 0 ? _DragOrientation : _PlayOrientation;
|
1938 |
+
var x = _StepLengthX * position * (orientation & 1);
|
1939 |
+
var y = _StepLengthY * position * ((orientation >> 1) & 1);
|
1940 |
+
|
1941 |
+
if ($Jssor$.$IsBrowserChrome() && $Jssor$.$BrowserVersion() < 38) {
|
1942 |
+
x = x.toFixed(3);
|
1943 |
+
y = y.toFixed(3);
|
1944 |
+
}
|
1945 |
+
else {
|
1946 |
+
x = Math.round(x);
|
1947 |
+
y = Math.round(y);
|
1948 |
+
}
|
1949 |
+
|
1950 |
+
if ($Jssor$.$IsBrowserIE() && $Jssor$.$BrowserVersion() >= 10 && $Jssor$.$BrowserVersion() < 11) {
|
1951 |
+
elmt.style.msTransform = "translate(" + x + "px, " + y + "px)";
|
1952 |
+
}
|
1953 |
+
else if ($Jssor$.$IsBrowserChrome() && $Jssor$.$BrowserVersion() >= 30 && $Jssor$.$BrowserVersion() < 34) {
|
1954 |
+
elmt.style.WebkitTransition = "transform 0s";
|
1955 |
+
elmt.style.WebkitTransform = "translate3d(" + x + "px, " + y + "px, 0px) perspective(2000px)";
|
1956 |
+
}
|
1957 |
+
else {
|
1958 |
+
$Jssor$.$CssLeft(elmt, x);
|
1959 |
+
$Jssor$.$CssTop(elmt, y);
|
1960 |
+
}
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
//Event handling begin
|
1964 |
+
|
1965 |
+
function OnMouseDown(event) {
|
1966 |
+
var tagName = $Jssor$.$EventSrc(event).tagName;
|
1967 |
+
if (!_DragOrientationRegistered && tagName != "INPUT" && tagName != "TEXTAREA" && tagName != "SELECT" && RegisterDrag()) {
|
1968 |
+
OnDragStart(event);
|
1969 |
+
}
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
function RecordFreezePoint() {
|
1973 |
+
|
1974 |
+
_CarouselPlaying_OnFreeze = _IsSliding;
|
1975 |
+
_PlayToPosition_OnFreeze = _CarouselPlayer.$GetPlayToPosition();
|
1976 |
+
_Position_OnFreeze = _Conveyor.$GetPosition();
|
1977 |
+
|
1978 |
+
}
|
1979 |
+
|
1980 |
+
function Freeze() {
|
1981 |
+
|
1982 |
+
RecordFreezePoint();
|
1983 |
+
|
1984 |
+
if (_IsDragging || !_NotOnHover && (_HoverToPause & 12)) {
|
1985 |
+
_CarouselPlayer.$Stop();
|
1986 |
+
|
1987 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_FREEZE);
|
1988 |
+
}
|
1989 |
+
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
function Unfreeze(byDrag) {
|
1993 |
+
|
1994 |
+
byDrag && RecordFreezePoint();
|
1995 |
+
|
1996 |
+
if (!_IsDragging && (_NotOnHover || !(_HoverToPause & 12)) && !_CarouselPlayer.$IsPlaying()) {
|
1997 |
+
|
1998 |
+
var currentPosition = _Conveyor.$GetPosition();
|
1999 |
+
var toPosition = Math.ceil(_Position_OnFreeze);
|
2000 |
+
|
2001 |
+
if (byDrag && Math.abs(_DragOffsetTotal) >= _Options.$MinDragOffsetToSlide) {
|
2002 |
+
toPosition = Math.ceil(currentPosition);
|
2003 |
+
toPosition += _DragIndexAdjust;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
if (!(_Loop & 1)) {
|
2007 |
+
toPosition = Math.min(_SlideCount - _DisplayPieces, Math.max(toPosition, 0));
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
var t = Math.abs(toPosition - currentPosition);
|
2011 |
+
t = 1 - Math.pow(1 - t, 5);
|
2012 |
+
|
2013 |
+
if (!_LastDragSucceded && _CarouselPlaying_OnFreeze) {
|
2014 |
+
_CarouselPlayer.$Continue(_PlayToPosition_OnFreeze);
|
2015 |
+
}
|
2016 |
+
else if (currentPosition == toPosition) {
|
2017 |
+
_CurrentSlideItem.$EnablePlayer();
|
2018 |
+
_CurrentSlideItem.$TryActivate();
|
2019 |
+
}
|
2020 |
+
else {
|
2021 |
+
|
2022 |
+
_CarouselPlayer.$PlayCarousel(currentPosition, toPosition, t * _SlideDuration);
|
2023 |
+
}
|
2024 |
+
}
|
2025 |
+
}
|
2026 |
+
|
2027 |
+
function OnDragStart(event) {
|
2028 |
+
|
2029 |
+
_IsDragging = true;
|
2030 |
+
_DragInvalid = false;
|
2031 |
+
_LoadingTicket = null;
|
2032 |
+
|
2033 |
+
$Jssor$.$AddEvent(document, _MoveEvent, OnDragMove);
|
2034 |
+
|
2035 |
+
_LastTimeMoveByDrag = $Jssor$.$GetNow() - 50;
|
2036 |
+
|
2037 |
+
_LastDragSucceded = 0;
|
2038 |
+
Freeze();
|
2039 |
+
|
2040 |
+
if (!_CarouselPlaying_OnFreeze)
|
2041 |
+
_DragOrientation = 0;
|
2042 |
+
|
2043 |
+
if (_HandleTouchEventOnly) {
|
2044 |
+
var touchPoint = event.touches[0];
|
2045 |
+
_DragStartMouseX = touchPoint.clientX;
|
2046 |
+
_DragStartMouseY = touchPoint.clientY;
|
2047 |
+
}
|
2048 |
+
else {
|
2049 |
+
var mousePoint = $Jssor$.$MousePosition(event);
|
2050 |
+
|
2051 |
+
_DragStartMouseX = mousePoint.x;
|
2052 |
+
_DragStartMouseY = mousePoint.y;
|
2053 |
+
|
2054 |
+
$Jssor$.$CancelEvent(event);
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
_DragOffsetTotal = 0;
|
2058 |
+
_DragOffsetLastTime = 0;
|
2059 |
+
_DragIndexAdjust = 0;
|
2060 |
+
|
2061 |
+
//Trigger EVT_DRAGSTART
|
2062 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_DRAG_START, GetRealIndex(_Position_OnFreeze), _Position_OnFreeze, event);
|
2063 |
+
}
|
2064 |
+
|
2065 |
+
function OnDragMove(event) {
|
2066 |
+
if (_IsDragging && (!$Jssor$.$IsBrowserIe9Earlier() || event.button)) {
|
2067 |
+
var actionPoint;
|
2068 |
+
|
2069 |
+
if (_HandleTouchEventOnly) {
|
2070 |
+
var touches = event.touches;
|
2071 |
+
if (touches && touches.length > 0) {
|
2072 |
+
actionPoint = { x: touches[0].clientX, y: touches[0].clientY };
|
2073 |
+
}
|
2074 |
+
}
|
2075 |
+
else {
|
2076 |
+
actionPoint = $Jssor$.$MousePosition(event);
|
2077 |
+
}
|
2078 |
+
|
2079 |
+
if (actionPoint) {
|
2080 |
+
var distanceX = actionPoint.x - _DragStartMouseX;
|
2081 |
+
var distanceY = actionPoint.y - _DragStartMouseY;
|
2082 |
+
|
2083 |
+
|
2084 |
+
if (Math.floor(_Position_OnFreeze) != _Position_OnFreeze)
|
2085 |
+
_DragOrientation = _DragOrientation || (_PlayOrientation & _DragOrientationRegistered);
|
2086 |
+
|
2087 |
+
if ((distanceX || distanceY) && !_DragOrientation) {
|
2088 |
+
if (_DragOrientationRegistered == 3) {
|
2089 |
+
if (Math.abs(distanceY) > Math.abs(distanceX)) {
|
2090 |
+
_DragOrientation = 2;
|
2091 |
+
}
|
2092 |
+
else
|
2093 |
+
_DragOrientation = 1;
|
2094 |
+
}
|
2095 |
+
else {
|
2096 |
+
_DragOrientation = _DragOrientationRegistered;
|
2097 |
+
}
|
2098 |
+
|
2099 |
+
if (_IsTouchDevice && _DragOrientation == 1 && Math.abs(distanceY) - Math.abs(distanceX) > 3) {
|
2100 |
+
_DragInvalid = true;
|
2101 |
+
}
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
if (_DragOrientation) {
|
2105 |
+
var distance = distanceY;
|
2106 |
+
var stepLength = _StepLengthY;
|
2107 |
+
|
2108 |
+
if (_DragOrientation == 1) {
|
2109 |
+
distance = distanceX;
|
2110 |
+
stepLength = _StepLengthX;
|
2111 |
+
}
|
2112 |
+
|
2113 |
+
if (!(_Loop & 1)) {
|
2114 |
+
if (distance > 0) {
|
2115 |
+
var normalDistance = stepLength * _CurrentSlideIndex;
|
2116 |
+
var sqrtDistance = distance - normalDistance;
|
2117 |
+
if (sqrtDistance > 0) {
|
2118 |
+
distance = normalDistance + Math.sqrt(sqrtDistance) * 5;
|
2119 |
+
}
|
2120 |
+
}
|
2121 |
+
|
2122 |
+
if (distance < 0) {
|
2123 |
+
var normalDistance = stepLength * (_SlideCount - _DisplayPieces - _CurrentSlideIndex);
|
2124 |
+
var sqrtDistance = -distance - normalDistance;
|
2125 |
+
|
2126 |
+
if (sqrtDistance > 0) {
|
2127 |
+
distance = -normalDistance - Math.sqrt(sqrtDistance) * 5;
|
2128 |
+
}
|
2129 |
+
}
|
2130 |
+
}
|
2131 |
+
|
2132 |
+
if (_DragOffsetTotal - _DragOffsetLastTime < -2) {
|
2133 |
+
_DragIndexAdjust = 0;
|
2134 |
+
}
|
2135 |
+
else if (_DragOffsetTotal - _DragOffsetLastTime > 2) {
|
2136 |
+
_DragIndexAdjust = -1;
|
2137 |
+
}
|
2138 |
+
|
2139 |
+
_DragOffsetLastTime = _DragOffsetTotal;
|
2140 |
+
_DragOffsetTotal = distance;
|
2141 |
+
_PositionToGoByDrag = _Position_OnFreeze - _DragOffsetTotal / stepLength / (_ScaleRatio || 1);
|
2142 |
+
|
2143 |
+
if (_DragOffsetTotal && _DragOrientation && !_DragInvalid) {
|
2144 |
+
$Jssor$.$CancelEvent(event);
|
2145 |
+
if (!_IsSliding) {
|
2146 |
+
_CarouselPlayer.$StandBy(_PositionToGoByDrag);
|
2147 |
+
}
|
2148 |
+
else
|
2149 |
+
_CarouselPlayer.$SetStandByPosition(_PositionToGoByDrag);
|
2150 |
+
}
|
2151 |
+
else if ($Jssor$.$IsBrowserIe9Earlier()) {
|
2152 |
+
$Jssor$.$CancelEvent(event);
|
2153 |
+
}
|
2154 |
+
}
|
2155 |
+
}
|
2156 |
+
}
|
2157 |
+
else {
|
2158 |
+
OnDragEnd(event);
|
2159 |
+
}
|
2160 |
+
}
|
2161 |
+
|
2162 |
+
function OnDragEnd(event) {
|
2163 |
+
UnregisterDrag();
|
2164 |
+
|
2165 |
+
if (_IsDragging) {
|
2166 |
+
|
2167 |
+
_IsDragging = false;
|
2168 |
+
|
2169 |
+
_LastTimeMoveByDrag = $Jssor$.$GetNow();
|
2170 |
+
|
2171 |
+
$Jssor$.$RemoveEvent(document, _MoveEvent, OnDragMove);
|
2172 |
+
|
2173 |
+
_LastDragSucceded = _DragOffsetTotal;
|
2174 |
+
|
2175 |
+
_LastDragSucceded && $Jssor$.$CancelEvent(event);
|
2176 |
+
|
2177 |
+
_CarouselPlayer.$Stop();
|
2178 |
+
|
2179 |
+
var currentPosition = _Conveyor.$GetPosition();
|
2180 |
+
|
2181 |
+
//Trigger EVT_DRAG_END
|
2182 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_DRAG_END, GetRealIndex(currentPosition), currentPosition, GetRealIndex(_Position_OnFreeze), _Position_OnFreeze, event);
|
2183 |
+
|
2184 |
+
Unfreeze(true);
|
2185 |
+
}
|
2186 |
+
}
|
2187 |
+
//Event handling end
|
2188 |
+
|
2189 |
+
function SetCurrentSlideIndex(index) {
|
2190 |
+
_PrevSlideItem = _SlideItems[_CurrentSlideIndex];
|
2191 |
+
_PreviousSlideIndex = _CurrentSlideIndex;
|
2192 |
+
_CurrentSlideIndex = GetRealIndex(index);
|
2193 |
+
_CurrentSlideItem = _SlideItems[_CurrentSlideIndex];
|
2194 |
+
ResetNavigator(index);
|
2195 |
+
return _CurrentSlideIndex;
|
2196 |
+
}
|
2197 |
+
|
2198 |
+
function OnPark(slideIndex, prevIndex) {
|
2199 |
+
_DragOrientation = 0;
|
2200 |
+
|
2201 |
+
SetCurrentSlideIndex(slideIndex);
|
2202 |
+
|
2203 |
+
//Trigger EVT_PARK
|
2204 |
+
_SelfSlider.$TriggerEvent(JssorSlider.$EVT_PARK, GetRealIndex(slideIndex), prevIndex);
|
2205 |
+
}
|
2206 |
+
|
2207 |
+
function ResetNavigator(index, temp) {
|
2208 |
+
_TempSlideIndex = index;
|
2209 |
+
$Jssor$.$Each(_Navigators, function (navigator) {
|
2210 |
+
navigator.$SetCurrentIndex(GetRealIndex(index), index, temp);
|
2211 |
+
});
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
function RegisterDrag() {
|
2215 |
+
var dragRegistry = JssorSlider.$DragRegistry || 0;
|
2216 |
+
var dragOrientation = _DragEnabled;
|
2217 |
+
if (_IsTouchDevice)
|
2218 |
+
(dragOrientation & 1) && (dragOrientation &= 1);
|
2219 |
+
JssorSlider.$DragRegistry |= dragOrientation;
|
2220 |
+
|
2221 |
+
return (_DragOrientationRegistered = dragOrientation & ~dragRegistry);
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
function UnregisterDrag() {
|
2225 |
+
if (_DragOrientationRegistered) {
|
2226 |
+
JssorSlider.$DragRegistry &= ~_DragEnabled;
|
2227 |
+
_DragOrientationRegistered = 0;
|
2228 |
+
}
|
2229 |
+
}
|
2230 |
+
|
2231 |
+
function CreatePanel() {
|
2232 |
+
var div = $Jssor$.$CreateDiv();
|
2233 |
+
|
2234 |
+
$Jssor$.$SetStyles(div, _StyleDef);
|
2235 |
+
$Jssor$.$CssPosition(div, "absolute");
|
2236 |
+
|
2237 |
+
return div;
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
function GetRealIndex(index) {
|
2241 |
+
return (index % _SlideCount + _SlideCount) % _SlideCount;
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
function IsCurrentSlideIndex(index) {
|
2245 |
+
return GetRealIndex(index) == _CurrentSlideIndex;
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
function IsPreviousSlideIndex(index) {
|
2249 |
+
return GetRealIndex(index) == _PreviousSlideIndex;
|
2250 |
+
}
|
2251 |
+
|
2252 |
+
//Navigation Request Handler
|
2253 |
+
function NavigationClickHandler(index, relative) {
|
2254 |
+
if (relative) {
|
2255 |
+
if (!_Loop) {
|
2256 |
+
//Stop at threshold
|
2257 |
+
index = Math.min(Math.max(index + _TempSlideIndex, 0), _SlideCount - _DisplayPieces);
|
2258 |
+
relative = false;
|
2259 |
+
}
|
2260 |
+
else if (_Loop & 2) {
|
2261 |
+
//Rewind
|
2262 |
+
index = GetRealIndex(index + _TempSlideIndex);
|
2263 |
+
relative = false;
|
2264 |
+
}
|
2265 |
+
}
|
2266 |
+
PlayTo(index, _Options.$SlideDuration, relative);
|
2267 |
+
}
|
2268 |
+
|
2269 |
+
function ShowNavigators() {
|
2270 |
+
$Jssor$.$Each(_Navigators, function (navigator) {
|
2271 |
+
navigator.$Show(navigator.$Options.$ChanceToShow <= _NotOnHover);
|
2272 |
+
});
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
function MainContainerMouseLeaveEventHandler() {
|
2276 |
+
if (!_NotOnHover) {
|
2277 |
+
|
2278 |
+
//$JssorDebug$.$Log("mouseleave");
|
2279 |
+
|
2280 |
+
_NotOnHover = 1;
|
2281 |
+
|
2282 |
+
ShowNavigators();
|
2283 |
+
|
2284 |
+
if (!_IsDragging) {
|
2285 |
+
(_HoverToPause & 12) && Unfreeze();
|
2286 |
+
(_HoverToPause & 3) && _SlideItems[_CurrentSlideIndex].$TryActivate();
|
2287 |
+
}
|
2288 |
+
}
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
function MainContainerMouseEnterEventHandler() {
|
2292 |
+
|
2293 |
+
if (_NotOnHover) {
|
2294 |
+
|
2295 |
+
//$JssorDebug$.$Log("mouseenter");
|
2296 |
+
|
2297 |
+
_NotOnHover = 0;
|
2298 |
+
|
2299 |
+
ShowNavigators();
|
2300 |
+
|
2301 |
+
_IsDragging || !(_HoverToPause & 12) || Freeze();
|
2302 |
+
}
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
function AdjustSlidesContainerSize() {
|
2306 |
+
_StyleDef = { $Width: _SlideWidth, $Height: _SlideHeight, $Top: 0, $Left: 0 };
|
2307 |
+
|
2308 |
+
$Jssor$.$Each(_SlideElmts, function (slideElmt, i) {
|
2309 |
+
|
2310 |
+
$Jssor$.$SetStyles(slideElmt, _StyleDef);
|
2311 |
+
$Jssor$.$CssPosition(slideElmt, "absolute");
|
2312 |
+
$Jssor$.$CssOverflow(slideElmt, "hidden");
|
2313 |
+
|
2314 |
+
$Jssor$.$HideElement(slideElmt);
|
2315 |
+
});
|
2316 |
+
|
2317 |
+
$Jssor$.$SetStyles(_LoadingContainer, _StyleDef);
|
2318 |
+
}
|
2319 |
+
|
2320 |
+
function PlayToOffset(offset, slideDuration) {
|
2321 |
+
PlayTo(offset, slideDuration, true);
|
2322 |
+
}
|
2323 |
+
|
2324 |
+
function PlayTo(slideIndex, slideDuration, relative) {
|
2325 |
+
/// <summary>
|
2326 |
+
/// PlayTo( slideIndex [, slideDuration] ); //Play slider to position 'slideIndex' within a period calculated base on 'slideDuration'.
|
2327 |
+
/// </summary>
|
2328 |
+
/// <param name="slideIndex" type="Number">
|
2329 |
+
/// slide slideIndex or position will be playing to
|
2330 |
+
/// </param>
|
2331 |
+
/// <param name="slideDuration" type="Number" optional="true">
|
2332 |
+
/// base slide duration in milliseconds to calculate the whole duration to complete this play request.
|
2333 |
+
/// default value is '$SlideDuration' value which is specified when initialize the slider.
|
2334 |
+
/// </param>
|
2335 |
+
/// http://msdn.microsoft.com/en-us/library/vstudio/bb385682.aspx
|
2336 |
+
/// http://msdn.microsoft.com/en-us/library/vstudio/hh542720.aspx
|
2337 |
+
if (_CarouselEnabled && (!_IsDragging || _Options.$NaviQuitDrag)) {
|
2338 |
+
_IsSliding = true;
|
2339 |
+
_IsDragging = false;
|
2340 |
+
_CarouselPlayer.$Stop();
|
2341 |
+
|
2342 |
+
{
|
2343 |
+
//Slide Duration
|
2344 |
+
if (slideDuration == undefined)
|
2345 |
+
slideDuration = _SlideDuration;
|
2346 |
+
|
2347 |
+
var positionDisplay = _Carousel.$GetPosition_Display();
|
2348 |
+
var positionTo = slideIndex;
|
2349 |
+
if (relative) {
|
2350 |
+
positionTo = positionDisplay + slideIndex;
|
2351 |
+
if (slideIndex > 0)
|
2352 |
+
positionTo = Math.ceil(positionTo);
|
2353 |
+
else
|
2354 |
+
positionTo = Math.floor(positionTo);
|
2355 |
+
}
|
2356 |
+
|
2357 |
+
|
2358 |
+
if (!(_Loop & 1)) {
|
2359 |
+
positionTo = GetRealIndex(positionTo);
|
2360 |
+
positionTo = Math.max(0, Math.min(positionTo, _SlideCount - _DisplayPieces));
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
var positionOffset = (positionTo - positionDisplay) % _SlideCount;
|
2364 |
+
positionTo = positionDisplay + positionOffset;
|
2365 |
+
|
2366 |
+
var duration = positionDisplay == positionTo ? 0 : slideDuration * Math.abs(positionOffset);
|
2367 |
+
duration = Math.min(duration, slideDuration * _DisplayPieces * 1.5);
|
2368 |
+
|
2369 |
+
_CarouselPlayer.$PlayCarousel(positionDisplay, positionTo, duration || 1);
|
2370 |
+
}
|
2371 |
+
}
|
2372 |
+
}
|
2373 |
+
|
2374 |
+
//private functions
|
2375 |
+
|
2376 |
+
//member functions
|
2377 |
+
|
2378 |
+
_SelfSlider.$PlayTo = PlayTo;
|
2379 |
+
|
2380 |
+
_SelfSlider.$GoTo = function (slideIndex) {
|
2381 |
+
/// <summary>
|
2382 |
+
/// instance.$GoTo( slideIndex ); //Go to the specifed slide immediately with no play.
|
2383 |
+
/// </summary>
|
2384 |
+
PlayTo(slideIndex, 1);
|
2385 |
+
};
|
2386 |
+
|
2387 |
+
_SelfSlider.$Next = function () {
|
2388 |
+
/// <summary>
|
2389 |
+
/// instance.$Next(); //Play the slider to next slide.
|
2390 |
+
/// </summary>
|
2391 |
+
PlayToOffset(1);
|
2392 |
+
};
|
2393 |
+
|
2394 |
+
_SelfSlider.$Prev = function () {
|
2395 |
+
/// <summary>
|
2396 |
+
/// instance.$Prev(); //Play the slider to previous slide.
|
2397 |
+
/// </summary>
|
2398 |
+
PlayToOffset(-1);
|
2399 |
+
};
|
2400 |
+
|
2401 |
+
_SelfSlider.$Pause = function () {
|
2402 |
+
/// <summary>
|
2403 |
+
/// instance.$Pause(); //Pause the slider, prevent it from auto playing.
|
2404 |
+
/// </summary>
|
2405 |
+
_AutoPlay = false;
|
2406 |
+
};
|
2407 |
+
|
2408 |
+
_SelfSlider.$Play = function () {
|
2409 |
+
/// <summary>
|
2410 |
+
/// instance.$Play(); //Start auto play if the slider is currently paused.
|
2411 |
+
/// </summary>
|
2412 |
+
if (!_AutoPlay) {
|
2413 |
+
_AutoPlay = true;
|
2414 |
+
_SlideItems[_CurrentSlideIndex] && _SlideItems[_CurrentSlideIndex].$TryActivate();
|
2415 |
+
}
|
2416 |
+
};
|
2417 |
+
|
2418 |
+
_SelfSlider.$SetSlideshowTransitions = function (transitions) {
|
2419 |
+
/// <summary>
|
2420 |
+
/// instance.$SetSlideshowTransitions( transitions ); //Reset slideshow transitions for the slider.
|
2421 |
+
/// </summary>
|
2422 |
+
$JssorDebug$.$Execute(function () {
|
2423 |
+
if (!transitions || !transitions.length) {
|
2424 |
+
$JssorDebug$.$Error("Can not set slideshow transitions, no transitions specified.");
|
2425 |
+
}
|
2426 |
+
});
|
2427 |
+
|
2428 |
+
$Jssor$.$TranslateTransitions(transitions); //for old transition compatibility
|
2429 |
+
_Options.$SlideshowOptions.$Transitions = transitions;
|
2430 |
+
};
|
2431 |
+
|
2432 |
+
_SelfSlider.$SetCaptionTransitions = function (transitions) {
|
2433 |
+
/// <summary>
|
2434 |
+
/// instance.$SetCaptionTransitions( transitions ); //Reset caption transitions for the slider.
|
2435 |
+
/// </summary>
|
2436 |
+
$JssorDebug$.$Execute(function () {
|
2437 |
+
if (!transitions || !transitions.length) {
|
2438 |
+
$JssorDebug$.$Error("Can not set caption transitions, no transitions specified");
|
2439 |
+
}
|
2440 |
+
});
|
2441 |
+
|
2442 |
+
$Jssor$.$TranslateTransitions(transitions); //for old transition compatibility
|
2443 |
+
_CaptionSliderOptions.$CaptionTransitions = transitions;
|
2444 |
+
_CaptionSliderOptions.$Version = $Jssor$.$GetNow();
|
2445 |
+
};
|
2446 |
+
|
2447 |
+
_SelfSlider.$SlidesCount = function () {
|
2448 |
+
/// <summary>
|
2449 |
+
/// instance.$SlidesCount(); //Retrieve slides count of the slider.
|
2450 |
+
/// </summary>
|
2451 |
+
return _SlideElmts.length;
|
2452 |
+
};
|
2453 |
+
|
2454 |
+
_SelfSlider.$CurrentIndex = function () {
|
2455 |
+
/// <summary>
|
2456 |
+
/// instance.$CurrentIndex(); //Retrieve current slide index of the slider.
|
2457 |
+
/// </summary>
|
2458 |
+
return _CurrentSlideIndex;
|
2459 |
+
};
|
2460 |
+
|
2461 |
+
_SelfSlider.$IsAutoPlaying = function () {
|
2462 |
+
/// <summary>
|
2463 |
+
/// instance.$IsAutoPlaying(); //Retrieve auto play status of the slider.
|
2464 |
+
/// </summary>
|
2465 |
+
return _AutoPlay;
|
2466 |
+
};
|
2467 |
+
|
2468 |
+
_SelfSlider.$IsDragging = function () {
|
2469 |
+
/// <summary>
|
2470 |
+
/// instance.$IsDragging(); //Retrieve drag status of the slider.
|
2471 |
+
/// </summary>
|
2472 |
+
return _IsDragging;
|
2473 |
+
};
|
2474 |
+
|
2475 |
+
_SelfSlider.$IsSliding = function () {
|
2476 |
+
/// <summary>
|
2477 |
+
/// instance.$IsSliding(); //Retrieve right<-->left sliding status of the slider.
|
2478 |
+
/// </summary>
|
2479 |
+
return _IsSliding;
|
2480 |
+
};
|
2481 |
+
|
2482 |
+
_SelfSlider.$IsMouseOver = function () {
|
2483 |
+
/// <summary>
|
2484 |
+
/// instance.$IsMouseOver(); //Retrieve mouse over status of the slider.
|
2485 |
+
/// </summary>
|
2486 |
+
return !_NotOnHover;
|
2487 |
+
};
|
2488 |
+
|
2489 |
+
_SelfSlider.$LastDragSucceded = function () {
|
2490 |
+
/// <summary>
|
2491 |
+
/// instance.$IsLastDragSucceded(); //Retrieve last drag succeded status, returns 0 if failed, returns drag offset if succeded
|
2492 |
+
/// </summary>
|
2493 |
+
return _LastDragSucceded;
|
2494 |
+
};
|
2495 |
+
|
2496 |
+
function OriginalWidth() {
|
2497 |
+
/// <summary>
|
2498 |
+
/// instance.$OriginalWidth(); //Retrieve original width of the slider.
|
2499 |
+
/// </summary>
|
2500 |
+
return $Jssor$.$CssWidth(_ScaleWrapper || elmt);
|
2501 |
+
}
|
2502 |
+
|
2503 |
+
function OriginalHeight() {
|
2504 |
+
/// <summary>
|
2505 |
+
/// instance.$OriginalHeight(); //Retrieve original height of the slider.
|
2506 |
+
/// </summary>
|
2507 |
+
return $Jssor$.$CssHeight(_ScaleWrapper || elmt);
|
2508 |
+
}
|
2509 |
+
|
2510 |
+
_SelfSlider.$OriginalWidth = _SelfSlider.$GetOriginalWidth = OriginalWidth;
|
2511 |
+
|
2512 |
+
_SelfSlider.$OriginalHeight = _SelfSlider.$GetOriginalHeight = OriginalHeight;
|
2513 |
+
|
2514 |
+
function Scale(dimension, isHeight) {
|
2515 |
+
/// <summary>
|
2516 |
+
/// instance.$ScaleWidth(); //Retrieve scaled dimension the slider currently displays.
|
2517 |
+
/// instance.$ScaleWidth( dimension ); //Scale the slider to new width and keep aspect ratio.
|
2518 |
+
/// </summary>
|
2519 |
+
|
2520 |
+
if (dimension == undefined)
|
2521 |
+
return $Jssor$.$CssWidth(elmt);
|
2522 |
+
|
2523 |
+
$JssorDebug$.$Execute(function () {
|
2524 |
+
if (!dimension || dimension < 0) {
|
2525 |
+
$JssorDebug$.$Fail("'$ScaleWidth' error, 'dimension' should be positive value.");
|
2526 |
+
}
|
2527 |
+
});
|
2528 |
+
|
2529 |
+
if (!_ScaleWrapper) {
|
2530 |
+
$JssorDebug$.$Execute(function () {
|
2531 |
+
var originalWidthStr = $Jssor$.$Css(elmt, "width");
|
2532 |
+
var originalHeightStr = $Jssor$.$Css(elmt, "height");
|
2533 |
+
var originalWidth = $Jssor$.$CssP(elmt, "width");
|
2534 |
+
var originalHeight = $Jssor$.$CssP(elmt, "height");
|
2535 |
+
|
2536 |
+
if (!originalWidthStr) {
|
2537 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not specified. Please specify 'dimension' in pixel. e.g. 'dimension: 600px;'");
|
2538 |
+
}
|
2539 |
+
|
2540 |
+
if (!originalHeightStr) {
|
2541 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not specified. Please specify 'height' in pixel. e.g. 'height: 300px;'");
|
2542 |
+
}
|
2543 |
+
|
2544 |
+
if (originalWidthStr.indexOf('%') != -1) {
|
2545 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not valid. Please specify 'dimension' in pixel. e.g. 'dimension: 600px;'");
|
2546 |
+
}
|
2547 |
+
|
2548 |
+
if (originalHeightStr.indexOf('%') != -1) {
|
2549 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not valid. Please specify 'height' in pixel. e.g. 'height: 300px;'");
|
2550 |
+
}
|
2551 |
+
|
2552 |
+
if (!originalWidth) {
|
2553 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'dimension' of 'outer container' not valid. 'dimension' of 'outer container' should be positive number. e.g. 'dimension: 600px;'");
|
2554 |
+
}
|
2555 |
+
|
2556 |
+
if (!originalHeight) {
|
2557 |
+
$JssorDebug$.$Fail("Cannot scale jssor slider, 'height' of 'outer container' not valid. 'height' of 'outer container' should be positive number. e.g. 'height: 300px;'");
|
2558 |
+
}
|
2559 |
+
});
|
2560 |
+
|
2561 |
+
var innerWrapper = $Jssor$.$CreateDiv(document);
|
2562 |
+
$Jssor$.$CssCssText(innerWrapper, $Jssor$.$CssCssText(elmt));
|
2563 |
+
$Jssor$.$ClassName(innerWrapper, $Jssor$.$ClassName(elmt));
|
2564 |
+
|
2565 |
+
$Jssor$.$CssPosition(innerWrapper, "relative");
|
2566 |
+
$Jssor$.$CssTop(innerWrapper, 0);
|
2567 |
+
$Jssor$.$CssLeft(innerWrapper, 0);
|
2568 |
+
$Jssor$.$CssOverflow(innerWrapper, "visible");
|
2569 |
+
|
2570 |
+
_ScaleWrapper = $Jssor$.$CreateDiv(document);
|
2571 |
+
|
2572 |
+
$Jssor$.$CssPosition(_ScaleWrapper, "absolute");
|
2573 |
+
$Jssor$.$CssTop(_ScaleWrapper, 0);
|
2574 |
+
$Jssor$.$CssLeft(_ScaleWrapper, 0);
|
2575 |
+
$Jssor$.$CssWidth(_ScaleWrapper, $Jssor$.$CssWidth(elmt));
|
2576 |
+
$Jssor$.$CssHeight(_ScaleWrapper, $Jssor$.$CssHeight(elmt));
|
2577 |
+
$Jssor$.$SetStyleTransformOrigin(_ScaleWrapper, "0 0");
|
2578 |
+
|
2579 |
+
$Jssor$.$AppendChild(_ScaleWrapper, innerWrapper);
|
2580 |
+
|
2581 |
+
var children = $Jssor$.$Children(elmt);
|
2582 |
+
$Jssor$.$AppendChild(elmt, _ScaleWrapper);
|
2583 |
+
|
2584 |
+
$Jssor$.$Css(elmt, "backgroundImage", "");
|
2585 |
+
|
2586 |
+
var noMoveElmts = {
|
2587 |
+
"navigator": _BulletNavigatorOptions && _BulletNavigatorOptions.$Scale == false,
|
2588 |
+
"arrowleft": _ArrowNavigatorOptions && _ArrowNavigatorOptions.$Scale == false,
|
2589 |
+
"arrowright": _ArrowNavigatorOptions && _ArrowNavigatorOptions.$Scale == false,
|
2590 |
+
"thumbnavigator": _ThumbnailNavigatorOptions && _ThumbnailNavigatorOptions.$Scale == false,
|
2591 |
+
"thumbwrapper": _ThumbnailNavigatorOptions && _ThumbnailNavigatorOptions.$Scale == false
|
2592 |
+
};
|
2593 |
+
|
2594 |
+
$Jssor$.$Each(children, function (child) {
|
2595 |
+
$Jssor$.$AppendChild(noMoveElmts[$Jssor$.$AttributeEx(child, "u")] ? elmt : innerWrapper, child);
|
2596 |
+
});
|
2597 |
+
|
2598 |
+
$Jssor$.$ShowElement(innerWrapper);
|
2599 |
+
$Jssor$.$ShowElement(_ScaleWrapper);
|
2600 |
+
}
|
2601 |
+
|
2602 |
+
$JssorDebug$.$Execute(function () {
|
2603 |
+
if (!_InitialScrollWidth) {
|
2604 |
+
_InitialScrollWidth = _SelfSlider.$Elmt.scrollWidth;
|
2605 |
+
}
|
2606 |
+
});
|
2607 |
+
|
2608 |
+
_ScaleRatio = dimension / (isHeight? $Jssor$.$CssHeight : $Jssor$.$CssWidth)(_ScaleWrapper);
|
2609 |
+
$Jssor$.$CssScale(_ScaleWrapper, _ScaleRatio);
|
2610 |
+
|
2611 |
+
var scaleWidth = isHeight ? (_ScaleRatio * OriginalWidth()) : dimension;
|
2612 |
+
var scaleHeight = isHeight ? dimension : (_ScaleRatio * OriginalHeight());
|
2613 |
+
|
2614 |
+
$Jssor$.$CssWidth(elmt, scaleWidth);
|
2615 |
+
$Jssor$.$CssHeight(elmt, scaleHeight);
|
2616 |
+
|
2617 |
+
$Jssor$.$Each(_Navigators, function (navigator) {
|
2618 |
+
navigator.$Relocate(scaleWidth, scaleHeight);
|
2619 |
+
});
|
2620 |
+
}
|
2621 |
+
|
2622 |
+
_SelfSlider.$ScaleHeight = _SelfSlider.$GetScaleHeight = function (height) {
|
2623 |
+
/// <summary>
|
2624 |
+
/// instance.$ScaleHeight(); //Retrieve scaled height the slider currently displays.
|
2625 |
+
/// instance.$ScaleHeight( dimension ); //Scale the slider to new height and keep aspect ratio.
|
2626 |
+
/// </summary>
|
2627 |
+
|
2628 |
+
if (height == undefined)
|
2629 |
+
return $Jssor$.$CssHeight(elmt);
|
2630 |
+
|
2631 |
+
Scale(height, true);
|
2632 |
+
};
|
2633 |
+
|
2634 |
+
_SelfSlider.$ScaleWidth = _SelfSlider.$SetScaleWidth = _SelfSlider.$GetScaleWidth = Scale;
|
2635 |
+
|
2636 |
+
_SelfSlider.$GetVirtualIndex = function (index) {
|
2637 |
+
var parkingIndex = Math.ceil(GetRealIndex(_ParkingPosition / _StepLength));
|
2638 |
+
var displayIndex = GetRealIndex(index - _CurrentSlideIndex + parkingIndex);
|
2639 |
+
|
2640 |
+
if (displayIndex > _DisplayPieces) {
|
2641 |
+
if (index - _CurrentSlideIndex > _SlideCount / 2)
|
2642 |
+
index -= _SlideCount;
|
2643 |
+
else if (index - _CurrentSlideIndex <= -_SlideCount / 2)
|
2644 |
+
index += _SlideCount;
|
2645 |
+
}
|
2646 |
+
else {
|
2647 |
+
index = _CurrentSlideIndex + displayIndex - parkingIndex;
|
2648 |
+
}
|
2649 |
+
|
2650 |
+
return index;
|
2651 |
+
};
|
2652 |
+
|
2653 |
+
//member functions
|
2654 |
+
|
2655 |
+
$JssorObject$.call(_SelfSlider);
|
2656 |
+
|
2657 |
+
$JssorDebug$.$Execute(function () {
|
2658 |
+
var outerContainerElmt = $Jssor$.$GetElement(elmt);
|
2659 |
+
if (!outerContainerElmt)
|
2660 |
+
$JssorDebug$.$Fail("Outer container '" + elmt + "' not found.");
|
2661 |
+
});
|
2662 |
+
|
2663 |
+
//initialize member variables
|
2664 |
+
_SelfSlider.$Elmt = elmt = $Jssor$.$GetElement(elmt);
|
2665 |
+
//initialize member variables
|
2666 |
+
|
2667 |
+
var _InitialScrollWidth; //for debug only
|
2668 |
+
var _CaptionSliderCount = 1; //for debug only
|
2669 |
+
|
2670 |
+
var _Options = $Jssor$.$Extend({
|
2671 |
+
$FillMode: 0, //[Optional] The way to fill image in slide, 0 stretch, 1 contain (keep aspect ratio and put all inside slide), 2 cover (keep aspect ratio and cover whole slide), 4 actual size, 5 contain for large image, actual size for small image, default value is 0
|
2672 |
+
$LazyLoading: 1, //[Optional] For image with lazy loading format (<IMG src2="url" .../>), by default it will be loaded only when the slide comes.
|
2673 |
+
//But an integer value (maybe 0, 1, 2 or 3) indicates that how far of nearby slides should be loaded immediately as well, default value is 1.
|
2674 |
+
$StartIndex: 0, //[Optional] Index of slide to display when initialize, default value is 0
|
2675 |
+
$AutoPlay: false, //[Optional] Whether to auto play, default value is false
|
2676 |
+
$Loop: 1, //[Optional] Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
|
2677 |
+
$HWA: true, //[Optional] Enable hardware acceleration or not, default value is true
|
2678 |
+
$NaviQuitDrag: true,
|
2679 |
+
$AutoPlaySteps: 1, //[Optional] Steps to go of every play (this options applys only when slideshow disabled), default value is 1
|
2680 |
+
$AutoPlayInterval: 3000, //[Optional] Interval to play next slide since the previous stopped if a slideshow is auto playing, default value is 3000
|
2681 |
+
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
|
2682 |
+
|
2683 |
+
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 400
|
2684 |
+
$SlideEasing: $JssorEasing$.$EaseOutQuad, //[Optional] Specifies easing for right to left animation, default value is $JssorEasing$.$EaseOutQuad
|
2685 |
+
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset that trigger slide, default value is 20
|
2686 |
+
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
|
2687 |
+
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), default value is 1
|
2688 |
+
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
|
2689 |
+
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is recursive) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc.
|
2690 |
+
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
|
2691 |
+
$DragOrientation: 1 //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 both, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
|
2692 |
+
|
2693 |
+
}, options);
|
2694 |
+
|
2695 |
+
//Sodo statement for development time intellisence only
|
2696 |
+
$JssorDebug$.$Execute(function () {
|
2697 |
+
_Options = $Jssor$.$Extend({
|
2698 |
+
$ArrowKeyNavigation: undefined,
|
2699 |
+
$SlideWidth: undefined,
|
2700 |
+
$SlideHeight: undefined,
|
2701 |
+
$SlideshowOptions: undefined,
|
2702 |
+
$CaptionSliderOptions: undefined,
|
2703 |
+
$BulletNavigatorOptions: undefined,
|
2704 |
+
$ArrowNavigatorOptions: undefined,
|
2705 |
+
$ThumbnailNavigatorOptions: undefined
|
2706 |
+
},
|
2707 |
+
_Options);
|
2708 |
+
});
|
2709 |
+
|
2710 |
+
var _PlayOrientation = _Options.$PlayOrientation & 3;
|
2711 |
+
var _PlayReverse = (_Options.$PlayOrientation & 4) / -4 || 1;
|
2712 |
+
|
2713 |
+
var _SlideshowOptions = _Options.$SlideshowOptions;
|
2714 |
+
var _CaptionSliderOptions = $Jssor$.$Extend({ $Class: $JssorCaptionSliderBase$, $PlayInMode: 1, $PlayOutMode: 1 }, _Options.$CaptionSliderOptions);
|
2715 |
+
$Jssor$.$TranslateTransitions(_CaptionSliderOptions.$CaptionTransitions); //for old transition compatibility
|
2716 |
+
var _BulletNavigatorOptions = _Options.$BulletNavigatorOptions;
|
2717 |
+
var _ArrowNavigatorOptions = _Options.$ArrowNavigatorOptions;
|
2718 |
+
var _ThumbnailNavigatorOptions = _Options.$ThumbnailNavigatorOptions;
|
2719 |
+
|
2720 |
+
$JssorDebug$.$Execute(function () {
|
2721 |
+
if (_SlideshowOptions && !_SlideshowOptions.$Class) {
|
2722 |
+
$JssorDebug$.$Fail("Option $SlideshowOptions error, class not specified.");
|
2723 |
+
}
|
2724 |
+
});
|
2725 |
+
|
2726 |
+
$JssorDebug$.$Execute(function () {
|
2727 |
+
if (_Options.$CaptionSliderOptions && !_Options.$CaptionSliderOptions.$Class) {
|
2728 |
+
$JssorDebug$.$Fail("Option $CaptionSliderOptions error, class not specified.");
|
2729 |
+
}
|
2730 |
+
});
|
2731 |
+
|
2732 |
+
$JssorDebug$.$Execute(function () {
|
2733 |
+
if (_BulletNavigatorOptions && !_BulletNavigatorOptions.$Class) {
|
2734 |
+
$JssorDebug$.$Fail("Option $BulletNavigatorOptions error, class not specified.");
|
2735 |
+
}
|
2736 |
+
});
|
2737 |
+
|
2738 |
+
$JssorDebug$.$Execute(function () {
|
2739 |
+
if (_ArrowNavigatorOptions && !_ArrowNavigatorOptions.$Class) {
|
2740 |
+
$JssorDebug$.$Fail("Option $ArrowNavigatorOptions error, class not specified.");
|
2741 |
+
}
|
2742 |
+
});
|
2743 |
+
|
2744 |
+
$JssorDebug$.$Execute(function () {
|
2745 |
+
if (_ThumbnailNavigatorOptions && !_ThumbnailNavigatorOptions.$Class) {
|
2746 |
+
$JssorDebug$.$Fail("Option $ThumbnailNavigatorOptions error, class not specified.");
|
2747 |
+
}
|
2748 |
+
});
|
2749 |
+
|
2750 |
+
var _UISearchNoDeep = !_Options.$UISearchMode;
|
2751 |
+
var _ScaleWrapper;
|
2752 |
+
var _SlidesContainer = $Jssor$.$FindChild(elmt, "slides", _UISearchNoDeep);
|
2753 |
+
var _LoadingContainer = $Jssor$.$FindChild(elmt, "loading", _UISearchNoDeep) || $Jssor$.$CreateDiv(document);
|
2754 |
+
|
2755 |
+
var _BulletNavigatorContainer = $Jssor$.$FindChild(elmt, "navigator", _UISearchNoDeep);
|
2756 |
+
|
2757 |
+
var _ArrowLeft = $Jssor$.$FindChild(elmt, "arrowleft", _UISearchNoDeep);
|
2758 |
+
var _ArrowRight = $Jssor$.$FindChild(elmt, "arrowright", _UISearchNoDeep);
|
2759 |
+
|
2760 |
+
var _ThumbnailNavigatorContainer = $Jssor$.$FindChild(elmt, "thumbnavigator", _UISearchNoDeep);
|
2761 |
+
|
2762 |
+
$JssorDebug$.$Execute(function () {
|
2763 |
+
//if (_BulletNavigatorOptions && !_BulletNavigatorContainer) {
|
2764 |
+
// throw new Error("$BulletNavigatorOptions specified but bullet navigator container (<div u=\"navigator\" ...) not defined.");
|
2765 |
+
//}
|
2766 |
+
if (_BulletNavigatorContainer && !_BulletNavigatorOptions) {
|
2767 |
+
throw new Error("Bullet navigator container defined but $BulletNavigatorOptions not specified.");
|
2768 |
+
}
|
2769 |
+
|
2770 |
+
//if (_ArrowNavigatorOptions) {
|
2771 |
+
// if (!_ArrowLeft) {
|
2772 |
+
// throw new Error("$ArrowNavigatorOptions specified, but arrowleft (<span u=\"arrowleft\" ...) not defined.");
|
2773 |
+
// }
|
2774 |
+
|
2775 |
+
// if (!_ArrowRight) {
|
2776 |
+
// throw new Error("$ArrowNavigatorOptions specified, but arrowright (<span u=\"arrowright\" ...) not defined.");
|
2777 |
+
// }
|
2778 |
+
//}
|
2779 |
+
|
2780 |
+
if ((_ArrowLeft || _ArrowRight) && !_ArrowNavigatorOptions) {
|
2781 |
+
throw new Error("arrowleft or arrowright defined, but $ArrowNavigatorOptions not specified.");
|
2782 |
+
}
|
2783 |
+
|
2784 |
+
//if (_ThumbnailNavigatorOptions && !_ThumbnailNavigatorContainer) {
|
2785 |
+
// throw new Error("$ThumbnailNavigatorOptions specified, but thumbnail navigator container (<div u=\"thumbnavigator\" ...) not defined.");
|
2786 |
+
//}
|
2787 |
+
|
2788 |
+
if (_ThumbnailNavigatorContainer && !_ThumbnailNavigatorOptions) {
|
2789 |
+
throw new Error("Thumbnail navigator container defined, but $ThumbnailNavigatorOptions not specified.");
|
2790 |
+
}
|
2791 |
+
});
|
2792 |
+
|
2793 |
+
var _SlidesContainerWidth = $Jssor$.$CssWidth(_SlidesContainer);
|
2794 |
+
var _SlidesContainerHeight = $Jssor$.$CssHeight(_SlidesContainer);
|
2795 |
+
|
2796 |
+
$JssorDebug$.$Execute(function () {
|
2797 |
+
if (isNaN(_SlidesContainerWidth))
|
2798 |
+
$JssorDebug$.$Fail("Width of slides container wrong specification, it should be specified in pixel (like style='width: 600px;').");
|
2799 |
+
|
2800 |
+
if (_SlidesContainerWidth == undefined)
|
2801 |
+
$JssorDebug$.$Fail("Width of slides container not specified, it should be specified in pixel (like style='width: 600px;').");
|
2802 |
+
|
2803 |
+
if (isNaN(_SlidesContainerHeight))
|
2804 |
+
$JssorDebug$.$Fail("Height of slides container wrong specification, it should be specified in pixel (like style='height: 300px;').");
|
2805 |
+
|
2806 |
+
if (_SlidesContainerHeight == undefined)
|
2807 |
+
$JssorDebug$.$Fail("Height of slides container not specified, it should be specified in pixel (like style='height: 300px;').");
|
2808 |
+
|
2809 |
+
var slidesContainerOverflow = $Jssor$.$CssOverflow(_SlidesContainer);
|
2810 |
+
var slidesContainerOverflowX = $Jssor$.$Css(_SlidesContainer, "overflowX");
|
2811 |
+
var slidesContainerOverflowY = $Jssor$.$Css(_SlidesContainer, "overflowY");
|
2812 |
+
if (slidesContainerOverflow != "hidden" && (slidesContainerOverflowX != "hidden" || slidesContainerOverflowY != "hidden"))
|
2813 |
+
$JssorDebug$.$Fail("Overflow of slides container wrong specification, it should be specified as 'hidden' (style='overflow:hidden;').");
|
2814 |
+
|
2815 |
+
//var slidesContainerTop = $Jssor$.$CssTop(_SlidesContainer);
|
2816 |
+
//var slidesContainerLeft = $Jssor$.$CssLeft(_SlidesContainer);
|
2817 |
+
|
2818 |
+
//if (isNaN(slidesContainerTop))
|
2819 |
+
// $JssorDebug$.$Fail("Top of slides container wrong specification, it should be specified in pixel (like style='top: 0px;').");
|
2820 |
+
|
2821 |
+
//if (slidesContainerTop == undefined)
|
2822 |
+
// $JssorDebug$.$Fail("Top of slides container not specified, it should be specified in pixel (like style='top: 0px;').");
|
2823 |
+
|
2824 |
+
//if (isNaN(slidesContainerLeft))
|
2825 |
+
// $JssorDebug$.$Fail("Left of slides container wrong specification, it should be specified in pixel (like style='left: 0px;').");
|
2826 |
+
|
2827 |
+
//if (slidesContainerLeft == undefined)
|
2828 |
+
// $JssorDebug$.$Fail("Left of slides container not specified, it should be specified in pixel (like style='left: 0px;').");
|
2829 |
+
});
|
2830 |
+
|
2831 |
+
$JssorDebug$.$Execute(function () {
|
2832 |
+
if (!$Jssor$.$IsNumeric(_Options.$DisplayPieces))
|
2833 |
+
$JssorDebug$.$Fail("Option $DisplayPieces error, it should be a numeric value and greater than or equal to 1.");
|
2834 |
+
|
2835 |
+
if (_Options.$DisplayPieces < 1)
|
2836 |
+
$JssorDebug$.$Fail("Option $DisplayPieces error, it should be greater than or equal to 1.");
|
2837 |
+
|
2838 |
+
if (_Options.$DisplayPieces > 1 && _Options.$DragOrientation && _Options.$DragOrientation != _PlayOrientation)
|
2839 |
+
$JssorDebug$.$Fail("Option $DragOrientation error, it should be 0 or the same of $PlayOrientation when $DisplayPieces is greater than 1.");
|
2840 |
+
|
2841 |
+
if (!$Jssor$.$IsNumeric(_Options.$ParkingPosition))
|
2842 |
+
$JssorDebug$.$Fail("Option $ParkingPosition error, it should be a numeric value.");
|
2843 |
+
|
2844 |
+
if (_Options.$ParkingPosition && _Options.$DragOrientation && _Options.$DragOrientation != _PlayOrientation)
|
2845 |
+
$JssorDebug$.$Fail("Option $DragOrientation error, it should be 0 or the same of $PlayOrientation when $ParkingPosition is not equal to 0.");
|
2846 |
+
});
|
2847 |
+
|
2848 |
+
var _StyleDef;
|
2849 |
+
|
2850 |
+
var _SlideElmts = [];
|
2851 |
+
|
2852 |
+
{
|
2853 |
+
var slideElmts = $Jssor$.$Children(_SlidesContainer);
|
2854 |
+
$Jssor$.$Each(slideElmts, function (slideElmt) {
|
2855 |
+
if (slideElmt.tagName == "DIV" && !$Jssor$.$AttributeEx(slideElmt, "u")) {
|
2856 |
+
_SlideElmts.push(slideElmt);
|
2857 |
+
}
|
2858 |
+
});
|
2859 |
+
}
|
2860 |
+
|
2861 |
+
$JssorDebug$.$Execute(function () {
|
2862 |
+
if (_SlideElmts.length < 1) {
|
2863 |
+
$JssorDebug$.$Error("Slides html code definition error, there must be at least 1 slide to initialize a slider.");
|
2864 |
+
}
|
2865 |
+
});
|
2866 |
+
|
2867 |
+
var _SlideItemCreatedCount = 0; //for debug only
|
2868 |
+
var _SlideItemReleasedCount = 0; //for debug only
|
2869 |
+
|
2870 |
+
var _PreviousSlideIndex;
|
2871 |
+
var _CurrentSlideIndex = -1;
|
2872 |
+
var _TempSlideIndex;
|
2873 |
+
var _PrevSlideItem;
|
2874 |
+
var _CurrentSlideItem;
|
2875 |
+
var _SlideCount = _SlideElmts.length;
|
2876 |
+
|
2877 |
+
var _SlideWidth = _Options.$SlideWidth || _SlidesContainerWidth;
|
2878 |
+
var _SlideHeight = _Options.$SlideHeight || _SlidesContainerHeight;
|
2879 |
+
|
2880 |
+
var _SlideSpacing = _Options.$SlideSpacing;
|
2881 |
+
var _StepLengthX = _SlideWidth + _SlideSpacing;
|
2882 |
+
var _StepLengthY = _SlideHeight + _SlideSpacing;
|
2883 |
+
var _StepLength = (_PlayOrientation & 1) ? _StepLengthX : _StepLengthY;
|
2884 |
+
var _DisplayPieces = Math.min(_Options.$DisplayPieces, _SlideCount);
|
2885 |
+
|
2886 |
+
var _SlideshowPanel;
|
2887 |
+
var _CurrentBoardIndex = 0;
|
2888 |
+
var _DragOrientation;
|
2889 |
+
var _DragOrientationRegistered;
|
2890 |
+
var _DragInvalid;
|
2891 |
+
|
2892 |
+
var _HandleTouchEventOnly;
|
2893 |
+
var _IsTouchDevice;
|
2894 |
+
|
2895 |
+
var _Navigators = [];
|
2896 |
+
var _BulletNavigator;
|
2897 |
+
var _ArrowNavigator;
|
2898 |
+
var _ThumbnailNavigator;
|
2899 |
+
|
2900 |
+
var _ShowLink;
|
2901 |
+
|
2902 |
+
var _Frozen;
|
2903 |
+
var _AutoPlay;
|
2904 |
+
var _AutoPlaySteps = _Options.$AutoPlaySteps;
|
2905 |
+
var _HoverToPause = _Options.$PauseOnHover;
|
2906 |
+
var _AutoPlayInterval = _Options.$AutoPlayInterval;
|
2907 |
+
var _SlideDuration = _Options.$SlideDuration;
|
2908 |
+
|
2909 |
+
var _SlideshowRunnerClass;
|
2910 |
+
var _TransitionsOrder;
|
2911 |
+
|
2912 |
+
var _SlideshowEnabled;
|
2913 |
+
var _ParkingPosition;
|
2914 |
+
var _CarouselEnabled = _DisplayPieces < _SlideCount;
|
2915 |
+
var _Loop = _CarouselEnabled ? _Options.$Loop : 0;
|
2916 |
+
|
2917 |
+
var _DragEnabled;
|
2918 |
+
var _LastDragSucceded;
|
2919 |
+
|
2920 |
+
var _NotOnHover = 1; //0 Hovering, 1 Not hovering
|
2921 |
+
|
2922 |
+
//Variable Definition
|
2923 |
+
var _IsSliding;
|
2924 |
+
var _IsDragging;
|
2925 |
+
var _LoadingTicket;
|
2926 |
+
|
2927 |
+
//The X position of mouse/touch when a drag start
|
2928 |
+
var _DragStartMouseX = 0;
|
2929 |
+
//The Y position of mouse/touch when a drag start
|
2930 |
+
var _DragStartMouseY = 0;
|
2931 |
+
var _DragOffsetTotal;
|
2932 |
+
var _DragOffsetLastTime;
|
2933 |
+
var _DragIndexAdjust;
|
2934 |
+
|
2935 |
+
var _Carousel;
|
2936 |
+
var _Conveyor;
|
2937 |
+
var _Slideshow;
|
2938 |
+
var _CarouselPlayer;
|
2939 |
+
var _SlideContainer = new SlideContainer();
|
2940 |
+
var _ScaleRatio;
|
2941 |
+
|
2942 |
+
//$JssorSlider$ Constructor
|
2943 |
+
{
|
2944 |
+
_AutoPlay = _Options.$AutoPlay;
|
2945 |
+
_SelfSlider.$Options = options;
|
2946 |
+
|
2947 |
+
AdjustSlidesContainerSize();
|
2948 |
+
|
2949 |
+
elmt["jssor-slider"] = true;
|
2950 |
+
|
2951 |
+
//_SlideshowPanel = CreatePanel();
|
2952 |
+
//$Jssor$.$CssZIndex(elmt, $Jssor$.$CssZIndex(elmt));
|
2953 |
+
//$Jssor$.$CssLeft(_SlideshowPanel, $Jssor$.$CssLeft(_SlidesContainer));
|
2954 |
+
//$Jssor$.$CssZIndex(_SlidesContainer, $Jssor$.$CssZIndex(_SlidesContainer));
|
2955 |
+
//$Jssor$.$CssTop(_SlideshowPanel, $Jssor$.$CssTop(_SlidesContainer));
|
2956 |
+
$Jssor$.$CssZIndex(_SlidesContainer, $Jssor$.$CssZIndex(_SlidesContainer) || 0);
|
2957 |
+
$Jssor$.$CssPosition(_SlidesContainer, "absolute");
|
2958 |
+
_SlideshowPanel = $Jssor$.$CloneNode(_SlidesContainer);
|
2959 |
+
$Jssor$.$InsertBefore($Jssor$.$ParentNode(_SlidesContainer), _SlideshowPanel, _SlidesContainer);
|
2960 |
+
|
2961 |
+
if (_SlideshowOptions) {
|
2962 |
+
_ShowLink = _SlideshowOptions.$ShowLink;
|
2963 |
+
_SlideshowRunnerClass = _SlideshowOptions.$Class;
|
2964 |
+
|
2965 |
+
$JssorDebug$.$Execute(function () {
|
2966 |
+
if (!_SlideshowOptions.$Transitions || !_SlideshowOptions.$Transitions.length) {
|
2967 |
+
$JssorDebug$.$Error("Invalid '$SlideshowOptions', no '$Transitions' specified.");
|
2968 |
+
}
|
2969 |
+
});
|
2970 |
+
|
2971 |
+
$Jssor$.$TranslateTransitions(_SlideshowOptions.$Transitions); //for old transition compatibility
|
2972 |
+
|
2973 |
+
_SlideshowEnabled = _DisplayPieces == 1 && _SlideCount > 1 && _SlideshowRunnerClass && (!$Jssor$.$IsBrowserIE() || $Jssor$.$BrowserVersion() >= 8);
|
2974 |
+
}
|
2975 |
+
|
2976 |
+
_ParkingPosition = (_SlideshowEnabled || _DisplayPieces >= _SlideCount || !(_Loop & 1)) ? 0 : _Options.$ParkingPosition;
|
2977 |
+
|
2978 |
+
_DragEnabled = ((_DisplayPieces > 1 || _ParkingPosition) ? _PlayOrientation : -1) & _Options.$DragOrientation;
|
2979 |
+
|
2980 |
+
//SlideBoard
|
2981 |
+
var _SlideboardElmt = _SlidesContainer;
|
2982 |
+
var _SlideItems = [];
|
2983 |
+
|
2984 |
+
var _SlideshowRunner;
|
2985 |
+
var _LinkContainer;
|
2986 |
+
|
2987 |
+
var _DownEvent = "mousedown";
|
2988 |
+
var _MoveEvent = "mousemove";
|
2989 |
+
var _UpEvent = "mouseup";
|
2990 |
+
var _CancelEvent;
|
2991 |
+
|
2992 |
+
var _LastTimeMoveByDrag;
|
2993 |
+
var _Position_OnFreeze;
|
2994 |
+
var _CarouselPlaying_OnFreeze;
|
2995 |
+
var _PlayToPosition_OnFreeze;
|
2996 |
+
var _PositionToGoByDrag;
|
2997 |
+
|
2998 |
+
//SlideBoard Constructor
|
2999 |
+
{
|
3000 |
+
var msPrefix;
|
3001 |
+
if (window.navigator.pointerEnabled || (msPrefix = window.navigator.msPointerEnabled)) {
|
3002 |
+
_IsTouchDevice = true;
|
3003 |
+
|
3004 |
+
_DownEvent = msPrefix ? "MSPointerDown" : "pointerdown";
|
3005 |
+
_MoveEvent = msPrefix ? "MSPointerMove" : "pointermove";
|
3006 |
+
_UpEvent = msPrefix ? "MSPointerUp" : "pointerup";
|
3007 |
+
_CancelEvent = msPrefix ? "MSPointerCancel" : "pointercancel";
|
3008 |
+
|
3009 |
+
if (_DragEnabled) {
|
3010 |
+
var touchAction = "auto";
|
3011 |
+
if (_DragEnabled == 2) {
|
3012 |
+
touchAction = "pan-x";
|
3013 |
+
}
|
3014 |
+
else if (_DragEnabled) {
|
3015 |
+
touchAction = "pan-y";
|
3016 |
+
}
|
3017 |
+
|
3018 |
+
$Jssor$.$Css(_SlideboardElmt, msPrefix ? "msTouchAction" : "touchAction", touchAction);
|
3019 |
+
}
|
3020 |
+
}
|
3021 |
+
else if ("ontouchstart" in window || "createTouch" in document) {
|
3022 |
+
_HandleTouchEventOnly = true;
|
3023 |
+
_IsTouchDevice = true;
|
3024 |
+
|
3025 |
+
_DownEvent = "touchstart";
|
3026 |
+
_MoveEvent = "touchmove";
|
3027 |
+
_UpEvent = "touchend";
|
3028 |
+
_CancelEvent = "touchcancel";
|
3029 |
+
}
|
3030 |
+
|
3031 |
+
_Slideshow = new Slideshow();
|
3032 |
+
|
3033 |
+
if (_SlideshowEnabled)
|
3034 |
+
_SlideshowRunner = new _SlideshowRunnerClass(_SlideContainer, _SlideWidth, _SlideHeight, _SlideshowOptions, _HandleTouchEventOnly);
|
3035 |
+
|
3036 |
+
$Jssor$.$AppendChild(_SlideshowPanel, _Slideshow.$Wrapper);
|
3037 |
+
$Jssor$.$CssOverflow(_SlidesContainer, "hidden");
|
3038 |
+
|
3039 |
+
//link container
|
3040 |
+
{
|
3041 |
+
_LinkContainer = CreatePanel();
|
3042 |
+
$Jssor$.$Css(_LinkContainer, "backgroundColor", "#000");
|
3043 |
+
$Jssor$.$CssOpacity(_LinkContainer, 0);
|
3044 |
+
$Jssor$.$InsertBefore(_SlideboardElmt, _LinkContainer, _SlideboardElmt.firstChild);
|
3045 |
+
}
|
3046 |
+
|
3047 |
+
for (var i = 0; i < _SlideElmts.length; i++) {
|
3048 |
+
var slideElmt = _SlideElmts[i];
|
3049 |
+
var slideItem = new SlideItem(slideElmt, i);
|
3050 |
+
_SlideItems.push(slideItem);
|
3051 |
+
}
|
3052 |
+
|
3053 |
+
$Jssor$.$HideElement(_LoadingContainer);
|
3054 |
+
|
3055 |
+
$JssorDebug$.$Execute(function () {
|
3056 |
+
$Jssor$.$Attribute(_LoadingContainer, "debug-id", "loading-container");
|
3057 |
+
});
|
3058 |
+
|
3059 |
+
_Carousel = new Carousel()
|
3060 |
+
_CarouselPlayer = new CarouselPlayer(_Carousel, _Slideshow);
|
3061 |
+
|
3062 |
+
$JssorDebug$.$Execute(function () {
|
3063 |
+
$Jssor$.$Attribute(_SlideboardElmt, "debug-id", "slide-board");
|
3064 |
+
});
|
3065 |
+
|
3066 |
+
if (_DragEnabled) {
|
3067 |
+
$Jssor$.$AddEvent(_SlidesContainer, _DownEvent, OnMouseDown);
|
3068 |
+
$Jssor$.$AddEvent(document, _UpEvent, OnDragEnd);
|
3069 |
+
_CancelEvent && $Jssor$.$AddEvent(document, _CancelEvent, OnDragEnd);
|
3070 |
+
}
|
3071 |
+
}
|
3072 |
+
//SlideBoard
|
3073 |
+
|
3074 |
+
_HoverToPause &= (_IsTouchDevice ? 10 : 5);
|
3075 |
+
|
3076 |
+
//Bullet Navigator
|
3077 |
+
if (_BulletNavigatorContainer && _BulletNavigatorOptions) {
|
3078 |
+
_BulletNavigator = new _BulletNavigatorOptions.$Class(_BulletNavigatorContainer, _BulletNavigatorOptions, OriginalWidth(), OriginalHeight());
|
3079 |
+
_Navigators.push(_BulletNavigator);
|
3080 |
+
}
|
3081 |
+
|
3082 |
+
//Arrow Navigator
|
3083 |
+
if (_ArrowNavigatorOptions && _ArrowLeft && _ArrowRight) {
|
3084 |
+
_ArrowNavigator = new _ArrowNavigatorOptions.$Class(_ArrowLeft, _ArrowRight, _ArrowNavigatorOptions, OriginalWidth(), OriginalHeight());
|
3085 |
+
_Navigators.push(_ArrowNavigator);
|
3086 |
+
}
|
3087 |
+
|
3088 |
+
//Thumbnail Navigator
|
3089 |
+
if (_ThumbnailNavigatorContainer && _ThumbnailNavigatorOptions) {
|
3090 |
+
_ThumbnailNavigatorOptions.$StartIndex = _Options.$StartIndex;
|
3091 |
+
_ThumbnailNavigator = new _ThumbnailNavigatorOptions.$Class(_ThumbnailNavigatorContainer, _ThumbnailNavigatorOptions);
|
3092 |
+
_Navigators.push(_ThumbnailNavigator);
|
3093 |
+
}
|
3094 |
+
|
3095 |
+
$Jssor$.$Each(_Navigators, function (navigator) {
|
3096 |
+
navigator.$Reset(_SlideCount, _SlideItems, _LoadingContainer);
|
3097 |
+
navigator.$On($JssorNavigatorEvents$.$NAVIGATIONREQUEST, NavigationClickHandler);
|
3098 |
+
});
|
3099 |
+
|
3100 |
+
Scale(OriginalWidth());
|
3101 |
+
|
3102 |
+
$Jssor$.$AddEvent(elmt, "mouseout", $Jssor$.$MouseOverOutFilter(MainContainerMouseLeaveEventHandler, elmt));
|
3103 |
+
$Jssor$.$AddEvent(elmt, "mouseover", $Jssor$.$MouseOverOutFilter(MainContainerMouseEnterEventHandler, elmt));
|
3104 |
+
|
3105 |
+
ShowNavigators();
|
3106 |
+
|
3107 |
+
//Keyboard Navigation
|
3108 |
+
if (_Options.$ArrowKeyNavigation) {
|
3109 |
+
$Jssor$.$AddEvent(document, "keydown", function (e) {
|
3110 |
+
if (e.keyCode == $JssorKeyCode$.$LEFT) {
|
3111 |
+
//Arrow Left
|
3112 |
+
PlayToOffset(-1);
|
3113 |
+
}
|
3114 |
+
else if (e.keyCode == $JssorKeyCode$.$RIGHT) {
|
3115 |
+
//Arrow Right
|
3116 |
+
PlayToOffset(1);
|
3117 |
+
}
|
3118 |
+
});
|
3119 |
+
}
|
3120 |
+
|
3121 |
+
var startPosition = _Options.$StartIndex;
|
3122 |
+
if (!(_Loop & 1)) {
|
3123 |
+
startPosition = Math.max(0, Math.min(startPosition, _SlideCount - _DisplayPieces));
|
3124 |
+
}
|
3125 |
+
_CarouselPlayer.$PlayCarousel(startPosition, startPosition, 0);
|
3126 |
+
}
|
3127 |
+
}
|
3128 |
+
//Jssor Slider
|
3129 |
+
|
3130 |
+
//JssorSlider.$ASSEMBLY_BOTTOM_LEFT = ASSEMBLY_BOTTOM_LEFT;
|
3131 |
+
//JssorSlider.$ASSEMBLY_BOTTOM_RIGHT = ASSEMBLY_BOTTOM_RIGHT;
|
3132 |
+
//JssorSlider.$ASSEMBLY_TOP_LEFT = ASSEMBLY_TOP_LEFT;
|
3133 |
+
//JssorSlider.$ASSEMBLY_TOP_RIGHT = ASSEMBLY_TOP_RIGHT;
|
3134 |
+
//JssorSlider.$ASSEMBLY_LEFT_TOP = ASSEMBLY_LEFT_TOP;
|
3135 |
+
//JssorSlider.$ASSEMBLY_LEFT_BOTTOM = ASSEMBLY_LEFT_BOTTOM;
|
3136 |
+
//JssorSlider.$ASSEMBLY_RIGHT_TOP = ASSEMBLY_RIGHT_TOP;
|
3137 |
+
//JssorSlider.$ASSEMBLY_RIGHT_BOTTOM = ASSEMBLY_RIGHT_BOTTOM;
|
3138 |
+
|
3139 |
+
JssorSlider.$EVT_CLICK = 21;
|
3140 |
+
JssorSlider.$EVT_DRAG_START = 22;
|
3141 |
+
JssorSlider.$EVT_DRAG_END = 23;
|
3142 |
+
JssorSlider.$EVT_SWIPE_START = 24;
|
3143 |
+
JssorSlider.$EVT_SWIPE_END = 25;
|
3144 |
+
|
3145 |
+
JssorSlider.$EVT_LOAD_START = 26;
|
3146 |
+
JssorSlider.$EVT_LOAD_END = 27;
|
3147 |
+
JssorSlider.$EVT_FREEZE = 28;
|
3148 |
+
|
3149 |
+
JssorSlider.$EVT_POSITION_CHANGE = 202;
|
3150 |
+
JssorSlider.$EVT_PARK = 203;
|
3151 |
+
|
3152 |
+
JssorSlider.$EVT_SLIDESHOW_START = 206;
|
3153 |
+
JssorSlider.$EVT_SLIDESHOW_END = 207;
|
3154 |
+
|
3155 |
+
JssorSlider.$EVT_PROGRESS_CHANGE = 208;
|
3156 |
+
JssorSlider.$EVT_STATE_CHANGE = 209;
|
3157 |
+
JssorSlider.$EVT_ROLLBACK_START = 210;
|
3158 |
+
JssorSlider.$EVT_ROLLBACK_END = 211;
|
3159 |
+
|
3160 |
+
window.$JssorSlider$ = $JssorSlider$ = JssorSlider;
|
3161 |
+
|
3162 |
+
//(function ($) {
|
3163 |
+
// jQuery.fn.jssorSlider = function (options) {
|
3164 |
+
// return this.each(function () {
|
3165 |
+
// return $(this).data('jssorSlider') || $(this).data('jssorSlider', new JssorSlider(this, options));
|
3166 |
+
// });
|
3167 |
+
// };
|
3168 |
+
//})(jQuery);
|
3169 |
+
|
3170 |
+
//window.jQuery && (jQuery.fn.jssorSlider = function (options) {
|
3171 |
+
// return this.each(function () {
|
3172 |
+
// return jQuery(this).data('jssorSlider') || jQuery(this).data('jssorSlider', new JssorSlider(this, options));
|
3173 |
+
// });
|
3174 |
+
//});
|
3175 |
+
};
|
3176 |
+
|
3177 |
+
//$JssorBulletNavigator$
|
3178 |
+
var $JssorNavigatorEvents$ = {
|
3179 |
+
$NAVIGATIONREQUEST: 1,
|
3180 |
+
$INDEXCHANGE: 2,
|
3181 |
+
$RESET: 3
|
3182 |
+
};
|
3183 |
+
|
3184 |
+
var $JssorBulletNavigator$ = window.$JssorBulletNavigator$ = function (elmt, options, containerWidth, containerHeight) {
|
3185 |
+
var self = this;
|
3186 |
+
$JssorObject$.call(self);
|
3187 |
+
|
3188 |
+
elmt = $Jssor$.$GetElement(elmt);
|
3189 |
+
|
3190 |
+
var _Count;
|
3191 |
+
var _Length;
|
3192 |
+
var _Width;
|
3193 |
+
var _Height;
|
3194 |
+
var _CurrentIndex;
|
3195 |
+
var _CurrentInnerIndex = 0;
|
3196 |
+
var _Options;
|
3197 |
+
var _Steps;
|
3198 |
+
var _Lanes;
|
3199 |
+
var _SpacingX;
|
3200 |
+
var _SpacingY;
|
3201 |
+
var _Orientation;
|
3202 |
+
var _ItemPrototype;
|
3203 |
+
var _PrototypeWidth;
|
3204 |
+
var _PrototypeHeight;
|
3205 |
+
|
3206 |
+
var _ButtonElements = [];
|
3207 |
+
var _Buttons = [];
|
3208 |
+
|
3209 |
+
function Highlight(index) {
|
3210 |
+
if (index != -1)
|
3211 |
+
_Buttons[index].$Activate(index == _CurrentInnerIndex);
|
3212 |
+
}
|
3213 |
+
|
3214 |
+
function OnNavigationRequest(index) {
|
3215 |
+
self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, index * _Steps);
|
3216 |
+
}
|
3217 |
+
|
3218 |
+
self.$Elmt = elmt;
|
3219 |
+
self.$GetCurrentIndex = function () {
|
3220 |
+
return _CurrentIndex;
|
3221 |
+
};
|
3222 |
+
|
3223 |
+
self.$SetCurrentIndex = function (index) {
|
3224 |
+
if (index != _CurrentIndex) {
|
3225 |
+
var lastInnerIndex = _CurrentInnerIndex;
|
3226 |
+
var innerIndex = Math.floor(index / _Steps);
|
3227 |
+
_CurrentInnerIndex = innerIndex;
|
3228 |
+
_CurrentIndex = index;
|
3229 |
+
|
3230 |
+
Highlight(lastInnerIndex);
|
3231 |
+
Highlight(innerIndex);
|
3232 |
+
|
3233 |
+
//self.$TriggerEvent($JssorNavigatorEvents$.$INDEXCHANGE, index);
|
3234 |
+
}
|
3235 |
+
};
|
3236 |
+
|
3237 |
+
self.$Show = function (hide) {
|
3238 |
+
$Jssor$.$ShowElement(elmt, hide);
|
3239 |
+
};
|
3240 |
+
|
3241 |
+
var _Located;
|
3242 |
+
self.$Relocate = function (containerWidth, containerHeight) {
|
3243 |
+
if (!_Located || _Options.$Scale == false) {
|
3244 |
+
if (_Options.$AutoCenter & 1) {
|
3245 |
+
$Jssor$.$CssLeft(elmt, (containerWidth - _Width) / 2);
|
3246 |
+
}
|
3247 |
+
if (_Options.$AutoCenter & 2) {
|
3248 |
+
$Jssor$.$CssTop(elmt, (containerHeight - _Height) / 2);
|
3249 |
+
}
|
3250 |
+
|
3251 |
+
_Located = true;
|
3252 |
+
}
|
3253 |
+
};
|
3254 |
+
|
3255 |
+
var _Initialized;
|
3256 |
+
self.$Reset = function (length) {
|
3257 |
+
if (!_Initialized) {
|
3258 |
+
_Length = length;
|
3259 |
+
_Count = Math.ceil(length / _Steps);
|
3260 |
+
_CurrentInnerIndex = 0;
|
3261 |
+
|
3262 |
+
var itemOffsetX = _PrototypeWidth + _SpacingX;
|
3263 |
+
var itemOffsetY = _PrototypeHeight + _SpacingY;
|
3264 |
+
|
3265 |
+
var maxIndex = Math.ceil(_Count / _Lanes) - 1;
|
3266 |
+
|
3267 |
+
_Width = _PrototypeWidth + itemOffsetX * (!_Orientation ? maxIndex : _Lanes - 1);
|
3268 |
+
_Height = _PrototypeHeight + itemOffsetY * (_Orientation ? maxIndex : _Lanes - 1);
|
3269 |
+
|
3270 |
+
$Jssor$.$CssWidth(elmt, _Width);
|
3271 |
+
$Jssor$.$CssHeight(elmt, _Height);
|
3272 |
+
|
3273 |
+
for (var buttonIndex = 0; buttonIndex < _Count; buttonIndex++) {
|
3274 |
+
|
3275 |
+
var numberDiv = $Jssor$.$CreateSpan();
|
3276 |
+
$Jssor$.$InnerText(numberDiv, buttonIndex + 1);
|
3277 |
+
|
3278 |
+
var div = $Jssor$.$BuildElement(_ItemPrototype, "numbertemplate", numberDiv, true);
|
3279 |
+
$Jssor$.$CssPosition(div, "absolute");
|
3280 |
+
|
3281 |
+
var columnIndex = buttonIndex % (maxIndex + 1);
|
3282 |
+
$Jssor$.$CssLeft(div, !_Orientation ? itemOffsetX * columnIndex : buttonIndex % _Lanes * itemOffsetX);
|
3283 |
+
$Jssor$.$CssTop(div, _Orientation ? itemOffsetY * columnIndex : Math.floor(buttonIndex / (maxIndex + 1)) * itemOffsetY);
|
3284 |
+
|
3285 |
+
$Jssor$.$AppendChild(elmt, div);
|
3286 |
+
_ButtonElements[buttonIndex] = div;
|
3287 |
+
|
3288 |
+
if (_Options.$ActionMode & 1)
|
3289 |
+
$Jssor$.$AddEvent(div, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, buttonIndex));
|
3290 |
+
|
3291 |
+
if (_Options.$ActionMode & 2)
|
3292 |
+
$Jssor$.$AddEvent(div, "mouseover", $Jssor$.$MouseOverOutFilter($Jssor$.$CreateCallback(null, OnNavigationRequest, buttonIndex), div));
|
3293 |
+
|
3294 |
+
_Buttons[buttonIndex] = $Jssor$.$Buttonize(div);
|
3295 |
+
}
|
3296 |
+
|
3297 |
+
//self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
|
3298 |
+
_Initialized = true;
|
3299 |
+
}
|
3300 |
+
};
|
3301 |
+
|
3302 |
+
//JssorBulletNavigator Constructor
|
3303 |
+
{
|
3304 |
+
self.$Options = _Options = $Jssor$.$Extend({
|
3305 |
+
$SpacingX: 0,
|
3306 |
+
$SpacingY: 0,
|
3307 |
+
$Orientation: 1,
|
3308 |
+
$ActionMode: 1
|
3309 |
+
}, options);
|
3310 |
+
|
3311 |
+
//Sodo statement for development time intellisence only
|
3312 |
+
$JssorDebug$.$Execute(function () {
|
3313 |
+
_Options = $Jssor$.$Extend({
|
3314 |
+
$Steps: undefined,
|
3315 |
+
$Lanes: undefined
|
3316 |
+
}, _Options);
|
3317 |
+
});
|
3318 |
+
|
3319 |
+
_ItemPrototype = $Jssor$.$FindChild(elmt, "prototype");
|
3320 |
+
|
3321 |
+
$JssorDebug$.$Execute(function () {
|
3322 |
+
if (!_ItemPrototype)
|
3323 |
+
$JssorDebug$.$Fail("Navigator item prototype not defined.");
|
3324 |
+
|
3325 |
+
if (isNaN($Jssor$.$CssWidth(_ItemPrototype))) {
|
3326 |
+
$JssorDebug$.$Fail("Width of 'navigator item prototype' not specified.");
|
3327 |
+
}
|
3328 |
+
|
3329 |
+
if (isNaN($Jssor$.$CssHeight(_ItemPrototype))) {
|
3330 |
+
$JssorDebug$.$Fail("Height of 'navigator item prototype' not specified.");
|
3331 |
+
}
|
3332 |
+
});
|
3333 |
+
|
3334 |
+
_PrototypeWidth = $Jssor$.$CssWidth(_ItemPrototype);
|
3335 |
+
_PrototypeHeight = $Jssor$.$CssHeight(_ItemPrototype);
|
3336 |
+
|
3337 |
+
$Jssor$.$RemoveChild(elmt, _ItemPrototype);
|
3338 |
+
|
3339 |
+
_Steps = _Options.$Steps || 1;
|
3340 |
+
_Lanes = _Options.$Lanes || 1;
|
3341 |
+
_SpacingX = _Options.$SpacingX;
|
3342 |
+
_SpacingY = _Options.$SpacingY;
|
3343 |
+
_Orientation = _Options.$Orientation - 1;
|
3344 |
+
}
|
3345 |
+
};
|
3346 |
+
|
3347 |
+
var $JssorArrowNavigator$ = window.$JssorArrowNavigator$ = function (arrowLeft, arrowRight, options, containerWidth, containerHeight) {
|
3348 |
+
var self = this;
|
3349 |
+
$JssorObject$.call(self);
|
3350 |
+
|
3351 |
+
$JssorDebug$.$Execute(function () {
|
3352 |
+
|
3353 |
+
if (!arrowLeft)
|
3354 |
+
$JssorDebug$.$Fail("Option '$ArrowNavigatorOptions' spepcified, but UI 'arrowleft' not defined. Define 'arrowleft' to enable direct navigation, or remove option '$ArrowNavigatorOptions' to disable direct navigation.");
|
3355 |
+
|
3356 |
+
if (!arrowRight)
|
3357 |
+
$JssorDebug$.$Fail("Option '$ArrowNavigatorOptions' spepcified, but UI 'arrowright' not defined. Define 'arrowright' to enable direct navigation, or remove option '$ArrowNavigatorOptions' to disable direct navigation.");
|
3358 |
+
|
3359 |
+
if (isNaN($Jssor$.$CssWidth(arrowLeft))) {
|
3360 |
+
$JssorDebug$.$Fail("Width of 'arrow left' not specified.");
|
3361 |
+
}
|
3362 |
+
|
3363 |
+
if (isNaN($Jssor$.$CssWidth(arrowRight))) {
|
3364 |
+
$JssorDebug$.$Fail("Width of 'arrow right' not specified.");
|
3365 |
+
}
|
3366 |
+
|
3367 |
+
if (isNaN($Jssor$.$CssHeight(arrowLeft))) {
|
3368 |
+
$JssorDebug$.$Fail("Height of 'arrow left' not specified.");
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
if (isNaN($Jssor$.$CssHeight(arrowRight))) {
|
3372 |
+
$JssorDebug$.$Fail("Height of 'arrow right' not specified.");
|
3373 |
+
}
|
3374 |
+
});
|
3375 |
+
|
3376 |
+
var _Length;
|
3377 |
+
var _CurrentIndex;
|
3378 |
+
var _Options;
|
3379 |
+
var _Steps;
|
3380 |
+
var _ArrowWidth = $Jssor$.$CssWidth(arrowLeft);
|
3381 |
+
var _ArrowHeight = $Jssor$.$CssHeight(arrowLeft);
|
3382 |
+
|
3383 |
+
function OnNavigationRequest(steps) {
|
3384 |
+
self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, steps, true);
|
3385 |
+
}
|
3386 |
+
|
3387 |
+
self.$GetCurrentIndex = function () {
|
3388 |
+
return _CurrentIndex;
|
3389 |
+
};
|
3390 |
+
|
3391 |
+
self.$SetCurrentIndex = function (index, virtualIndex, temp) {
|
3392 |
+
if (temp) {
|
3393 |
+
_CurrentIndex = virtualIndex;
|
3394 |
+
}
|
3395 |
+
else {
|
3396 |
+
_CurrentIndex = index;
|
3397 |
+
}
|
3398 |
+
//self.$TriggerEvent($JssorNavigatorEvents$.$INDEXCHANGE, index);
|
3399 |
+
};
|
3400 |
+
|
3401 |
+
self.$Show = function (hide) {
|
3402 |
+
$Jssor$.$ShowElement(arrowLeft, hide);
|
3403 |
+
$Jssor$.$ShowElement(arrowRight, hide);
|
3404 |
+
};
|
3405 |
+
|
3406 |
+
var _Located;
|
3407 |
+
self.$Relocate = function (conainerWidth, containerHeight) {
|
3408 |
+
if (!_Located || _Options.$Scale == false) {
|
3409 |
+
|
3410 |
+
if (_Options.$AutoCenter & 1) {
|
3411 |
+
$Jssor$.$CssLeft(arrowLeft, (containerWidth - _ArrowWidth) / 2);
|
3412 |
+
$Jssor$.$CssLeft(arrowRight, (containerWidth - _ArrowWidth) / 2);
|
3413 |
+
}
|
3414 |
+
|
3415 |
+
if (_Options.$AutoCenter & 2) {
|
3416 |
+
$Jssor$.$CssTop(arrowLeft, (containerHeight - _ArrowHeight) / 2);
|
3417 |
+
$Jssor$.$CssTop(arrowRight, (containerHeight - _ArrowHeight) / 2);
|
3418 |
+
}
|
3419 |
+
|
3420 |
+
_Located = true;
|
3421 |
+
}
|
3422 |
+
};
|
3423 |
+
|
3424 |
+
var _Initialized;
|
3425 |
+
self.$Reset = function (length) {
|
3426 |
+
_Length = length;
|
3427 |
+
_CurrentIndex = 0;
|
3428 |
+
|
3429 |
+
if (!_Initialized) {
|
3430 |
+
|
3431 |
+
$Jssor$.$AddEvent(arrowLeft, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, -_Steps));
|
3432 |
+
$Jssor$.$AddEvent(arrowRight, "click", $Jssor$.$CreateCallback(null, OnNavigationRequest, _Steps));
|
3433 |
+
|
3434 |
+
$Jssor$.$Buttonize(arrowLeft);
|
3435 |
+
$Jssor$.$Buttonize(arrowRight);
|
3436 |
+
|
3437 |
+
_Initialized = true;
|
3438 |
+
}
|
3439 |
+
|
3440 |
+
//self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
|
3441 |
+
};
|
3442 |
+
|
3443 |
+
//JssorArrowNavigator Constructor
|
3444 |
+
{
|
3445 |
+
self.$Options = _Options = $Jssor$.$Extend({
|
3446 |
+
$Steps: 1
|
3447 |
+
}, options);
|
3448 |
+
|
3449 |
+
_Steps = _Options.$Steps;
|
3450 |
+
}
|
3451 |
+
};
|
3452 |
+
|
3453 |
+
//$JssorThumbnailNavigator$
|
3454 |
+
var $JssorThumbnailNavigator$ = window.$JssorThumbnailNavigator$ = function (elmt, options) {
|
3455 |
+
var _Self = this;
|
3456 |
+
var _Length;
|
3457 |
+
var _Count;
|
3458 |
+
var _CurrentIndex;
|
3459 |
+
var _Options;
|
3460 |
+
var _NavigationItems = [];
|
3461 |
+
|
3462 |
+
var _Width;
|
3463 |
+
var _Height;
|
3464 |
+
var _Lanes;
|
3465 |
+
var _SpacingX;
|
3466 |
+
var _SpacingY;
|
3467 |
+
var _PrototypeWidth;
|
3468 |
+
var _PrototypeHeight;
|
3469 |
+
var _DisplayPieces;
|
3470 |
+
|
3471 |
+
var _Slider;
|
3472 |
+
var _CurrentMouseOverIndex = -1;
|
3473 |
+
|
3474 |
+
var _SlidesContainer;
|
3475 |
+
var _ThumbnailPrototype;
|
3476 |
+
|
3477 |
+
$JssorObject$.call(_Self);
|
3478 |
+
elmt = $Jssor$.$GetElement(elmt);
|
3479 |
+
|
3480 |
+
function NavigationItem(item, index) {
|
3481 |
+
var self = this;
|
3482 |
+
var _Wrapper;
|
3483 |
+
var _Button;
|
3484 |
+
var _Thumbnail;
|
3485 |
+
|
3486 |
+
function Highlight(mouseStatus) {
|
3487 |
+
_Button.$Activate(_CurrentIndex == index);
|
3488 |
+
}
|
3489 |
+
|
3490 |
+
function OnNavigationRequest(event) {
|
3491 |
+
if (!_Slider.$LastDragSucceded()) {
|
3492 |
+
var tail = _Lanes - index % _Lanes;
|
3493 |
+
var slideVirtualIndex = _Slider.$GetVirtualIndex((index + tail) / _Lanes - 1);
|
3494 |
+
var itemVirtualIndex = slideVirtualIndex * _Lanes + _Lanes - tail;
|
3495 |
+
_Self.$TriggerEvent($JssorNavigatorEvents$.$NAVIGATIONREQUEST, itemVirtualIndex);
|
3496 |
+
}
|
3497 |
+
|
3498 |
+
//$JssorDebug$.$Log("navigation request");
|
3499 |
+
}
|
3500 |
+
|
3501 |
+
$JssorDebug$.$Execute(function () {
|
3502 |
+
self.$Wrapper = undefined;
|
3503 |
+
});
|
3504 |
+
|
3505 |
+
self.$Index = index;
|
3506 |
+
|
3507 |
+
self.$Highlight = Highlight;
|
3508 |
+
|
3509 |
+
//NavigationItem Constructor
|
3510 |
+
{
|
3511 |
+
_Thumbnail = item.$Thumb || item.$Image || $Jssor$.$CreateDiv();
|
3512 |
+
self.$Wrapper = _Wrapper = $Jssor$.$BuildElement(_ThumbnailPrototype, "thumbnailtemplate", _Thumbnail, true);
|
3513 |
+
|
3514 |
+
_Button = $Jssor$.$Buttonize(_Wrapper);
|
3515 |
+
if (_Options.$ActionMode & 1)
|
3516 |
+
$Jssor$.$AddEvent(_Wrapper, "click", OnNavigationRequest);
|
3517 |
+
if (_Options.$ActionMode & 2)
|
3518 |
+
$Jssor$.$AddEvent(_Wrapper, "mouseover", $Jssor$.$MouseOverOutFilter(OnNavigationRequest, _Wrapper));
|
3519 |
+
}
|
3520 |
+
}
|
3521 |
+
|
3522 |
+
_Self.$GetCurrentIndex = function () {
|
3523 |
+
return _CurrentIndex;
|
3524 |
+
};
|
3525 |
+
|
3526 |
+
_Self.$SetCurrentIndex = function (index, virtualIndex, temp) {
|
3527 |
+
var oldIndex = _CurrentIndex;
|
3528 |
+
_CurrentIndex = index;
|
3529 |
+
if (oldIndex != -1)
|
3530 |
+
_NavigationItems[oldIndex].$Highlight();
|
3531 |
+
_NavigationItems[index].$Highlight();
|
3532 |
+
|
3533 |
+
if (!temp) {
|
3534 |
+
_Slider.$PlayTo(_Slider.$GetVirtualIndex(Math.floor(virtualIndex / _Lanes)));
|
3535 |
+
}
|
3536 |
+
};
|
3537 |
+
|
3538 |
+
_Self.$Show = function (hide) {
|
3539 |
+
$Jssor$.$ShowElement(elmt, hide);
|
3540 |
+
};
|
3541 |
+
|
3542 |
+
_Self.$Relocate = $Jssor$.$EmptyFunction;
|
3543 |
+
|
3544 |
+
var _Initialized;
|
3545 |
+
_Self.$Reset = function (length, items, loadingContainer) {
|
3546 |
+
if (!_Initialized) {
|
3547 |
+
_Length = length;
|
3548 |
+
_Count = Math.ceil(_Length / _Lanes);
|
3549 |
+
_CurrentIndex = -1;
|
3550 |
+
_DisplayPieces = Math.min(_DisplayPieces, items.length);
|
3551 |
+
|
3552 |
+
var horizontal = _Options.$Orientation & 1;
|
3553 |
+
|
3554 |
+
var slideWidth = _PrototypeWidth + (_PrototypeWidth + _SpacingX) * (_Lanes - 1) * (1 - horizontal);
|
3555 |
+
var slideHeight = _PrototypeHeight + (_PrototypeHeight + _SpacingY) * (_Lanes - 1) * horizontal;
|
3556 |
+
|
3557 |
+
var slidesContainerWidth = slideWidth + (slideWidth + _SpacingX) * (_DisplayPieces - 1) * horizontal;
|
3558 |
+
var slidesContainerHeight = slideHeight + (slideHeight + _SpacingY) * (_DisplayPieces - 1) * (1 - horizontal);
|
3559 |
+
|
3560 |
+
$Jssor$.$CssPosition(_SlidesContainer, "absolute");
|
3561 |
+
$Jssor$.$CssOverflow(_SlidesContainer, "hidden");
|
3562 |
+
if (_Options.$AutoCenter & 1) {
|
3563 |
+
$Jssor$.$CssLeft(_SlidesContainer, (_Width - slidesContainerWidth) / 2);
|
3564 |
+
}
|
3565 |
+
if (_Options.$AutoCenter & 2) {
|
3566 |
+
$Jssor$.$CssTop(_SlidesContainer, (_Height - slidesContainerHeight) / 2);
|
3567 |
+
}
|
3568 |
+
//$JssorDebug$.$Execute(function () {
|
3569 |
+
// if (!_Options.$AutoCenter) {
|
3570 |
+
// var slidesContainerTop = $Jssor$.$CssTop(_SlidesContainer);
|
3571 |
+
// var slidesContainerLeft = $Jssor$.$CssLeft(_SlidesContainer);
|
3572 |
+
|
3573 |
+
// if (isNaN(slidesContainerTop)) {
|
3574 |
+
// $JssorDebug$.$Fail("Position 'top' wrong specification of thumbnail navigator slides container (<div u=\"thumbnavigator\">...<div u=\"slides\">), \r\nwhen option $ThumbnailNavigatorOptions.$AutoCenter set to 0, it should be specified in pixel (like <div u=\"slides\" style=\"top: 0px;\">)");
|
3575 |
+
// }
|
3576 |
+
|
3577 |
+
// if (isNaN(slidesContainerLeft)) {
|
3578 |
+
// $JssorDebug$.$Fail("Position 'left' wrong specification of thumbnail navigator slides container (<div u=\"thumbnavigator\">...<div u=\"slides\">), \r\nwhen option $ThumbnailNavigatorOptions.$AutoCenter set to 0, it should be specified in pixel (like <div u=\"slides\" style=\"left: 0px;\">)");
|
3579 |
+
// }
|
3580 |
+
// }
|
3581 |
+
//});
|
3582 |
+
$Jssor$.$CssWidth(_SlidesContainer, slidesContainerWidth);
|
3583 |
+
$Jssor$.$CssHeight(_SlidesContainer, slidesContainerHeight);
|
3584 |
+
|
3585 |
+
var slideItemElmts = [];
|
3586 |
+
$Jssor$.$Each(items, function (item, index) {
|
3587 |
+
var navigationItem = new NavigationItem(item, index);
|
3588 |
+
var navigationItemWrapper = navigationItem.$Wrapper;
|
3589 |
+
|
3590 |
+
var columnIndex = Math.floor(index / _Lanes);
|
3591 |
+
var laneIndex = index % _Lanes;
|
3592 |
+
|
3593 |
+
$Jssor$.$CssLeft(navigationItemWrapper, (_PrototypeWidth + _SpacingX) * laneIndex * (1 - horizontal));
|
3594 |
+
$Jssor$.$CssTop(navigationItemWrapper, (_PrototypeHeight + _SpacingY) * laneIndex * horizontal);
|
3595 |
+
|
3596 |
+
if (!slideItemElmts[columnIndex]) {
|
3597 |
+
slideItemElmts[columnIndex] = $Jssor$.$CreateDiv();
|
3598 |
+
$Jssor$.$AppendChild(_SlidesContainer, slideItemElmts[columnIndex]);
|
3599 |
+
}
|
3600 |
+
|
3601 |
+
$Jssor$.$AppendChild(slideItemElmts[columnIndex], navigationItemWrapper);
|
3602 |
+
|
3603 |
+
_NavigationItems.push(navigationItem);
|
3604 |
+
});
|
3605 |
+
|
3606 |
+
var thumbnailSliderOptions = $Jssor$.$Extend({
|
3607 |
+
$HWA: false,
|
3608 |
+
$AutoPlay: false,
|
3609 |
+
$NaviQuitDrag: false,
|
3610 |
+
$SlideWidth: slideWidth,
|
3611 |
+
$SlideHeight: slideHeight,
|
3612 |
+
$SlideSpacing: _SpacingX * horizontal + _SpacingY * (1 - horizontal),
|
3613 |
+
$MinDragOffsetToSlide: 12,
|
3614 |
+
$SlideDuration: 200,
|
3615 |
+
$PauseOnHover: 1,
|
3616 |
+
$PlayOrientation: _Options.$Orientation,
|
3617 |
+
$DragOrientation: _Options.$DisableDrag ? 0 : _Options.$Orientation
|
3618 |
+
}, _Options);
|
3619 |
+
|
3620 |
+
_Slider = new $JssorSlider$(elmt, thumbnailSliderOptions);
|
3621 |
+
|
3622 |
+
_Initialized = true;
|
3623 |
+
}
|
3624 |
+
|
3625 |
+
//_Self.$TriggerEvent($JssorNavigatorEvents$.$RESET);
|
3626 |
+
};
|
3627 |
+
|
3628 |
+
//JssorThumbnailNavigator Constructor
|
3629 |
+
{
|
3630 |
+
_Self.$Options = _Options = $Jssor$.$Extend({
|
3631 |
+
$SpacingX: 3,
|
3632 |
+
$SpacingY: 3,
|
3633 |
+
$DisplayPieces: 1,
|
3634 |
+
$Orientation: 1,
|
3635 |
+
$AutoCenter: 3,
|
3636 |
+
$ActionMode: 1
|
3637 |
+
}, options);
|
3638 |
+
|
3639 |
+
//Sodo statement for development time intellisence only
|
3640 |
+
$JssorDebug$.$Execute(function () {
|
3641 |
+
_Options = $Jssor$.$Extend({
|
3642 |
+
$Lanes: undefined,
|
3643 |
+
$Width: undefined,
|
3644 |
+
$Height: undefined
|
3645 |
+
}, _Options);
|
3646 |
+
});
|
3647 |
+
|
3648 |
+
_Width = $Jssor$.$CssWidth(elmt);
|
3649 |
+
_Height = $Jssor$.$CssHeight(elmt);
|
3650 |
+
|
3651 |
+
$JssorDebug$.$Execute(function () {
|
3652 |
+
if (!_Width)
|
3653 |
+
$JssorDebug$.$Fail("width of 'thumbnavigator' container not specified.");
|
3654 |
+
if (!_Height)
|
3655 |
+
$JssorDebug$.$Fail("height of 'thumbnavigator' container not specified.");
|
3656 |
+
});
|
3657 |
+
|
3658 |
+
_SlidesContainer = $Jssor$.$FindChild(elmt, "slides", true);
|
3659 |
+
_ThumbnailPrototype = $Jssor$.$FindChild(_SlidesContainer, "prototype");
|
3660 |
+
|
3661 |
+
$JssorDebug$.$Execute(function () {
|
3662 |
+
if (!_ThumbnailPrototype)
|
3663 |
+
$JssorDebug$.$Fail("prototype of 'thumbnavigator' not defined.");
|
3664 |
+
});
|
3665 |
+
|
3666 |
+
_PrototypeWidth = $Jssor$.$CssWidth(_ThumbnailPrototype);
|
3667 |
+
_PrototypeHeight = $Jssor$.$CssHeight(_ThumbnailPrototype);
|
3668 |
+
|
3669 |
+
$Jssor$.$RemoveChild(_SlidesContainer, _ThumbnailPrototype);
|
3670 |
+
|
3671 |
+
_Lanes = _Options.$Lanes || 1;
|
3672 |
+
_SpacingX = _Options.$SpacingX;
|
3673 |
+
_SpacingY = _Options.$SpacingY;
|
3674 |
+
_DisplayPieces = _Options.$DisplayPieces;
|
3675 |
+
}
|
3676 |
+
};
|
3677 |
+
|
3678 |
+
//$JssorCaptionSliderBase$
|
3679 |
+
function $JssorCaptionSliderBase$() {
|
3680 |
+
$JssorAnimator$.call(this, 0, 0);
|
3681 |
+
this.$Revert = $Jssor$.$EmptyFunction;
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
var $JssorCaptionSlider$ = window.$JssorCaptionSlider$ = function (container, captionSlideOptions, playIn) {
|
3685 |
+
$JssorDebug$.$Execute(function () {
|
3686 |
+
if (!captionSlideOptions.$CaptionTransitions) {
|
3687 |
+
$JssorDebug$.$Error("'$CaptionSliderOptions' option error, '$CaptionSliderOptions.$CaptionTransitions' not specified.");
|
3688 |
+
}
|
3689 |
+
//else if (!$Jssor$.$IsArray(captionSlideOptions.$CaptionTransitions)) {
|
3690 |
+
// $JssorDebug$.$Error("'$CaptionSliderOptions' option error, '$CaptionSliderOptions.$CaptionTransitions' is not an array.");
|
3691 |
+
//}
|
3692 |
+
});
|
3693 |
+
|
3694 |
+
var _Self = this;
|
3695 |
+
var _ImmediateOutCaptionHanger;
|
3696 |
+
var _PlayMode = playIn ? captionSlideOptions.$PlayInMode : captionSlideOptions.$PlayOutMode;
|
3697 |
+
|
3698 |
+
var _CaptionTransitions = captionSlideOptions.$CaptionTransitions;
|
3699 |
+
var _CaptionTuningFetcher = { $Transition: "t", $Delay: "d", $Duration: "du", x: "x", y: "y", $Rotate: "r", $Zoom: "z", $Opacity: "f", $BeginTime: "b" };
|
3700 |
+
var _CaptionTuningTransfer = {
|
3701 |
+
$Default: function (value, tuningValue) {
|
3702 |
+
if (!isNaN(tuningValue.$Value))
|
3703 |
+
value = tuningValue.$Value;
|
3704 |
+
else
|
3705 |
+
value *= tuningValue.$Percent;
|
3706 |
+
|
3707 |
+
return value;
|
3708 |
+
},
|
3709 |
+
$Opacity: function (value, tuningValue) {
|
3710 |
+
return this.$Default(value - 1, tuningValue);
|
3711 |
+
}
|
3712 |
+
};
|
3713 |
+
_CaptionTuningTransfer.$Zoom = _CaptionTuningTransfer.$Opacity;
|
3714 |
+
|
3715 |
+
$JssorAnimator$.call(_Self, 0, 0);
|
3716 |
+
|
3717 |
+
function GetCaptionItems(element, level) {
|
3718 |
+
|
3719 |
+
var itemsToPlay = [];
|
3720 |
+
var lastTransitionName;
|
3721 |
+
var namedTransitions = [];
|
3722 |
+
var namedTransitionOrders = [];
|
3723 |
+
|
3724 |
+
//$JssorDebug$.$Execute(function () {
|
3725 |
+
|
3726 |
+
// var debugInfoElement = $Jssor$.$GetElement("debugInfo");
|
3727 |
+
|
3728 |
+
// if (debugInfoElement && playIn) {
|
3729 |
+
|
3730 |
+
// var text = $Jssor.$InnerHtml(debugInfoElement) + "<br>";
|
3731 |
+
|
3732 |
+
// $Jssor$.$InnerHtml(debugInfoElement, text);
|
3733 |
+
// }
|
3734 |
+
//});
|
3735 |
+
|
3736 |
+
function FetchRawTransition(captionElmt, index) {
|
3737 |
+
var rawTransition = {};
|
3738 |
+
|
3739 |
+
$Jssor$.$Each(_CaptionTuningFetcher, function (fetchAttribute, fetchProperty) {
|
3740 |
+
var attributeValue = $Jssor$.$AttributeEx(captionElmt, fetchAttribute + (index || ""));
|
3741 |
+
if (attributeValue) {
|
3742 |
+
var propertyValue = {};
|
3743 |
+
|
3744 |
+
if (fetchAttribute == "t") {
|
3745 |
+
//if (($Jssor$.$IsBrowserChrome() || $Jssor$.$IsBrowserSafari() || $Jssor$.$IsBrowserFireFox()) && attributeValue == "*") {
|
3746 |
+
// attributeValue = Math.floor(Math.random() * captionSlideOptions.$CaptionTransitions.length);
|
3747 |
+
// $Jssor$.$Attribute(captionElmt, fetchAttribute + (index || ""), attributeValue);
|
3748 |
+
//}
|
3749 |
+
|
3750 |
+
propertyValue.$Value = attributeValue;
|
3751 |
+
}
|
3752 |
+
else if (attributeValue.indexOf("%") + 1)
|
3753 |
+
propertyValue.$Percent = $Jssor$.$ParseFloat(attributeValue) / 100;
|
3754 |
+
else
|
3755 |
+
propertyValue.$Value = $Jssor$.$ParseFloat(attributeValue);
|
3756 |
+
|
3757 |
+
rawTransition[fetchProperty] = propertyValue;
|
3758 |
+
}
|
3759 |
+
});
|
3760 |
+
|
3761 |
+
return rawTransition;
|
3762 |
+
}
|
3763 |
+
|
3764 |
+
function GetRandomTransition() {
|
3765 |
+
return _CaptionTransitions[Math.floor(Math.random() * _CaptionTransitions.length)];
|
3766 |
+
}
|
3767 |
+
|
3768 |
+
function EvaluateCaptionTransition(transitionName) {
|
3769 |
+
|
3770 |
+
var transition;
|
3771 |
+
|
3772 |
+
if (transitionName == "*") {
|
3773 |
+
transition = GetRandomTransition();
|
3774 |
+
}
|
3775 |
+
else if (transitionName) {
|
3776 |
+
|
3777 |
+
//indexed transition allowed, just the same as named transition
|
3778 |
+
var tempTransition = _CaptionTransitions[$Jssor$.$ParseInt(transitionName)] || _CaptionTransitions[transitionName];
|
3779 |
+
|
3780 |
+
if ($Jssor$.$IsArray(tempTransition)) {
|
3781 |
+
if (transitionName != lastTransitionName) {
|
3782 |
+
lastTransitionName = transitionName;
|
3783 |
+
namedTransitionOrders[transitionName] = 0;
|
3784 |
+
|
3785 |
+
namedTransitions[transitionName] = tempTransition[Math.floor(Math.random() * tempTransition.length)];
|
3786 |
+
}
|
3787 |
+
else {
|
3788 |
+
namedTransitionOrders[transitionName]++;
|
3789 |
+
}
|
3790 |
+
|
3791 |
+
tempTransition = namedTransitions[transitionName];
|
3792 |
+
|
3793 |
+
if ($Jssor$.$IsArray(tempTransition)) {
|
3794 |
+
tempTransition = tempTransition.length && tempTransition[namedTransitionOrders[transitionName] % tempTransition.length];
|
3795 |
+
|
3796 |
+
if ($Jssor$.$IsArray(tempTransition)) {
|
3797 |
+
//got transition from array level 3, random for all captions
|
3798 |
+
tempTransition = tempTransition[Math.floor(Math.random() * tempTransition.length)];
|
3799 |
+
}
|
3800 |
+
//else {
|
3801 |
+
// //got transition from array level 2, in sequence for all adjacent captions with same name specified
|
3802 |
+
// transition = tempTransition;
|
3803 |
+
//}
|
3804 |
+
}
|
3805 |
+
//else {
|
3806 |
+
// //got transition from array level 1, random but same for all adjacent captions with same name specified
|
3807 |
+
// transition = tempTransition;
|
3808 |
+
//}
|
3809 |
+
}
|
3810 |
+
//else {
|
3811 |
+
// //got transition directly from a simple transition object
|
3812 |
+
// transition = tempTransition;
|
3813 |
+
//}
|
3814 |
+
|
3815 |
+
transition = tempTransition;
|
3816 |
+
|
3817 |
+
if ($Jssor$.$IsString(transition))
|
3818 |
+
transition = EvaluateCaptionTransition(transition);
|
3819 |
+
}
|
3820 |
+
|
3821 |
+
return transition;
|
3822 |
+
}
|
3823 |
+
|
3824 |
+
var captionElmts = $Jssor$.$Children(element);
|
3825 |
+
$Jssor$.$Each(captionElmts, function (captionElmt, i) {
|
3826 |
+
|
3827 |
+
var transitionsWithTuning = [];
|
3828 |
+
transitionsWithTuning.$Elmt = captionElmt;
|
3829 |
+
var isCaption = $Jssor$.$AttributeEx(captionElmt, "u") == "caption";
|
3830 |
+
|
3831 |
+
$Jssor$.$Each(playIn ? [0, 3] : [2], function (j, k) {
|
3832 |
+
|
3833 |
+
if (isCaption) {
|
3834 |
+
var transition;
|
3835 |
+
var rawTransition;
|
3836 |
+
|
3837 |
+
if (j != 2 || !$Jssor$.$AttributeEx(captionElmt, "t3")) {
|
3838 |
+
rawTransition = FetchRawTransition(captionElmt, j);
|
3839 |
+
|
3840 |
+
if (j == 2 && !rawTransition.$Transition) {
|
3841 |
+
rawTransition.$Delay = rawTransition.$Delay || { $Value: 0 };
|
3842 |
+
rawTransition = $Jssor$.$Extend(FetchRawTransition(captionElmt, 0), rawTransition);
|
3843 |
+
}
|
3844 |
+
}
|
3845 |
+
|
3846 |
+
if (rawTransition && rawTransition.$Transition) {
|
3847 |
+
|
3848 |
+
transition = EvaluateCaptionTransition(rawTransition.$Transition.$Value);
|
3849 |
+
|
3850 |
+
if (transition) {
|
3851 |
+
|
3852 |
+
//var transitionWithTuning = $Jssor$.$Extend({ $Delay: 0, $ScaleHorizontal: 1, $ScaleVertical: 1 }, transition);
|
3853 |
+
var transitionWithTuning = $Jssor$.$Extend({ $Delay: 0 }, transition);
|
3854 |
+
|
3855 |
+
$Jssor$.$Each(rawTransition, function (rawPropertyValue, propertyName) {
|
3856 |
+
var tuningPropertyValue = (_CaptionTuningTransfer[propertyName] || _CaptionTuningTransfer.$Default).apply(_CaptionTuningTransfer, [transitionWithTuning[propertyName], rawTransition[propertyName]]);
|
3857 |
+
if (!isNaN(tuningPropertyValue))
|
3858 |
+
transitionWithTuning[propertyName] = tuningPropertyValue;
|
3859 |
+
});
|
3860 |
+
|
3861 |
+
if (!k) {
|
3862 |
+
if (rawTransition.$BeginTime)
|
3863 |
+
transitionWithTuning.$BeginTime = rawTransition.$BeginTime.$Value || 0;
|
3864 |
+
else if ((_PlayMode) & 2)
|
3865 |
+
transitionWithTuning.$BeginTime = 0;
|
3866 |
+
}
|
3867 |
+
}
|
3868 |
+
}
|
3869 |
+
|
3870 |
+
transitionsWithTuning.push(transitionWithTuning);
|
3871 |
+
}
|
3872 |
+
|
3873 |
+
if ((level % 2) && !k) {
|
3874 |
+
//transitionsWithTuning.$Children = GetCaptionItems(captionElmt, lastTransitionName, [].concat(namedTransitions), [].concat(namedTransitionOrders), level + 1);
|
3875 |
+
transitionsWithTuning.$Children = GetCaptionItems(captionElmt, level + 1);
|
3876 |
+
}
|
3877 |
+
});
|
3878 |
+
|
3879 |
+
itemsToPlay.push(transitionsWithTuning);
|
3880 |
+
});
|
3881 |
+
|
3882 |
+
return itemsToPlay;
|
3883 |
+
}
|
3884 |
+
|
3885 |
+
function CreateAnimator(item, transition, immediateOut) {
|
3886 |
+
|
3887 |
+
var animatorOptions = {
|
3888 |
+
$Easing: transition.$Easing,
|
3889 |
+
$Round: transition.$Round,
|
3890 |
+
$During: transition.$During,
|
3891 |
+
$Reverse: playIn && !immediateOut,
|
3892 |
+
$Optimize: true
|
3893 |
+
};
|
3894 |
+
|
3895 |
+
$JssorDebug$.$Execute(function () {
|
3896 |
+
animatorOptions.$CaptionAnimator = true;
|
3897 |
+
});
|
3898 |
+
|
3899 |
+
var captionItem = item;
|
3900 |
+
var captionParent = $Jssor$.$ParentNode(item);
|
3901 |
+
|
3902 |
+
var captionItemWidth = $Jssor$.$CssWidth(captionItem);
|
3903 |
+
var captionItemHeight = $Jssor$.$CssHeight(captionItem);
|
3904 |
+
var captionParentWidth = $Jssor$.$CssWidth(captionParent);
|
3905 |
+
var captionParentHeight = $Jssor$.$CssHeight(captionParent);
|
3906 |
+
|
3907 |
+
var toStyles = {};
|
3908 |
+
var fromStyles = {};
|
3909 |
+
var scaleClip = transition.$ScaleClip || 1;
|
3910 |
+
|
3911 |
+
//Opacity
|
3912 |
+
if (transition.$Opacity) {
|
3913 |
+
toStyles.$Opacity = 2 - transition.$Opacity;
|
3914 |
+
}
|
3915 |
+
|
3916 |
+
animatorOptions.$OriginalWidth = captionItemWidth;
|
3917 |
+
animatorOptions.$OriginalHeight = captionItemHeight;
|
3918 |
+
|
3919 |
+
//Transform
|
3920 |
+
if (transition.$Zoom || transition.$Rotate) {
|
3921 |
+
toStyles.$Zoom = transition.$Zoom ? transition.$Zoom - 1 : 1;
|
3922 |
+
|
3923 |
+
if ($Jssor$.$IsBrowserIe9Earlier() || $Jssor$.$IsBrowserOpera())
|
3924 |
+
toStyles.$Zoom = Math.min(toStyles.$Zoom, 2);
|
3925 |
+
|
3926 |
+
fromStyles.$Zoom = 1;
|
3927 |
+
|
3928 |
+
var rotate = transition.$Rotate || 0;
|
3929 |
+
|
3930 |
+
toStyles.$Rotate = rotate * 360;
|
3931 |
+
fromStyles.$Rotate = 0;
|
3932 |
+
}
|
3933 |
+
//Clip
|
3934 |
+
else if (transition.$Clip) {
|
3935 |
+
var fromStyleClip = { $Top: 0, $Right: captionItemWidth, $Bottom: captionItemHeight, $Left: 0 };
|
3936 |
+
var toStyleClip = $Jssor$.$Extend({}, fromStyleClip);
|
3937 |
+
|
3938 |
+
var blockOffset = toStyleClip.$Offset = {};
|
3939 |
+
|
3940 |
+
var topBenchmark = transition.$Clip & 4;
|
3941 |
+
var bottomBenchmark = transition.$Clip & 8;
|
3942 |
+
var leftBenchmark = transition.$Clip & 1;
|
3943 |
+
var rightBenchmark = transition.$Clip & 2;
|
3944 |
+
|
3945 |
+
if (topBenchmark && bottomBenchmark) {
|
3946 |
+
blockOffset.$Top = captionItemHeight / 2 * scaleClip;
|
3947 |
+
blockOffset.$Bottom = -blockOffset.$Top;
|
3948 |
+
}
|
3949 |
+
else if (topBenchmark)
|
3950 |
+
blockOffset.$Bottom = -captionItemHeight * scaleClip;
|
3951 |
+
else if (bottomBenchmark)
|
3952 |
+
blockOffset.$Top = captionItemHeight * scaleClip;
|
3953 |
+
|
3954 |
+
if (leftBenchmark && rightBenchmark) {
|
3955 |
+
blockOffset.$Left = captionItemWidth / 2 * scaleClip;
|
3956 |
+
blockOffset.$Right = -blockOffset.$Left;
|
3957 |
+
}
|
3958 |
+
else if (leftBenchmark)
|
3959 |
+
blockOffset.$Right = -captionItemWidth * scaleClip;
|
3960 |
+
else if (rightBenchmark)
|
3961 |
+
blockOffset.$Left = captionItemWidth * scaleClip;
|
3962 |
+
|
3963 |
+
animatorOptions.$Move = transition.$Move;
|
3964 |
+
toStyles.$Clip = toStyleClip;
|
3965 |
+
fromStyles.$Clip = fromStyleClip;
|
3966 |
+
}
|
3967 |
+
|
3968 |
+
//Fly
|
3969 |
+
{
|
3970 |
+
var toLeft = 0;
|
3971 |
+
var toTop = 0;
|
3972 |
+
|
3973 |
+
if (transition.x)
|
3974 |
+
toLeft -= captionParentWidth * transition.x;
|
3975 |
+
|
3976 |
+
if (transition.y)
|
3977 |
+
toTop -= captionParentHeight * transition.y;
|
3978 |
+
|
3979 |
+
if (toLeft || toTop || animatorOptions.$Move) {
|
3980 |
+
toStyles.$Left = toLeft + $Jssor$.$CssLeft(captionItem);
|
3981 |
+
toStyles.$Top = toTop + $Jssor$.$CssTop(captionItem);
|
3982 |
+
}
|
3983 |
+
}
|
3984 |
+
|
3985 |
+
//duration
|
3986 |
+
var duration = transition.$Duration;
|
3987 |
+
|
3988 |
+
fromStyles = $Jssor$.$Extend(fromStyles, $Jssor$.$GetStyles(captionItem, toStyles));
|
3989 |
+
|
3990 |
+
animatorOptions.$Setter = $Jssor$.$StyleSetterEx();
|
3991 |
+
|
3992 |
+
return new $JssorAnimator$(transition.$Delay, duration, animatorOptions, captionItem, fromStyles, toStyles);
|
3993 |
+
}
|
3994 |
+
|
3995 |
+
function CreateAnimators(streamLineLength, captionItems) {
|
3996 |
+
|
3997 |
+
$Jssor$.$Each(captionItems, function (captionItem, i) {
|
3998 |
+
|
3999 |
+
$JssorDebug$.$Execute(function () {
|
4000 |
+
if (captionItem.length) {
|
4001 |
+
var top = $Jssor$.$CssTop(captionItem.$Elmt);
|
4002 |
+
var left = $Jssor$.$CssLeft(captionItem.$Elmt);
|
4003 |
+
var width = $Jssor$.$CssWidth(captionItem.$Elmt);
|
4004 |
+
var height = $Jssor$.$CssHeight(captionItem.$Elmt);
|
4005 |
+
|
4006 |
+
var error = null;
|
4007 |
+
|
4008 |
+
if (isNaN(top))
|
4009 |
+
error = "Style 'top' for caption not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
|
4010 |
+
else if (isNaN(left))
|
4011 |
+
error = "Style 'left' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
|
4012 |
+
else if (isNaN(width))
|
4013 |
+
error = "Style 'width' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
|
4014 |
+
else if (isNaN(height))
|
4015 |
+
error = "Style 'height' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'.";
|
4016 |
+
|
4017 |
+
if (error)
|
4018 |
+
$JssorDebug$.$Error("Caption " + (i + 1) + " definition error, \r\n" + error + "\r\n" + captionItem.$Elmt.outerHTML);
|
4019 |
+
}
|
4020 |
+
});
|
4021 |
+
|
4022 |
+
var animator;
|
4023 |
+
var captionElmt = captionItem.$Elmt;
|
4024 |
+
var transition = captionItem[0];
|
4025 |
+
var transition3 = captionItem[1];
|
4026 |
+
|
4027 |
+
if (transition) {
|
4028 |
+
|
4029 |
+
animator = CreateAnimator(captionElmt, transition);
|
4030 |
+
streamLineLength = animator.$Locate(transition.$BeginTime == undefined ? streamLineLength : transition.$BeginTime, 1);
|
4031 |
+
}
|
4032 |
+
|
4033 |
+
streamLineLength = CreateAnimators(streamLineLength, captionItem.$Children);
|
4034 |
+
|
4035 |
+
if (transition3) {
|
4036 |
+
var animator3 = CreateAnimator(captionElmt, transition3, 1);
|
4037 |
+
animator3.$Locate(streamLineLength, 1);
|
4038 |
+
_Self.$Combine(animator3);
|
4039 |
+
_ImmediateOutCaptionHanger.$Combine(animator3);
|
4040 |
+
}
|
4041 |
+
|
4042 |
+
if (animator)
|
4043 |
+
_Self.$Combine(animator);
|
4044 |
+
});
|
4045 |
+
|
4046 |
+
return streamLineLength;
|
4047 |
+
}
|
4048 |
+
|
4049 |
+
_Self.$Revert = function () {
|
4050 |
+
_Self.$GoToPosition(_Self.$GetPosition_OuterEnd() * (playIn || 0));
|
4051 |
+
_ImmediateOutCaptionHanger.$GoToBegin();
|
4052 |
+
};
|
4053 |
+
|
4054 |
+
//Constructor
|
4055 |
+
{
|
4056 |
+
_ImmediateOutCaptionHanger = new $JssorAnimator$(0, 0);
|
4057 |
+
|
4058 |
+
//var streamLineLength = 0;
|
4059 |
+
//var captionItems = GetCaptionItems(container, null, [], [], 1);
|
4060 |
+
|
4061 |
+
CreateAnimators(0, _PlayMode ? GetCaptionItems(container, 1) : []);
|
4062 |
+
}
|
4063 |
+
};
|
4064 |
+
|
4065 |
+
//Event Table
|
4066 |
+
|
4067 |
+
//$EVT_CLICK = 21; function(slideIndex[, event])
|
4068 |
+
//$EVT_DRAG_START = 22; function(position[, virtualPosition, event])
|
4069 |
+
//$EVT_DRAG_END = 23; function(position, startPosition[, virtualPosition, virtualStartPosition, event])
|
4070 |
+
//$EVT_SWIPE_START = 24; function(position[, virtualPosition])
|
4071 |
+
//$EVT_SWIPE_END = 25; function(position[, virtualPosition])
|
4072 |
+
|
4073 |
+
//$EVT_LOAD_START = 26; function(slideIndex)
|
4074 |
+
//$EVT_LOAD_END = 27; function(slideIndex)
|
4075 |
+
|
4076 |
+
//$EVT_POSITION_CHANGE = 202; function(position, fromPosition[, virtualPosition, virtualFromPosition])
|
4077 |
+
//$EVT_PARK = 203; function(slideIndex, fromIndex)
|
4078 |
+
|
4079 |
+
//$EVT_PROGRESS_CHANGE = 208; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
|
4080 |
+
//$EVT_STATE_CHANGE = 209; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
|
4081 |
+
|
4082 |
+
//$EVT_ROLLBACK_START = 210; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
|
4083 |
+
//$EVT_ROLLBACK_END = 211; function(slideIndex, progress[, progressBegin, idleBegin, idleEnd, progressEnd])
|
4084 |
+
|
4085 |
+
//$EVT_SLIDESHOW_START = 206; function(slideIndex[, progressBegin, slideshowBegin, slideshowEnd, progressEnd])
|
4086 |
+
//$EVT_SLIDESHOW_END = 207; function(slideIndex[, progressBegin, slideshowBegin, slideshowEnd, progressEnd])
|
4087 |
+
|
4088 |
+
//http://www.jssor.com/development/reference-api.html
|
media/bannerslider/images/a17.png
ADDED
Binary file
|
media/bannerslider/images/slider1.jpg
ADDED
Binary file
|
media/bannerslider/images/slider10.jpg
ADDED
Binary file
|
media/bannerslider/images/slider2.jpg
ADDED
Binary file
|
media/bannerslider/images/slider3.jpg
ADDED
Binary file
|
media/bannerslider/images/slider4.jpg
ADDED
Binary file
|
media/bannerslider/images/slider5.jpg
ADDED
Binary file
|
media/bannerslider/images/slider6.jpg
ADDED
Binary file
|
media/bannerslider/images/slider7.jpg
ADDED
Binary file
|
media/bannerslider/images/slider8.jpg
ADDED
Binary file
|
media/bannerslider/images/slider9.jpg
ADDED
Binary file
|
package.xml
ADDED
@@ -0,0 +1,27 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Dataman_Bannerslider</name>
|
4 |
+
<version>0.1.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Responsive Banner Slider with multiple styles.</summary>
|
10 |
+
<description>This extension allows you to have different styles of bannerslider in your website. The style of bannerslider can be selected from configuration setting of extension. bannerslider can be called in Cms page by following code:
|
11 |
+
{{block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/bannerslider.phtml"}}
|
12 |
+
If you want to select style of bannerslider other than selection in setting configuration of extension, then you have to call the specific phtml file on cms page by follwing code snnipet:
|
13 |
+
{{block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/slider1.phtml"}}
|
14 |
+
{{block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/slider2.phtml"}}
|
15 |
+
{{block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/slider3.phtml"}}
|
16 |
+
.......
|
17 |
+
up to
|
18 |
+
{{block type="bannerslider/bannerslider" name="bannerslider" template="bannerslider/slider11.phtml"}}
|
19 |
+
As 11 types of styles are available in this extension.</description>
|
20 |
+
<notes>First Release</notes>
|
21 |
+
<authors><author><name>Dataman Computers System(P) Ltd.</name><user>Priyanka_Dataman</user><email>priyankakushwaha@dataman.in</email></author></authors>
|
22 |
+
<date>2015-02-27</date>
|
23 |
+
<time>08:08:44</time>
|
24 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Dataman_Bannerslider.xml" hash="7cf4f5c4899fac38839a51085f2e08c8"/></dir></target><target name="mage"><dir name="js"><dir name="bannerslider"><file name="jquery-1.9.1.min.js" hash="8cb6c28c541f888d6044bfeb8a34724e"/><file name="jssor.js" hash="89b0070495d48c05865e87ff94f92827"/><file name="jssor.slider.js" hash="f30912c714a482f6bb4eb8a7fd566d61"/></dir></dir></target><target name="magemedia"><dir name="bannerslider"><dir name="images"><file name="a17.png" hash="1c07428693b64ab8c518191026ce2190"/><file name="slider1.jpg" hash="2153f939d37766ded9a58a9c11c9bfeb"/><file name="slider10.jpg" hash="cb0edbb8be8654c457da8a17bd5b467a"/><file name="slider2.jpg" hash="c08a7d816e79fdf219bea84eca302f19"/><file name="slider3.jpg" hash="70aec2e2af5402a80a269c72e366679f"/><file name="slider4.jpg" hash="03c88859aa6622b4a3d26894e1017061"/><file name="slider5.jpg" hash="a8f842652a309c2d8f8c380d8fd49c0a"/><file name="slider6.jpg" hash="6171d88e7361fed17e50dfb84fc9bfb9"/><file name="slider7.jpg" hash="33cde90cfcf6adaeddc0690ed7bc6d7a"/><file name="slider8.jpg" hash="b8fc9f7a3f317f7f5c648ce362fc3615"/><file name="slider9.jpg" hash="4cf4f609ce88e5cae126c50c59715fdd"/></dir></dir></target><target name="magelocal"><dir name="Dataman"><dir name="Bannerslider"><dir name="Block"><dir name="Adminhtml"><dir name="Bannerslider"><dir name="Edit"><file name="Form.php" hash="2e1922fcb5715b5b4ce4fceee5dce3d7"/><dir name="Tab"><file name="Form.php" hash="ba30255bae343ce5f962236062097b5a"/></dir><file name="Tabs.php" hash="7e21e42ca7c190875b643b0fdb35988b"/></dir><file name="Edit.php" hash="8392cded789fa7cce8ce71f835ebf6a9"/><file name="Grid.php" hash="7b4fe3aeedd944f977e90c23100fa788"/></dir><file name="Bannerslider.php" hash="53b92617ee0767c343b0ab67a7a8405e"/></dir><file name="Bannerslider.php" hash="0ff835b9e8ee45cc62a460ea7573fb40"/></dir><dir name="Helper"><file name="Data.php" hash="addb0e7bef69d24c6cf3709d40c211cf"/></dir><dir name="Model"><file name="Bannerslider.php" hash="c206f39c9730b669f571c519d009e6a1"/><dir name="Mysql4"><dir name="Bannerslider"><file name="Collection.php" hash="a30e4817af43d3ebdcb4b015fdb74075"/></dir><file name="Bannerslider.php" hash="25f0185c14d97cd3d771d15fc416c9d5"/></dir><file name="Status.php" hash="24acd6fdf283aec4dcff5bacf1eb3779"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Values.php" hash="1155ebab3c59034748d936db99316f96"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannersliderController.php" hash="2d48235de45895d3094df07fa0b9f3c2"/></dir><file name="IndexController.php" hash="199e7becf8ffa85f0ee035b7b7fa96db"/></dir><dir name="data"><dir name="bannerslider_setup"><file name="data-install-0.1.0.php" hash="2b1fa062597c94b09c3e06090121c665"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="bcd2bc9e7bf067c74d06774e48ca3010"/><file name="config.xml" hash="31fe79c407b707793a55c05f7e44d0b1"/><file name="system.xml" hash="5eb894c9f170a4fe031c82c57099ff91"/></dir><dir name="sql"><dir name="bannerslider_setup"><file name="mysql4-install-0.1.0.php" hash="c2f0de9266072cd7d4ba1664e7e625ae"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="8d0abedb901fc9a1e8f85a72d5b4b1ca"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bannerslider.xml" hash="f15fe6757bc5e16a3f324ab72c9ed0a1"/></dir><dir name="template"><dir name="bannerslider"><file name="bannerslider.phtml" hash="b2ec3004a1d0ddfa7df39c607bc83db0"/><file name="slider1.phtml" hash="5d0f10c2dd3c970063502cc45f5a1d8b"/><file name="slider10.phtml" hash="0295f15987b79eafe6b11d26cdaa3ced"/><file name="slider11.phtml" hash="fab33e7f81e69d577f7a650702117b4f"/><file name="slider2.phtml" hash="0c615afe6c433d6952c766bbf14773df"/><file name="slider3.phtml" hash="f37193198645153606a9ce4367fece13"/><file name="slider4.phtml" hash="a70eec714fa19bac3f734c04ce674db4"/><file name="slider5.phtml" hash="9a86e001bedd83bfdcb5020692054d71"/><file name="slider6.phtml" hash="3fbf981a4552ca46bff8e4012913f170"/><file name="slider7.phtml" hash="5de0dceb25e90a4bc9d2d5f83f308ed4"/><file name="slider8.phtml" hash="136a248e5b2ea5f0844d128f93fa0e17"/><file name="slider9.phtml" hash="629abbbed46248c5f051297eb68c9d7b"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bannerslider.xml" hash="821d565ea6febc6639cf1e45cb35d73c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="bannerslider"><dir name="css"><file name="default.css" hash="5dacd2e5955c20f929bf4fbe24263fad"/></dir><dir name="images"><file name="a02.png" hash="40a719c27da43ce578fa4335776b4c94"/><file name="a11.png" hash="f7bcd8df5258346060276b9dbcb0c63a"/><file name="a13.png" hash="6f8f003e471803fa8a9e3a59fb501dc2"/><file name="a17.png" hash="1c07428693b64ab8c518191026ce2190"/><file name="a20.png" hash="e58807df9c59b27a6713a11e77d21164"/><file name="b03.png" hash="66ddc21fc1fad1a9fd04d042e7f442e8"/><file name="loading.gif" hash="dd78ac008009bd821d2bf2da98108854"/><file name="share-icons.png" hash="803443f63020f75a43cfeb4bab51b2ac"/><file name="sidebar.png" hash="4c33c9e09638d8905564cdc9d23acbee"/><file name="t01.png" hash="5c594fe685ea67e734e636fe1623d638"/></dir></dir></dir></dir></dir></dir></target></contents>
|
25 |
+
<compatible/>
|
26 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
+
</package>
|
skin/frontend/base/default/css/bannerslider/css/default.css
ADDED
@@ -0,0 +1,637 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.captionOrange, .captionBlack
|
2 |
+
{
|
3 |
+
color: #fff;
|
4 |
+
font-size: 20px;
|
5 |
+
line-height: 30px;
|
6 |
+
text-align: center;
|
7 |
+
border-radius: 4px;
|
8 |
+
}
|
9 |
+
.captionOrange
|
10 |
+
{
|
11 |
+
text-transform: capitalize;
|
12 |
+
background-color: rgba(0, 0, 0, 0.4);
|
13 |
+
}
|
14 |
+
.captionBlack
|
15 |
+
{
|
16 |
+
font-size:16px;
|
17 |
+
background: #000;
|
18 |
+
background-color: rgba(0, 0, 0, 0.4);
|
19 |
+
}
|
20 |
+
a.captionOrange, A.captionOrange:active, A.captionOrange:visited
|
21 |
+
{
|
22 |
+
color: #ffffff;
|
23 |
+
text-decoration: none;
|
24 |
+
}
|
25 |
+
a.captionOrange:hover
|
26 |
+
{
|
27 |
+
color: #eb5100;
|
28 |
+
text-decoration: underline;
|
29 |
+
background-color: #eeeeee;
|
30 |
+
background-color: rgba(238, 238, 238, 0.7);
|
31 |
+
}
|
32 |
+
.bricon
|
33 |
+
{
|
34 |
+
background: url(../images/browser-icons.png);
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
/*
|
39 |
+
.jssorb01 div (normal)
|
40 |
+
.jssorb01 div:hover (normal mouseover)
|
41 |
+
.jssorb01 .av (active)
|
42 |
+
.jssorb01 .av:hover (active mouseover)
|
43 |
+
.jssorb01 .dn (mousedown)
|
44 |
+
*/
|
45 |
+
.jssorb01 div, .jssorb01 div:hover, .jssorb01 .av
|
46 |
+
{
|
47 |
+
filter: alpha(opacity=70);
|
48 |
+
opacity: .7;
|
49 |
+
overflow:hidden;
|
50 |
+
cursor: pointer;
|
51 |
+
border: #000 1px solid;
|
52 |
+
}
|
53 |
+
.jssorb01 div { background-color: gray; }
|
54 |
+
.jssorb01 div:hover, .jssorb01 .av:hover { background-color: #d3d3d3; }
|
55 |
+
.jssorb01 .av { background-color: #fff; }
|
56 |
+
.jssorb01 .dn, .jssorb01 .dn:hover { background-color: #555555; }
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
/* jssor slider arrow navigator skin 05 css */
|
61 |
+
/*
|
62 |
+
.jssora05l (normal)
|
63 |
+
.jssora05r (normal)
|
64 |
+
.jssora05l:hover (normal mouseover)
|
65 |
+
.jssora05r:hover (normal mouseover)
|
66 |
+
.jssora05ldn (mousedown)
|
67 |
+
.jssora05rdn (mousedown)
|
68 |
+
*/
|
69 |
+
.jssora05l, .jssora05r, .jssora05ldn, .jssora05rdn
|
70 |
+
{
|
71 |
+
position: absolute;
|
72 |
+
cursor: pointer;
|
73 |
+
display: block;
|
74 |
+
background: url(../images/a17.png) no-repeat;
|
75 |
+
overflow:hidden;
|
76 |
+
}
|
77 |
+
.jssora05l { background-position: -10px -40px; }
|
78 |
+
.jssora05r { background-position: -70px -40px; }
|
79 |
+
.jssora05l:hover { background-position: -130px -40px; }
|
80 |
+
.jssora05r:hover { background-position: -190px -40px; }
|
81 |
+
.jssora05ldn { background-position: -250px -40px; }
|
82 |
+
.jssora05rdn { background-position: -310px -40px; }
|
83 |
+
|
84 |
+
/* jssor slider thumbnail navigator skin 01 css */
|
85 |
+
/*
|
86 |
+
.jssort01 .p (normal)
|
87 |
+
.jssort01 .p:hover (normal mouseover)
|
88 |
+
.jssort01 .pav (active)
|
89 |
+
.jssort01 .pav:hover (active mouseover)
|
90 |
+
.jssort01 .pdn (mousedown)
|
91 |
+
*/
|
92 |
+
.jssort01 .w {
|
93 |
+
position: absolute;
|
94 |
+
top: 0px;
|
95 |
+
left: 0px;
|
96 |
+
width: 100%;
|
97 |
+
height: 100%;
|
98 |
+
}
|
99 |
+
|
100 |
+
.jssort01 .c {
|
101 |
+
position: absolute;
|
102 |
+
top: 0px;
|
103 |
+
left: 0px;
|
104 |
+
width: 68px;
|
105 |
+
height: 68px;
|
106 |
+
border: #000 2px solid;
|
107 |
+
}
|
108 |
+
|
109 |
+
.jssort01 .p:hover .c, .jssort01 .pav:hover .c, .jssort01 .pav .c {
|
110 |
+
background: url(../images/t01.png) center center;
|
111 |
+
border-width: 0px;
|
112 |
+
top: 2px;
|
113 |
+
left: 2px;
|
114 |
+
width: 68px;
|
115 |
+
height: 68px;
|
116 |
+
}
|
117 |
+
|
118 |
+
.jssort01 .p:hover .c, .jssort01 .pav:hover .c {
|
119 |
+
top: 0px;
|
120 |
+
left: 0px;
|
121 |
+
width: 70px;
|
122 |
+
height: 70px;
|
123 |
+
border: #fff 1px solid;
|
124 |
+
}
|
125 |
+
|
126 |
+
/* jssor slider thumbnail navigator skin 02 css */
|
127 |
+
/*
|
128 |
+
.jssort02 .p (normal)
|
129 |
+
.jssort02 .p:hover (normal mouseover)
|
130 |
+
.jssort02 .pav (active)
|
131 |
+
.jssort02 .pav:hover (active mouseover)
|
132 |
+
.jssort02 .pdn (mousedown)
|
133 |
+
*/
|
134 |
+
.jssort02 .w
|
135 |
+
{
|
136 |
+
position: absolute;
|
137 |
+
top: 0px;
|
138 |
+
left: 0px;
|
139 |
+
width: 100%;
|
140 |
+
height: 100%;
|
141 |
+
}
|
142 |
+
.jssort02 .c
|
143 |
+
{
|
144 |
+
position: absolute;
|
145 |
+
top: 0px;
|
146 |
+
left: 0px;
|
147 |
+
width: 95px;
|
148 |
+
height: 62px;
|
149 |
+
border: #000 2px solid;
|
150 |
+
}
|
151 |
+
.jssort02 .p:hover .c, .jssort02 .pav:hover .c, .jssort02 .pav .c
|
152 |
+
{
|
153 |
+
background: url(../images/t01.png) center center;
|
154 |
+
border-width: 0px;
|
155 |
+
top: 2px;
|
156 |
+
left: 2px;
|
157 |
+
width: 95px;
|
158 |
+
height: 62px;
|
159 |
+
}
|
160 |
+
.jssort02 .p:hover .c, .jssort02 .pav:hover .c
|
161 |
+
{
|
162 |
+
top: 0px;
|
163 |
+
left: 0px;
|
164 |
+
width: 97px;
|
165 |
+
height: 64px;
|
166 |
+
border: #fff 1px solid;
|
167 |
+
}
|
168 |
+
|
169 |
+
|
170 |
+
/* jssor slider arrow navigator skin 02 css */
|
171 |
+
/*
|
172 |
+
.jssora02l (normal)
|
173 |
+
.jssora02r (normal)
|
174 |
+
.jssora02l:hover (normal mouseover)
|
175 |
+
.jssora02r:hover (normal mouseover)
|
176 |
+
.jssora02ldn (mousedown)
|
177 |
+
.jssora02rdn (mousedown)
|
178 |
+
*/
|
179 |
+
.jssora02l, .jssora02r, .jssora02ldn, .jssora02rdn
|
180 |
+
{
|
181 |
+
position: absolute;
|
182 |
+
cursor: pointer;
|
183 |
+
display: block;
|
184 |
+
background: url(../images/a02.png) no-repeat;
|
185 |
+
overflow:hidden;
|
186 |
+
}
|
187 |
+
.jssora02l { background-position: -3px -33px; }
|
188 |
+
.jssora02r { background-position: -63px -33px; }
|
189 |
+
.jssora02l:hover { background-position: -123px -33px; }
|
190 |
+
.jssora02r:hover { background-position: -183px -33px; }
|
191 |
+
.jssora02ldn { background-position: -243px -33px; }
|
192 |
+
.jssora02rdn { background-position: -303px -33px; }
|
193 |
+
|
194 |
+
/* jssor slider thumbnail navigator skin 03 css */
|
195 |
+
/*
|
196 |
+
.jssort03 .p (normal)
|
197 |
+
.jssort03 .p:hover (normal mouseover)
|
198 |
+
.jssort03 .pav (active)
|
199 |
+
.jssort03 .pav:hover (active mouseover)
|
200 |
+
.jssort03 .pdn (mousedown)
|
201 |
+
*/
|
202 |
+
.jssort03 .w, .jssort03 .pav:hover .w
|
203 |
+
{
|
204 |
+
position: absolute;
|
205 |
+
width: 60px;
|
206 |
+
height: 30px;
|
207 |
+
border: white 1px dashed;
|
208 |
+
}
|
209 |
+
* html .jssort03 .w
|
210 |
+
{
|
211 |
+
width /**/: 62px;
|
212 |
+
height /**/: 32px;
|
213 |
+
}
|
214 |
+
.jssort03 .pdn .w, .jssort03 .pav .w { border-style: solid; }
|
215 |
+
.jssort03 .c
|
216 |
+
{
|
217 |
+
width: 62px;
|
218 |
+
height: 32px;
|
219 |
+
filter: alpha(opacity=45);
|
220 |
+
opacity: .45;
|
221 |
+
|
222 |
+
transition: opacity .6s;
|
223 |
+
-moz-transition: opacity .6s;
|
224 |
+
-webkit-transition: opacity .6s;
|
225 |
+
-o-transition: opacity .6s;
|
226 |
+
}
|
227 |
+
.jssort03 .p:hover .c, .jssort03 .pav .c
|
228 |
+
{
|
229 |
+
filter: alpha(opacity=0);
|
230 |
+
opacity: 0;
|
231 |
+
}
|
232 |
+
.jssort03 .p:hover .c
|
233 |
+
{
|
234 |
+
transition: none;
|
235 |
+
-moz-transition: none;
|
236 |
+
-webkit-transition: none;
|
237 |
+
-o-transition: none;
|
238 |
+
}
|
239 |
+
.qr_code{
|
240 |
+
background: url(../images/sidebar.png) center center;
|
241 |
+
}
|
242 |
+
/* jssor slider bullet navigator skin 03 css */
|
243 |
+
/*
|
244 |
+
.jssorb03 div (normal)
|
245 |
+
.jssorb03 div:hover (normal mouseover)
|
246 |
+
.jssorb03 .av (active)
|
247 |
+
.jssorb03 .av:hover (active mouseover)
|
248 |
+
.jssorb03 .dn (mousedown)
|
249 |
+
*/
|
250 |
+
.jssorb03 div, .jssorb03 div:hover, .jssorb03 .av
|
251 |
+
{
|
252 |
+
background: url(../images/b03.png) no-repeat;
|
253 |
+
overflow:hidden;
|
254 |
+
cursor: pointer;
|
255 |
+
}
|
256 |
+
.jssorb03 div { background-position: -5px -4px; }
|
257 |
+
.jssorb03 div:hover, .jssorb03 .av:hover { background-position: -35px -4px; }
|
258 |
+
.jssorb03 .av { background-position: -65px -4px; }
|
259 |
+
.jssorb03 .dn, .jssorb03 .dn:hover { background-position: -95px -4px; }
|
260 |
+
|
261 |
+
|
262 |
+
/* jssor slider arrow navigator skin 20 css */
|
263 |
+
/*
|
264 |
+
.jssora20l (normal)
|
265 |
+
.jssora20r (normal)
|
266 |
+
.jssora20l:hover (normal mouseover)
|
267 |
+
.jssora20r:hover (normal mouseover)
|
268 |
+
.jssora20ldn (mousedown)
|
269 |
+
.jssora20rdn (mousedown)
|
270 |
+
*/
|
271 |
+
.jssora20l, .jssora20r, .jssora20ldn, .jssora20rdn
|
272 |
+
{
|
273 |
+
position: absolute;
|
274 |
+
cursor: pointer;
|
275 |
+
display: block;
|
276 |
+
background: url(../images/a20.png) no-repeat;
|
277 |
+
overflow:hidden;
|
278 |
+
}
|
279 |
+
.jssora20l { background-position: -3px -33px; }
|
280 |
+
.jssora20r { background-position: -63px -33px; }
|
281 |
+
.jssora20l:hover { background-position: -123px -33px; }
|
282 |
+
.jssora20r:hover { background-position: -183px -33px; }
|
283 |
+
.jssora20ldn { background-position: -243px -33px; }
|
284 |
+
.jssora20rdn { background-position: -303px -33px; }
|
285 |
+
|
286 |
+
.share-icon {
|
287 |
+
display: inline-block;
|
288 |
+
float: left;
|
289 |
+
margin: 4px;
|
290 |
+
width: 32px;
|
291 |
+
height: 32px;
|
292 |
+
cursor: pointer;
|
293 |
+
vertical-align: middle;
|
294 |
+
background-image: url(../images/share-icons.png);
|
295 |
+
}
|
296 |
+
|
297 |
+
.share-facebook {
|
298 |
+
background-position: 0px 0px;
|
299 |
+
}
|
300 |
+
|
301 |
+
.share-facebook:hover {
|
302 |
+
background-position: 0px -40px;
|
303 |
+
}
|
304 |
+
|
305 |
+
.share-twitter {
|
306 |
+
background-position: -40px 0px;
|
307 |
+
}
|
308 |
+
|
309 |
+
.share-twitter:hover {
|
310 |
+
background-position: -40px -40px;
|
311 |
+
}
|
312 |
+
|
313 |
+
.share-pinterest {
|
314 |
+
background-position: -80px 0px;
|
315 |
+
}
|
316 |
+
|
317 |
+
.share-pinterest:hover {
|
318 |
+
background-position: -80px -40px;
|
319 |
+
}
|
320 |
+
|
321 |
+
.share-linkedin {
|
322 |
+
background-position: -240px 0px;
|
323 |
+
}
|
324 |
+
|
325 |
+
.share-linkedin:hover {
|
326 |
+
background-position: -240px -40px;
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
.share-googleplus {
|
331 |
+
background-position: -120px 0px;
|
332 |
+
}
|
333 |
+
|
334 |
+
.share-googleplus:hover {
|
335 |
+
background-position: -120px -40px;
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
.share-stumbleupon {
|
340 |
+
background-position: -360px 0px;
|
341 |
+
}
|
342 |
+
|
343 |
+
.share-stumbleupon:hover {
|
344 |
+
background-position: -360px -40px;
|
345 |
+
}
|
346 |
+
|
347 |
+
.share-email {
|
348 |
+
background-position: -320px 0px;
|
349 |
+
}
|
350 |
+
|
351 |
+
.share-email:hover {
|
352 |
+
background-position: -320px -40px;
|
353 |
+
}
|
354 |
+
|
355 |
+
/* jssor slider thumbnail navigator skin 11 css */
|
356 |
+
/*
|
357 |
+
.jssort11 .p (normal)
|
358 |
+
.jssort11 .p:hover (normal mouseover)
|
359 |
+
.jssort11 .pav (active)
|
360 |
+
.jssort11 .pav:hover (active mouseover)
|
361 |
+
.jssort11 .pdn (mousedown)
|
362 |
+
*/
|
363 |
+
.jssort11
|
364 |
+
{
|
365 |
+
font-family: Arial, Helvetica, sans-serif;
|
366 |
+
}
|
367 |
+
.jssort11 .i, .jssort11 .pav:hover .i
|
368 |
+
{
|
369 |
+
position: absolute;
|
370 |
+
top:3px;
|
371 |
+
left:3px;
|
372 |
+
WIDTH: 190px;
|
373 |
+
HEIGHT: 62px;
|
374 |
+
border: white 1px dashed;
|
375 |
+
}
|
376 |
+
* html .jssort11 .i
|
377 |
+
{
|
378 |
+
WIDTH /**/: 62px;
|
379 |
+
HEIGHT /**/: 32px;
|
380 |
+
}
|
381 |
+
.jssort11 .pav .i
|
382 |
+
{
|
383 |
+
border: white 1px solid;
|
384 |
+
}
|
385 |
+
.jssort11 .t, .jssort11 .pav:hover .t
|
386 |
+
{
|
387 |
+
position: absolute;
|
388 |
+
top: 3px;
|
389 |
+
left: 68px;
|
390 |
+
width:129px;
|
391 |
+
height: 32px;
|
392 |
+
line-height:32px;
|
393 |
+
text-align: center;
|
394 |
+
color:#fc9835;
|
395 |
+
font-size:13px;
|
396 |
+
font-weight:700;
|
397 |
+
}
|
398 |
+
.jssort11 .pav .t, .jssort11 .phv .t, .jssort11 .p:hover .t
|
399 |
+
{
|
400 |
+
color:#fff;
|
401 |
+
}
|
402 |
+
.jssort11 .c, .jssort11 .pav:hover .c
|
403 |
+
{
|
404 |
+
position: absolute;
|
405 |
+
top: 38px;
|
406 |
+
left: 3px;
|
407 |
+
width:197px;
|
408 |
+
height: 31px;
|
409 |
+
line-height:31px;
|
410 |
+
color:#fff;
|
411 |
+
font-size:11px;
|
412 |
+
font-weight:400;
|
413 |
+
overflow: hidden;
|
414 |
+
}
|
415 |
+
.jssort11 .pav .c, .jssort11 .phv .c, .jssort11 .p:hover .c
|
416 |
+
{
|
417 |
+
color:#fc9835;
|
418 |
+
}
|
419 |
+
.jssort11 .t, .jssort11 .c
|
420 |
+
{
|
421 |
+
transition: color 2s;
|
422 |
+
-moz-transition: color 2s;
|
423 |
+
-webkit-transition: color 2s;
|
424 |
+
-o-transition: color 2s;
|
425 |
+
}
|
426 |
+
.jssort11 .p:hover .t, .jssort11 .phv .t, .jssort11 .pav:hover .t, .jssort11 .p:hover .c, .jssort11 .phv .c, .jssort11 .pav:hover .c
|
427 |
+
{
|
428 |
+
transition: none;
|
429 |
+
-moz-transition: none;
|
430 |
+
-webkit-transition: none;
|
431 |
+
-o-transition: none;
|
432 |
+
}
|
433 |
+
.jssort11 .p
|
434 |
+
{
|
435 |
+
background:#181818;
|
436 |
+
}
|
437 |
+
.jssort11 .pav, .jssort11 .pdn
|
438 |
+
{
|
439 |
+
background:#462300;
|
440 |
+
}
|
441 |
+
.jssort11 .p:hover, .jssort11 .phv, .jssort11 .pav:hover
|
442 |
+
{
|
443 |
+
background:#333;
|
444 |
+
}
|
445 |
+
/* jssor slider arrow navigator skin 13 css */
|
446 |
+
/*
|
447 |
+
.jssora13l (normal)
|
448 |
+
.jssora13r (normal)
|
449 |
+
.jssora13l:hover (normal mouseover)
|
450 |
+
.jssora13r:hover (normal mouseover)
|
451 |
+
.jssora13ldn (mousedown)
|
452 |
+
.jssora13rdn (mousedown)
|
453 |
+
*/
|
454 |
+
.jssora13l, .jssora13r, .jssora13ldn, .jssora13rdn {
|
455 |
+
position: absolute;
|
456 |
+
cursor: pointer;
|
457 |
+
display: block;
|
458 |
+
background: url(../images/a13.png) no-repeat;
|
459 |
+
overflow: hidden;
|
460 |
+
}
|
461 |
+
|
462 |
+
.jssora13l {
|
463 |
+
background-position: -10px -35px;
|
464 |
+
}
|
465 |
+
|
466 |
+
.jssora13r {
|
467 |
+
background-position: -70px -35px;
|
468 |
+
}
|
469 |
+
|
470 |
+
.jssora13l:hover {
|
471 |
+
background-position: -130px -35px;
|
472 |
+
}
|
473 |
+
|
474 |
+
.jssora13r:hover {
|
475 |
+
background-position: -190px -35px;
|
476 |
+
}
|
477 |
+
|
478 |
+
.jssora13ldn {
|
479 |
+
background-position: -250px -35px;
|
480 |
+
}
|
481 |
+
|
482 |
+
.jssora13rdn {
|
483 |
+
background-position: -310px -35px;
|
484 |
+
}
|
485 |
+
/* jssor slider thumbnail navigator skin 14 css */
|
486 |
+
/*
|
487 |
+
.jssort14 .p (normal)
|
488 |
+
.jssort14 .p:hover (normal mouseover)
|
489 |
+
.jssort14 .pav (active)
|
490 |
+
.jssort14 .pav:hover (active mouseover)
|
491 |
+
.jssort14 .pdn (mousedown)
|
492 |
+
*/
|
493 |
+
.jssort14 .w, .jssort14 .phv .w
|
494 |
+
{
|
495 |
+
cursor: pointer;
|
496 |
+
position: absolute;
|
497 |
+
WIDTH: 100%;
|
498 |
+
HEIGHT: 100%;
|
499 |
+
background-color: #c2b38f;
|
500 |
+
}
|
501 |
+
.jssort14 .pdn .w, .jssort14 .pav .w, .jssort14 .p:hover .w
|
502 |
+
{
|
503 |
+
background-color: #422e2c;
|
504 |
+
}
|
505 |
+
.jssort14 .c
|
506 |
+
{
|
507 |
+
color: #000;
|
508 |
+
font-size:13px;
|
509 |
+
background-color: #e6e0c8; text-transform: capitalize;
|
510 |
+
transition: background-color .6s;
|
511 |
+
-moz-transition: background-color .6s;
|
512 |
+
-webkit-transition: background-color .6s;
|
513 |
+
-o-transition: background-color .6s;
|
514 |
+
}
|
515 |
+
.jssort14 .p:hover .c, .jssort14 .phv .c, .jssort14 .pav:hover .c, .jssort14 .pav .c
|
516 |
+
{
|
517 |
+
transition: none;
|
518 |
+
-moz-transition: none;
|
519 |
+
-webkit-transition: none;
|
520 |
+
-o-transition: none;
|
521 |
+
}
|
522 |
+
.jssort14 .pav .c
|
523 |
+
{
|
524 |
+
background-color:#ffab57;
|
525 |
+
}
|
526 |
+
.jssort14 .p:hover .c, .jssort14 .phv .c, .jssort14 .pav:hover .c
|
527 |
+
{
|
528 |
+
background-color:#fc9835;
|
529 |
+
}
|
530 |
+
|
531 |
+
/* jssor slider thumbnail navigator skin 07 css */
|
532 |
+
/*
|
533 |
+
.jssort07 .p (normal)
|
534 |
+
.jssort07 .p:hover (normal mouseover)
|
535 |
+
.jssort07 .pav (active)
|
536 |
+
.jssort07 .pav:hover (active mouseover)
|
537 |
+
.jssort07 .pdn (mousedown)
|
538 |
+
*/
|
539 |
+
.jssort07 .i {
|
540 |
+
position: absolute;
|
541 |
+
top: 0px;
|
542 |
+
left: 0px;
|
543 |
+
width: 99px;
|
544 |
+
height: 66px;
|
545 |
+
filter: alpha(opacity=80);
|
546 |
+
opacity: .8;
|
547 |
+
}
|
548 |
+
|
549 |
+
.jssort07 .p:hover .i, .jssort07 .pav .i {
|
550 |
+
filter: alpha(opacity=100);
|
551 |
+
opacity: 1;
|
552 |
+
}
|
553 |
+
|
554 |
+
.jssort07 .o {
|
555 |
+
position: absolute;
|
556 |
+
top: 0px;
|
557 |
+
left: 0px;
|
558 |
+
width: 97px;
|
559 |
+
height: 64px;
|
560 |
+
border: 1px solid #000;
|
561 |
+
transition: border-color .6s;
|
562 |
+
-moz-transition: border-color .6s;
|
563 |
+
-webkit-transition: border-color .6s;
|
564 |
+
-o-transition: border-color .6s;
|
565 |
+
}
|
566 |
+
|
567 |
+
* html .jssort07 .o {
|
568 |
+
/* ie quirks mode adjust */
|
569 |
+
width /**/: 99px;
|
570 |
+
height /**/: 66px;
|
571 |
+
}
|
572 |
+
|
573 |
+
.jssort07 .pav .o, .jssort07 .p:hover .o {
|
574 |
+
border-color: #fff;
|
575 |
+
}
|
576 |
+
|
577 |
+
.jssort07 .pav:hover .o {
|
578 |
+
border-color: #0099FF;
|
579 |
+
}
|
580 |
+
|
581 |
+
.jssort07 .p:hover .o {
|
582 |
+
transition: none;
|
583 |
+
-moz-transition: none;
|
584 |
+
-webkit-transition: none;
|
585 |
+
-o-transition: none;
|
586 |
+
}
|
587 |
+
|
588 |
+
/* jssor slider arrow navigator skin 11 css */
|
589 |
+
/*
|
590 |
+
.jssora11l (normal)
|
591 |
+
.jssora11r (normal)
|
592 |
+
.jssora11l:hover (normal mouseover)
|
593 |
+
.jssora11r:hover (normal mouseover)
|
594 |
+
.jssora11ldn (mousedown)
|
595 |
+
.jssora11rdn (mousedown)
|
596 |
+
*/
|
597 |
+
.jssora11l, .jssora11r, .jssora11ldn, .jssora11rdn {
|
598 |
+
position: absolute;
|
599 |
+
cursor: pointer;
|
600 |
+
display: block;
|
601 |
+
background: url(../images/a11.png) no-repeat;
|
602 |
+
overflow: hidden;
|
603 |
+
}
|
604 |
+
|
605 |
+
.jssora11l {
|
606 |
+
background-position: -11px -41px;
|
607 |
+
}
|
608 |
+
|
609 |
+
.jssora11r {
|
610 |
+
background-position: -71px -41px;
|
611 |
+
}
|
612 |
+
|
613 |
+
.jssora11l:hover {
|
614 |
+
background-position: -131px -41px;
|
615 |
+
}
|
616 |
+
|
617 |
+
.jssora11r:hover {
|
618 |
+
background-position: -191px -41px;
|
619 |
+
}
|
620 |
+
|
621 |
+
.jssora11ldn {
|
622 |
+
background-position: -251px -41px;
|
623 |
+
}
|
624 |
+
|
625 |
+
.jssora11rdn {
|
626 |
+
background-position: -311px -41px;
|
627 |
+
}
|
628 |
+
|
629 |
+
/********* <!-- Loading Screen --> **************/
|
630 |
+
.loading_screen{
|
631 |
+
position: absolute; display: block; background: url(../images/loading.gif) no-repeat center center;
|
632 |
+
top: 0px; left: 0px;width: 100%;height:100%;
|
633 |
+
}
|
634 |
+
/********* <!-- End Loading Screen --> **************/
|
635 |
+
.slidercontainer > div {
|
636 |
+
margin: 0 auto;
|
637 |
+
}
|
skin/frontend/base/default/css/bannerslider/images/a02.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/a11.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/a13.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/a17.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/a20.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/b03.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/loading.gif
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/share-icons.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/sidebar.png
ADDED
Binary file
|
skin/frontend/base/default/css/bannerslider/images/t01.png
ADDED
Binary file
|