Apt_Testimonial - Version 1.0.0.0

Version Notes

Initial version

Download this release

Release Info

Developer prax Ahir
Extension Apt_Testimonial
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

Files changed (42) hide show
  1. app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial.php +19 -0
  2. app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Edit.php +49 -0
  3. app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Edit/Form.php +175 -0
  4. app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Grid.php +124 -0
  5. app/code/community/Apt/Testimonial/Block/Testimonial.php +119 -0
  6. app/code/community/Apt/Testimonial/Helper/Data.php +150 -0
  7. app/code/community/Apt/Testimonial/Model/Mysql4/Testimonial.php +16 -0
  8. app/code/community/Apt/Testimonial/Model/Mysql4/Testimonial/Collection.php +18 -0
  9. app/code/community/Apt/Testimonial/Model/Status.php +15 -0
  10. app/code/community/Apt/Testimonial/Model/Testimonial.php +21 -0
  11. app/code/community/Apt/Testimonial/Model/system/Layout.php +17 -0
  12. app/code/community/Apt/Testimonial/controllers/Adminhtml/TestimonialController.php +249 -0
  13. app/code/community/Apt/Testimonial/controllers/IndexController.php +114 -0
  14. app/code/community/Apt/Testimonial/etc/adminhtml.xml +52 -0
  15. app/code/community/Apt/Testimonial/etc/config.xml +132 -0
  16. app/code/community/Apt/Testimonial/etc/system.xml +300 -0
  17. app/code/community/Apt/Testimonial/sql/testimonial_setup/mysql4-install-1.0.0.0.php +31 -0
  18. app/design/adminhtml/default/default/layout/apt/testimonial.xml +10 -0
  19. app/design/frontend/base/default/layout/apt/testimonial.xml +84 -0
  20. app/design/frontend/base/default/template/apt/page/html/head_custom.phtml +1 -0
  21. app/design/frontend/base/default/template/apt/testimonial/testimonials.phtml +192 -0
  22. app/design/frontend/base/default/template/apt/testimonial/testimonials_leftsidebar.phtml +65 -0
  23. app/design/frontend/base/default/template/apt/testimonial/testimonials_sidebar.phtml +63 -0
  24. app/etc/modules/Apt_Testimonial.xml +17 -0
  25. package.xml +18 -0
  26. skin/frontend/base/default/apt/testimonial/css/dd.css +64 -0
  27. skin/frontend/base/default/apt/testimonial/css/jquery.bxslider.css +208 -0
  28. skin/frontend/base/default/apt/testimonial/css/jquery.fancybox.css +274 -0
  29. skin/frontend/base/default/apt/testimonial/css/testimonial.css +133 -0
  30. skin/frontend/base/default/apt/testimonial/images/company_icon.png +0 -0
  31. skin/frontend/base/default/apt/testimonial/images/email_icon.png +0 -0
  32. skin/frontend/base/default/apt/testimonial/images/fancybox_overlay.png +0 -0
  33. skin/frontend/base/default/apt/testimonial/images/fancybox_sprite.png +0 -0
  34. skin/frontend/base/default/apt/testimonial/images/icon_top.png +0 -0
  35. skin/frontend/base/default/apt/testimonial/images/location_icon.png +0 -0
  36. skin/frontend/base/default/apt/testimonial/images/no-image.png +0 -0
  37. skin/frontend/base/default/apt/testimonial/images/quote-sml.png +0 -0
  38. skin/frontend/base/default/apt/testimonial/images/quote.png +0 -0
  39. skin/frontend/base/default/apt/testimonial/images/testi-sdw.png +0 -0
  40. skin/frontend/base/default/apt/testimonial/js/jquery.bxslider.min.js +10 -0
  41. skin/frontend/base/default/apt/testimonial/js/jquery.dd.min.js +11 -0
  42. skin/frontend/base/default/apt/testimonial/js/jquery.fancybox.js +46 -0
app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Block_Adminhtml_Testimonial extends Mage_Adminhtml_Block_Widget_Grid_Container
8
+ {
9
+
10
+ public function __construct()
11
+ {
12
+ $this->_controller = 'adminhtml_testimonial';
13
+ $this->_blockGroup = 'testimonial';
14
+ $this->_headerText = Mage::helper('testimonial')->__('Manage Testimonials');
15
+ $this->_addButtonLabel = Mage::helper('testimonial')->__('Add New Testimonial');
16
+ parent::__construct();
17
+ }
18
+
19
+ }
app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Edit.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Block_Adminhtml_Testimonial_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
8
+ {
9
+
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+
15
+ $this->_objectId = 'id';
16
+ $this->_blockGroup = 'testimonial';
17
+ $this->_controller = 'adminhtml_testimonial';
18
+
19
+ $this->_updateButton('save', 'label', Mage::helper('testimonial')->__('Save Testimonial'));
20
+ $this->_updateButton('delete', 'label', Mage::helper('testimonial')->__('Delete Testimonial'));
21
+ $this->_addButton('saveandcontinue', array(
22
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
23
+ 'onclick' => 'saveAndContinueEdit()',
24
+ 'class' => 'save',
25
+ ), -100);
26
+
27
+ $this->_formScripts[] = "
28
+ function saveAndContinueEdit(){
29
+ editForm.submit($('edit_form').action+'back/edit/');
30
+ }
31
+ ";
32
+
33
+ if( $this->getRequest()->getParam($this->_objectId) ) {
34
+ $model = Mage::getModel('testimonial/testimonial')->load($this->getRequest()->getParam($this->_objectId));
35
+ Mage::register('testimonial', $model);
36
+ }
37
+
38
+ }
39
+
40
+
41
+ public function getHeaderText()
42
+ {
43
+ if( Mage::registry('testimonial') && Mage::registry('testimonial')->getId() ) {
44
+ return Mage::helper('testimonial')->__('Edit Testimonial');
45
+ } else {
46
+ return Mage::helper('testimonial')->__('Add Testimonial');
47
+ }
48
+ }
49
+ }
app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Edit/Form.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Block_Adminhtml_Testimonial_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
8
+ {
9
+
10
+
11
+ protected function _prepareLayout()
12
+ {
13
+ parent::_prepareLayout();
14
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
15
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
16
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
17
+ }
18
+ }
19
+
20
+
21
+ protected function _prepareForm()
22
+ {
23
+ $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
24
+ array(
25
+ 'add_widgets' => false,
26
+ 'add_variables' => false,
27
+ 'add_images' => false,
28
+ 'files_browser_window_url'=> $this->getBaseUrl().'admin/cms_wysiwyg_images/index/',
29
+ ));
30
+ $helper = Mage::helper('testimonial');
31
+ $form = new Varien_Data_Form(array(
32
+ 'id' => 'edit_form',
33
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
34
+ 'method' => 'post',
35
+ 'enctype' => 'multipart/form-data'
36
+ ));
37
+
38
+ $fieldset = $form->addFieldset('testimonial_form', array(
39
+ 'legend' => Mage::helper('testimonial')->__('Testimonial'),
40
+ 'class' => 'fieldset-wide',
41
+ )
42
+ );
43
+
44
+ if($helper->isEnableContactName()){
45
+ $fieldset->addField('testimonial_name', 'text', array(
46
+ 'name' => 'testimonial_name',
47
+ 'label' => Mage::helper('testimonial')->__('Contact Name'),
48
+ 'class' => 'required-entry',
49
+ 'required' => true,
50
+ ));
51
+ }
52
+
53
+ if($helper->isEnableContactEmail()){
54
+ $fieldset->addField('testimonial_email', 'text', array(
55
+ 'name' => 'testimonial_email',
56
+ 'label' => Mage::helper('testimonial')->__('Contact Email'),
57
+ 'class' => 'required-entry validate-email',
58
+ 'required' => true,
59
+ ));
60
+ }
61
+
62
+ if($helper->isEnableCompanyname()){
63
+ $fieldset->addField('testimonial_companyname', 'text', array(
64
+ 'name' => 'testimonial_companyname',
65
+ 'label' => Mage::helper('testimonial')->__('Company Name'),
66
+ 'required' => false,
67
+ ));
68
+ }
69
+
70
+ if($helper->isEnableContactAddress()){
71
+ $fieldset->addField('testimonial_address', 'text', array(
72
+ 'name' => 'testimonial_address',
73
+ 'label' => Mage::helper('testimonial')->__('Location'),
74
+ 'required' => false,
75
+ ));
76
+ }
77
+
78
+ $fieldset->addField('testimonial_text', 'editor', array(
79
+ 'name' => 'testimonial_text',
80
+ 'label' => Mage::helper('testimonial')->__('Content'),
81
+ 'title' => Mage::helper('testimonial')->__('Content'),
82
+ 'style' => 'width:100%;height:300px;',
83
+ 'required' => true,
84
+ 'wysiwyg' => true,
85
+ 'required' => true,
86
+ 'config' => $config,
87
+
88
+ ));
89
+
90
+ if($helper->isEnableContactPhoto()){
91
+ $fieldset->addField('testimonial_img', 'image', array(
92
+ 'name' => 'testimonial_img',
93
+ 'label' => Mage::helper('testimonial')->__('Contact Photo'),
94
+ ));
95
+ }
96
+
97
+
98
+ $fieldset->addField('status', 'select', array(
99
+ 'label' => Mage::helper('testimonial')->__('Status'),
100
+ 'name' => 'status',
101
+ 'values' => array(
102
+ array(
103
+ 'value' => 1,
104
+ 'label' => Mage::helper('testimonial')->__('Enabled'),
105
+ ),
106
+
107
+ array(
108
+ 'value' => 2,
109
+ 'label' => Mage::helper('testimonial')->__('Disabled'),
110
+ ),
111
+ ),
112
+ ));
113
+ if (!Mage::app()->isSingleStoreMode()) {
114
+ $fieldset->addField('store_id', 'multiselect', array(
115
+ 'name' => 'stores[]',
116
+ 'label' => Mage::helper('testimonial')->__('Store View'),
117
+ 'title' => Mage::helper('testimonial')->__('Store View'),
118
+ 'required' => true,
119
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
120
+ ));
121
+ }
122
+ else {
123
+ $fieldset->addField('store_id', 'hidden', array(
124
+ 'name' => 'stores[]',
125
+ 'value' => Mage::app()->getStore(true)->getId()
126
+ ));
127
+ $model = Mage::getModel('testimonial/testimonial');
128
+ $model->setStoreId(Mage::app()->getStore(true)->getId());
129
+ }
130
+
131
+ if($helper->isEnableSidebar()){
132
+ $fieldset->addField('testimonial_sidebar', 'select', array(
133
+ 'label' => Mage::helper('testimonial')->__('Show in Sidebar'),
134
+ 'name' => 'testimonial_sidebar',
135
+ 'values' => array(
136
+ array(
137
+ 'value' => 1,
138
+ 'label' => Mage::helper('core')->__('Yes'),
139
+ ),
140
+ array(
141
+ 'value' => 0,
142
+ 'label' => Mage::helper('core')->__('No'),
143
+ ),
144
+ ),
145
+ ));
146
+ }
147
+ $fieldset->addField('testimonial_position', 'text', array(
148
+ 'name' => 'testimonial_position',
149
+ 'label' => Mage::helper('testimonial')->__('Position'),
150
+ 'style' => 'width:100px !important',
151
+ ));
152
+
153
+
154
+
155
+ $form->setUseContainer(true);
156
+ $this->setForm($form);
157
+
158
+
159
+ if ( Mage::getSingleton('adminhtml/session')->getTestimonial() )
160
+ {
161
+ $data = Mage::getSingleton('adminhtml/session')->getTestimonial();
162
+ Mage::getSingleton('adminhtml/session')->getTestimonial(null);
163
+ } elseif ( Mage::registry('testimonial') ) {
164
+ $data = Mage::registry('testimonial')->getData();
165
+ }
166
+ $data['store_id'] = explode(',',$data['stores']);
167
+ $form->setValues($data);
168
+
169
+
170
+
171
+
172
+ return parent::_prepareForm();
173
+ }
174
+
175
+ }
app/code/community/Apt/Testimonial/Block/Adminhtml/Testimonial/Grid.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Block_Adminhtml_Testimonial_Grid extends Mage_Adminhtml_Block_Widget_Grid
8
+ {
9
+
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+ $this->setId('testimonialGrid');
15
+ $this->setDefaultSort('testimonial_position');
16
+ $this->setDefaultDir('DESC');
17
+ $this->setSaveParametersInSession(true);
18
+ }
19
+
20
+
21
+ protected function _prepareCollection()
22
+ {
23
+ $collection = Mage::getModel('testimonial/testimonial')->getCollection();
24
+ $this->setCollection($collection);
25
+ return parent::_prepareCollection();
26
+
27
+ }
28
+
29
+
30
+ protected function _prepareColumns()
31
+ {
32
+ $this->addColumn('testimonial_position', array(
33
+ 'header' => Mage::helper('testimonial')->__('Position'),
34
+ 'align' => 'right',
35
+ 'width' => '50px',
36
+ 'index' => 'testimonial_position',
37
+ 'type' => 'number',
38
+ ));
39
+
40
+ $this->addColumn('testimonial_name', array(
41
+ 'header' => Mage::helper('testimonial')->__('Name'),
42
+ 'align' => 'left',
43
+ 'index' => 'testimonial_name',
44
+ ));
45
+
46
+ $this->addColumn('testimonial_text', array(
47
+ 'header' => Mage::helper('testimonial')->__('Text'),
48
+ 'align' => 'left',
49
+ 'index' => 'testimonial_text',
50
+ ));
51
+
52
+ $this->addColumn('status', array(
53
+ 'header' => Mage::helper('testimonial')->__('Status'),
54
+ 'align' => 'left',
55
+ 'width' => '80px',
56
+ 'index' => 'status',
57
+ 'type' => 'options',
58
+ 'options' => array(
59
+ 1 => 'Enabled',
60
+ 2 => 'Disabled',
61
+ ),
62
+ ));
63
+
64
+ $this->addColumn('action',
65
+ array(
66
+ 'header' => Mage::helper('testimonial')->__('Action'),
67
+ 'width' => '100',
68
+ 'type' => 'action',
69
+ 'getter' => 'getId',
70
+ 'actions' => array(
71
+ array(
72
+ 'caption' => Mage::helper('testimonial')->__('Edit'),
73
+ 'url' => array('base'=> '*/*/edit'),
74
+ 'field' => 'id'
75
+ )
76
+ ),
77
+ 'filter' => false,
78
+ 'sortable' => false,
79
+ 'index' => 'stores',
80
+ 'is_system' => true,
81
+ ));
82
+
83
+ $this->addExportType('*/*/exportCsv', Mage::helper('testimonial')->__('CSV'));
84
+ $this->addExportType('*/*/exportXml', Mage::helper('testimonial')->__('XML'));
85
+
86
+ return parent::_prepareColumns();
87
+ }
88
+ protected function _prepareMassaction()
89
+ {
90
+ $this->setMassactionIdField('testimonial_id');
91
+ $this->getMassactionBlock()->setFormFieldName('testimonial');
92
+
93
+ $this->getMassactionBlock()->addItem('delete', array(
94
+ 'label' => Mage::helper('testimonial')->__('Delete'),
95
+ 'url' => $this->getUrl('*/*/massDelete'),
96
+ 'confirm' => Mage::helper('testimonial')->__('Are you sure?')
97
+ ));
98
+
99
+ $statuses = Mage::getSingleton('testimonial/status')->getOptionArray();
100
+
101
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
102
+ $this->getMassactionBlock()->addItem('status', array(
103
+ 'label'=> Mage::helper('testimonial')->__('Change status'),
104
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
105
+ 'additional' => array(
106
+ 'visibility' => array(
107
+ 'name' => 'status',
108
+ 'type' => 'select',
109
+ 'class' => 'required-entry',
110
+ 'label' => Mage::helper('testimonial')->__('Status'),
111
+ 'values' => $statuses
112
+ )
113
+ )
114
+ ));
115
+ return $this;
116
+ }
117
+
118
+
119
+ public function getRowUrl($row)
120
+ {
121
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
122
+ }
123
+
124
+ }
app/code/community/Apt/Testimonial/Block/Testimonial.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Apt_Testimonial_Block_Testimonial extends Mage_Core_Block_Template
4
+ {
5
+
6
+ /**
7
+ * Before rendering html, but after trying to load cache
8
+ *
9
+
10
+ */
11
+ public function __construct() {
12
+ parent::__construct();
13
+ $collection = Mage::getModel('testimonial/testimonial')->getCollection() // for collection
14
+ ->addFieldToFilter('status','1');
15
+ $this->setTestimonials($collection);
16
+ //var_dump((string)$collection->getSelect());
17
+
18
+ $this->setFormAction(Mage::getUrl('*/*/save'));
19
+ }
20
+
21
+ protected function _beforeToHtml()
22
+ {
23
+
24
+ $this->_prepareCollection();
25
+ return parent::_beforeToHtml();
26
+ }
27
+
28
+ /**
29
+ * Prepare testimonial collection object
30
+ *
31
+
32
+ */
33
+ protected function _prepareCollection()
34
+ {
35
+ $current_store = Mage::app()->getStore()->getId();
36
+ $configTestyBlockValue = Mage::getStoreConfig('testimonialsection/testisettings/testynumbers');
37
+ $configFeaturedTestyBlockValue = Mage::getStoreConfig('testimonialsection/testyblock/featuredtestynumbers');
38
+ $pagerEnable = Mage::getStoreConfig('testimonialsection/testisettings/allowpagination');
39
+ $collection = Mage::getModel("testimonial/testimonial")->getCollection()
40
+ ->addFieldToFilter('status','1');
41
+
42
+
43
+ /* echo '<pre>';
44
+ print_r(get_class_methods($collection));exit; */
45
+ if(!$this->getSidebar()) {
46
+ if($pagerEnable != 1){
47
+ if($configTestyBlockValue =='')
48
+ {
49
+ $collection->clear()->setPageSize(10);
50
+ }
51
+ else
52
+ {
53
+ $collection->clear()->setPageSize($configTestyBlockValue);
54
+ }
55
+ }
56
+ else{
57
+ $limit = $this->getRequest()->getParam('limit');
58
+ $pager = $this->getLayout()->createBlock('page/html_pager', 'testimonials.pager');
59
+ //$pager->setAvailableLimit(array(6=>6,12=>12,20=>20));
60
+ if(!empty($limit))
61
+ {
62
+ $collection->clear()->setPageSize($limit);
63
+ $pager->setCollection($collection);
64
+ }
65
+ else
66
+ {
67
+ $collection->clear()->setPageSize(10);
68
+ $pager->setCollection($collection);
69
+ }
70
+ $this->setChild('pager', $pager);
71
+ }
72
+ }
73
+ if ($this->getSidebar()){
74
+ $collection->addFieldToFilter('testimonial_sidebar', '1');
75
+ if($configFeaturedTestyBlockValue ==''){
76
+ $collection->clear()->setPageSize(5);
77
+ }
78
+ else{
79
+ $collection->clear()->setPageSize($configFeaturedTestyBlockValue);
80
+ }
81
+ }
82
+ $collection->setOrder('testimonial_position', 'DESC')
83
+ ->load();
84
+
85
+ $testys = array();
86
+ foreach ($collection as $testy) {
87
+ $stores = explode(',',$testy->getStores());
88
+ if (in_array(0,$stores) || in_array($current_store,$stores))
89
+ //if ($banner->getStatus())
90
+ $testys[] = $testy;
91
+
92
+ }
93
+ $this->setTestimonials($testys);
94
+
95
+ return $this;
96
+ }
97
+
98
+ public function getPagerHtml()
99
+ {
100
+ return $this->getChildHtml('pager');
101
+ }
102
+
103
+
104
+ /**
105
+ * Setter for limit items per page
106
+ *
107
+ * @param int $limit
108
+ * @return Mage_Page_Block_Html_Pager
109
+ */
110
+ public function setLimit($limit)
111
+ {
112
+ $this->_limit = $limit;
113
+ return $this;
114
+ }
115
+
116
+
117
+
118
+
119
+ }
app/code/community/Apt/Testimonial/Helper/Data.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Helper_Data extends Mage_Core_Helper_Abstract
8
+ {
9
+ const ROUTE_TESTIMONIAL = 'testimonials';
10
+
11
+ /**
12
+ * Get name of the extension
13
+ *
14
+ * @return string - name
15
+ */
16
+ public function getTranslatedExtensionName()
17
+ {
18
+ return $this->__('Testimonials');
19
+ }
20
+ public function getUserName()
21
+ {
22
+ if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
23
+ return '';
24
+ }
25
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
26
+ return trim($customer->getName());
27
+ }
28
+
29
+ public function getUserEmail()
30
+ {
31
+ if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
32
+ return '';
33
+ }
34
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
35
+ return $customer->getEmail();
36
+ }
37
+
38
+ public function getTitle()
39
+ {
40
+ $configTitleValue = Mage::getStoreConfig('testimonialsection/testisettings/title');
41
+ if ($configTitleValue=='') {
42
+ return 'Testimonials';
43
+ }
44
+ else{
45
+ return $configTitleValue;
46
+ }
47
+ }
48
+ public function getFeaturedTitle()
49
+ {
50
+ $configTitleValue = Mage::getStoreConfig('testimonialsection/testyblock/featuredtitle');
51
+ if ($configTitleValue=='') {
52
+ return 'Featured Testimonials';
53
+ }
54
+ else{
55
+ return $configTitleValue;
56
+ }
57
+ }
58
+ public function getStatusAprroval()
59
+ {
60
+ $configStatusAprroveValue = Mage::getStoreConfig('testimonialsection/testisettings/adminapproval');
61
+
62
+ $status ="";
63
+ if ($configStatusAprroveValue == 0) {
64
+ $status = 1;
65
+ return (int)$status;
66
+ }
67
+ else{
68
+ $status = 2;
69
+ return (int)$status;
70
+ }
71
+ }
72
+
73
+ public function getTestimonialUrl()
74
+ {
75
+ return $this->_getUrl(self::ROUTE_TESTIMONIAL);
76
+ }
77
+
78
+ public function resizeImage($imageName, $width=NULL, $height=NULL, $imagePath=NULL)
79
+ {
80
+ $imagePath = str_replace("/", DS, $imagePath);
81
+ $imagePathFull = Mage::getBaseDir('media') . DS . $imagePath . DS . $imageName;
82
+
83
+ if($width == NULL && $height == NULL) {
84
+ $width = 100;
85
+ $height = 100;
86
+ }
87
+ $resizePath = $width . 'x' . $height;
88
+ $resizePathFull = Mage::getBaseDir('media') . DS . $imagePath . DS . $resizePath . DS . $imageName;
89
+
90
+ if (file_exists($imagePathFull) && !file_exists($resizePathFull)) {
91
+ $imageObj = new Varien_Image($imagePathFull);
92
+ $imageObj->constrainOnly(TRUE);
93
+ $imageObj->keepAspectRatio(TRUE);
94
+ $imageObj->resize($width,$height);
95
+ $imageObj->save($resizePathFull);
96
+ }
97
+
98
+ $imagePath=str_replace(DS, "/", $imagePath);
99
+ return Mage::getBaseUrl("media") . $imagePath . "/" . $resizePath . "/" . $imageName;
100
+ }
101
+ public function isEnableContactName()
102
+ {
103
+ $configContactNameValue = Mage::getStoreConfig('testimonialsection/showhideform/contactname');
104
+ return $configContactNameValue;
105
+ }
106
+ public function isEnableCompanyname()
107
+ {
108
+ $configCompanyNameValue = Mage::getStoreConfig('testimonialsection/showhideform/companyname');
109
+ return $configCompanyNameValue;
110
+ }
111
+ public function isEnableContactEmail()
112
+ {
113
+ $configContactEmailValue = Mage::getStoreConfig('testimonialsection/showhideform/contactemail');
114
+ return $configContactEmailValue;
115
+ }
116
+
117
+ public function isEnableSidebar()
118
+ {
119
+ $configFeatueredValue = Mage::getStoreConfig('testimonialsection/testyblock/featured');
120
+ return $configFeatueredValue;
121
+ }
122
+ public function isEnableContactPhoto()
123
+ {
124
+ $configContactPhotoValue = Mage::getStoreConfig('testimonialsection/showhideform/contactphoto');
125
+ return $configContactPhotoValue;
126
+ }
127
+
128
+ public function isEnableContactAddress()
129
+ {
130
+ $configAddressValue = Mage::getStoreConfig('testimonialsection/showhideform/address');
131
+ return $configAddressValue;
132
+ }
133
+ public function isEnableFrontend()
134
+ {
135
+ $configEnableValue = Mage::getStoreConfig('testimonialsection/testisettings/activetesty');
136
+ return $configEnableValue;
137
+ }
138
+
139
+ public function isEnableGuest()
140
+ {
141
+ $enableguest = Mage::getStoreConfig('testimonialsection/testisettings/enableguest');
142
+ return $enableguest;
143
+ }
144
+
145
+
146
+
147
+
148
+
149
+
150
+ }
app/code/community/Apt/Testimonial/Model/Mysql4/Testimonial.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Model_Mysql4_Testimonial extends Mage_Core_Model_Mysql4_Abstract
8
+ {
9
+
10
+
11
+ public function _construct()
12
+ {
13
+ $this->_init('testimonial/testimonial', 'testimonial_id');
14
+ }
15
+
16
+ }
app/code/community/Apt/Testimonial/Model/Mysql4/Testimonial/Collection.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+
8
+ class Apt_Testimonial_Model_Mysql4_Testimonial_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
9
+ {
10
+
11
+
12
+ public function _construct()
13
+ {
14
+ parent::_construct();
15
+ $this->_init('testimonial/testimonial');
16
+ }
17
+
18
+ }
app/code/community/Apt/Testimonial/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Apt_Testimonial_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('testimonial')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('testimonial')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/community/Apt/Testimonial/Model/Testimonial.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+
8
+ class Apt_Testimonial_Model_Testimonial extends Mage_Core_Model_Abstract
9
+ {
10
+
11
+
12
+
13
+ public function _construct()
14
+ {
15
+ parent::_construct();
16
+ $this->_init('testimonial/testimonial');
17
+ }
18
+
19
+
20
+
21
+ }
app/code/community/Apt/Testimonial/Model/system/Layout.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Apt_Testimonial_Model_System_Layout
4
+ {
5
+ protected $_options;
6
+
7
+ public function toOptionArray()
8
+ {
9
+ if (!$this->_options) {
10
+ $this->_options = array(
11
+ array('value' => 1,'label' => Mage::helper('testimonial')->__('Right')),
12
+ array('value' => 0,'label' => Mage::helper('testimonial')->__('Left')),
13
+ );
14
+ }
15
+ return $this->_options;
16
+ }
17
+ }
app/code/community/Apt/Testimonial/controllers/Adminhtml/TestimonialController.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_Adminhtml_TestimonialController extends Mage_Adminhtml_Controller_Action
8
+ {
9
+
10
+
11
+ protected function _initAction()
12
+ {
13
+ $this->loadLayout();
14
+ $this->_setActiveMenu('apt/testimonial');
15
+ $this->_addBreadcrumb(Mage::helper('testimonial')->__('Testimonials'), Mage::helper('testimonial')->__('Testimonials'));
16
+ }
17
+
18
+ /**
19
+ * View grid action
20
+ */
21
+ public function indexAction()
22
+ {
23
+ $this->_initAction();
24
+ $this->renderLayout();
25
+ }
26
+
27
+ /**
28
+ * View edit form action
29
+ */
30
+ public function editAction()
31
+ {
32
+
33
+ $this->_initAction();
34
+ $this->_addContent($this->getLayout()->createBlock('testimonial/adminhtml_testimonial_edit'));
35
+ $this->renderLayout();
36
+ }
37
+
38
+ /**
39
+ * View new form action
40
+ */
41
+ public function newAction()
42
+ {
43
+ $this->editAction();
44
+ }
45
+
46
+
47
+ /**
48
+ * Save form action
49
+ */
50
+ public function saveAction()
51
+ {
52
+
53
+ if ($this->getRequest()->getPost()) {
54
+
55
+ try {
56
+ $data = $this->getRequest()->getPost();
57
+ $fileName = '';
58
+ if (isset($_FILES['testimonial_img']['name']) and (file_exists($_FILES['testimonial_img']['tmp_name']))) {
59
+ $baseDir = Mage::getBaseDir('media').DS.'testimonials';
60
+ $file = new Varien_Io_File();
61
+ mkdir($baseDir,0777);
62
+ $fileName = $_FILES['testimonial_img']['name'];
63
+ mysql_real_escape_string($fileName);
64
+ $tmp = explode(".",$fileName);
65
+ $fileName = time().uniqid().'.'.end($tmp);
66
+ $image_to_upload = "";
67
+ $uploader = new Varien_File_Uploader('testimonial_img');
68
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
69
+ $uploader->setAllowRenameFiles(false);
70
+ $uploader->setFilesDispersion(false);
71
+ $path = Mage::getBaseDir('media') . DS.'testimonials'.DS ;
72
+ $sitePath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'testimonials';
73
+ $uploader->save($path, $fileName);
74
+ $data['testimonial_img'] = $sitePath.'/'.$fileName;
75
+ } else {
76
+
77
+ if(isset($data['testimonial_img']['delete']) && $data['testimonial_img']['delete'] == 1) {
78
+ $data['testimonial_img'] = '';
79
+ $path = Mage::getBaseDir('media') . DS . 'testimonials';
80
+ $model = Mage::getModel('testimonial/testimonial');
81
+ $resizeEndarray = explode("/",$model->load($this->getRequest()->getParam('id'))->getTestimonialImg());
82
+ unlink($path.'/'.end($resizeEndarray)); //delete it
83
+ } else {
84
+ unset($data['testimonial_img']);
85
+
86
+ }
87
+ }
88
+
89
+ $model = Mage::getModel('testimonial/testimonial');
90
+
91
+
92
+ $model->setData($data)->setTestimonialId($this->getRequest()->getParam('id'));
93
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
94
+ $model->setCreatedTime(now())
95
+ ->setUpdateTime(now());
96
+ } else {
97
+
98
+ $model->setUpdateTime(now());
99
+ }
100
+ $model->setStores(implode(',',$data['stores']));
101
+
102
+ $model->save();
103
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('testimonial')->__('Testimonial was successfully saved'));
104
+ if ($this->getRequest()->getParam('back')) {
105
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
106
+ return;
107
+ }
108
+ $this->_redirect('*/*/');
109
+ return;
110
+ } catch (Exception $e) {
111
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
112
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
113
+ return;
114
+ }
115
+ }
116
+
117
+ $this->_redirect('*/*/');
118
+ }
119
+
120
+ /**
121
+ * Delete action
122
+ */
123
+ public function deleteAction()
124
+ {
125
+ if ($this->getRequest()->getParam('id') > 0) {
126
+ try {
127
+ $model = Mage::getModel('testimonial/testimonial');
128
+ $imageId= $this->getRequest()->getParam('id');
129
+ $path = Mage::getBaseDir('media') . DS . 'testimonials';
130
+ $resizeEndarray = explode("/",$model->load($imageId)->getTestimonialImg());
131
+ unlink($path.'/'.end($resizeEndarray)); //delete it
132
+ $model->setTestimonialId($imageId)->delete();
133
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('testimonial')->__('Testimonial was successfully deleted'));
134
+ $this->_redirect('*/*/');
135
+ } catch (Exception $e) {
136
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
137
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
138
+ }
139
+ }
140
+
141
+ $this->_redirect('*/*/');
142
+ }
143
+
144
+ /**
145
+ * Check allow or not access to ths page
146
+ *
147
+ * @return bool - is allowed to access this menu
148
+ */
149
+ protected function _isAllowed()
150
+ {
151
+ return Mage::getSingleton('admin/session')->isAllowed('apt/testimonial');
152
+ }
153
+
154
+
155
+
156
+
157
+
158
+ public function massDeleteAction() {
159
+ $testimonialsIds = $this->getRequest()->getParam('testimonial');
160
+
161
+ if(!is_array($testimonialsIds)) {
162
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
163
+ } else {
164
+ try {
165
+
166
+ foreach ($testimonialsIds as $testimonialsId) {
167
+ $testimonials = Mage::getModel('testimonial/testimonial')->load($testimonialsId);
168
+ $path = Mage::getBaseDir('media') . DS . 'testimonials';
169
+ /* $filename = basename($testimonials->getTestimonialImg()); //get the filename
170
+ unlink($path.'/'.$filename); //delete it */
171
+ $resizeEndarray = explode("/",$testimonials->getTestimonialImg());
172
+ unlink($path.'/'.end($resizeEndarray)); //delete it
173
+ $testimonials->delete();
174
+ }
175
+
176
+ Mage::getSingleton('adminhtml/session')->addSuccess(
177
+ Mage::helper('adminhtml')->__(
178
+ 'Total of %d record(s) were successfully deleted', count($testimonialsIds)
179
+ )
180
+ );
181
+ } catch (Exception $e) {
182
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
183
+ }
184
+ }
185
+ $this->_redirect('*/*/index');
186
+ }
187
+
188
+ public function massStatusAction()
189
+ {
190
+ $testimonialsIds = $this->getRequest()->getParam('testimonial');
191
+ if(!is_array($testimonialsIds)) {
192
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
193
+ } else {
194
+ try {
195
+ foreach ($testimonialsIds as $testimonialsId) {
196
+ $testimonials = Mage::getSingleton('testimonial/testimonial')
197
+ ->load($testimonialsId)
198
+ ->setStatus($this->getRequest()->getParam('status'))
199
+ ->setIsMassupdate(true)
200
+ ->save();
201
+ }
202
+ $this->_getSession()->addSuccess(
203
+ $this->__('Total of %d record(s) were successfully updated', count($testimonialsIds))
204
+ );
205
+ } catch (Exception $e) {
206
+ $this->_getSession()->addError($e->getMessage());
207
+ }
208
+ }
209
+ $this->_redirect('*/*/index');
210
+ }
211
+
212
+ public function exportCsvAction()
213
+ {
214
+ $fileName = 'testimonial.csv';
215
+ $content = $this->getLayout()->createBlock('testimonial/adminhtml_testimonial_grid')
216
+ ->getCsv();
217
+
218
+ $this->_sendUploadResponse($fileName, $content);
219
+ }
220
+
221
+ public function exportXmlAction()
222
+ {
223
+ $fileName = 'testimonial.xml';
224
+ $content = $this->getLayout()->createBlock('testimonial/adminhtml_testimonial_grid')
225
+ ->getXml();
226
+
227
+ $this->_sendUploadResponse($fileName, $content);
228
+ }
229
+
230
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
231
+ {
232
+ $response = $this->getResponse();
233
+ $response->setHeader('HTTP/1.1 200 OK','');
234
+ $response->setHeader('Pragma', 'public', true);
235
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
236
+ $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
237
+ $response->setHeader('Last-Modified', date('r'));
238
+ $response->setHeader('Accept-Ranges', 'bytes');
239
+ $response->setHeader('Content-Length', strlen($content));
240
+ $response->setHeader('Content-type', $contentType);
241
+ $response->setBody($content);
242
+ $response->sendResponse();
243
+ die;
244
+ }
245
+
246
+
247
+
248
+
249
+ }
app/code/community/Apt/Testimonial/controllers/IndexController.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * @package Apt_Testimonial
5
+ * @author Apt
6
+ */
7
+ class Apt_Testimonial_IndexController extends Mage_Core_Controller_Front_Action
8
+ {
9
+
10
+ const XML_PATH_EMAIL_SENDER = 'testimonialsection/testisettings/sender_email_identity';
11
+ const XML_PATH_EMAIL_TEMPLATE = 'testimonialsection/testisettings/email_template';
12
+ const XML_PATH_EMAIL_RECIPIENT = 'testimonialsection/testisettings/recipient';
13
+
14
+ public function indexAction()
15
+ {
16
+
17
+ $this->loadLayout();
18
+ $this->renderLayout();
19
+ }
20
+
21
+ public function saveAction()
22
+ {
23
+
24
+
25
+ if ($this->getRequest()->getPost()) {
26
+
27
+ try {
28
+ $data = $this->getRequest()->getPost();
29
+ $postObject = new Varien_Object();
30
+ $postObject->setData($data);
31
+ $translate = Mage::getSingleton('core/translate');
32
+ /* @var $translate Mage_Core_Model_Translate */
33
+ $translate->setTranslateInline(false);
34
+
35
+ $fileName = '';
36
+ if (isset($_FILES['testimonial_img']['name']) and (file_exists($_FILES['testimonial_img']['tmp_name']))) {
37
+ $baseDir = Mage::getBaseDir('media').DS.'testimonials';
38
+ $file = new Varien_Io_File();
39
+ mkdir($baseDir,0777);
40
+ $fileName = $_FILES['testimonial_img']['name'];
41
+ mysql_real_escape_string($fileName);
42
+ $tmp = explode(".",$fileName);
43
+
44
+ $fileName = time().uniqid().'.'.end($tmp);
45
+ $image_to_upload = "";
46
+ $uploader = new Varien_File_Uploader('testimonial_img');
47
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
48
+ $uploader->setAllowRenameFiles(false);
49
+ $uploader->setFilesDispersion(false);
50
+ $path = Mage::getBaseDir('media') . DS.'testimonials'.DS ;
51
+ $sitePath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'testimonials';
52
+ $uploader->save($path, $fileName);
53
+ $data['testimonial_img'] = $sitePath.'/'.$fileName;
54
+
55
+ }
56
+ $model = Mage::getModel('testimonial/testimonial');
57
+ $numberOfData = $model->getCollection()->count();
58
+
59
+ $model->setData($data)->setTestimonialId($this->getRequest()->getParam('id'));
60
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
61
+ $model->setCreatedTime(now())
62
+ ->setUpdateTime(now());
63
+ } else {
64
+
65
+ $model->setUpdateTime(now());
66
+ }
67
+
68
+ $store= Mage::app()->getStore();
69
+ $current_store = $store->getId();
70
+
71
+ $configContactEmailValue = Mage::getStoreConfig('testimonialsection/showhideform/contactemail');
72
+ $configEmailToAdmin = Mage::getStoreConfig('testimonialsection/testisettings/allowemail');
73
+ if($configContactEmailValue == 1 && $configEmailToAdmin == 1 ){
74
+ $mailTemplate = Mage::getModel('core/email_template');
75
+ /* @var $mailTemplate Mage_Core_Model_Email_Template */
76
+
77
+ $mailTemplate->setDesignConfig(array('area' => 'frontend','store'=>$current_store))
78
+ ->setReplyTo($data['testimonial_email'])
79
+ ->sendTransactional(
80
+ Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
81
+ Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
82
+ Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
83
+ null,
84
+ array('data' => $postObject)
85
+ );
86
+ }
87
+ $model->setStores($current_store);
88
+ $status = Mage::helper('testimonial')->getStatusAprroval();
89
+
90
+ $model->setStatus($status);
91
+ $model->setTestimonialPosition($numberOfData+1);
92
+ $model->save();
93
+ Mage::getSingleton('core/session')->addSuccess(Mage::helper('testimonial')->__('Your inquiry was submitted and will be responded to as soon as possible.'));
94
+ $this->_redirect('*/*');
95
+ return;
96
+ } catch (Exception $e) {
97
+ Mage::getModel('core/session')->setData('submited', '0');
98
+ $e->getMessage();exit;
99
+ Mage::getSingleton('core/session')->addError(Mage::helper('testimonial')->__('Unable to submit your request. Please, try again later'));
100
+ $this->_redirect('*/*');
101
+ return;
102
+ /* echo $e->getMessage();*/
103
+ }
104
+ }else{
105
+ Mage::getSingleton('core/session')->addError(Mage::helper('testimonial')->__('There is No Data'));
106
+ $this->_redirect('*/*');
107
+ return;
108
+ }
109
+ }
110
+
111
+
112
+
113
+
114
+ }
app/code/community/Apt/Testimonial/etc/adminhtml.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <menu>
5
+ <apt translate="title" module="testimonial">
6
+ <title>Apt Extensions</title>
7
+ <sort_order>80</sort_order>
8
+ <children>
9
+ <testimonial translate="title" module="testimonial">
10
+ <title>Testimonials</title>
11
+ <sort_order>5</sort_order>
12
+ <action>adminhtml/testimonial</action>
13
+ </testimonial>
14
+ </children>
15
+ </apt>
16
+ </menu>
17
+ <acl>
18
+ <resources>
19
+ <all>
20
+ <title>Allow Everything</title>
21
+ </all>
22
+ <admin>
23
+ <children>
24
+ <apt>
25
+ <title>Apt Extensions</title>
26
+ <sort_order>150</sort_order>
27
+ <children>
28
+ <testimonial>
29
+ <title>Testimonials</title>
30
+ <sort_order>5</sort_order>
31
+ </testimonial>
32
+ </children>
33
+ </apt>
34
+ </children>
35
+ <children>
36
+ <system>
37
+ <children>
38
+ <config>
39
+ <children>
40
+ <testimonialsection translate="title" module="testimonial">
41
+ <title>Apt Testimonials</title>
42
+ <sort_order>11</sort_order>
43
+ </testimonialsection>
44
+ </children>
45
+ </config>
46
+ </children>
47
+ </system>
48
+ </children>
49
+ </admin>
50
+ </resources>
51
+ </acl>
52
+ </config>
app/code/community/Apt/Testimonial/etc/config.xml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Apt_Testimonial>
5
+ <version>1.0.0.0</version>
6
+ </Apt_Testimonial>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <testimonial>
11
+ <class>Apt_Testimonial_Model</class>
12
+ <resourceModel>testimonial_mysql4</resourceModel>
13
+ </testimonial>
14
+ <testimonial_mysql4>
15
+ <class>Apt_Testimonial_Model_Mysql4</class>
16
+ <entities>
17
+ <testimonial>
18
+ <table>apt_testimonials</table>
19
+ </testimonial>
20
+ </entities>
21
+ </testimonial_mysql4>
22
+ </models>
23
+ <blocks>
24
+ <testimonial>
25
+ <class>Apt_Testimonial_Block</class>
26
+ </testimonial>
27
+ </blocks>
28
+ <helpers>
29
+ <testimonial>
30
+ <class>Apt_Testimonial_Helper</class>
31
+ </testimonial>
32
+ </helpers>
33
+ <resources>
34
+ <testimonial_setup>
35
+ <setup>
36
+ <module>Apt_Testimonial</module>
37
+ </setup>
38
+ <connection>
39
+ <use>core_setup</use>
40
+ </connection>
41
+ </testimonial_setup>
42
+ <testimonial_write>
43
+ <connection>
44
+ <use>core_write</use>
45
+ </connection>
46
+ </testimonial_write>
47
+ <testimonial_read>
48
+ <connection>
49
+ <use>core_read</use>
50
+ </connection>
51
+ </testimonial_read>
52
+ </resources>
53
+ <template>
54
+ <email>
55
+ <testimonialsection_testisettings_email_template translate="label" module="testimonial">
56
+ <label>Testimonial Form</label>
57
+ <file>apt/testimonial_form.html</file>
58
+ <type>text</type>
59
+ </testimonialsection_testisettings_email_template>
60
+ </email>
61
+ </template>
62
+ </global>
63
+ <admin>
64
+ <routers>
65
+ <adminhtml>
66
+ <args>
67
+ <modules>
68
+ <apt_testimonial after="Mage_Adminhtml">Apt_Testimonial_Adminhtml</apt_testimonial>
69
+ </modules>
70
+ </args>
71
+ </adminhtml>
72
+ </routers>
73
+ </admin>
74
+ <adminhtml>
75
+ <layout>
76
+ <updates>
77
+ <testimonial>
78
+ <file>apt/testimonial.xml</file>
79
+ </testimonial>
80
+ </updates>
81
+ </layout>
82
+ </adminhtml>
83
+ <frontend>
84
+ <routers>
85
+ <testimonial>
86
+ <use>standard</use>
87
+ <args>
88
+ <module>Apt_Testimonial</module>
89
+ <frontName>testimonials</frontName>
90
+ </args>
91
+ </testimonial>
92
+ </routers>
93
+ <layout>
94
+ <updates>
95
+ <testimonial>
96
+ <file>apt/testimonial.xml</file>
97
+ </testimonial>
98
+ </updates>
99
+ </layout>
100
+ </frontend>
101
+ <default>
102
+ <testimonialsection>
103
+ <testisettings>
104
+ <title>Testimonials</title>
105
+ <active>1</active>
106
+ <activetesty>1</activetesty>
107
+ <adminapproval>1</adminapproval>
108
+ <enableguest>1</enableguest>
109
+ <testynumbers>10</testynumbers>
110
+ <enabletoplinks>1</enabletoplinks>
111
+ <footerlinks>1</footerlinks>
112
+ <recipient><![CDATA[hello@example.com]]></recipient>
113
+ </testisettings>
114
+ <showhideform>
115
+ <companyname>1</companyname>
116
+ <contactname>1</contactname>
117
+ <address>1</address>
118
+ <contactemail>1</contactemail>
119
+ <contactphoto>1</contactphoto>
120
+ <height>120</height>
121
+ <width>120</width>
122
+ </showhideform>
123
+ <testyblock>
124
+ <featuredtestynumbers>5</featuredtestynumbers>
125
+ <featuredtitle>Featured Testimonials</featuredtitle>
126
+ <featured>1</featured>
127
+ <layoutrighttype>1</layoutrighttype>
128
+ <layoutlefttype>1</layoutlefttype>
129
+ </testyblock>
130
+ </testimonialsection>
131
+ </default>
132
+ </config>
app/code/community/Apt/Testimonial/etc/system.xml ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <tabs>
3
+ <apt translate="label" module="testimonial">
4
+ <label>Apt Extensions</label>
5
+ <sort_order>150</sort_order>
6
+ </apt>
7
+ </tabs>
8
+ <sections>
9
+ <testimonialsection translate="label" module="testimonial">
10
+ <label>Testimonial Configuration</label>
11
+ <tab>apt</tab>
12
+ <frontend_type>text</frontend_type>
13
+ <sort_order>11</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
+ <testisettings translate="label">
19
+ <label>Add Testimonial Settings</label>
20
+ <expanded>1</expanded>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>1</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <active translate="label">
28
+ <label>Enabled</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>0</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </active>
36
+ <title translate="label">
37
+ <label>Title</label>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>1</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ <comment>Title Of Block </comment>
44
+ </title>
45
+ <activetesty translate="label">
46
+ <label>Allow users to write testimonials</label>
47
+ <frontend_type>select</frontend_type>
48
+ <source_model>adminhtml/system_config_source_yesno</source_model>
49
+ <sort_order>2</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
+ <tooltip>User can write testimonials </tooltip>
54
+ </activetesty>
55
+ <enableguest translate="label">
56
+ <label>Enable for Guests</label>
57
+ <depends><activetesty>1</activetesty></depends>
58
+ <frontend_type>select</frontend_type>
59
+ <source_model>adminhtml/system_config_source_yesno</source_model>
60
+ <sort_order>3</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
+ </enableguest>
65
+ <adminapproval translate="label">
66
+ <label>Need Admin Approval</label>
67
+ <depends><activetesty>1</activetesty></depends>
68
+ <frontend_type>select</frontend_type>
69
+ <source_model>adminhtml/system_config_source_yesno</source_model>
70
+ <sort_order>4</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>1</show_in_store>
74
+ </adminapproval>
75
+ <allowpagination translate="label">
76
+ <label>Allow Pagination</label>
77
+ <frontend_type>select</frontend_type>
78
+ <source_model>adminhtml/system_config_source_yesno</source_model>
79
+ <sort_order>5</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </allowpagination>
84
+ <testynumbers translate="label">
85
+ <label>Number of Testimonials</label>
86
+ <frontend_type>text</frontend_type>
87
+ <depends><allowpagination>0</allowpagination></depends>
88
+ <sort_order>6</sort_order>
89
+ <show_in_default>1</show_in_default>
90
+ <show_in_website>1</show_in_website>
91
+ <show_in_store>1</show_in_store>
92
+ <comment>If empty then set to 10 </comment>
93
+ </testynumbers>
94
+ <allowemail translate="label">
95
+ <label>Allow Email</label>
96
+ <depends><activetesty>1</activetesty></depends>
97
+ <frontend_type>select</frontend_type>
98
+ <source_model>adminhtml/system_config_source_yesno</source_model>
99
+ <sort_order>7</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ </allowemail>
104
+ <recipient translate="label">
105
+ <label>Send Emails To</label>
106
+ <depends><allowemail>1</allowemail></depends>
107
+ <frontend_type>text</frontend_type>
108
+ <sort_order>8</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </recipient>
113
+ <sender_email_identity translate="label">
114
+ <label>Email Sender</label>
115
+ <frontend_type>select</frontend_type>
116
+ <depends><allowemail>1</allowemail></depends>
117
+ <source_model>adminhtml/system_config_source_email_identity</source_model>
118
+ <sort_order>9</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>1</show_in_store>
122
+ </sender_email_identity>
123
+ <email_template translate="label">
124
+ <label>Email Template</label>
125
+ <depends><allowemail>1</allowemail></depends>
126
+ <frontend_type>select</frontend_type>
127
+ <source_model>adminhtml/system_config_source_email_template</source_model>
128
+ <sort_order>10</sort_order>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>1</show_in_store>
132
+ </email_template>
133
+ <enabletoplinks translate="label">
134
+ <label>Show link as Toplink</label>
135
+ <frontend_type>select</frontend_type>
136
+ <source_model>adminhtml/system_config_source_yesno</source_model>
137
+ <sort_order>11</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>1</show_in_store>
141
+ </enabletoplinks>
142
+ <footerlinks translate="label">
143
+ <label>Show link as Footerlink</label>
144
+ <frontend_type>select</frontend_type>
145
+ <source_model>adminhtml/system_config_source_yesno</source_model>
146
+ <sort_order>12</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>1</show_in_store>
150
+ </footerlinks>
151
+ </fields>
152
+ </testisettings>
153
+ <showhideform translate="label">
154
+ <label>Show/Hide Form Fields</label>
155
+ <frontend_type>text</frontend_type>
156
+ <sort_order>2</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ <fields>
161
+ <companyname translate="label">
162
+ <label>Company Name</label>
163
+ <frontend_type>select</frontend_type>
164
+ <source_model>adminhtml/system_config_source_yesno</source_model>
165
+ <sort_order>0</sort_order>
166
+ <show_in_default>1</show_in_default>
167
+ <show_in_website>1</show_in_website>
168
+ <show_in_store>1</show_in_store>
169
+ </companyname>
170
+ <contactname translate="label">
171
+ <label>Contact Name</label>
172
+ <frontend_type>select</frontend_type>
173
+ <source_model>adminhtml/system_config_source_yesno</source_model>
174
+ <sort_order>1</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <show_in_store>1</show_in_store>
178
+ </contactname>
179
+ <contactemail translate="label">
180
+ <label>Contact Email</label>
181
+ <frontend_type>select</frontend_type>
182
+ <source_model>adminhtml/system_config_source_yesno</source_model>
183
+ <sort_order>2</sort_order>
184
+ <show_in_default>1</show_in_default>
185
+ <show_in_website>1</show_in_website>
186
+ <show_in_store>1</show_in_store>
187
+ </contactemail>
188
+ <address translate="label">
189
+ <label>Location</label>
190
+ <frontend_type>select</frontend_type>
191
+ <source_model>adminhtml/system_config_source_yesno</source_model>
192
+ <sort_order>3</sort_order>
193
+ <show_in_default>1</show_in_default>
194
+ <show_in_website>1</show_in_website>
195
+ <show_in_store>1</show_in_store>
196
+ </address>
197
+ <contactphoto translate="label">
198
+ <label>Contact Photo</label>
199
+ <frontend_type>select</frontend_type>
200
+ <source_model>adminhtml/system_config_source_yesno</source_model>
201
+ <sort_order>4</sort_order>
202
+ <show_in_default>1</show_in_default>
203
+ <show_in_website>1</show_in_website>
204
+ <show_in_store>1</show_in_store>
205
+ </contactphoto>
206
+ <height translate="label">
207
+ <label>Image Height</label>
208
+ <depends><contactphoto>1</contactphoto></depends>
209
+ <frontend_type>text</frontend_type>
210
+ <comment> In Pixel </comment>
211
+ <sort_order>5</sort_order>
212
+ <show_in_default>1</show_in_default>
213
+ <show_in_website>1</show_in_website>
214
+ <show_in_store>1</show_in_store>
215
+ </height>
216
+ <width translate="label">
217
+ <label>Image Width</label>
218
+ <depends><contactphoto>1</contactphoto></depends>
219
+ <frontend_type>text</frontend_type>
220
+ <comment> In Pixel </comment>
221
+ <sort_order>6</sort_order>
222
+ <show_in_default>1</show_in_default>
223
+ <show_in_website>1</show_in_website>
224
+ <show_in_store>1</show_in_store>
225
+ </width>
226
+ </fields>
227
+ </showhideform>
228
+ <testyblock translate="label">
229
+ <label>Testimonials Featured Block Settings</label>
230
+ <frontend_type>text</frontend_type>
231
+ <sort_order>3</sort_order>
232
+ <show_in_default>1</show_in_default>
233
+ <show_in_website>1</show_in_website>
234
+ <show_in_store>1</show_in_store>
235
+ <fields>
236
+ <featured translate="label">
237
+ <label>Display In Sidebar</label>
238
+ <frontend_type>select</frontend_type>
239
+ <source_model>adminhtml/system_config_source_yesno</source_model>
240
+ <sort_order>0</sort_order>
241
+ <show_in_default>1</show_in_default>
242
+ <show_in_website>1</show_in_website>
243
+ <show_in_store>1</show_in_store>
244
+ </featured>
245
+ <featuredtitle translate="label">
246
+ <label>Title</label>
247
+ <depends><featured>1</featured></depends>
248
+ <frontend_type>text</frontend_type>
249
+ <sort_order>1</sort_order>
250
+ <show_in_default>1</show_in_default>
251
+ <show_in_website>1</show_in_website>
252
+ <show_in_store>1</show_in_store>
253
+ <comment>Title Of Block </comment>
254
+ </featuredtitle>
255
+ <layoutrighttype translate="label">
256
+ <label>Right Sidebar</label>
257
+ <depends><featured>1</featured></depends>
258
+ <frontend_type>select</frontend_type>
259
+ <source_model>adminhtml/system_config_source_yesno</source_model>
260
+ <sort_order>2</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>1</show_in_website>
263
+ <show_in_store>1</show_in_store>
264
+ </layoutrighttype>
265
+ <layoutlefttype translate="label">
266
+ <label>Left Sidebar</label>
267
+ <depends><featured>1</featured></depends>
268
+ <frontend_type>select</frontend_type>
269
+ <source_model>adminhtml/system_config_source_yesno</source_model>
270
+ <sort_order>3</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>1</show_in_store>
274
+ </layoutlefttype>
275
+ <enableslider translate="label">
276
+ <label>Display as slider</label>
277
+ <frontend_type>select</frontend_type>
278
+ <depends><featured>1</featured></depends>
279
+ <source_model>adminhtml/system_config_source_yesno</source_model>
280
+ <sort_order>4</sort_order>
281
+ <show_in_default>1</show_in_default>
282
+ <show_in_website>1</show_in_website>
283
+ <show_in_store>1</show_in_store>
284
+ </enableslider>
285
+ <featuredtestynumbers translate="label">
286
+ <label>Number of Featured Testimonials</label>
287
+ <depends><featured>1</featured></depends>
288
+ <frontend_type>text</frontend_type>
289
+ <sort_order>5</sort_order>
290
+ <show_in_default>1</show_in_default>
291
+ <show_in_website>1</show_in_website>
292
+ <show_in_store>1</show_in_store>
293
+ <comment>If empty then set to 5 </comment>
294
+ </featuredtestynumbers>
295
+ </fields>
296
+ </testyblock>
297
+ </groups>
298
+ </testimonialsection>
299
+ </sections>
300
+ </config>
app/code/community/Apt/Testimonial/sql/testimonial_setup/mysql4-install-1.0.0.0.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Apt_Testimonial
4
+ * @author Apt
5
+ */
6
+ $installer = $this;
7
+
8
+ $installer->startSetup();
9
+
10
+ $table = $installer->getTable('apt_testimonials');
11
+
12
+ $installer->run("
13
+ create table IF NOT EXISTS {$table} (
14
+ `testimonial_id` int(11) unsigned not null auto_increment,
15
+ `testimonial_position` int(11) default 0,
16
+ `testimonial_name` varchar(50) not null default '',
17
+ `testimonial_email` varchar(255) NOT NULL default '',
18
+ `testimonial_text` text not null default '',
19
+ `testimonial_companyname` text not null default '',
20
+ `testimonial_address` text not null default '',
21
+ `testimonial_img` varchar(128) default NULL,
22
+ `testimonial_sidebar` tinyint(4) NOT NULL,
23
+ `status` smallint(6) NOT NULL default '0',
24
+ `stores` varchar(255) NOT NULL default '',
25
+ `created_time` datetime NULL,
26
+ `update_time` datetime NULL,
27
+ PRIMARY KEY(testimonial_id)
28
+ ) engine=InnoDB default charset=utf8;
29
+ ");
30
+
31
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/apt/testimonial.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+
4
+ <adminhtml_testimonial_index>
5
+ <reference name="content">
6
+ <block type="testimonial/adminhtml_testimonial" name="testimonial" />
7
+ </reference>
8
+ </adminhtml_testimonial_index>
9
+
10
+ </layout>
app/design/frontend/base/default/layout/apt/testimonial.xml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+ <default>
4
+
5
+ <reference name="right">
6
+ <block type="testimonial/testimonial" name="right.testimonials" >
7
+ <action method="setSidebar">
8
+ <sidebar>1</sidebar>
9
+ </action>
10
+ <action method="setTemplate" ifconfig="testimonialsection/testyblock/layoutrighttype">
11
+ <template>apt/testimonial/testimonials_sidebar.phtml</template>
12
+ </action>
13
+ </block>
14
+ </reference>
15
+ <reference name="left">
16
+ <block type="testimonial/testimonial" name="left.testimonials" >
17
+ <action method="setSidebar">
18
+ <sidebar>1</sidebar>
19
+ </action>
20
+ <action method="setTemplate" ifconfig="testimonialsection/testyblock/layoutlefttype">
21
+ <template>apt/testimonial/testimonials_leftsidebar.phtml</template>
22
+ </action>
23
+ </block>
24
+ </reference>
25
+ <reference name="head">
26
+ <!--<action method="addJs" ><script>testimonial/jquery-1.9.1.min.js</script></action>-->
27
+
28
+ <action method="addItem" ifconfig="testimonialsection/testyblock/enableslider"><type>skin_js</type><name>apt/testimonial/js/jquery.dd.min.js</name></action>
29
+ <action method="addItem" ifconfig="testimonialsection/testyblock/enableslider"><type>skin_js</type><name>apt/testimonial/js/jquery.bxslider.min.js</name></action>
30
+
31
+
32
+ <action method="addCss"><stylesheet>apt/testimonial/css/testimonial.css</stylesheet></action>
33
+ <action method="addCss" ifconfig="testimonialsection/testyblock/enableslider"><stylesheet>apt/testimonial/css/dd.css</stylesheet></action>
34
+ <action method="addCss" ifconfig="testimonialsection/testyblock/enableslider"><stylesheet>apt/testimonial/css/jquery.bxslider.css</stylesheet></action>
35
+
36
+
37
+ </reference>
38
+ <reference name="top.links">
39
+ <action method="addLink" translate="label title" module="testimonial" ifconfig="testimonialsection/testisettings/enabletoplinks">
40
+ <label helper="testimonial/getTitle"/>
41
+ <url helper="testimonial/getTestimonialUrl"/>
42
+ <title helper="testimonial/getTitle"/>
43
+ <prepare/>
44
+ <urlParams/>
45
+ <position>200</position>
46
+ <liParams/>
47
+ <aParams>class='testimonial-top-link'</aParams>
48
+ </action>
49
+ </reference>
50
+ <reference name="footer_links">
51
+ <action method="addLink" translate="label title" ifconfig="testimonialsection/testisettings/footerlinks">
52
+ <label helper="testimonial/getTitle"/>
53
+ <url helper="testimonial/getTestimonialUrl"/>
54
+ <title helper="testimonial/getTitle"/>
55
+ <prepare/>
56
+ <urlParams/>
57
+ <position>2</position>
58
+ <liParams/>
59
+ <aParams>class='testimonial-footer-link'</aParams>
60
+ </action>
61
+ </reference>
62
+ </default>
63
+ <testimonial_index_index>
64
+ <label>Testimonials</label>
65
+ <reference name="head">
66
+ <block type="page/html_head" name="head_custom" template="apt/page/html/head_custom.phtml">
67
+ <action method="setTitle"><title>Testimonials</title></action>
68
+
69
+ <action method="addItem" ifconfig="testimonialsection/testisettings/activetesty"><type>skin_js</type><name>apt/testimonial/js/jquery.fancybox.js</name></action>
70
+ <action method="addCss" ifconfig="testimonialsection/testisettings/activetesty"><stylesheet>apt/testimonial/css/jquery.fancybox.css</stylesheet></action>
71
+ </block>
72
+ </reference>
73
+ <reference name="root">
74
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
75
+ </reference>
76
+ <reference name="content">
77
+ <block type="testimonial/testimonial" name="testimonials">
78
+ <action method="setTemplate" ifconfig="testimonialsection/testisettings/active">
79
+ <template>apt/testimonial/testimonials.phtml</template>
80
+ </action>
81
+ </block>
82
+ </reference>
83
+ </testimonial_index_index>
84
+ </layout>
app/design/frontend/base/default/template/apt/page/html/head_custom.phtml ADDED
@@ -0,0 +1 @@
 
1
+ <?php echo $this->getCssJsHtml(); ?>
app/design/frontend/base/default/template/apt/testimonial/testimonials.phtml ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* $configContactNameValue = Mage::getStoreConfig('testimonialsection/testisettings/active');
3
+ echo $configContactNameValue;exit;*/
4
+ ?>
5
+ <script type="text/javascript">
6
+ jQuery.noConflict();
7
+ </script>
8
+ <?php
9
+ $configEnableValue = Mage::getStoreConfig('testimonialsection/testisettings/activetesty');
10
+ $enableguest = Mage::getStoreConfig('testimonialsection/testisettings/enableguest');
11
+ $helper = Mage::helper('testimonial');
12
+ if($configEnableValue == 1 ):
13
+ if($enableguest == 1 ):
14
+
15
+ ?>
16
+
17
+
18
+ <a id="testy-create" class="fancybox" onclick='jQuery.fancybox({"href" : "#info-testy-create",scrolling: "no", afterClose: function() { jQuery("div").remove(".validation-advice"); jQuery("div.input-box input,div.input-box textarea").removeClass("validation-failed"); } });' title="<?php echo Mage::helper('testimonial')->__('Add Testimonial') ?>" href="javascript:void(0)"><?php echo Mage::helper('testimonial')->__('Add Testimonial') ?></a>
19
+ <div id="info-testy-create" style="display:none;min-width:700px;min-height:400px;">
20
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
21
+ <div class="page-title">
22
+ <h1> <?php echo $this->htmlEscape($this->helper('testimonial')->getTitle()) ?></h1>
23
+ </div>
24
+
25
+ <form action="<?php echo $this->getFormAction(); ?>" id="testyForm" method="post" enctype="multipart/form-data">
26
+ <div class="fieldset_popup">
27
+ <ul class="form-list">
28
+
29
+ <li class="fields">
30
+ <?php if($helper->isEnableContactName()):?>
31
+ <div class="field">
32
+ <label for="testimonial_name" class="required"><em>*</em><?php echo Mage::helper('testimonial')->__('Name') ?></label>
33
+ <div class="input-box">
34
+ <input name="testimonial_name" id="testimonial_name" title="<?php echo Mage::helper('testimonial')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('testimonial')->getUserName()) ?>" class="input-text required-entry" type="text" />
35
+ </div>
36
+ </div>
37
+ <?php endif;?>
38
+ <?php if($helper->isEnableContactEmail()):?>
39
+ <div class="field">
40
+ <label for="testimonial_email" class="required"><em>*</em><?php echo Mage::helper('testimonial')->__('Email') ?></label>
41
+ <div class="input-box">
42
+ <input name="testimonial_email" id="testimonial_email" title="<?php echo Mage::helper('testimonial')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('testimonial')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
43
+ </div>
44
+ </div>
45
+ </li>
46
+ <?php endif;?>
47
+ <li class="fields">
48
+ <?php if($helper->isEnableCompanyname()): ?>
49
+ <div class="field">
50
+ <label for="testimonial_companyname"><?php echo Mage::helper('testimonial')->__('Comapny Name') ?></label>
51
+ <div class="input-box">
52
+ <input name="testimonial_companyname" id="testimonial_companyname" title="<?php echo Mage::helper('testimonial')->__('Company Name') ?>" value="" class="input-text" type="text" />
53
+ </div>
54
+ </div>
55
+
56
+ <?php endif;?>
57
+ <?php if($helper->isEnableContactAddress()):?>
58
+ <div class="field">
59
+ <label for="testimonial_address"><?php echo Mage::helper('testimonial')->__('Location') ?></label>
60
+ <div class="input-box">
61
+ <input name="testimonial_address" id="testimonial_address" title="<?php echo Mage::helper('testimonial')->__('Company Location') ?>" value="" class="input-text" type="text" />
62
+ </div>
63
+ </div>
64
+
65
+ <?php endif;?>
66
+ </li>
67
+ <li class="wide">
68
+ <label for="testimonial_text" class="required"><em>*</em><?php echo Mage::helper('testimonial')->__('Content') ?></label>
69
+ <div class="input-box alignleft">
70
+ <textarea name="testimonial_text" id="testimonial_text" title="<?php echo Mage::helper('testimonial')->__('Content') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
71
+ </div>
72
+ </li>
73
+ <?php if($helper->isEnableContactPhoto()):?>
74
+ <li class="fields">
75
+ <label for="testimonial_img"><?php echo Mage::helper('testimonial')->__('Contact Photo') ?></label>
76
+ <div class="input-box alignleft">
77
+ <input name="testimonial_img" id="testimonial_img" class="input-text" type="file" />
78
+ </div>
79
+ </li>
80
+ <?php endif;?>
81
+
82
+ </ul>
83
+ </div>
84
+ <div class="buttons-set">
85
+ <p class="required"><?php echo Mage::helper('testimonial')->__('* Required Fields') ?></p>
86
+ <button type="submit" title="<?php echo Mage::helper('testimonial')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('testimonial')->__('Submit') ?></span></span></button>
87
+ <button type="reset" class="button" value="<?php echo Mage::helper('testimonial')->__('Reset') ?>"><span><span><?php echo Mage::helper('testimonial')->__('Reset') ?></span></span></button>
88
+
89
+ </div>
90
+ </form>
91
+ <script type="text/javascript">
92
+ //<![CDATA[
93
+ var testyForm = new VarienForm('testyForm', true);
94
+ //]]>
95
+ </script>
96
+ </div>
97
+
98
+
99
+ <?php endif;?>
100
+ <?php endif;?>
101
+ <div class="testimonials_container">
102
+ <h1 class="testimonials_title">
103
+ <?php echo $this->htmlEscape($this->helper('testimonial')->getTitle()) ?>
104
+ </h1>
105
+ <div class="testimonials">
106
+ <?php $testimonials = $this->getTestimonials(); ?>
107
+ <?php $i = 0;?>
108
+ <?php if (count($testimonials) > 0): ?>
109
+ <?php foreach ($testimonials as $testimonial): ?>
110
+ <div class="testimonial_<?php $i++; echo (is_int($i/2) ? "right" : "left")?>">
111
+ <?php if($helper->isEnableContactPhoto()):?>
112
+ <div class="testimonial_image">
113
+ <?php
114
+ $configHeightValue = Mage::getStoreConfig('testimonialsection/showhideform/height');
115
+ $configWidthValue = Mage::getStoreConfig('testimonialsection/showhideform/width');
116
+ ?>
117
+ <?php if ($testimonial->getTestimonialImg()):
118
+ $resizeEndarray = explode("/",$testimonial->getTestimonialImg());
119
+
120
+ ?>
121
+
122
+
123
+ <img src="<?php echo Mage::helper('testimonial')->resizeImage(end($resizeEndarray),$configHeightValue,$configWidthValue,'testimonials'); ?>" alt="<?php echo $testimonial->getTestimonialName(); ?>" title="<?php echo $testimonial->getTestimonialName(); ?>" class="testy_img"/>
124
+
125
+
126
+
127
+ <?php else: ?>
128
+ <img src="<?php echo $this->getSkinUrl('apt/testimonial/images/no-image.png') ?>" alt="<?php echo $testimonial->getTestimonialName(); ?>" title="<?php echo $testimonial->getTestimonialName(); ?>" class="testy_no_img" height="<?php echo $configHeightValue.'px' ;?>" width="<?php echo $configWidthValue.'px' ;?>"/>
129
+
130
+
131
+ <?php endif; ?>
132
+ </div>
133
+ <?php endif; ?>
134
+
135
+ <div class="testimonial_content">
136
+ <?php echo $testimonial->getTestimonialText(); ?>
137
+ <?php if($helper->isEnableContactName()):?>
138
+
139
+ <h2><?php echo $testimonial->getTestimonialName(); ?></h2>
140
+ <?php endif;?>
141
+ <?php if($helper->isEnableContactEmail()&& $testimonial->getTestimonialEmail()!=''):?>
142
+ <div class="icon_holder"><img src="<?php echo $this->getSkinUrl('apt/testimonial/images/email_icon.png')?>" width="20" height="20" /></div>
143
+ <p class="text_holder"><?php echo $testimonial->getTestimonialEmail(); ?></p>
144
+ <?php endif;?>
145
+ <?php if($helper->isEnableCompanyname() && $testimonial->getTestimonialCompanyname()!=''): ?>
146
+ <div class="icon_holder"><img src="<?php echo $this->getSkinUrl('apt/testimonial/images/company_icon.png')?>" width="20" height="20" /></div>
147
+ <p class="text_holder"><?php echo $testimonial->getTestimonialCompanyname(); ?></p>
148
+
149
+ <?php endif;?>
150
+
151
+ <?php if($helper->isEnableContactAddress()&& $testimonial->getTestimonialAddress()!=''):?>
152
+ <div class="icon_holder"><img src="<?php echo $this->getSkinUrl('apt/testimonial/images/location_icon.png')?>" width="20" height="20" /></div>
153
+ <p class="text_holder"><?php echo $testimonial->getTestimonialAddress(); ?></p>
154
+ <?php endif;?>
155
+ </div>
156
+ </div>
157
+ <?php endforeach; ?>
158
+ <?php endif;?>
159
+ </div>
160
+
161
+ <a id='back-top' href="#top"><span></span><?php echo $this->__('Back to Top')?></a>
162
+
163
+ <?php $configContactNameValue = Mage::getStoreConfig('testimonialsection/testisettings/allowpagination');
164
+ if($configContactNameValue == 1): ?>
165
+ <div class="testy_paging">
166
+ <?php echo $this->getPagerHtml(); ?>
167
+ </div>
168
+ <?php endif;?>
169
+ </div>
170
+ <script>
171
+ jQuery(document).ready(function(){
172
+ // hide #back-top first
173
+ jQuery("#back-top").hide();
174
+ // fade in #back-top
175
+ jQuery(function () {
176
+ jQuery(window).scroll(function () {
177
+ if (jQuery(this).scrollTop() > 100) {
178
+ jQuery('#back-top').fadeIn();
179
+ } else {
180
+ jQuery('#back-top').fadeOut();
181
+ }
182
+ });
183
+ // scroll body to 0px on click
184
+ jQuery('#back-top').click(function () {
185
+ jQuery('body,html').animate({
186
+ scrollTop: 0
187
+ }, 1500);
188
+ return false;
189
+ });
190
+ });
191
+ });
192
+ </script>
app/design/frontend/base/default/template/apt/testimonial/testimonials_leftsidebar.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $testimonials = $this->getTestimonials();
2
+ $helper = Mage::helper('testimonial');
3
+ ?>
4
+ <?php $i = 0;?>
5
+ <?php if (count($testimonials) > 0): ?>
6
+ <!--Testimonial Start-->
7
+ <div class="block block-testimonial">
8
+ <div class="block-title"><strong><?php echo $this->htmlEscape($this->helper('testimonial')->getFeaturedTitle()) ?></strong></div>
9
+ <div class="block-content testimonial-container">
10
+ <div class="testimonial-slider-left cf">
11
+ <?php foreach ($testimonials as $testimonial): ?>
12
+ <div class="slide">
13
+ <div class="testimonial-content">
14
+ <div class="quote"><p class="qut-text"><?php echo $testimonial->getTestimonialText(); ?></p></div>
15
+
16
+ </div>
17
+ <div class="sidebar_testy">
18
+ <?php if($helper->isEnableContactName()):?>
19
+ <p class="name_featured_testimonials"><?php echo $testimonial->getTestimonialName(); ?></p>
20
+ <?php endif;?>
21
+ <?php if($helper->isEnableContactEmail()):?>
22
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialEmail(); ?></p>
23
+ <?php endif;?>
24
+ <?php if($helper->isEnableCompanyname()): ?>
25
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialCompanyname(); ?></p>
26
+ <?php endif;?>
27
+ <?php if($helper->isEnableContactAddress()):?>
28
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialAddress(); ?></p>
29
+ <?php endif;?>
30
+ </div>
31
+
32
+ </div>
33
+ <?php endforeach; ?>
34
+
35
+ </div>
36
+ </div>
37
+ <p class="view-all"><a href="<?php echo $helper->getTestimonialUrl()?>" title="<?php echo $this->__('View All')?>"><?php echo $this->__('View All')?></a></p>
38
+ </div>
39
+ <!--Testimonial End-->
40
+
41
+ <?php endif; ?>
42
+
43
+
44
+ <?php $configSliderValue = Mage::getStoreConfig('testimonialsection/testyblock/enableslider');?>
45
+ <?php if (count($testimonials) > 1 && $configSliderValue== 1 ): ?>
46
+ <script type="text/javascript">
47
+ jQuery(document).ready(function(){
48
+ jQuery('.testimonial-slider-left').bxSlider({
49
+ controls:false,
50
+ pager:false,
51
+ auto:true,
52
+ adaptiveHeight:true,
53
+ pause:5000,
54
+ autoHover:true,
55
+ slideWidth: 200,
56
+ minSlides: 1,
57
+ maxSlides: 1,
58
+ onSlideBefore: function(){
59
+ jQuery(".testimonial-slider > div").css({width:"186px"})
60
+
61
+ }
62
+ });
63
+ });
64
+ </script>
65
+ <?php endif; ?>
app/design/frontend/base/default/template/apt/testimonial/testimonials_sidebar.phtml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $testimonials = $this->getTestimonials();
2
+ $helper = Mage::helper('testimonial');
3
+ ?>
4
+ <?php $i = 0;?>
5
+ <?php if (count($testimonials) > 0): ?>
6
+ <!--Testimonial Start-->
7
+ <div class="block block-testimonial">
8
+ <div class="block-title"><strong><?php echo $this->htmlEscape($this->helper('testimonial')->getFeaturedTitle()) ?></strong></div>
9
+ <div class="block-content testimonial-container">
10
+ <div class="testimonial-slider cf">
11
+ <?php foreach ($testimonials as $testimonial): ?>
12
+ <div class="slide">
13
+ <div class="testimonial-content">
14
+ <div class="quote"><p class="qut-text"><?php echo $testimonial->getTestimonialText(); ?></p></div>
15
+
16
+ </div>
17
+ <div class="sidebar_testy">
18
+ <?php if($helper->isEnableContactName()):?>
19
+ <p class="name_featured_testimonials"><?php echo $testimonial->getTestimonialName(); ?></p>
20
+ <?php endif;?>
21
+ <?php if($helper->isEnableContactEmail()):?>
22
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialEmail(); ?></p>
23
+ <?php endif;?>
24
+ <?php if($helper->isEnableCompanyname()): ?>
25
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialCompanyname(); ?></p>
26
+ <?php endif;?>
27
+ <?php if($helper->isEnableContactAddress()):?>
28
+ <p class="sub_title_featured_testimonials"><?php echo $testimonial->getTestimonialAddress(); ?></p>
29
+ <?php endif;?>
30
+ </div>
31
+
32
+ </div>
33
+ <?php endforeach; ?>
34
+
35
+ </div>
36
+ </div>
37
+ <p class="view-all"><a href="<?php echo $helper->getTestimonialUrl()?>" title="<?php echo $this->__('View All')?>"><?php echo $this->__('View All')?></a></p>
38
+ </div>
39
+ <!--Testimonial End-->
40
+
41
+ <?php endif; ?>
42
+ <?php $configSliderValue = Mage::getStoreConfig('testimonialsection/testyblock/enableslider');?>
43
+ <?php if (count($testimonials) > 1 && $configSliderValue== 1 ): ?>
44
+ <script type="text/javascript">
45
+ jQuery(document).ready(function(){
46
+ jQuery('.testimonial-slider').bxSlider({
47
+ controls:false,
48
+ pager:false,
49
+ auto:true,
50
+ adaptiveHeight:true,
51
+ pause:5000,
52
+ autoHover:true,
53
+ slideWidth: 200,
54
+ minSlides: 1,
55
+ maxSlides: 1,
56
+ onSlideBefore: function(){
57
+ jQuery(".testimonial-slider > div").css({width:"186px"})
58
+
59
+ }
60
+ });
61
+ });
62
+ </script>
63
+ <?php endif; ?>
app/etc/modules/Apt_Testimonial.xml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * @category Apt
7
+ * @package Apt_Testimonial
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Apt_Testimonial>
13
+ <active>true</active>
14
+ <codePool>community</codePool>
15
+ </Apt_Testimonial>
16
+ </modules>
17
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Apt_Testimonial</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Testimonial module</summary>
10
+ <description>Testimonial module</description>
11
+ <notes>Initial version</notes>
12
+ <authors><author><name>prax Ahir</name><user>praxahir</user><email>info@aptwebdesign.com</email></author></authors>
13
+ <date>2014-07-14</date>
14
+ <time>10:17:51</time>
15
+ <contents><target name="magecommunity"><dir name="Apt"><dir name="Testimonial"><dir name="Block"><dir name="Adminhtml"><dir name="Testimonial"><dir name="Edit"><file name="Form.php" hash="cc8455d4a12678a43343fbe8d0b017ce"/></dir><file name="Edit.php" hash="6ea825e6ca7e8f626ae6bd9c267b7826"/><file name="Grid.php" hash="3e794671cf28fb6d01772a5b5ac1e08b"/></dir><file name="Testimonial.php" hash="944f69ffb625f1aa9ba22fb6afc856a1"/></dir><file name="Testimonial.php" hash="82b71fe6846a8fd75e0bcb5ea4ed85a5"/></dir><dir name="Helper"><file name="Data.php" hash="9f4fd64b0c803568359e96db0f192831"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Testimonial"><file name="Collection.php" hash="4085a0ecd905e91a19dfe66416d1a257"/></dir><file name="Testimonial.php" hash="8b2c14eb226051d429d0d825ca06c363"/></dir><file name="Status.php" hash="382daf798b2a36c1319cea45d1d42720"/><file name="Testimonial.php" hash="6e34d13253cf2a4221802c209aaa1a05"/><dir name="system"><file name="Layout.php" hash="897c01ef70a45472eed4c902f502b0ec"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="TestimonialController.php" hash="c0458427a7c3f41ec55f0e2b4d4f386e"/></dir><file name="IndexController.php" hash="48056d1b13a5837d9b0ac8fa41ce3b2d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="94e6b4abe2232383b9d72c3f2c3e8223"/><file name="config.xml" hash="c82419986273a8f4c225283d0d88ce1e"/><file name="system.xml" hash="cd13e296545052a8c273732a8f0c73f2"/></dir><dir name="sql"><dir name="testimonial_setup"><file name="mysql4-install-1.0.0.0.php" hash="ab49f7238f1804126c17e2f4f1ce0251"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="apt"><file name="testimonial.xml" hash="22ddd22f7164bbe0a36b138c00d7d227"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="apt"><file name="testimonial.xml" hash="63c17fbb5e604c96cbd7c6ec542b1b2a"/></dir></dir><dir name="template"><dir name="apt"><dir name="page"><dir name="html"><file name="head_custom.phtml" hash="f3eba84e971e890922141d90f6bdd53f"/></dir></dir><dir name="testimonial"><file name="testimonials.phtml" hash="ef04f8e8b13f7d208a7c61176f002882"/><file name="testimonials_leftsidebar.phtml" hash="b04ccb18b4d70a8ab4a282f429b9ecda"/><file name="testimonials_sidebar.phtml" hash="6b5e89f622cde7f5a33f64b7843c9f47"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apt_Testimonial.xml" hash="a19679ea1ebc19ea783f245d229b038e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="apt"><dir name="testimonial"><dir name="css"><file name="dd.css" hash="e2f5ae74ef756a0c3b2ddc9f1ba7b85c"/><file name="jquery.bxslider.css" hash="3711e33d3ee564717e079ab2f07cef80"/><file name="jquery.fancybox.css" hash="13bb0d408bb7f8cd9c9b70464c5543dc"/><file name="testimonial.css" hash="c87bcefba890a0264b6856af692add6a"/></dir><dir name="images"><file name="company_icon.png" hash="0f1101b39d3ad70c4d86c5a5804ae303"/><file name="email_icon.png" hash="a415f65574b10977ca21380fd431c666"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="icon_top.png" hash="99dcb864e2f82b2527ff26267754cade"/><file name="location_icon.png" hash="a0641b79756d72748e24ec21a8c9076d"/><file name="no-image.png" hash="fe9a5942444f12caedd09ffd4bed8bf7"/><file name="quote-sml.png" hash="bedab462be760b8649a6d597fabcd9fb"/><file name="quote.png" hash="abec27178d28c252582a05708c7f59c9"/><file name="testi-sdw.png" hash="396018e3139a2233e5ef475b38760d04"/></dir><dir name="js"><file name="jquery.bxslider.min.js" hash="707061648e2df83fd963799b8f9b0558"/><file name="jquery.dd.min.js" hash="ff41dc8bc2c3d0ee8153bfea98ab9982"/><file name="jquery.fancybox.js" hash="cc9e759f24ba773aeef8a131889d3728"/></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/base/default/apt/testimonial/css/dd.css ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .borderRadius{-moz-border-radius:5px; border-radius:5px; }
2
+ .borderRadiusTp{-moz-border-radius:5px 5px 0 0; border-radius:5px;}
3
+ .borderRadiusBtm{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;}
4
+
5
+ .ddcommon {position:relative;display:-moz-inline-stack; zoom:1; display:inline-block; *display:inline; cursor:default;}
6
+ .ddcommon ul{padding:0;margin:0;}
7
+ .ddcommon ul li{list-style-type:none;}
8
+ .borderRadiusTp ul li:last-child{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;border-bottom:0 none #c3c3c3; }
9
+ .borderRadiusBtm ul li:first-child{-moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0 ;border-bottom:1 solid #c3c3c3; }
10
+
11
+ .ddcommon .disabled img, .ddcommon .disabled span, .ddcommon.disabledAll{
12
+ opacity: .5; /* standard: ff gt 1.5, opera, safari */
13
+ -ms-filter:"alpha(opacity=50)"; /* ie 8 */
14
+ filter:alpha(opacity=50); /* ie lt 7 */
15
+ -khtml-opacity:.5; /* safari 1.x */
16
+ -moz-opacity:.5; /* ff lt 1.5, netscape */
17
+ color:#999999;
18
+ }
19
+ .ddcommon .clear{clear:both}
20
+ .ddcommon .shadow{-moz-box-shadow:5px 5px 5px -5px #888888;-webkit-box-shadow:5px 5px 5px -5px #888888;box-shadow: 5px 5px 5px -5px #888888;}
21
+ .ddcommon .text{color:#7e7e7e;padding:0; position:absolute; background:#fff; display:block; width:98%; height:98%; left:2px; top:0; border:none;}
22
+ .ddOutOfVision{position:relative; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline;}
23
+ .borderRadius .shadow{-moz-box-shadow:5px 5px 5px -5px #888888;-webkit-box-shadow:5px 5px 5px -5px #888888;box-shadow: 5px 5px 5px -5px #888888;}
24
+ .borderRadiusBtm .shadow{-moz-box-shadow:-5px -5px 5px -5px #888888;-webkit-box-shadow:-5px -5px 5px -5px #888888;box-shadow: -5px -5px 5px -5px #888888}
25
+ .borderRadiusTp .border, .borderRadius .border{-moz-border-radius:0 0 5px 5px ; border-radius:0 0 5px 5px;}
26
+ .borderRadiusBtm .border{-moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0;}
27
+
28
+ .ddcommon .divider{width:0; height:65%; position:absolute;}
29
+ .ddcommon .arrow{display:inline-block; position:absolute; top:50%; right:4px;}
30
+ .ddcommon .arrow:hover{background-position:0 100%;}
31
+ .ddcommon .ddTitle{padding:0; position:relative; display:inline-block; width:100%; text-align:left;}
32
+ .ddcommon .ddTitle .ddTitleText{display:block;}
33
+ .ddcommon .ddTitle .ddTitleText .ddTitleText{padding:0;}
34
+ .ddcommon .ddTitle .description{display:block;}
35
+ .ddcommon .ddTitle .ddTitleText img{position:relative; vertical-align:middle; float:left; margin:3px 18px 0 3px; }
36
+ .ddcommon .ddChild{position:absolute;display:none;width:100%;overflow-y:auto; overflow-x:hidden; zoom:1;}
37
+ .ddcommon .ddChild li{clear:both;}
38
+ .ddcommon .ddChild li .description{display:block;}
39
+ .ddcommon .ddChild li img{border:0 none; position:relative;vertical-align:middle;float:left}
40
+ .ddcommon .ddChild li.optgroup{padding:0;}
41
+ .ddcommon .ddChild li.optgroup .optgroupTitle{padding:0 5px; font-weight:bold; font-style:italic}
42
+ .ddcommon .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}
43
+ .ddcommon .noBorderTop{border-top:none 0 !important; padding:0; margin:0;}
44
+
45
+ /*************** default theme **********************/
46
+ .dd{border:1px solid #c3c3c3;}
47
+ .dd .divider{border-left:1px solid #c3c3c3; border-right:1px solid #fff;; left:37px; margin:5px 0; }
48
+ .dd .arrow{width:16px;height:16px; margin-top:-8px; background:url(../images/bgi/dd_arrow.gif) no-repeat;}
49
+ .dd .arrow:hover{background-position:0 100%;}
50
+ .dd .ddTitle{color:#010101;background:#fcfcfc;}
51
+ .dd .ddTitle .ddTitleText{padding:5px 20px 5px 5px;}
52
+ .dd .ddTitle .ddTitleText .ddTitleText{padding:0;}
53
+ .dd .ddTitle .description{font-size:12px; color:#666}
54
+ .dd .ddTitle .ddTitleText img{padding-right:5px;}
55
+ .dd .ddChild{border:1px solid #c3c3c3; background-color:#fff; left:-1px;}
56
+ .dd .ddChild li{padding:5px; background-color:#fff; border-bottom:1px solid #c3c3c3; text-align:left; }
57
+ .dd .ddChild li .description{color:#666;}
58
+ .dd .ddChild li .ddlabel{color:#333;}
59
+ .dd .ddChild li.hover{background-color:#f2f2f2}
60
+ .dd .ddChild li img{padding:0 6px 0 0;}
61
+ .dd .ddChild li.optgroup{padding:0;}
62
+ .dd .ddChild li.optgroup .optgroupTitle{padding:0 5px; font-weight:bold; font-style:italic}
63
+ .dd .ddChild li.optgroup ul li{padding:5px 5px 5px 15px}
64
+ .dd .ddChild li.selected{background-color:#d5d5d5; color:#000;}
skin/frontend/base/default/apt/testimonial/css/jquery.bxslider.css ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BxSlider v4.0 - Fully loaded, responsive content slider
3
+ * http://bxslider.com
4
+ *
5
+ * Written by: Steven Wanderski, 2012
6
+ * http://stevenwanderski.com
7
+ * (while drinking Belgian ales and listening to jazz)
8
+ *
9
+ * CEO and founder of bxCreative, LTD
10
+ * http://bxcreative.com
11
+ */
12
+
13
+
14
+ /** RESET AND LAYOUT
15
+ ===================================*/
16
+
17
+ .bx-wrapper {
18
+ position: relative;
19
+ margin: 0 auto;
20
+ padding: 0;
21
+ *zoom: 1;
22
+ }
23
+
24
+ .bx-wrapper img {
25
+ max-width: 100%;
26
+ display: block;
27
+ }
28
+
29
+ /** THEME
30
+ ===================================*/
31
+
32
+ .bx-wrapper .bx-viewport {
33
+ /*-moz-box-shadow: 0 0 5px #ccc;
34
+ -webkit-box-shadow: 0 0 5px #ccc;
35
+ box-shadow: 0 0 5px #ccc;
36
+ border: solid #fff 5px;
37
+ left: -5px;
38
+ background: #fff;*/
39
+ }
40
+
41
+ .bx-wrapper .bx-pager,
42
+ .bx-wrapper .bx-controls-auto {
43
+ position: absolute;
44
+ bottom: -30px;
45
+ width: 100%;
46
+ }
47
+
48
+ /* LOADER */
49
+
50
+ .bx-wrapper .bx-loading {
51
+ min-height: 50px;
52
+
53
+ height: 100%;
54
+ width: 100%;
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ z-index: 2000;
59
+ }
60
+
61
+ /* PAGER */
62
+
63
+ .bx-wrapper .bx-pager {
64
+ text-align: center;
65
+ font-size: .85em;
66
+ font-family: Arial;
67
+ font-weight: bold;
68
+ color: #666;
69
+ padding-top: 20px;
70
+ }
71
+
72
+ .bx-wrapper .bx-pager .bx-pager-item,
73
+ .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
74
+ display: inline-block;
75
+ *zoom: 1;
76
+ *display: inline;
77
+ }
78
+
79
+ .bx-wrapper .bx-pager.bx-default-pager a {
80
+ background:url(../images/gallery_pagination_bullete.png) -28px 0 no-repeat; width:17px; height:17px; margin-left:8px;
81
+ text-indent: -9999px;
82
+ display: block;
83
+ outline: 0;
84
+ }
85
+
86
+ .bx-wrapper .bx-pager.bx-default-pager a:hover,
87
+ .bx-wrapper .bx-pager.bx-default-pager a.active {
88
+ background-position:-1px 0;
89
+ }
90
+
91
+ /* DIRECTION CONTROLS (NEXT / PREV) */
92
+
93
+ .bx-wrapper .bx-prev {
94
+ left: 10px;
95
+
96
+ }
97
+
98
+ .bx-wrapper .bx-next {
99
+ right: 10px;
100
+
101
+ }
102
+
103
+ .bx-wrapper .bx-prev:hover {
104
+ background-position: 0 0;
105
+ }
106
+
107
+ .bx-wrapper .bx-next:hover {
108
+ background-position: -42px 0;
109
+ }
110
+
111
+ .bx-wrapper .bx-controls-direction a {
112
+ position: absolute;
113
+ top: 50%;
114
+ margin-top: -16px;
115
+ outline: 0;
116
+ width: 32px;
117
+ height: 32px;
118
+ text-indent: -9999px;
119
+ z-index: 9999;
120
+ }
121
+
122
+ .bx-wrapper .bx-controls-direction a.disabled {
123
+ display: none;
124
+ }
125
+
126
+ /* AUTO CONTROLS (START / STOP) */
127
+
128
+ .bx-wrapper .bx-controls-auto {
129
+ text-align: center;
130
+ }
131
+
132
+ .bx-wrapper .bx-controls-auto .bx-start {
133
+ display: block;
134
+ text-indent: -9999px;
135
+ width: 10px;
136
+ height: 11px;
137
+ outline: 0;
138
+
139
+ margin: 0 3px;
140
+ }
141
+
142
+ .bx-wrapper .bx-controls-auto .bx-start:hover,
143
+ .bx-wrapper .bx-controls-auto .bx-start.active {
144
+ background-position: -86px 0;
145
+ }
146
+
147
+ .bx-wrapper .bx-controls-auto .bx-stop {
148
+ display: block;
149
+ text-indent: -9999px;
150
+ width: 9px;
151
+ height: 11px;
152
+ outline: 0;
153
+
154
+ margin: 0 3px;
155
+ }
156
+
157
+ .bx-wrapper .bx-controls-auto .bx-stop:hover,
158
+ .bx-wrapper .bx-controls-auto .bx-stop.active {
159
+ background-position: -86px -33px;
160
+ }
161
+
162
+ /* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
163
+
164
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
165
+ text-align: left;
166
+ width: 80%;
167
+ }
168
+
169
+ .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
170
+ right: 0;
171
+ width: 35px;
172
+ }
173
+
174
+ /* IMAGE CAPTIONS */
175
+
176
+ .bx-wrapper .bx-caption {
177
+ position: absolute;
178
+ bottom: 0;
179
+ left: 0;
180
+ background: #666\9;
181
+ background: rgba(80, 80, 80, 0.75);
182
+ width: 100%;
183
+ }
184
+
185
+ .bx-wrapper .bx-caption span {
186
+ color: #fff;
187
+ font-family: Arial;
188
+ display: block;
189
+ font-size: .85em;
190
+ padding: 10px;
191
+ }
192
+ .block .bx-wrapper .bx-prev {
193
+ background: url("../images/block-slider-btn.png") no-repeat scroll 0 0 transparent;
194
+ float: left;
195
+ height: 26px;
196
+ left: inherit;
197
+ margin-left: 10px;
198
+ right: 41px;
199
+ width: 29px;
200
+ }
201
+ .block .bx-wrapper .bx-prev, .block .bx-wrapper .bx-next {
202
+ cursor: pointer;
203
+ display: inline-block;
204
+ margin: 0;
205
+ position: absolute;
206
+ text-indent: -9999px;
207
+ top: -36px;
208
+ }
skin/frontend/base/default/apt/testimonial/css/jquery.fancybox.css ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ .fancybox-wrap,
3
+ .fancybox-skin,
4
+ .fancybox-outer,
5
+ .fancybox-inner,
6
+ .fancybox-image,
7
+ .fancybox-wrap iframe,
8
+ .fancybox-wrap object,
9
+ .fancybox-nav,
10
+ .fancybox-nav span,
11
+ .fancybox-tmp
12
+ {
13
+ padding: 0;
14
+ margin: 0;
15
+ border: 0;
16
+ outline: none;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .fancybox-wrap {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ z-index: 8020;
25
+ }
26
+
27
+ .fancybox-skin {
28
+ position: relative;
29
+ background: #f9f9f9;
30
+ color: #444;
31
+ text-shadow: none;
32
+ -webkit-border-radius: 4px;
33
+ -moz-border-radius: 4px;
34
+ border-radius: 4px;
35
+ }
36
+
37
+ .fancybox-opened {
38
+ z-index: 8030;
39
+ }
40
+
41
+ .fancybox-opened .fancybox-skin {
42
+ -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
43
+ -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
44
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
45
+ }
46
+
47
+ .fancybox-outer, .fancybox-inner {
48
+ position: relative;
49
+ }
50
+
51
+ .fancybox-inner {
52
+ overflow: hidden;
53
+ }
54
+
55
+ .fancybox-type-iframe .fancybox-inner {
56
+ -webkit-overflow-scrolling: touch;
57
+ }
58
+
59
+ .fancybox-error {
60
+ color: #444;
61
+ font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
62
+ margin: 0;
63
+ padding: 15px;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .fancybox-image, .fancybox-iframe {
68
+ display: block;
69
+ width: 100%;
70
+ height: 100%;
71
+ }
72
+
73
+ .fancybox-image {
74
+ max-width: 100%;
75
+ max-height: 100%;
76
+ }
77
+
78
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79
+ background-image: url('../images/fancybox_sprite.png');
80
+ }
81
+
82
+ #fancybox-loading {
83
+ position: fixed;
84
+ top: 50%;
85
+ left: 50%;
86
+ margin-top: -22px;
87
+ margin-left: -22px;
88
+ background-position: 0 -108px;
89
+ opacity: 0.8;
90
+ cursor: pointer;
91
+ z-index: 8060;
92
+ }
93
+
94
+ #fancybox-loading div {
95
+ width: 44px;
96
+ height: 44px;
97
+ background: url('../images/fancybox_loading.gif') center center no-repeat;
98
+ }
99
+
100
+ .fancybox-close {
101
+ position: absolute;
102
+ top: -18px;
103
+ right: -18px;
104
+ width: 36px;
105
+ height: 36px;
106
+ cursor: pointer;
107
+ z-index: 8040;
108
+ }
109
+
110
+ .fancybox-nav {
111
+ position: absolute;
112
+ top: 0;
113
+ width: 40%;
114
+ height: 100%;
115
+ cursor: pointer;
116
+ text-decoration: none;
117
+ background: transparent url('blank.gif'); /* helps IE */
118
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
119
+ z-index: 8040;
120
+ }
121
+
122
+ .fancybox-prev {
123
+ left: 0;
124
+ }
125
+
126
+ .fancybox-next {
127
+ right: 0;
128
+ }
129
+
130
+ .fancybox-nav span {
131
+ position: absolute;
132
+ top: 50%;
133
+ width: 36px;
134
+ height: 34px;
135
+ margin-top: -18px;
136
+ cursor: pointer;
137
+ z-index: 8040;
138
+ visibility: hidden;
139
+ }
140
+
141
+ .fancybox-prev span {
142
+ left: 10px;
143
+ background-position: 0 -36px;
144
+ }
145
+
146
+ .fancybox-next span {
147
+ right: 10px;
148
+ background-position: 0 -72px;
149
+ }
150
+
151
+ .fancybox-nav:hover span {
152
+ visibility: visible;
153
+ }
154
+
155
+ .fancybox-tmp {
156
+ position: absolute;
157
+ top: -99999px;
158
+ left: -99999px;
159
+ visibility: hidden;
160
+ max-width: 99999px;
161
+ max-height: 99999px;
162
+ overflow: visible !important;
163
+ }
164
+
165
+ /* Overlay helper */
166
+
167
+ .fancybox-lock {
168
+ overflow: hidden !important;
169
+ width: auto;
170
+ }
171
+
172
+ .fancybox-lock body {
173
+ overflow: hidden !important;
174
+ }
175
+
176
+ .fancybox-lock-test {
177
+ overflow-y: hidden !important;
178
+ }
179
+
180
+ .fancybox-overlay {
181
+ position: absolute;
182
+ top: 0;
183
+ left: 0;
184
+ overflow: hidden;
185
+ display: none;
186
+ z-index: 8010;
187
+ background: url('../images/fancybox_overlay.png');
188
+ }
189
+
190
+ .fancybox-overlay-fixed {
191
+ position: fixed;
192
+ bottom: 0;
193
+ right: 0;
194
+ }
195
+
196
+ .fancybox-lock .fancybox-overlay {
197
+ overflow: auto;
198
+ overflow-y: scroll;
199
+ }
200
+
201
+ /* Title helper */
202
+
203
+ .fancybox-title {
204
+ visibility: hidden;
205
+ font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
206
+ position: relative;
207
+ text-shadow: none;
208
+ z-index: 8050;
209
+ }
210
+
211
+ .fancybox-opened .fancybox-title {
212
+ visibility: visible;
213
+ }
214
+
215
+ .fancybox-title-float-wrap {
216
+ position: absolute;
217
+ bottom: 0;
218
+ right: 50%;
219
+ margin-bottom: -35px;
220
+ z-index: 8050;
221
+ text-align: center;
222
+ }
223
+
224
+ .fancybox-title-float-wrap .child {
225
+ display: inline-block;
226
+ margin-right: -100%;
227
+ padding: 2px 20px;
228
+ background: transparent; /* Fallback for web browsers that doesn't support RGBa */
229
+ background: rgba(0, 0, 0, 0.8);
230
+ -webkit-border-radius: 15px;
231
+ -moz-border-radius: 15px;
232
+ border-radius: 15px;
233
+ text-shadow: 0 1px 2px #222;
234
+ color: #FFF;
235
+ font-weight: bold;
236
+ line-height: 24px;
237
+ white-space: nowrap;
238
+ }
239
+
240
+ .fancybox-title-outside-wrap {
241
+ position: relative;
242
+ margin-top: 10px;
243
+ color: #fff;
244
+ }
245
+
246
+ .fancybox-title-inside-wrap {
247
+ padding-top: 10px;
248
+ }
249
+
250
+ .fancybox-title-over-wrap {
251
+ position: absolute;
252
+ bottom: 0;
253
+ left: 0;
254
+ color: #fff;
255
+ padding: 10px;
256
+ background: #000;
257
+ background: rgba(0, 0, 0, .8);
258
+ }
259
+
260
+ /*Retina graphics!*/
261
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
262
+ only screen and (min--moz-device-pixel-ratio: 1.5),
263
+ only screen and (min-device-pixel-ratio: 1.5){
264
+
265
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
266
+ background-image: url('fancybox_sprite@2x.png');
267
+ background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
268
+ }
269
+
270
+ #fancybox-loading div {
271
+ background-image: url('fancybox_loading@2x.gif');
272
+ background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
273
+ }
274
+ }
skin/frontend/base/default/apt/testimonial/css/testimonial.css ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .testimonials {
2
+ height: 100%;
3
+ }
4
+
5
+ .testimonials .testimonial_left, .testimonials .testimonial_right {
6
+ clear: both;
7
+ display: table;
8
+ height: auto;
9
+ margin: 20px 18px 20px 0;
10
+ padding: 20px 20px 30px 20px;
11
+ width: 94%;
12
+
13
+ background: url("../images/testi-sdw.png") left bottom no-repeat !important;
14
+ }
15
+
16
+ .testimonial_image {
17
+ display: table-cell;
18
+ float: left;
19
+ width: 120px;
20
+ height:120px;
21
+
22
+ }
23
+
24
+ .testimonial_image img {
25
+
26
+ }
27
+
28
+ .testimonial_content {
29
+ background: url("../images/quote.png") no-repeat scroll 0 0 transparent;
30
+ display: table-cell;
31
+ float: right;
32
+ font-size: 13px;
33
+ padding: 0 0 0 55px;
34
+ width: 450px; font-family:verdana; color:#818181;
35
+ }
36
+
37
+ .testimonial_content h2 {
38
+ color: #43A3AC; font-family: Georgia;font-size: 2em;font-weight: normal;line-height: 1.25; margin-bottom: 0.45em;
39
+ }
40
+
41
+ .testimonial_left .testimonial_content {
42
+ float: left;
43
+ }
44
+
45
+ .testimonial_left .testimonial_image {
46
+ float: right;
47
+ }
48
+
49
+ .testimonial_right .testimonial_content {
50
+ float: right;
51
+ }
52
+
53
+ .testimonial_right .testimonial_image {
54
+ float: left;
55
+ }
56
+
57
+ .testimonials_sidebar .block-content a {
58
+ color: #1B2D3B;
59
+ float: none;
60
+ text-decoration: underline;
61
+ text-align: right;
62
+ font-size: 11px;
63
+ line-height: 1.25;
64
+ }
65
+
66
+ .testimonial-container{font-family:verdana; color:#818181; font-size:11px;}
67
+ .testimonial-container .quote{padding:0 2px 0 14px ; background: url("../images/quote-sml.png") left top no-repeat !important;}
68
+
69
+ .testimonials_sidebar .testimonial_sidebar_box .testimonial_sidebar_text .testimonial_sidebar_name {
70
+ font-size: 11px;
71
+ line-height: 1.25;
72
+ color: #1B2D3B;
73
+ }
74
+
75
+ .testimonial_sidebar_text {
76
+ text-align: left;
77
+ padding: 6px 9px;
78
+ }
79
+
80
+ .testimonial_sidebar_name {
81
+ text-align: right !important;
82
+ font-style: italic;
83
+ margin: 0 10px 7px;
84
+ }
85
+ #testy-create{
86
+ background: none repeat scroll 0 0 #000;
87
+ border-radius: 15px 15px 15px 15px;
88
+ color: #FFFFFF;
89
+ display: inline-block;
90
+ font-weight: bold;
91
+ line-height: 24px;
92
+ padding: 2px 20px;
93
+ text-shadow: 0 1px 2px #222222;
94
+ white-space: nowrap;
95
+ float:right;
96
+ text-decoration:none;
97
+ }
98
+
99
+ /*CSS 26/7/2013*/
100
+
101
+ .testimonials_container h1 {color: #111111; font-family: Georgia; font-size: 3em; font-weight: normal; line-height: 1.15;}
102
+ .testimonial_text h2 {font-family: Georgia;font-size: 2em;font-weight: normal;line-height: 1.25; margin-bottom: 0.45em;}
103
+ .icon_holder { width:20px; height:20px; float:left; clear:right; display:block;}
104
+ .text_holder { float:left; clear:right; font-family:Georgia, "Times New Roman", Times, serif; font-weight:normal; color: #414141; margin:0px 5px 0px 0px; padding:3px 0px 0px 10px; font-size:13px;}
105
+ .slide {padding:5px; width:186px !important}
106
+
107
+ .name_featured_testimonials {font-family: Georgia;font-size:16px; font-weight: normal;line-height: 1.25; margin-bottom: 0.45em; color:#43A3AC; text-align:right;}
108
+ .sub_title_featured_testimonials {font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight: normal; line-height: normal; margin-bottom:3px; color:#818181; text-align:right;}
109
+ .sidebar_testy{width:98%;}
110
+
111
+ p.view-all {text-align: right; font-size:12px; padding:5px; margin:0px; font-weight:bold;}
112
+ p.view-all a{ color:#222;}
113
+ p.view-all a:hover{ color:#43A3AC;}
114
+ .testy_img{ border: 2px solid #ddd;}
115
+ .fieldset_popup{ margin: 28px 0; padding: 22px 25px 12px 80px;}
116
+ .quote p{word-wrap: break-word;}
117
+ #testyForm .form-list .fields .input-box {text-align:left !important;}
118
+ #testyForm .form-list .wide .input-box {text-align:left !important;}
119
+
120
+
121
+ /**backTOTop***/
122
+ #back-top{
123
+ width:40px;
124
+ height:40px;
125
+ opacity:0.3;
126
+ position:fixed;
127
+ bottom:50px;
128
+ right:100px;
129
+ display:none;
130
+ text-indent:-9999px;
131
+ background: url('../images/icon_top.png') no-repeat;
132
+ }
133
+ .alignleft{float:left;}
skin/frontend/base/default/apt/testimonial/images/company_icon.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/email_icon.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/fancybox_overlay.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/fancybox_sprite.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/icon_top.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/location_icon.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/no-image.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/quote-sml.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/quote.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/images/testi-sdw.png ADDED
Binary file
skin/frontend/base/default/apt/testimonial/js/jquery.bxslider.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BxSlider v4.0 - Fully loaded, responsive content slider
3
+ * http://bxslider.com
4
+ *
5
+ * Copyright 2012, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
6
+ * Written while drinking Belgian ales and listening to jazz
7
+ *
8
+ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
9
+ */
10
+ (function(t){var e={},n={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,touchEnabled:!0,swipeThreshold:50,video:!1,useCSS:!0,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};t.fn.bxSlider=function(s){if(0!=this.length){if(this.length>1)return this.each(function(){t(this).bxSlider(s)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},n,s),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),c()},c=function(){if(r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?215*o.children.length+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.width(h()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:50,display:"block"})),o.controls.el=t('<div class="bx-controls" />'),o.settings.captions&&T(),o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var e="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass("bx-clone"),n=o.children.slice(-e).clone().addClass("bx-clone");r.append(i).prepend(n)}o.active.last=o.settings.startSlide==v()-1,o.settings.video&&r.fitVids(),o.settings.ticker||(o.settings.pager&&S(),o.settings.controls&&b(),o.settings.auto&&o.settings.autoControls&&w(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),r.children().imagesLoaded(function(){o.loader.remove(),f(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(g()),o.settings.onSliderLoad(o.active.index),o.initialized=!0,t(window).bind("resize",O),o.settings.auto&&o.settings.autoStart&&L(),o.settings.ticker&&D(),o.settings.pager&&y(o.settings.startSlide),o.settings.controls&&q(),o.settings.touchEnabled&&!o.settings.ticker&&H()})},g=function(){var e=0,n=t();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var s=1==o.settings.moveSlides?o.active.index:o.active.index*p();for(n=o.children.eq(s),i=1;o.settings.maxSlides-1>=i;i++)n=s+i>=o.children.length?n.add(o.children.eq(i-1)):n.add(o.children.eq(s+i))}else n=o.children.eq(o.active.index);else n=o.children;return"vertical"==o.settings.mode?(n.each(function(){e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),e},h=function(){var t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth?t=e:e>o.maxThreshold?t=(e-o.settings.slideMargin*(o.settings.maxSlides-1))/o.settings.maxSlides:o.minThreshold>e&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides),t},u=function(){var t=1;if("horizontal"==o.settings.mode)if(o.viewport.width()<o.minThreshold)t=o.settings.minSlides;else if(o.viewport.width()>o.maxThreshold)t=o.settings.maxSlides;else{var e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.settings.mode&&(t=o.settings.minSlides);return t},v=function(){var t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/p();else for(var e=0,i=0;o.children.length>e;)++t,e=i+u(),i+=o.settings.moveSlides<=u()?o.settings.moveSlides:u();else t=Math.ceil(o.children.length/u());return t},p=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=u()?o.settings.moveSlides:u()},f=function(){if(o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var t=o.children.last(),e=t.position();x(-(e.left-(o.viewport.width()-t.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();x(-e.top,"reset",0)}}else{var e=o.children.eq(o.active.index*p()).position();o.active.index==v()-1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?x(-e.left,"reset",0):"vertical"==o.settings.mode&&x(-e.top,"reset",0))}},x=function(t,e,i,n){if(o.usingCSS){var s="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?(r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),z()})):"reset"==e?r.css(o.animProp,s):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),x(n.resetValue,"reset",0),I()}))}else{var a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function(){z()}):"reset"==e?r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function(){x(n.resetValue,"reset",0),I()})}},m=function(){var e="";pagerQty=v();for(var i=0;pagerQty>i;i++){var n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(i),o.pagerEl.addClass("bx-custom-pager")):(n=i+1,o.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+i+'" class="bx-pager-link">'+n+"</a></div>"}o.pagerEl.html(e)},S=function(){o.settings.pagerCustom?o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('<div class="bx-pager" />'),o.settings.pagerSelector?t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),m()),o.pagerEl.delegate("a","click",k)},b=function(){o.controls.next=t('<a class="bx-next" href="">'+o.settings.nextText+"</a>"),o.controls.prev=t('<a class="bx-prev" href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",C),o.controls.prev.bind("click",E),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=t('<div class="bx-controls-direction" />'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},w=function(){o.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+o.settings.startText+"</a></div>"),o.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=t('<div class="bx-controls-auto" />'),o.controls.autoEl.delegate(".bx-start","click",A),o.controls.autoEl.delegate(".bx-stop","click",P),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),M(o.settings.autoStart?"stop":"start")},T=function(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!=e&&t(this).append('<div class="bx-caption"><span>'+e+"</span></div>")})},C=function(t){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},E=function(t){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},A=function(t){r.startAuto(),t.preventDefault()},P=function(t){r.stopAuto(),t.preventDefault()},k=function(e){o.settings.auto&&r.stopAuto();var i=t(e.currentTarget),n=parseInt(i.attr("data-slide-index"));n!=o.active.index&&r.goToSlide(n),e.preventDefault()},y=function(e){return"short"==o.settings.pagerType?(o.pagerEl.html(e+1+o.settings.pagerShortSeparator+o.children.length),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")}),void 0)},z=function(){if(o.settings.infiniteLoop){var t="";0==o.active.index?t=o.children.eq(0).position():o.active.index==v()-1&&o.carousel?t=o.children.eq((v()-1)*p()).position():o.active.index==o.children.length-1&&(t=o.children.eq(o.children.length-1).position()),"horizontal"==o.settings.mode?x(-t.left,"reset",0):"vertical"==o.settings.mode&&x(-t.top,"reset",0)}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},M=function(t){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[t]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},q=function(){!o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==v()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))},L=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},D=function(){var e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-i.top}x(e,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)});var i=o.settings.speed/e,n="horizontal"==o.settings.mode?"left":"top",s=i*(e-Math.abs(parseInt(r.css(n))));I(s)}),I()},I=function(t){speed=t?t:o.settings.speed;var e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-clone").first().position():i=o.children.first().position();var n="horizontal"==o.settings.mode?-e.left:-e.top,s="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:s};x(n,"ticker",speed,a)},H=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",W)},W=function(t){if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.changedTouches[0].pageY,o.viewport.bind("touchmove",N),o.viewport.bind("touchend",B)}},N=function(t){if(t.preventDefault(),"fade"!=o.settings.mode){var e=t.originalEvent,i=0;if("horizontal"==o.settings.mode){var n=e.changedTouches[0].pageX-o.touch.start.x;i=o.touch.originalPos.left+n}else{var n=e.changedTouches[0].pageY-o.touch.start.y;i=o.touch.originalPos.top+n}x(i,"reset",0)}},B=function(t){o.viewport.unbind("touchmove",N);var e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.changedTouches[0].pageY,"fade"==o.settings.mode){var n=Math.abs(o.touch.start.x-o.touch.end.x);n>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var n=0;"horizontal"==o.settings.mode?(n=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(n=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&n>0||o.active.last&&0>n)?x(i,"reset",200):Math.abs(n)>=o.settings.swipeThreshold?(0>n?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):x(i,"reset",200)}o.viewport.unbind("touchend",B)},O=function(){var e=t(window).width(),i=t(window).height();(a!=e||l!=i)&&(a=e,l=i,o.children.add(r.find(".bx-clone")).width(h()),o.viewport.css("height",g()),o.active.last&&(o.active.index=v()-1),o.active.index>=v()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(m(),y(o.active.index)),o.settings.ticker||f())};return r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>e?v()-1:e>=v()?0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=v()-1,o.settings.pager&&y(o.active.index),o.settings.controls&&q(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=g()&&o.viewport.animate({height:g()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",51).fadeIn(o.settings.speed,function(){t(this).css("zIndex",50),z()});else{o.settings.adaptiveHeight&&o.viewport.height()!=g()&&o.viewport.animate({height:g()},o.settings.adaptiveHeightSpeed);var n=0,s={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);s=a.position(),n=o.viewport.width()-a.width()}else{var l=o.children.length-o.settings.minSlides;s=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-p():(v()-1)*p()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);s=a.position()}else if("next"==i&&0==o.active.index)s=r.find(".bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var c=e*p();s=o.children.eq(c).position()}var h="horizontal"==o.settings.mode?-(s.left-n):-s.top;x(h,"slide",o.settings.speed)}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var t=o.active.index+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var t=o.active.index-1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=t&&M("stop"))},r.stopAuto=function(t){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=t&&M("start"))},r.getCurrentSlide=function(){return o.active.index},r.getSlideCount=function(){return o.children.length},r.destroySlider=function(){o.initialized&&(o.initialized=!1,t(".bx-clone",this).remove(),o.children.removeAttr("style"),this.removeAttr("style").unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.pagerEl.remove(),t(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),t(window).unbind("resize",O))},r.reloadSlider=function(t){void 0!=t&&(s=t),r.destroySlider(),d()},d(),this}}})(jQuery),function(t,e){var i="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";t.fn.imagesLoaded=function(n){function s(){var e=t(g),i=t(h);a&&(h.length?a.reject(d,e,i):a.resolve(d)),t.isFunction(n)&&n.call(r,d,e,i)}function o(e,n){e.src===i||-1!==t.inArray(e,c)||(c.push(e),n?h.push(e):g.push(e),t.data(e,"imagesLoaded",{isBroken:n,src:e.src}),l&&a.notifyWith(t(e),[n,d,t(g),t(h)]),d.length===c.length&&(setTimeout(s),d.unbind(".imagesLoaded")))}var r=this,a=t.isFunction(t.Deferred)?t.Deferred():0,l=t.isFunction(a.notify),d=r.find("img").add(r.filter("img")),c=[],g=[],h=[];return t.isPlainObject(n)&&t.each(n,function(t,e){"callback"===t?n=e:a&&a[t](e)}),d.length?d.bind("load.imagesLoaded error.imagesLoaded",function(t){o(t.target,"error"===t.type)}).each(function(n,s){var r=s.src,a=t.data(s,"imagesLoaded");a&&a.src===r?o(s,a.isBroken):s.complete&&s.naturalWidth!==e?o(s,0===s.naturalWidth||0===s.naturalHeight):(s.readyState||s.complete)&&(s.src=i,s.src=r)}):s(),a?a.promise(r):r}}(jQuery);
skin/frontend/base/default/apt/testimonial/js/jquery.dd.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ // MSDropDown - jquery.dd.js
2
+ // author: Marghoob Suleman - http://www.marghoobsuleman.com/
3
+ // Date: 10 Nov, 2012
4
+ // Version: 3.0
5
+ // Revision: 16
6
+ // web: www.marghoobsuleman.com
7
+ /*
8
+ // msDropDown is free jQuery Plugin: you can redistribute it and/or modify
9
+ // it under the terms of the either the MIT License or the Gnu General Public License (GPL) Version 2
10
+ */
11
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4 1A=1A||{};(6($){1A={3w:\'3.0\',3x:"52 53",2R:20,3y:6(v){5(v!==12){$(".2D").1l({1u:\'2S\',23:\'4a\'})}1b{$(".2D").1l({1u:\'4b\',23:\'2T\'})}},2U:\'\',2V:6(a,b,c){c=c||"3z";4 d;1W(c.2E()){1h"3z":1h"4c":d=$(a).2W(b).1d("1O");1i}14 d}};$.2X={};$.2W={};$.2F(11,$.2X,1A);$.2F(11,$.2W,1A);5($.1L.24===1v){$.1L.24=$.1L.54}5($.1L.18===1v){$.1L.18=$.1L.55;$.1L.1y=$.1L.56}5(1w $.2Y.4d===\'6\'){$.2Y[\':\'].3A=$.2Y.4d(6(b){14 6(a){14 $(a).1n().2Z().4e(b.2Z())>=0}})}1b{$.2Y[\':\'].3A=6(a,i,m){14 $(a).1n().2Z().4e(m[3].2Z())>=0}}6 1O(q,t){4 u=$.2F(11,{1H:{1d:1e,1k:0,3B:1e,25:0,1P:12,30:57},4f:\'1O\',1u:58,2d:7,31:0,32:11,1X:59,2e:12,4g:\'5a\',3C:\'1M\',4h:\'2S\',2p:11,1I:\'\',4i:0.7,3D:11,18:{2V:1e,2q:1e,33:1e,1Y:1e,1B:1e,34:1e,4j:1e,1M:1e,3E:1e,3F:1e,2f:1e,2r:1e,4k:1e,2g:1e,2h:1e}},t);4 x=15;4 y={3G:\'5b\',1Q:\'5c\',3H:\'5d\',2i:\'5e\',1m:\'5f\'};4 z={1O:u.4f,2G:\'2G\',3I:\'3I 5g\',3J:\'3J\',35:\'35\',2s:\'2s\',1o:\'1o\',2D:\'2D\',4l:\'4l\',4m:\'4m\',19:\'19\',3K:\'3K\',36:"36",3L:"3L",1f:"1f",2H:"5h",2I:\'2I\',3a:\'3a\'};4 A={8:\'5i\',2j:\'2j\',4n:\'5j 4o\',3b:"3b"};4 B=12,1Z=12,1j=12,3c={},9,1J,3d=12;4 C=40,4p=38,4q=37,4r=39,4s=27,4t=13,4u=47,3M=16,3N=17;4 D=12,2t=12,3e=1e,3f=12,3O,5k=12;4 E=2J;4 F=6(a){5(3c[a]===1v){3c[a]=E.5l(a)}14 3c[a]};4 G=6(a){4 b=J("1m");14 $("#"+b+" 8."+A.8).1C(a)};4 H=6(){5(u.1H.1d){4 a=["1f","1z","1p"];3g{5(!q.1D){q.1D="3z"+1A.2R};u.1H.1d=4v(u.1H.1d);4 b="5m"+(1A.2R++);4 c={};c.1D=b;c.3B=u.1H.3B||q.1D;5(u.1H.25>0){c.25=u.1H.25};c.1P=u.1H.1P;4 d=M("4c",c);21(4 i=0;i<u.1H.1d.1a;i++){4 f=u.1H.1d[i];4 g=3h 3P(f.1n,f.1g);21(4 p 3i f){5(p.2E()!=\'1n\'){4 h=($.5n(p.2E(),a)!=-1)?"1d-":"";g.5o(h+p,f[p])}};d.1E[i]=g};F(q.1D).1q(d);d.1k=u.1H.1k;$(d).1l({30:u.1H.30+\'2u\'});q=d}3j(e){5p"5q 5r 5s 5t 3i 5u 1d.";}}};4 I=6(){H();5(!q.1D){q.1D="5v"+(1A.2R++)};9=q.1D;x.9=9;1j=F(9).2s;B=(F(9).25>1||F(9).1P==11)?11:12;4 a=$("#"+9).1d("5w");5(a){z.1O=a};5(B){1Z=F(9).1P};4w();4x();4y();1r("4z",26());1r("4A",$("#"+9+" 1R:19"))};4 J=6(a){14 9+y[a]};4 K=6(a){4 s=(a.1I===1v)?"":a.1I.4B;14 s};4 L=6(a){4 b=\'\',1p=\'\',1f=\'\',1g=-1,1n=\'\',1c=\'\',1x=\'\';5(a!==1v){4 c=a.1p||"";5(c!=""){4 d=/^\\{.*\\}$/;4 e=d.5x(c);5(e&&u.2p){4 f=4v("["+c+"]")};1p=(e&&u.2p)?f[0].1p:1p;1f=(e&&u.2p)?f[0].1f:1f;b=(e&&u.2p)?f[0].1z:c;1x=(e&&u.2p)?f[0].1x:1x};1n=a.1n||\'\';1g=a.1g||\'\';1c=a.1c||"";1p=$(a).24("1d-1p")||$(a).1d("1p")||(1p||"");1f=$(a).24("1d-1f")||$(a).1d("1f")||(1f||"");b=$(a).24("1d-1z")||$(a).1d("1z")||(b||"");1x=$(a).24("1d-1x")||$(a).1d("1x")||(1x||"")};4 o={1z:b,1p:1p,1f:1f,1g:1g,1n:1n,1c:1c,1x:1x};14 o};4 M=6(a,b,c){4 d=E.5y(a);5(b){21(4 i 3i b){1W(i){1h"1I":d.1I.4B=b[i];1i;2v:d[i]=b[i];1i}}};5(c){d.5z=c};14 d};4 N=6(){4 a=J("3G");5($("#"+a).1a==0){4 b={1I:\'1u: 4b;3Q: 2k;23: 2T;\',1c:z.2D};b.1D=a;4 c=M("2K",b);$("#"+9).4C(c);$("#"+9).5A($("#"+a))}1b{$("#"+a).1l({1u:0,3Q:\'2k\',23:\'2T\'})}};4 O=6(){4 a={1c:z.1O+" 5B 2w"};4 b=K(F(9));4 w=$("#"+9).5C();a.1I="30: "+w+"2u;";5(b.1a>0){a.1I=a.1I+""+b};a.1D=J("1Q");4 c=M("2K",a);14 c};4 P=6(){4 a;5(F(9).1k>=0){a=F(9).1E[F(9).1k]}1b{a={1g:\'\',1n:\'\'}}4 b="",3R="";4 c=$("#"+9).1d("5D");5(c){u.2e=c};5(u.2e!=12){b=" "+u.2e;3R=" "+a.1c};4 d=M("2K",{1c:z.2G+b+" "+A.2j});4 e=M("28",{1c:z.3K});4 f=M("28",{1c:z.3I});4 g=J("3H");4 h=M("28",{1c:z.35+3R,1D:g});4 i=L(a);4 j=i.1z;4 k=i.1n||"";5(j!=""&&u.32){4 l=M("3k");l.3S=j;5(i.1x!=""){l.1c=i.1x+" "}};4 m=M("28",{1c:z.2H},k);d.1q(e);d.1q(f);5(l){h.1q(l)};h.1q(m);d.1q(h);4 n=M("28",{1c:z.1f},i.1f);h.1q(n);14 d};4 Q=6(){4 a=J("2i");4 b=M("5E",{1D:a,5F:\'1n\',1g:\'\',5G:\'1y\',1c:\'1n 4o 2w\',1I:\'1S: 2x\'});14 b};4 R=6(a){4 b={};4 c=K(a);5(c.1a>0){b.1I=c};4 d=(a.2s)?z.2s:z.1o;d=(a.19)?(d+" "+z.19):d;d=d+" "+A.8;b.1c=d;5(u.2e!=12){b.1c=d+" "+a.1c};4 e=M("8",b);4 f=L(a);5(f.1p!=""){e.1p=f.1p};4 g=f.1z;5(g!=""&&u.32){4 h=M("3k");h.3S=g;5(f.1x!=""){h.1c=f.1x+" "}};5(f.1f!=""){4 i=M("28",{1c:z.1f},f.1f)};4 j=a.1n||"";4 k=M("28",{1c:z.2H},j);5(h){e.1q(h)};e.1q(k);5(i){e.1q(i)}1b{5(h){h.1c=h.1c+A.3b}};4 l=M("2K",{1c:\'5H\'});e.1q(l);14 e};4 S=6(){4 a=J("1m");4 b={1c:z.3J+" 5I "+A.4n,1D:a};5(B==12){b.1I="z-1C: "+u.1X};4 c=M("2K",b);4 d=M("3T");5(u.2e!=12){d.1c=u.2e};4 e=F(9).1T;21(4 i=0;i<e.1a;i++){4 f=e[i];4 g;5(f.5J.2E()=="36"){g=M("8",{1c:z.36});4 h=M("28",{1c:z.3L},f.2H);g.1q(h);4 k=f.1T;4 l=M("3T");21(4 j=0;j<k.1a;j++){4 m=R(k[j]);l.1q(m)};g.1q(l)}1b{g=R(f)};d.1q(g)};c.1q(d);14 c};4 T=6(a){4 b=J("1m");5(a){5(a==-1){$("#"+b).1l({1u:"2S",3Q:"2S"})}1b{$("#"+b).1l("1u",a+"2u")};14 12};4 c;5(F(9).1E.1a>u.2d){4 d=2y($("#"+b+" 8:3U").1l("4D-5K"))+2y($("#"+b+" 8:3U").1l("4D-22"));5(u.31===0){$("#"+b).1l({4E:\'2k\',1S:\'3l\'});u.31=3m.5L($("#"+b+" 8:3U").1u());$("#"+b).1l({4E:\'1N\'});5(!B){$("#"+b).1l({1S:\'2x\'})}};c=((u.31+d)*u.2d)}1b 5(B){c=$("#"+9).1u()};14 c};4 U=6(){4 h=J("1m");$("#"+h).18("1M",6(e){5(1j==11)14 12;e.1U();e.29();5(B){3n()}});$("#"+h+" 8."+z.1o).18("1M",6(e){2l(15)});$("#"+h+" 8."+z.1o).18("2g",6(e){5(1j==11)14 12;3O=$("#"+h+" 8."+z.19);3e=15;e.1U();e.29();5(B===11){5(1Z){5(D===11){$(15).1s(z.19);4 a=$("#"+h+" 8."+z.19);4 b=G(15);5(a.1a>1){4 c=$("#"+h+" 8."+A.8);4 d=G(a[0]);4 f=G(a[1]);5(b>f){d=(b);f=f+1};21(4 i=3m.5M(d,f);i<=3m.5N(d,f);i++){4 g=c[i];5($(g).3o(z.1o)){$(g).1s(z.19)}}}}1b 5(2t===11){$(15).5O(z.19)}1b{$("#"+h+" 8."+z.19).1F(z.19);$(15).1s(z.19)}}1b{$("#"+h+" 8."+z.19).1F(z.19);$(15).1s(z.19)}}1b{$("#"+h+" 8."+z.19).1F(z.19);$(15).1s(z.19)}});$("#"+h+" 8."+z.1o).18("2L",6(e){5(1j==11)14 12;e.1U();e.29();5(3e!=1e){5(1Z){$(15).1s(z.19)}}});$("#"+h+" 8."+z.1o).18("2f",6(e){5(1j==11)14 12;$(15).1s(z.2I)});$("#"+h+" 8."+z.1o).18("2r",6(e){5(1j==11)14 12;$("#"+h+" 8."+z.2I).1F(z.2I)});$("#"+h+" 8."+z.1o).18("2h",6(e){5(1j==11)14 12;e.1U();e.29();4 a=$("#"+h+" 8."+z.19).1a;3f=(3O.1a!=a||a==0)?11:12;2M();3p();3n();3e=1e});5(u.3D==12){$("#"+h+" 8."+A.8).18("1M",6(e){5(1j==11)14 12;2m(15,"1M")});$("#"+h+" 8."+A.8).18("2L",6(e){5(1j==11)14 12;2m(15,"2L")});$("#"+h+" 8."+A.8).18("2f",6(e){5(1j==11)14 12;2m(15,"2f")});$("#"+h+" 8."+A.8).18("2r",6(e){5(1j==11)14 12;2m(15,"2r")});$("#"+h+" 8."+A.8).18("2g",6(e){5(1j==11)14 12;2m(15,"2g")});$("#"+h+" 8."+A.8).18("2h",6(e){5(1j==11)14 12;2m(15,"2h")})}};4 V=6(){4 a=J("1m");$("#"+a).1y("1M");$("#"+a+" 8."+z.1o).1y("2L");$("#"+a+" 8."+z.1o).1y("1M");$("#"+a+" 8."+z.1o).1y("2f");$("#"+a+" 8."+z.1o).1y("2r");$("#"+a+" 8."+z.1o).1y("2g");$("#"+a+" 8."+z.1o).1y("2h")};4 W=6(){4 a=J("1Q");4 b=J("1m");$("#"+a).18(u.3C,6(e){5(1j==11)14 12;1V("1M");e.1U();e.29();3V(e)});U();$("#"+a).18("3E",4F);$("#"+a).18("3F",4G);$("#"+a).18("2L",4H);$("#"+a).18("5P",4I);$("#"+a).18("2g",4J);$("#"+a).18("2h",4K)};4 X=6(){4 a=J("1Q");4 b=J("1m");5(B===11){$("#"+a+" ."+z.2G).2N();$("#"+b).1l({1S:\'3l\',23:\'4a\'})}1b{1Z=12;$("#"+a+" ."+z.2G).2n();$("#"+b).1l({1S:\'2x\',23:\'2T\'});4 c=$("#"+b+" 8."+z.19)[0];$("#"+b+" 8."+z.19).1F(z.19);4 d=G($(c).1s(z.19));2o(d)};T(T())};4 Y=6(){4 a=J("1Q");4 b=(1j==11)?u.4i:1;5(1j===11){$("#"+a).1s(z.3a)}1b{$("#"+a).1F(z.3a)}};4 Z=6(){4 a=J("2i");$("#"+a).18("2z",4L);X();Y()};4 4y=6(){4 a=O();4 b=P();a.1q(b);4 c=Q();a.1q(c);4 d=S();a.1q(d);$("#"+9).4C(a);N();Z();W();5(1w u.18.2V=="6"){u.18.2V.1K(x,1t)}};4 4M=6(a){4 b=J("1m");4 c=a||$("#"+b+" 8."+z.19);21(4 i=0;i<c.1a;i++){4 d=G(c[i]);F(9).1E[d].19="19"}};4 2M=6(){4 a=J("1m");4 b=$("#"+a+" 8."+z.19);5(1Z&&(D||2t)||3f){F(9).1k=-1};5(b.1a==0){c=-1}1b 5(b.1a>1){4M(b);4 c=$("#"+a+" 8."+z.19)}1b{4 c=G($("#"+a+" 8."+z.19))};5(F(9).1k!=c||3f){2o(c);$("#"+9).3W("34")}};4 2o=6(a,b){5(a!==1v){4 c,1g,2a;5(a==-1){c=-1;1g="";2a="";2O(-1)}1b{5(1w a!="5Q"){4 d=F(9).1E[a];F(9).1k=a;c=a;1g=L(d);2a=(a>=0)?F(9).1E[a].1n:"";2O(1v,1g);1g=1g.1g}1b{c=F(9).1k;1g=F(9).1g;2a=F(9).1E[F(9).1k].1n||""}};1r("1k",c);1r("1g",1g);1r("2a",2a);1r("1T",F(9).1T);1r("4z",26());1r("4A",$("#"+9+" 1R:19"))}};4 3q=6(a){4 b={2A:12,2B:12,2b:12};4 c=$("#"+9);5(c.24("18"+a)!=1v){b.2b=11;b.2A=11};4 d;5(1w $.4N=="6"){d=$.4N(c[0],"3X")}1b{d=c.1d("3X")};5(d&&d[a]){b.2b=11;b.2B=11};14 b};4 3n=6(){3p();$("4O").18("1M",2l);$(2J).18("2P",3Y);$(2J).18("2z",3Z)};4 3p=6(){$("4O").1y("1M",2l);$(2J).1y("2P",3Y);$(2J).1y("2z",3Z)};4 4L=6(){4 a=J("1m");4 b=J("2i");4 c=F(b).1g;5(c.1a==0){$("#"+a+" 8:2k").2n();T(T())}1b{$("#"+a+" 8").2N();$("#"+a+" 8:3A(\'"+c+"\')").2n();5($("#"+a+" 8:1N").1a<=u.2d){T(-1)}}};4 4P=6(){4 a=J("2i");5($("#"+a+":2k").1a>0&&2t==12){$("#"+a+":2k").2n().5R("");F(a).4k()}};4 4Q=6(){4 a=J("2i");5($("#"+a+":1N").1a>0){$("#"+a+":1N").2N();F(a).4j()}};4 3Y=6(a){4 b=J("2i");1W(a.41){1h C:1h 4r:a.1U();a.29();4R();1i;1h 4p:1h 4q:a.1U();a.29();4S();1i;1h 4s:1h 4t:a.1U();a.29();2l();1i;1h 3M:D=11;1i;1h 3N:2t=11;1i;2v:5(a.41>=4u&&B===12){4P()};1i};5(1j==11)14 12;1V("2P")};4 3Z=6(a){1W(a.41){1h 3M:D=12;1i;1h 3N:2t=12;1i};5(1j==11)14 12;1V("2z")};4 4F=6(a){5(1j==11)14 12;1V("3E")};4 4G=6(a){5(1j==11)14 12;1V("3F")};4 4H=6(a){5(1j==11)14 12;a.1U();1V("2f")};4 4I=6(a){5(1j==11)14 12;a.1U();1V("2r")};4 4J=6(a){5(1j==11)14 12;1V("2g")};4 4K=6(a){5(1j==11)14 12;1V("2h")};4 3r=6(a,b){4 c={2A:12,2B:12,2b:12};5($(a).24("18"+b)!=1v){c.2b=11;c.2A=11};4 d=$(a).1d("3X");5(d&&d[b]){c.2b=11;c.2B=11};14 c};4 2m=6(a,b){5(u.3D==12){4 c=F(9).1E[G(a)];5(3r(c,b).2b===11){5(3r(c,b).2A===11){c["18"+b]()};5(3r(c,b).2B===11){1W(b){1h"2P":1h"2z":1i;2v:$(c).3W(b);1i}};14 12}}};4 1V=6(a){5(1w u.18[a]=="6"){u.18[a].1K(15,1t)};5(3q(a).2b===11){5(3q(a).2A===11){F(9)["18"+a]()};5(3q(a).2B===11){1W(a){1h"2P":1h"2z":1i;2v:$("#"+9).3W(a);1i}};14 12}};4 3s=6(a){4 b=J("1m");a=(a!==1v)?a:$("#"+b+" 8."+z.19);5(a.1a>0){4 c=2y(($(a).23().22));4 d=2y($("#"+b).1u());5(c>d){4 e=c+$("#"+b).2Q()-(d/2);$("#"+b).4T({2Q:e},4U)}}};4 4R=6(){4 b=J("1m");4 c=$("#"+b+" 8:1N."+A.8);4 d=$("#"+b+" 8:1N."+z.19);d=(d.1a==0)?c[0]:d;4 e=$("#"+b+" 8:1N."+A.8).1C(d);5((e<c.1a-1)){e=42(e);5(e<c.1a){5(!D||!B||!1Z){$("#"+b+" ."+z.19).1F(z.19)};$(c[e]).1s(z.19);2O(e);5(B==11){2M()};3s($(c[e]))};5(!B){3t()}};6 42(a){a=a+1;5(a>c.1a){14 a};5($(c[a]).3o(z.1o)===11){14 a};14 a=42(a)}};4 4S=6(){4 b=J("1m");4 c=$("#"+b+" 8:1N."+z.19);4 d=$("#"+b+" 8:1N."+A.8);4 e=$("#"+b+" 8:1N."+A.8).1C(c[0]);5(e>=0){e=43(e);5(e>=0){5(!D||!B||!1Z){$("#"+b+" ."+z.19).1F(z.19)};$(d[e]).1s(z.19);2O(e);5(B==11){2M()};5(2y(($(d[e]).23().22+$(d[e]).1u()))<=0){4 f=($("#"+b).2Q()-$("#"+b).1u())-$(d[e]).1u();$("#"+b).4T({2Q:f},4U)}};5(!B){3t()}};6 43(a){a=a-1;5(a<0){14 a};5($(d[a]).3o(z.1o)===11){14 a};14 a=43(a)}};4 3t=6(){4 a=J("1Q");4 b=J("1m");4 c=$("#"+a).4V();4 d=$("#"+a).1u();4 e=$(4W).1u();4 f=$(4W).2Q();4 g=$("#"+b).1u();4 h=$("#"+a).1u();5((e+f)<3m.5S(g+d+c.22)||u.4h.2E()==\'5T\'){h=g;$("#"+b).1l({22:"-"+h+"2u",1S:\'3l\',1X:u.1X});$("#"+a).1F("2w 2j").1s("3u");4 h=$("#"+b).4V().22;5(h<-10){$("#"+b).1l({22:(2y($("#"+b).1l("22"))-h+20+f)+"2u",1X:u.1X});$("#"+a).1F("3u 2j").1s("2w")}}1b{$("#"+b).1l({22:h+"2u",1X:u.1X});$("#"+a).1F("2w 3u").1s("2j")}};4 3V=6(e){5(1j==11)14 12;4 a=J("1Q");4 b=J("1m");5(!3d){3d=11;5(1A.2U!=\'\'){$("#"+1A.2U).1l({1S:"2x"})};1A.2U=b;$("#"+b+" 8:2k").2n();3t();4 c=u.4g;5(c==""||c=="2x"){$("#"+b).1l({1S:"3l"});3s();5(1w u.18.2q=="6"){4 d=26();u.18.2q(d.1d,d.1G)}}1b{$("#"+b)[c]("5U",6(){3s();5(1w u.18.2q=="6"){4 d=26();u.18.2q(d.1d,d.1G)}})};3n()}1b{5(u.3C!==\'2f\'){2l()}}};4 2l=6(e){3d=12;4 a=J("1Q");4 b=J("1m");5(B===12){$("#"+b).1l({1S:"2x"});$("#"+a).1F("2j 3u").1s("2w");2M()};3p();5(1w u.18.33=="6"){4 d=26();u.18.33(d.1d,d.1G)};4Q();T(T());$("#"+b).1l({1X:1})};4 4X=6(){5(1J.2C!=1e){1J.2C.1K(15,1t)};x.1k=15.1k;x.1g=15.1g;x.2a=(15.1k>=0)?15.1E[15.1k].1n:"";5(1w u.18.34=="6"){4 d=26();u.18.34(d.1d,d.1G)}};4 4x=6(){F(9).2C=4X};4 4w=6(){1J=$.2F(11,{},F(9));21(4 i 3i 1J){5(1w 1J[i]!="6"){x[i]=1J[i]}};x.2a=(1J.1k>=0)?1J.1E[1J.1k].1n:"";x.3w=1A.3w;x.3x=1A.3x};4 44=6(a){5(a!=1e&&1w a!="1v"){4 b=J("1m");4 c=L(a);4 d=$("#"+b+" 8."+A.8+":45("+(a.1C)+")");14{1d:c,1G:d,1R:a,1C:a.1C}};14 1e};4 26=6(){4 a=J("1m");4 b=F(9);4 c,1G,1R,1C;5(b.1k==-1){c=1e;1G=1e;1R=1e;1C=-1}1b{1G=$("#"+a+" 8."+z.19);5(1G.1a>1){4 d=[],46=[],5V=[];21(4 i=0;i<1G.1a;i++){4 e=G(1G[i]);d.4Y(e);46.4Y(b.1E[e])};c=d;1R=46;1C=d}1b{1R=b.1E[b.1k];c=L(1R);1C=b.1k}};14{1d:c,1G:1G,1C:1C,1R:1R}};4 2O=6(a,b){4 c=J("3H");4 d={};5(a==-1){d.1n="&5W;";d.1c="";d.1f="";d.1z=""}1b 5(1w a!="1v"){4 e=F(9).1E[a];d=L(e)}1b{d=b};$("#"+c).3v("."+z.2H).48(d.1n);F(c).1c=z.35+" "+d.1c;5(d.1f!=""){$("#"+c).3v("."+z.1f).48(d.1f).2n()}1b{$("#"+c).3v("."+z.1f).48("").2N()};4 f=$("#"+c).3v("3k");5(f.1a>0){$(f).1B()};5(d.1z!=""&&u.32){f=M("3k",{3S:d.1z});$("#"+c).5X(f);5(d.1x!=""){f.1c=d.1x+" "};5(d.1f==""){f.1c=f.1c+A.3b}}};4 1r=6(p,v){x[p]=v};4 49=6(a,b,i){4 c=J("1m");4 d=12;1W(a){1h"1Y":4 e=R(b||F(9).1E[i]);4 f;5(1t.1a==3){f=i}1b{f=$("#"+c+" 8."+A.8).1a-1};5(f<0||!f){$("#"+c+" 3T").5Y(e)}1b{4 g=$("#"+c+" 8."+A.8)[f];$(g).5Z(e)};V();U();5(u.18.1Y!=1e){u.18.1Y.1K(15,1t)};1i;1h"1B":d=$($("#"+c+" 8."+A.8)[i]).3o(z.19);$("#"+c+" 8."+A.8+":45("+i+")").1B();4 h=$("#"+c+" 8."+z.1o);5(d==11){5(h.1a>0){$(h[0]).1s(z.19);4 j=$("#"+c+" 8."+A.8).1C(h[0]);2o(j)}};5(h.1a==0){2o(-1)};5($("#"+c+" 8."+A.8).1a<u.2d&&!B){T(-1)};5(u.18.1B!=1e){u.18.1B.1K(15,1t)};1i}};15.60=6(){4 a=1t[0];61.62.63.64(1t);1W(a){1h"1Y":x.1Y.1K(15,1t);1i;1h"1B":x.1B.1K(15,1t);1i;2v:3g{F(9)[a].1K(F(9),1t)}3j(e){};1i}};15.1Y=6(){4 a,1g,1p,1z,1f;4 b=1t[0];5(b 65 66){2c=b}1b 5(1w b=="67"){a=b;1g=a;2c=3h 3P(a,1g)}1b{a=b.1n||\'\';1g=b.1g||a;1p=b.1p||\'\';1z=b.1z||\'\';1f=b.1f||\'\';2c=3h 3P(a,1g);$(2c).1d("1f",1f);$(2c).1d("1z",1z);$(2c).1d("1p",1p)};1t[0]=2c;F(9).1Y.1K(F(9),1t);1r("1T",F(9)["1T"]);1r("1a",F(9).1a);49("1Y",2c,1t[1])};15.1B=6(i){F(9).1B(i);1r("1T",F(9)["1T"]);1r("1a",F(9).1a);49("1B",1v,i)};15.68=6(a,b){5(1w a=="1v"||1w b=="1v")14 12;a=a.69();3g{1r(a,b)}3j(e){};1W(a){1h"25":F(9)[a]=b;5(b==0){F(9).1P=12};B=(F(9).25>1||F(9).1P==11)?11:12;X();1i;1h"1P":B=(F(9).25>1||F(9).1P==11)?11:12;1Z=F(9).1P;X();1r(a,b);1i;1h"2s":F(9)[a]=b;1j=b;Y();1i;1h"1k":1h"1g":F(9)[a]=b;4 c=J("1m");$("#"+c+" 8."+A.8).1F(z.19);$($("#"+c+" 8."+A.8)[F(9).1k]).1s(z.19);2o(F(9).1k);1i;1h"1a":4 c=J("1m");5(b<F(9).1a){F(9)[a]=b;5(b==0){$("#"+c+" 8."+A.8).1B();2o(-1)}1b{$("#"+c+" 8."+A.8+":6a("+(b-1)+")").1B();5($("#"+c+" 8."+z.19).1a==0){$("#"+c+" 8."+z.1o+":45(0)").1s(z.19)}};1r(a,b);1r("1T",F(9)["1T"])};1i;1h"1D":1i;2v:3g{F(9)[a]=b;1r(a,b)}3j(e){};1i}};15.6b=6(a){14 x[a]||F(9)[a]};15.1N=6(a){4 b=J("1Q");5(a==11){$("#"+b).2n()}1b 5(a==12){$("#"+b).2N()}1b{14 $("#"+b).1l("1S")}};15.3y=6(v){1A.3y(v)};15.33=6(){2l()};15.2q=6(){3V()};15.4Z=6(r){5(1w r=="1v"||r==0){14 12};u.2d=r;T(T())};15.2d=15.4Z;15.18=6(a,b){$("#"+9).18(a,b)};15.1y=6(a,b){$("#"+9).1y(a,b)};15.6c=15.18;15.6d=6(){14 26()};15.50=6(){4 a=F(9).50.1K(F(9),1t);14 44(a)};15.51=6(){4 a=F(9).51.1K(F(9),1t);14 44(a)};15.6e=6(){4 a=J("3G");4 b=J("1Q");$("#"+b+", #"+b+" *").1y();$("#"+b).1B();$("#"+9).6f().6g($("#"+9));F(9).2C=6(){5(1J.2C!=1e){1J.2C.1K(15,1t)}};$("#"+9).1d("1O",1e)};I()};$.1L.2F({2X:6(b){14 15.6h(6(){5(!$(15).1d(\'1O\')){4 a=3h 1O(15,b);$(15).1d(\'1O\',a)}})}});$.1L.2W=$.1L.2X})(6i);',62,391,'||||var|if|function||li|_element||||||||||||||||||||||||||||||||||||||||||||||||||||||true|false||return|this|||on|selected|length|else|className|data|null|description|value|case|break|_isDisabled|selectedIndex|css|postChildID|text|enabled|title|appendChild|cq|addClass|arguments|height|undefined|typeof|imagecss|off|image|msBeautify|remove|index|id|options|removeClass|ui|byJson|style|_orginial|apply|fn|click|visible|dd|multiple|postID|option|display|children|preventDefault|cd|switch|zIndex|add|_isMultiple||for|top|position|prop|size|co||span|stopPropagation|selectedText|hasEvent|opt|visibleRows|useSprite|mouseover|mousedown|mouseup|postTitleTextID|borderRadiusTp|hidden|cj|cc|show|bM|jsonTitle|open|mouseout|disabled|_controlHolded|px|default|borderRadius|none|parseInt|keyup|byElement|byJQuery|onchange|ddOutOfVision|toLowerCase|extend|ddTitle|label|hover|document|div|mouseenter|bL|hide|cp|keydown|scrollTop|counter|auto|absolute|oldDiv|create|msDropdown|msDropDown|expr|toUpperCase|width|rowHeight|showIcon|close|change|ddTitleText|optgroup||||disabledAll|fnone|_cacheElement|_isOpen|_lastTarget|_forcedTrigger|try|new|in|catch|img|block|Math|bO|hasClass|bP|bN|cb|ce|ch|borderRadiusBtm|find|version|author|debug|dropdown|Contains|name|event|disabledOptionEvents|dblclick|mousemove|postElementHolder|postTitleID|arrow|ddChild|divider|optgroupTitle|SHIFT|CONTROL|_oldSelected|Option|overflow|selectedClass|src|ul|first|ci|trigger|events|bT|bU||keyCode|getNext|getPrev|cn|eq|op||html|cr|relative|0px|select|createPseudo|indexOf|mainCSS|animStyle|openDirection|disabledOpacity|blur|focus|borderTop|noBorderTop|ddChildMore|shadow|UP_ARROW|LEFT_ARROW|RIGHT_ARROW|ESCAPE|ENTER|ALPHABETS_START|eval|cm|cl|bJ|uiData|selectedOptions|cssText|after|padding|visibility|bV|bW|bX|bY|bZ|ca|bQ|bK|_data|body|bR|bS|cf|cg|animate|500|offset|window|ck|push|showRows|namedItem|item|Marghoob|Suleman|attr|bind|unbind|250|120|9999|slideDown|_msddHolder|_msdd|_title|_titleText|_child|arrowoff|ddlabel|_msddli_|border|_isCreated|getElementById|msdropdown|inArray|setAttribute|throw|There|is|an|error|json|msdrpdd|maincss|test|createElement|innerHTML|appendTo|ddcommon|outerWidth|usesprite|input|type|autocomplete|clear|ddchild_|nodeName|bottom|round|min|max|toggleClass|mouseleave|object|val|floor|alwaysup|fast|ind|nbsp|prepend|append|before|act|Array|prototype|shift|call|instanceof|HTMLOptionElement|string|set|toString|gt|get|addMyEvent|getData|destory|parent|replaceWith|each|jQuery'.split('|'),0,{}))
skin/frontend/base/default/apt/testimonial/js/jquery.fancybox.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
3
+ width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
4
+ keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
5
+ (I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
6
+ openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
7
+ isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
8
+ c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
9
+ k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
10
+ b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11
+ setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
12
+ d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
13
+ a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
14
+ b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
15
+ y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
16
+ if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
17
+ (h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
18
+ {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
19
+ mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
20
+ !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
21
+ "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
22
+ this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
23
+ f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
24
+ e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
25
+ outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
26
+ g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
27
+ "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
28
+ h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
29
+ h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
30
+ "iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
31
+ y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
32
+ !a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
33
+ b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
34
+ a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
35
+ (c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
36
+ f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
37
+ {duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
38
+ b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
39
+ f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
40
+ b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
41
+ p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
42
+ f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
43
+ b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
44
+ e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
45
+ ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
46
+ d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);