Cyclone Slider - Version 2.1.0

Version Description

  • 2012-11-16
Download this release

Release Info

Developer kosinix
Plugin Icon 128x128 Cyclone Slider
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.1 to 2.1.0

README.txt CHANGED
@@ -1,95 +1,111 @@
1
- === Cyclone Slider 2 ===
2
- Contributors: kosinix
3
- Donate link: http://www.codefleet.net/donate
4
- Tags: slider, slideshow, jquery, cycle 2, responsive, multilingual support, custom post, cyclone slider
5
- Requires at least: 3.3.2
6
- Tested up to: 3.4.2
7
- Stable tag: 2.0.0
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- Create responsive slideshows with ease. Built for both developers and non-developers.
12
-
13
- == Description ==
14
-
15
- Features: Uses jQuery Cycle 2 with full responsiveness, easy-to-use interface with drag and drop functionality, multiple slideshows, individual slideshow settings, shortcode, and customizable templates.
16
-
17
- Cyclone Slider leverages wordpress' built-in features. It uses custom post for the slideshow, custom fields to store settings, and media uploader for the images. Its simple and flexible.
18
-
19
- Note: If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2.
20
-
21
- = Homepage =
22
- [Checkout more about Cyclone Slider 2](http://www.codefleet.net/cyclone-slider-2/)
23
-
24
-
25
- == Installation ==
26
-
27
- = Install via WordPress Admin =
28
- 1. Ready the zip file of the plugin
29
- 1. Go to Admin > Plugins > Add New
30
- 1. On the upper portion click the Upload link
31
- 1. Using the file upload field, upload the plugin zip file here and activate the plugin
32
-
33
- = Install via FTP =
34
- 1. First unzip the plugin file
35
- 1. Using FTP go to your server's wp-content/plugins directory
36
- 1. Upload the unzipped plugin here
37
- 1. Once finished login into your WP Admin and go to Admin > Plugins
38
- 1. Look for Cyclone Slider 2 and activate it
39
-
40
- = Usage =
41
- 1. Start adding slideshows in 'Cyclone Slider' menu in WordPress
42
- 1. You can then use a shortcode to display your slideshow. Example: `[cycloneslider id ="my-slideshow"]`
43
- 1. Function do_shortcode can be used inside template files. Example: `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
44
-
45
-
46
- == Frequently Asked Questions ==
47
-
48
- = What's the improvement of Cyclone Slider 2 over Cyclone Slider? =
49
- 1. Uses jQuery Cycle 2 plugin.
50
- 1. All slideshow templates are responsive.
51
- 1. Cleaner and faster user interface.
52
- 1. Per slide settings.
53
- 1. Tile effects.
54
-
55
- = Why is my slider not working? =
56
- Check for javascript errors in your page. This is the most common cause of the slider not running.
57
- `cycle not a function` error - most probably you have double jquery (jquery.js) included from improperly coded plugins. Remove the duplicate jquery or deactivate the plugin causing the double jquery include.
58
-
59
- = Why is there is an extra slide that I didn't add? =
60
- Most probably its wordpress adding paragpraphs on line breaks next to the slides therefore adding a blank `<p>` slide. You can try adding this to functions.php:
61
- `remove_filter('the_content', 'wpautop');`
62
-
63
- = How to display it in post/page? =
64
- Use the shortcode `[cycloneslider id ="my-slideshow"]`
65
-
66
- = How to display it inside template files (header.php, index.php, page.php, etc.)? =
67
- Use `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
68
-
69
- = What are the shortcode options? =
70
- `[cycloneslider id ="my-slideshow" fx="fade" timeout="5000" speed="1000" width="500" height="300" show_prev_next="true" show_nav="true"]`
71
-
72
- = How can I use templates? =
73
- `[cycloneslider id ="my-slideshow" template="custom-name"]`
74
-
75
- = Where do I add my own templates? =
76
- Inside your theme create a folder named "cycloneslider". Add your templates inside.
77
-
78
- == Screenshots ==
79
-
80
- 1. All Slideshow Screen
81
- 2. Slideshow Editing Screen
82
- 3. Slideshow in Action
83
-
84
- == Changelog ==
85
-
86
- = 2.0.1 - 2012-11-09 =
87
- * Bug fix for hover pause
88
- = 2.0.0 - 2012-10-28 =
89
- * Initial
90
-
91
-
92
- == Upgrade Notice ==
93
-
94
- = 2.0.0 =
95
- * Initial. If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Cyclone Slider 2 ===
2
+ Contributors: kosinix
3
+ Donate link: http://www.codefleet.net/donate
4
+ Tags: slider, slideshow, jquery, cycle 2, responsive, multilingual support, custom post, cyclone slider
5
+ Requires at least: 3.3.2
6
+ Tested up to: 3.4.2
7
+ Stable tag: 2.0.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Create responsive slideshows with ease. Built for both developers and non-developers.
12
+
13
+ == Description ==
14
+
15
+ = Features: =
16
+ * Uses jQuery Cycle 2 with full responsiveness
17
+ * Easy-to-use interface with drag and drop to rearrange the slide order
18
+ * Unlimited slideshows can be created
19
+ * Each slideshow can have their own unique settings
20
+ * Shortcode for displaying slideshows
21
+ * Customizable templates
22
+ * Ability to import images from NextGEN
23
+ * It's totally FREE!
24
+
25
+ Cyclone Slider leverages wordpress' built-in features. It uses custom post for the slideshow, custom fields to store settings, and media uploader for the images. Its simple and flexible.
26
+
27
+ Note: If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2.
28
+
29
+ = Homepage =
30
+ [Checkout more about Cyclone Slider 2](http://www.codefleet.net/cyclone-slider-2/)
31
+
32
+
33
+ == Installation ==
34
+
35
+ = Install via WordPress Admin =
36
+ 1. Ready the zip file of the plugin
37
+ 1. Go to Admin > Plugins > Add New
38
+ 1. On the upper portion click the Upload link
39
+ 1. Using the file upload field, upload the plugin zip file here and activate the plugin
40
+
41
+ = Install via FTP =
42
+ 1. First unzip the plugin file
43
+ 1. Using FTP go to your server's wp-content/plugins directory
44
+ 1. Upload the unzipped plugin here
45
+ 1. Once finished login into your WP Admin and go to Admin > Plugins
46
+ 1. Look for Cyclone Slider 2 and activate it
47
+
48
+ = Usage =
49
+ 1. Start adding slideshows in 'Cyclone Slider' menu in WordPress
50
+ 1. You can then use a shortcode to display your slideshow. Example: `[cycloneslider id ="my-slideshow"]`
51
+ 1. Function do_shortcode can be used inside template files. Example: `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
52
+
53
+
54
+ == Frequently Asked Questions ==
55
+
56
+ = What's the improvement of Cyclone Slider 2 over Cyclone Slider? =
57
+ 1. Uses jQuery Cycle 2 plugin.
58
+ 1. All slideshow templates are responsive.
59
+ 1. Cleaner and faster user interface.
60
+ 1. Per slide settings.
61
+ 1. Tile effects.
62
+
63
+ = Why is my slider not working? =
64
+ Check for javascript errors in your page. This is the most common cause of the slider not running.
65
+ `cycle not a function` error - most probably you have double jquery (jquery.js) included from improperly coded plugins. Remove the duplicate jquery or deactivate the plugin causing the double jquery include.
66
+
67
+ = Why is there is an extra slide that I didn't add? =
68
+ Most probably its wordpress adding paragpraphs on line breaks next to the slides therefore adding a blank `<p>` slide. You can try adding this to functions.php:
69
+ `remove_filter('the_content', 'wpautop');`
70
+
71
+ = How to display it in post/page? =
72
+ Use the shortcode `[cycloneslider id ="my-slideshow"]`
73
+
74
+ = How to display it inside template files (header.php, index.php, page.php, etc.)? =
75
+ Use `<?php echo do_shortcode('[cycloneslider id ="my-slideshow"]'); ?>`
76
+
77
+ = What are the shortcode options? =
78
+ `[cycloneslider id ="my-slideshow" fx="fade" timeout="5000" speed="1000" width="500" height="300" show_prev_next="true" show_nav="true"]`
79
+
80
+ = How can I use templates? =
81
+ `[cycloneslider id ="my-slideshow" template="custom-name"]`
82
+
83
+ = Where do I add my own templates? =
84
+ Inside your theme create a folder named "cycloneslider". Add your templates inside.
85
+
86
+ == Screenshots ==
87
+
88
+ 1. All Slideshow Screen
89
+ 2. Slideshow Editing Screen
90
+ 3. Slideshow in Action
91
+
92
+ == Changelog ==
93
+
94
+ = 2.1.0 - 2012-11-16 =
95
+ * Fix for slideshow not working when NextGEN 1.9.7 is active
96
+ * You can now import images from NextGEN
97
+
98
+ = 2.0.1 - 2012-11-09 =
99
+ * Bug fix for hover pause
100
+ = 2.0.0 - 2012-10-28 =
101
+ * Initial
102
+
103
+
104
+ == Upgrade Notice ==
105
+
106
+ = 2.1.0 - 2012-11-16 =
107
+ * Fix for slideshow not working when NextGEN 1.9.7 is active
108
+ * You can now import images from NextGEN
109
+
110
+ = 2.0.0 =
111
+ * Initial. If you are using Cyclone Slider (version 1) deactivate it first before activating Cyclone Slider 2
css/admin.css CHANGED
@@ -223,3 +223,15 @@ input[name=cycloneslider_add_slide]{
223
  border:1px solid yellow;
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  border:1px solid yellow;
224
  }
225
 
226
+ /*** Nextgen ***/
227
+ #cyclone-nextgen-metabox .inside{
228
+ padding:0;
229
+ }
230
+ .cycloneslider-field label.inline{
231
+ display:inline-block;
232
+ margin:0 0 0 3px;
233
+ }
234
+ #cyclone-nextgen-metabox select{
235
+ display:inline-block;
236
+ margin:0 0 0 3px;
237
+ }
cyclone-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cyclone Slider 2
4
  Plugin URI: http://www.codefleet.net/cyclone-slider-2/
5
  Description: Create responsive slideshows with ease. Built for both developers and non-developers.
6
- Version: 2.0.1
7
  Author: Nico Amarilla
8
  Author URI: http://www.codefleet.net/
9
  License:
@@ -26,6 +26,7 @@ License:
26
  */
27
  require_once('inc/class-cyclone-slider.php');
28
  require_once('inc/class-image-resizer.php');
 
29
 
30
  if(!defined('CYCLONE_PATH')){
31
  define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
@@ -52,29 +53,31 @@ endif;
52
  * @return string The url to the thumbnail. False on failure.
53
  */
54
  //
55
- function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh = false ){
56
  $dir = wp_upload_dir();
57
 
58
  // Get full path to the slide image
59
  $image_path = get_attached_file($original_attachment_id);
 
60
  if(empty($image_path)){
61
  return false;
62
  }
63
 
64
  // Full url to the slide image
65
  $image_url = wp_get_attachment_url($original_attachment_id);
66
- if(empty($image_path)){
 
67
  return false;
68
  }
69
-
70
  $info = pathinfo($image_path);
71
- $dirname = isset($info['dirname']) ? $info['dirname'] : '';
72
- $ext = isset($info['extension']) ? $info['extension'] : '';
73
- $thumb = wp_basename($image_path, ".$ext")."-{$width}x{$height}.{$ext}";
74
 
75
  // Check if thumb already exists. If it is, return its url, unless refresh is true
76
  if(file_exists($dirname.'/'.$thumb ) and !$refresh){
77
- return dirname($image_url).'/'.$thumb;
78
  }
79
 
80
  $resizeObj = new Image_Resizer($image_path);
@@ -82,5 +85,4 @@ function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh
82
  $resizeObj -> saveImage($dirname.'/'.$thumb, 80);
83
 
84
  return dirname($image_url).'/'.$thumb;
85
-
86
  }
3
  Plugin Name: Cyclone Slider 2
4
  Plugin URI: http://www.codefleet.net/cyclone-slider-2/
5
  Description: Create responsive slideshows with ease. Built for both developers and non-developers.
6
+ Version: 2.1.0
7
  Author: Nico Amarilla
8
  Author URI: http://www.codefleet.net/
9
  License:
26
  */
27
  require_once('inc/class-cyclone-slider.php');
28
  require_once('inc/class-image-resizer.php');
29
+ require_once('inc/class-nextgen-integration.php');
30
 
31
  if(!defined('CYCLONE_PATH')){
32
  define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
53
  * @return string The url to the thumbnail. False on failure.
54
  */
55
  //
56
+ function cycloneslider_thumb( $original_attachment_id, $width, $height, $refresh = false, $slide_meta = array() ){
57
  $dir = wp_upload_dir();
58
 
59
  // Get full path to the slide image
60
  $image_path = get_attached_file($original_attachment_id);
61
+ $image_path = apply_filters('cycloneslider_image_path', $image_path, $slide_meta);
62
  if(empty($image_path)){
63
  return false;
64
  }
65
 
66
  // Full url to the slide image
67
  $image_url = wp_get_attachment_url($original_attachment_id);
68
+ $image_url = apply_filters('cycloneslider_image_url', $image_url, $slide_meta);
69
+ if(empty($image_url)){
70
  return false;
71
  }
72
+
73
  $info = pathinfo($image_path);
74
+ $dirname = isset($info['dirname']) ? $info['dirname'] : ''; // Path to directory
75
+ $ext = isset($info['extension']) ? $info['extension'] : ''; // File extension Eg. "jpg"
76
+ $thumb = wp_basename($image_path, ".$ext")."-{$width}x{$height}.{$ext}"; // Thumbname. Eg. [imagename]-[width]x[height].hpg
77
 
78
  // Check if thumb already exists. If it is, return its url, unless refresh is true
79
  if(file_exists($dirname.'/'.$thumb ) and !$refresh){
80
+ return dirname($image_url).'/'.$thumb; //We used dirname() since we need the URL format not the path
81
  }
82
 
83
  $resizeObj = new Image_Resizer($image_path);
85
  $resizeObj -> saveImage($dirname.'/'.$thumb, 80);
86
 
87
  return dirname($image_url).'/'.$thumb;
 
88
  }
inc/admin/box-js.php CHANGED
@@ -14,6 +14,7 @@
14
  <div class="cycloneslider-body-left">
15
  <img class="cycloneslider-slide-thumb" src="" alt="" />
16
  <input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[{id}][id]" type="hidden" value="" />
 
17
  <input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
18
  </div>
19
  <div class="cycloneslider-body-right">
14
  <div class="cycloneslider-body-left">
15
  <img class="cycloneslider-slide-thumb" src="" alt="" />
16
  <input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[{id}][id]" type="hidden" value="" />
17
+ <input class="cycloneslider-slide-meta-type" name="cycloneslider_metas[{id}][type]" type="hidden" value="image" />
18
  <input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
19
  </div>
20
  <div class="cycloneslider-body-right">
inc/admin/box.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="cycloneslider-box">
2
  <div class="cycloneslider-box-title ui-state-default">
3
  <span class="cycloneslider-box-title-left">
4
- <?php _e('Slide', 'cycloneslider'); ?>
5
  </span>
6
  <span class="cycloneslider-box-title-right">
7
  <span class="cycloneslider-box-drag" title="<?php _e('Drag', 'cycloneslider'); ?>"><?php _e('Drag', 'cycloneslider'); ?></span>
@@ -14,6 +14,7 @@
14
  <div class="cycloneslider-body-left">
15
  <img class="cycloneslider-slide-thumb" src="<?php echo esc_url($image_url); ?>" alt="" />
16
  <input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[<?php echo $i; ?>][id]" type="hidden" value="<?php echo esc_attr($slider_metas[$i]['id']); ?>" />
 
17
  <input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
18
  </div>
19
  <div class="cycloneslider-body-right">
1
  <div class="cycloneslider-box">
2
  <div class="cycloneslider-box-title ui-state-default">
3
  <span class="cycloneslider-box-title-left">
4
+ <?php echo $box_title; ?>
5
  </span>
6
  <span class="cycloneslider-box-title-right">
7
  <span class="cycloneslider-box-drag" title="<?php _e('Drag', 'cycloneslider'); ?>"><?php _e('Drag', 'cycloneslider'); ?></span>
14
  <div class="cycloneslider-body-left">
15
  <img class="cycloneslider-slide-thumb" src="<?php echo esc_url($image_url); ?>" alt="" />
16
  <input class="cycloneslider-slide-meta-id" name="cycloneslider_metas[<?php echo $i; ?>][id]" type="hidden" value="<?php echo esc_attr($slider_metas[$i]['id']); ?>" />
17
+ <input class="cycloneslider-slide-meta-type" name="cycloneslider_metas[<?php echo $i; ?>][type]" type="hidden" value="<?php echo esc_attr($slider_meta['type']); ?>" />
18
  <input class="button-secondary cycloneslider-upload-button" type="button" value="<?php _e('Get Image', 'cycloneslider'); ?>" />
19
  </div>
20
  <div class="cycloneslider-body-right">
inc/class-cyclone-slider.php CHANGED
@@ -40,7 +40,7 @@ class Cyclone_Slider {
40
  add_action( 'admin_enqueue_scripts', array( &$this, 'register_admin_scripts' ), 10);
41
 
42
  // Register frontend styles and scripts
43
- add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_scripts' ) );
44
 
45
 
46
  // Add admin menus
@@ -76,6 +76,7 @@ class Cyclone_Slider {
76
 
77
  // The magic that shows our css
78
  add_action('template_redirect', array( $this, 'cyclone_css_hook'));
 
79
  } // end constructor
80
 
81
  /**
@@ -121,9 +122,6 @@ class Cyclone_Slider {
121
  wp_register_script( 'cycle2-tile', $this->plugin_url.'js/jquery.cycle2.tile.min.js', array('cycle2') );
122
  wp_enqueue_script( 'cycle2-tile' );
123
 
124
- wp_register_script( 'display', $this->plugin_url.'js/display.js', array('jquery') );
125
- wp_enqueue_script( 'display' );
126
-
127
  }
128
 
129
  /*--------------------------------------------*
@@ -231,10 +229,25 @@ class Cyclone_Slider {
231
  <div class="cycloneslider-sortable">
232
  <?php
233
  if(is_array($slider_metas) and count($slider_metas)>0):
 
 
 
 
 
 
 
 
 
 
 
 
234
  foreach($slider_metas as $i=>$slider_meta):
 
235
  $attachment_id = (int) $slider_meta['id'];
236
  $image_url = wp_get_attachment_image_src( $attachment_id, 'medium', true );
237
  $image_url = (is_array($image_url)) ? $image_url[0] : '';
 
 
238
 
239
  include($this->template_slide_box);
240
  endforeach;
@@ -356,24 +369,30 @@ class Cyclone_Slider {
356
 
357
  function save_post($post_id){
358
 
359
- // verify nonce
360
- if (!empty($_POST['cycloneslider_metabox_nonce'])) {
361
- if (!wp_verify_nonce($_POST['cycloneslider_metabox_nonce'], basename(__FILE__))) {
 
362
  return $post_id;
363
  }
 
 
364
  }
365
-
366
  // check autosave
367
  if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
368
  return $post_id;
369
  }
370
-
 
 
371
  //slide metas
372
  $this->save_metas($post_id);
373
 
374
  //settings
375
  $this->save_settings($post_id);
376
 
 
377
  remove_action( 'save_post', array( &$this, 'save_post' ) );
378
  }
379
 
@@ -385,7 +404,7 @@ class Cyclone_Slider {
385
  $slides = array();
386
  $i=0;//always start from 0
387
  foreach($_POST['cycloneslider_metas'] as $slide){
388
- //bord($i.' '.$slide['fx']);
389
  $slides[$i]['id'] = (int) $slide['id'];
390
  $slides[$i]['link'] = esc_url_raw($slide['link']);
391
  $slides[$i]['title'] = sanitize_text_field($slide['title']);
@@ -394,8 +413,12 @@ class Cyclone_Slider {
394
  $slides[$i]['fx'] = wp_kses_post($slide['fx']);
395
  $slides[$i]['speed'] = sanitize_text_field($slide['speed']);
396
  $slides[$i]['timeout'] = sanitize_text_field($slide['timeout']);
 
397
  $i++;
398
  }
 
 
 
399
  delete_post_meta($post_id, '_cycloneslider_metas');
400
  update_post_meta($post_id, '_cycloneslider_metas', $slides);
401
  }
@@ -415,6 +438,8 @@ class Cyclone_Slider {
415
  $settings['show_prev_next'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_prev_next']);
416
  $settings['show_nav'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_nav']);
417
 
 
 
418
  delete_post_meta($post_id, '_cycloneslider_settings');
419
  update_post_meta($post_id, '_cycloneslider_settings', $settings);
420
  }
@@ -549,28 +574,6 @@ class Cyclone_Slider {
549
  return $slider;
550
  }
551
 
552
- // Process the post meta and return the settings
553
- function get_slider_admin_settings($meta){
554
- if(isset($meta['cycloneslider_settings'][0]) and !empty($meta['cycloneslider_settings'][0])){//from version 1.0.0. set for deletion in future releases
555
- return maybe_unserialize($meta['cycloneslider_settings'][0]);
556
- }
557
- if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){//we have added prefix _ since 1.0.2
558
- return maybe_unserialize($meta['_cycloneslider_settings'][0]);
559
- }
560
- return false;
561
- }
562
-
563
- // Process the post meta and return the settings
564
- function get_slider_metas($meta){
565
- if(isset($meta['cycloneslider_metas'][0]) and !empty($meta['cycloneslider_metas'][0])){//from version 1.0.0. set for deletion in future releases
566
- return maybe_unserialize($meta['cycloneslider_metas'][0]);
567
- }
568
- if(isset($meta['_cycloneslider_metas'][0]) and !empty($meta['_cycloneslider_metas'][0])){//we have added prefix _ since 1.0.2
569
- return maybe_unserialize($meta['_cycloneslider_metas'][0]);
570
- }
571
- return false;
572
- }
573
-
574
  // Get slideshow template
575
  function get_slider_template($slider_id, $template_name, $slides, $slider_metas, $slider_settings, $slider_count){
576
 
@@ -593,6 +596,24 @@ class Cyclone_Slider {
593
  return sprintf(__('[Template "%s" not found]', 'cycloneslider'), $template_name);
594
  }
595
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  function trim_white_spaces($buffer){
597
  $search = array(
598
  '/\>[^\S ]+/s', //strip whitespaces after tags, except space
@@ -686,4 +707,4 @@ class Cyclone_Slider {
686
 
687
  } // end class
688
 
689
- endif;
40
  add_action( 'admin_enqueue_scripts', array( &$this, 'register_admin_scripts' ), 10);
41
 
42
  // Register frontend styles and scripts
43
+ add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_scripts' ), 100 );
44
 
45
 
46
  // Add admin menus
76
 
77
  // The magic that shows our css
78
  add_action('template_redirect', array( $this, 'cyclone_css_hook'));
79
+
80
  } // end constructor
81
 
82
  /**
122
  wp_register_script( 'cycle2-tile', $this->plugin_url.'js/jquery.cycle2.tile.min.js', array('cycle2') );
123
  wp_enqueue_script( 'cycle2-tile' );
124
 
 
 
 
125
  }
126
 
127
  /*--------------------------------------------*
229
  <div class="cycloneslider-sortable">
230
  <?php
231
  if(is_array($slider_metas) and count($slider_metas)>0):
232
+ $slider_metas = apply_filters('cycloneslider_metas', $slider_metas);
233
+ $defaults = array(
234
+ 'id' => 0,
235
+ 'link' => '',
236
+ 'title' => '',
237
+ 'description' => '',
238
+ 'link_target' => '_self',
239
+ 'fx' => 'default',
240
+ 'speed' => '',
241
+ 'timeout' => '',
242
+ 'type' => 'image'
243
+ );
244
  foreach($slider_metas as $i=>$slider_meta):
245
+ $slider_meta = wp_parse_args($slider_meta, $defaults);
246
  $attachment_id = (int) $slider_meta['id'];
247
  $image_url = wp_get_attachment_image_src( $attachment_id, 'medium', true );
248
  $image_url = (is_array($image_url)) ? $image_url[0] : '';
249
+ $image_url = apply_filters('cycloneslider_preview_url', $image_url, $slider_meta);
250
+ $box_title = apply_filters('cycloneslider_box_title', _('Slide', 'cycloneslider'), $slider_meta);
251
 
252
  include($this->template_slide_box);
253
  endforeach;
369
 
370
  function save_post($post_id){
371
 
372
+ // Verify nonce
373
+ $nonce_name = 'cycloneslider_metabox_nonce';
374
+ if (!empty($_POST[$nonce_name])) {
375
+ if (!wp_verify_nonce($_POST[$nonce_name], basename(__FILE__))) {
376
  return $post_id;
377
  }
378
+ } else {
379
+ return $post_id; // Make sure we cancel on missing nonce!
380
  }
381
+
382
  // check autosave
383
  if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
384
  return $post_id;
385
  }
386
+
387
+ do_action('cycloneslider_before_save', $post_id);
388
+
389
  //slide metas
390
  $this->save_metas($post_id);
391
 
392
  //settings
393
  $this->save_settings($post_id);
394
 
395
+
396
  remove_action( 'save_post', array( &$this, 'save_post' ) );
397
  }
398
 
404
  $slides = array();
405
  $i=0;//always start from 0
406
  foreach($_POST['cycloneslider_metas'] as $slide){
407
+
408
  $slides[$i]['id'] = (int) $slide['id'];
409
  $slides[$i]['link'] = esc_url_raw($slide['link']);
410
  $slides[$i]['title'] = sanitize_text_field($slide['title']);
413
  $slides[$i]['fx'] = wp_kses_post($slide['fx']);
414
  $slides[$i]['speed'] = sanitize_text_field($slide['speed']);
415
  $slides[$i]['timeout'] = sanitize_text_field($slide['timeout']);
416
+ $slides[$i]['type'] = sanitize_text_field($slide['type']);
417
  $i++;
418
  }
419
+
420
+ $slides = apply_filters('cycloneslider_slides', $slides); //do filter before saving
421
+
422
  delete_post_meta($post_id, '_cycloneslider_metas');
423
  update_post_meta($post_id, '_cycloneslider_metas', $slides);
424
  }
438
  $settings['show_prev_next'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_prev_next']);
439
  $settings['show_nav'] = (int) wp_filter_nohtml_kses($_POST['cycloneslider_settings']['show_nav']);
440
 
441
+ $settings = apply_filters('cycloneslider_settings', $settings); //do filter before saving
442
+
443
  delete_post_meta($post_id, '_cycloneslider_settings');
444
  update_post_meta($post_id, '_cycloneslider_settings', $settings);
445
  }
574
  return $slider;
575
  }
576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  // Get slideshow template
578
  function get_slider_template($slider_id, $template_name, $slides, $slider_metas, $slider_settings, $slider_count){
579
 
596
  return sprintf(__('[Template "%s" not found]', 'cycloneslider'), $template_name);
597
  }
598
 
599
+ // Process the post meta and return the settings
600
+ function get_slider_admin_settings($meta){
601
+ if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){
602
+ return maybe_unserialize($meta['_cycloneslider_settings'][0]);
603
+ }
604
+ return false;
605
+ }
606
+
607
+ // Process the post meta and return the settings
608
+ function get_slider_metas($meta){
609
+ if(isset($meta['_cycloneslider_metas'][0]) and !empty($meta['_cycloneslider_metas'][0])){
610
+ return maybe_unserialize($meta['_cycloneslider_metas'][0]);
611
+ }
612
+ return false;
613
+ }
614
+
615
+
616
+
617
  function trim_white_spaces($buffer){
618
  $search = array(
619
  '/\>[^\S ]+/s', //strip whitespaces after tags, except space
707
 
708
  } // end class
709
 
710
+ endif;
inc/class-nextgen-integration.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!class_exists('Nextgen_Integration')):
3
+
4
+ /**
5
+ * Class for NextGEN integration. Allows import of images from a gallery as new slides.
6
+ */
7
+ class Nextgen_Integration {
8
+
9
+ /**
10
+ * Initialize
11
+ */
12
+ function __construct() {
13
+
14
+ // Add metaboxes
15
+ add_action( 'add_meta_boxes', array( &$this, 'add_meta_boxes' ), 100 );
16
+
17
+ // Append nextgen slides
18
+ add_filter('cycloneslider_slides', array($this, 'nextgen_slides'));
19
+
20
+ }
21
+
22
+ /**
23
+ * Add metabox
24
+ */
25
+ function add_meta_boxes(){
26
+ global $nggdb;
27
+ if(!isset($nggdb)){//Show only if nextgen plugin is available
28
+ return false;
29
+ }
30
+
31
+ add_meta_box(
32
+ 'cyclone-nextgen-metabox',
33
+ __('NextGEN Integration', 'cycloneslider'),
34
+ array( &$this, 'render_nextgen_meta_box' ),
35
+ 'cycloneslider' ,
36
+ 'normal',
37
+ 'low'
38
+ );
39
+ }
40
+
41
+ /**
42
+ * Render metabox
43
+ */
44
+ function render_nextgen_meta_box($post){
45
+ global $nggdb;
46
+
47
+ $meta = get_post_custom($post->ID);
48
+ $slider_settings = $this->get_slider_admin_settings($meta);
49
+ $slider_settings['nextgen_gallery'] = isset($slider_settings['nextgen_gallery']) ? $slider_settings['nextgen_gallery'] : '';
50
+ ?>
51
+
52
+ <div class="cycloneslider-field last">
53
+ <label for="cycloneslider_nextgen_gallery"><?php _e('Choose a NextGEN Gallery', 'cycloneslider'); ?></label>
54
+ <?php
55
+ $galleries = $nggdb->find_all_galleries();
56
+ ?>
57
+ <select id="cycloneslider_nextgen_gallery" name="cycloneslider_settings[nextgen_gallery]">
58
+ <option selected="selected" value="0"></option>
59
+ <?php foreach($galleries as $gallery): ?>
60
+ <option <?php echo ($slider_settings['nextgen_gallery']==$gallery->gid) ? 'selected="selected"' : ''; ?> value="<?php echo $gallery->gid; ?>"><?php echo $gallery->title; ?></option>
61
+ <?php endforeach; ?>
62
+ </select>
63
+ <input type="submit" name="cycloneslider_settings[nextgen]" value="<?php _e('Import', 'cycloneslider'); ?>" class="button-secondary" />
64
+ <br />
65
+ <span class="note"><?php _e('Select a gallery to import images from. Images will be added as new slides.', 'cycloneslider'); ?></span>
66
+ <div class="clear"></div>
67
+ </div>
68
+ <?php
69
+ }
70
+
71
+ /**
72
+ * Append 1-x to name if filename already exist
73
+ */
74
+ function increment_name($filename, $extension, $folder_files){
75
+ $name = $filename.'.'.$extension;
76
+ if($this->in_array_str_i($name, $folder_files)){
77
+ $existing = true;
78
+ $counter = 0;
79
+ while($existing){
80
+ $counter++;
81
+ $name = $filename.$counter.'.'.$extension;
82
+ if(!$this->in_array_str_i($name, $folder_files)){
83
+ return $name;
84
+ }
85
+ }
86
+ }
87
+ return $name;
88
+ }
89
+
90
+ /**
91
+ * Case insensitive string lookup in an array
92
+ */
93
+ function in_array_str_i($key, $array){
94
+ foreach($array as $element){
95
+ if(strcasecmp($key, $element)==0){
96
+ return true;
97
+ }
98
+ }
99
+ return false;
100
+ }
101
+
102
+ /**
103
+ * Replace certain characters with spaces in order to be a readable post title
104
+ */
105
+ function slug_to_title($string){
106
+ $patterns = array();
107
+ $patterns[0] = '/-/';
108
+ $patterns[1] = '/_/';
109
+ $replacements = array();
110
+ $replacements[0] = ' ';
111
+ $replacements[1] = ' ';
112
+ return ucwords(preg_replace($patterns, $replacements, $string));
113
+ }
114
+
115
+ /**
116
+ * Copy image to WP upload directory, create attachment and return attachment ID.
117
+ */
118
+ function copy_image($image_file){
119
+ $dir = wp_upload_dir();
120
+ $target_folder = $dir['path'].'/';
121
+
122
+ $info = pathinfo($image_file);
123
+ $dirname = isset($info['dirname']) ? $info['dirname'] : ''; // Path to directory
124
+ $filename = isset($info['filename']) ? $info['filename'] : ''; // Filename without extension Eg. "image-1"
125
+ $ext = isset($info['extension']) ? $info['extension'] : ''; // File extension Eg. "jpg"
126
+
127
+ if($target_folder_files = scandir($target_folder)){
128
+ if(is_array($target_folder_files)){
129
+ $new_name = $this->increment_name($filename, $ext, $target_folder_files); //Append numbers if file exist
130
+ if(copy($image_file, $target_folder.$new_name)){
131
+
132
+ $size = getimagesize($target_folder.$new_name);// Get mime type
133
+ // Build attachment details
134
+ $attachment = array(
135
+ 'post_mime_type' => $size['mime'],
136
+ 'post_title' => $this->slug_to_title(basename($new_name, '.'.$ext)),
137
+ 'post_content' => '',
138
+ 'post_status' => 'inherit'
139
+ );
140
+
141
+ $attach_id = wp_insert_attachment( $attachment, $target_folder.$new_name );
142
+
143
+ if(!function_exists('wp_generate_attachment_metadata')) include( ABSPATH . 'wp-admin/includes/image.php' );// Required for wp_generate_attachment_metadata
144
+
145
+ $attach_data = wp_generate_attachment_metadata( $attach_id, $target_folder.$new_name ); // Generate different thumbnails
146
+ wp_update_attachment_metadata( $attach_id, $attach_data );
147
+ return $attach_id;
148
+ }
149
+ }
150
+ }
151
+ return false;
152
+ }
153
+
154
+
155
+
156
+ /**
157
+ * Add images from nextgen as new slides. Images are copied from nextgen folders into WP uploads dir and added as attachments.
158
+ */
159
+ function nextgen_slides($slides){
160
+ global $nggdb;
161
+ if(!isset($nggdb)){
162
+ return $slides;
163
+ }
164
+
165
+ if(isset($_POST['cycloneslider_settings']['nextgen']) and isset($_POST['cycloneslider_settings']['nextgen_gallery']) ){
166
+
167
+ $nextgen_gallery = $nggdb->get_gallery((int) $_POST['cycloneslider_settings']['nextgen_gallery']);
168
+
169
+ if(!empty($nextgen_gallery) and is_array($nextgen_gallery)){
170
+
171
+ foreach($nextgen_gallery as $image){
172
+ if($attach_id = $this->copy_image($image->imagePath)){
173
+ $slides[] = array(
174
+ 'id' => $attach_id,
175
+ 'link' => '',
176
+ 'title' => '',
177
+ 'description' => '',
178
+ 'link_target' => '_self',
179
+ 'fx' => 'default',
180
+ 'speed' => '',
181
+ 'timeout' => '',
182
+ 'type' => 'image'
183
+ );
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ return $slides;
190
+ }
191
+
192
+ /**
193
+ * Slides
194
+ */
195
+ function get_slider_admin_settings($meta){
196
+ if(isset($meta['_cycloneslider_settings'][0]) and !empty($meta['_cycloneslider_settings'][0])){
197
+ return maybe_unserialize($meta['_cycloneslider_settings'][0]);
198
+ }
199
+ return false;
200
+ }
201
+
202
+ } // end class
203
+
204
+ new Nextgen_Integration();
205
+
206
+ endif;
js/admin.js CHANGED
@@ -25,7 +25,7 @@ jQuery(document).ready(function($){
25
  });
26
  $('.cycloneslider-sortable .cycloneslider-box').each(function(i){
27
  $(this).data('cycloneslider_id',i);
28
- $(this).find('.cycloneslider-box-title-left').html('Slide '+(i+1));
29
  });
30
 
31
 
@@ -126,6 +126,7 @@ jQuery(document).ready(function($){
126
  if (current_slide_box) {
127
  var slide_thumb = current_slide_box.find('.cycloneslider-slide-thumb');/*** find the thumb ***/
128
  var slide_attachment_id = current_slide_box.find('.cycloneslider-slide-meta-id');/*** find the hidden field that will hold the attachment id ***/
 
129
 
130
  var image = false;
131
  if(jQuery(html).get(0) != undefined){ /*** Check if its a valid html tag ***/
@@ -140,10 +141,13 @@ jQuery(document).ready(function($){
140
  if(image){
141
  var url = image.attr('src');
142
  var attachment_id = image.attr('data-id');
143
-
144
- slide_thumb.attr('src', url).show();
145
- slide_attachment_id.val(attachment_id);
146
-
 
 
 
147
  } else {
148
  alert('Could not insert image.');
149
  }
25
  });
26
  $('.cycloneslider-sortable .cycloneslider-box').each(function(i){
27
  $(this).data('cycloneslider_id',i);
28
+ $(this).find('.cycloneslider-box-title-left').append((i+1));
29
  });
30
 
31
 
126
  if (current_slide_box) {
127
  var slide_thumb = current_slide_box.find('.cycloneslider-slide-thumb');/*** find the thumb ***/
128
  var slide_attachment_id = current_slide_box.find('.cycloneslider-slide-meta-id');/*** find the hidden field that will hold the attachment id ***/
129
+ var slide_type = current_slide_box.find('.cycloneslider-slide-meta-type');/*** find the hidden field that will hold the type ***/
130
 
131
  var image = false;
132
  if(jQuery(html).get(0) != undefined){ /*** Check if its a valid html tag ***/
141
  if(image){
142
  var url = image.attr('src');
143
  var attachment_id = image.attr('data-id');
144
+ if(url!=undefined && attachment_id != undefined ){
145
+ slide_thumb.attr('src', url).show();
146
+ slide_attachment_id.val(attachment_id);
147
+ slide_type.val('image');
148
+ } else {
149
+ alert('Could not insert image. URL or attachment ID missing.');
150
+ }
151
  } else {
152
  alert('Could not insert image.');
153
  }
js/display.js DELETED
File without changes
js/jquery.cycle2.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
- * jQuery Cycle2; ver: BETA-20121002
3
  * http://jquery.malsup.com/cycle2/
4
  * Copyright (c) 2012 M. Alsup; Dual licensed: MIT/GPL
5
  */
6
- (function(a){function c(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))}function d(a){return(a||"").toLowerCase()}"use strict";var b="BETA-20120923";a.fn.cycle=function(b){var e;return this.length===0&&!a.isReady?(e={s:this.selector,c:this.context},c("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(b)}),this):this.each(function(){var e,f,g,h,i=a(this);if(i.data("cycle.opts"))return;if(i.data("cycle-log")===!1||b&&b.log===!1||f&&f.log===!1)c=a.noop;c("--c2 init--"),e=i.data();for(var j in e)e.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(h=e[j],g=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c(g+":",h,"("+typeof h+")"),e[g]=h);f=a.extend({},a.fn.cycle.defaults,e,b||{}),f.timeoutId=0,f.paused=0,f.container=i,f._maxZ=f.maxZ,f.API=a.extend({_container:i},a.fn.cycle.API),f.API.log=c,f.API.trigger=function(a,b){return f.container.trigger(a,b),f.API},i.data("cycle.opts",f),i.data("cycle.API",f.API),f.API.trigger("cycle-bootstrap",[f,f.API]),f.API.addInitialSlides(),f.API.preInitSlideshow(),f.slides.length&&f.API.initSlideshow()})},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b=this.opts(),c=b.container;b.API.calcFirstSlide(),b.container.css("position")=="static"&&b.container.css("position","relative"),a(b.slides[b.currSlide]).css("opacity",1).show(),b.API.stackSlides(b.slides[b.currSlide],b.slides[b.nextSlide],!b.reverse),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.hover(function(){b.paused=1,b.API.trigger("cycle-paused",[b])},function(){b.paused=0,b.API.trigger("cycle-resumed",[b])})),b.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},b.timeout+b.delay)),b._initialized=!0,b.API.updateView(),b.container.on("cycle-paused cycle-resumed",function(a){b.container[a.type==="cycle-paused"?"addClass":"removeClass"]("cycle-paused")}),b.API.trigger("cycle-initialized",[b]),b.API.postInitSlideshow()},add:function(b,c){var d=this.opts(),e=d.slideCount,f=!1;a(b).each(function(b){var e,f=a(this);c?d.container.prepend(f):d.container.append(f),d.slideCount++,e=d.API.buildSlideOpts(f),c?d.slides=a(f).add(d.slides):d.slides=d.slides.add(f),d.API.initSlide(e,f,--d._maxZ),f.data("cycle.opts",e),d.API.trigger("cycle-slide-added",[d,e,f])}),d.API.updateView(),f=d._preInitialized&&e<2&&d.slideCount>=1,f&&(d._initialized?d.timeout&&(d.timeoutId=setTimeout(function(){var a=d.slides.length;d.nextSlide=d.reverse?a-1:1,d.API.prepareTx(!1,!d.reverse)},d.timeout+d.delay)):d.API.initSlideshow())},calcFirstSlide:function(){var a=this.opts(),b;b=parseInt(a.startingSlide||0,10);if(b>=a.slides.length||b<0)b=0;a.currSlide=b,a.reverse?(a.nextSlide=b-1,a.nextSlide<0&&(a.nextSlide=a.slides.length-1)):(a.nextSlide=b+1,a.nextSlide==a.slides.length&&(a.nextSlide=0))},calcNextSlide:function(){var a=this.opts(),b;a.reverse?(b=a.nextSlide-1<0,a.nextSlide=b?a.slideCount-1:a.nextSlide-1,a.currSlide=b?0:a.nextSlide+1):(b=a.nextSlide+1==a.slides.length,a.nextSlide=b?0:a.nextSlide+1,a.currSlide=b?a.slides.length-1:a.nextSlide-1)},calcTx:function(b,d){var e=b,f;return d&&e.manualFx&&(f=a.fn.cycle.transitions[e.manualFx]),f||(f=a.fn.cycle.transitions[e.fx]),f||(f=a.fn.cycle.transitions.fade,c('Transition "'+e.fx+'" not found. Using fade.')),f},prepareTx:function(a,b){var c=this.opts(),d,e,f,g,h;if(c.slideCount<2){c.timeoutId=0;return}a&&(c.API.stopTransition(),c.busy=!1,clearTimeout(c.timeoutId),c.timeoutId=0);if(c.busy)return;if(c.timeoutId===0&&!a)return;e=c.slides[c.currSlide],f=c.slides[c.nextSlide],g=c.API.getSlideOpts(c.nextSlide),h=c.API.calcTx(g,a),c._tx=h,a&&g.manualSpeed!==undefined&&(g.speed=g.manualSpeed),c.nextSlide!=c.currSlide&&(a||!c.paused&&c.timeout)?(c.API.trigger("cycle-before",[g,e,f,b]),h.before&&h.before(g,e,f,b),d=function(){c.busy=!1,h.after&&h.after(g,e,f,b),c.API.trigger("cycle-after",[g,e,f,b]),c.API.queueTransition(g),c.API.updateView()},c.busy=!0,h.transition?h.transition(g,e,f,b,d):c.API.doTransition(g,e,f,b,d),c.API.calcNextSlide()):c.API.queueTransition(g)},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(a){var b=this.opts();if(b.nextSlide===0&&--b.loop===0){b.API.log("terminating; loop=0"),b.timeout=0,b.API.trigger("cycle-finished",[b]),b.nextSlide=b.currSlide;return}a.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},a.timeout))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(b){var e=this.opts(),f,g,h=b.data()||{};for(var i in h)h.hasOwnProperty(i)&&/^cycle[A-Z]+/.test(i)&&(f=h[i],g=i.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c("["+(e.slideCount-1)+"]",g+":",f,"("+typeof f+")"),h[g]=f);h=a.extend({},a.fn.cycle.defaults,e,h),h.slideNum=e.slideCount;try{delete h.API,delete h.slideCount,delete h.currSlide,delete h.nextSlide,delete h.slides}catch(j){}return h},getSlideOpts:function(b){var c=this.opts();b===undefined&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(){var a=this.opts();if(!a._initialized)return;var b=a.API.getSlideOpts(),c=a.slides[a.currSlide];a.slideActiveClass&&a.slides.removeClass(a.slideActiveClass).eq(a.currSlide).addClass(a.slideActiveClass),a.hideNonActive&&a.slides.filter(":not(."+a.slideActiveClass+")").hide(),a.API.trigger("cycle-update-view",[a,b,c])},getComponent:function(b){var c=this.opts(),d=c[b];return typeof d=="string"?/^\s*\>/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;f<h;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=c,a.fn.cycle.version=function(){return"Cycle2: "+b},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,display:"block"},a.cssAfter={zIndex:a._maxZ-2},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:undefined,manualSpeed:undefined,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{autoHeight:0}),a(document).on("cycle-initialized",function(b,c){function e(){c.container.height(c.container.width()/d)}var d;a.type(c.autoHeight)=="number"&&c.autoHeight>=0?c._sentinel=a(c.slides[c.autoHeight]).clone().css({position:"static",visibility:"hidden",display:"block"}).prependTo(c.container).removeClass().addClass("cycle-sentinel cycle-slide"):a.type(c.autoHeight)=="string"&&/\d+\:\d+/.test(c.autoHeight)&&(d=c.autoHeight.match(/(\d+)\:(\d+)/),d=d[1]/d[2],a(window).on("resize",e),c._autoHeightOnResize=e,setTimeout(function(){a(window).triggerHandler("resize")},15))}),a(document).on("cycle-destroyed",function(b,c){c._sentinel&&c._sentinel.remove(),c._autoHeightOnResize&&a(window).off("resize",c._autoHeightOnResize)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>"}),a(document).on("cycle-update-view",function(b,c,d,e){var f;a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"];c[a]&&b&&(f=c.API.getComponent(a),f.html(c.API.tmpl(b,d,e)))})}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return a.type(c)=="number"?this.cycle("goto",c):a.type(c)=="string"?this.each(function(){var h;d=c,f=a(this).data("cycle.opts");if(f===undefined){b.log('slideshow must be initialized before sending commands; "'+d+'" ignored');return}d=d=="goto"?"jump":d,e=f.API[d];if(a.isFunction(e))return h=a.makeArray(g),h.shift(),e.apply(f.API,h);b.log("unknown command: ",d)}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts(),b=a.reverse?-1:1;if(a.allowWrap===!1&&a.currSlide+b>=a.slideCount)return;a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next")},prev:function(){var a=this.opts(),b=a.reverse?1:-1;if(a.allowWrap===!1&&a.currSlide+b<0)return;a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev")},destroy:function(){var a=this.opts();clearTimeout(a.timeoutId),a.timeoutId=0,a.API.stop(),a.API.trigger("cycle-destroyed",[a]).log("cycle-destroyed"),a.container.removeData("cycle.opts")},jump:function(a){var b=this.opts(),c=parseInt(a,10);if(isNaN(c)||c<0||c>=b.slides.length){b.API.log("goto: invalid slide index: "+c);return}if(c==b.currSlide){b.API.log("goto: skipping, already on slide",c);return}b.nextSlide=c,clearTimeout(b.timeoutId),b.timeoutId=0,b.API.log("goto: ",c," (zero-index)"),b.API.prepareTx(!0,!b.reverse)},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},pause:function(){var a=this.opts();a.paused=!0,a.API.trigger("cycle-paused",[a]).log("cycle-paused")},resume:function(){var a=this.opts();a.paused=!1,a.API.trigger("cycle-resumed",[a]).log("cycle-resumed")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){var c=this.opts(),d,e,f=[],g=1;for(var h=0;h<c.slides.length;h++)d=c.slides[h],h==b?e=d:(f.push(d),d.data("cycle.opts").slideNum=g,g++);e&&(c.slides=a(f),c.slideCount--,a(e).remove(),b==c.currSlide&&c.API.advanceSlide(1),c.API.trigger("cycle-slide-removed",[c,b,e]).log("cycle-slide-removed"),c.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),function(a){function b(b,c){var d;if(b._hashFence){b._hashFence=!1;return}d=window.location.hash.substring(1),b.slides.each(function(e){if(a(this).data("cycle-hash")===d)return c===!0?b.startingSlide=e:(b.nextSlide=e,b.API.prepareTx(!0,!1)),!1})}"use strict",a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function e(b,e){function h(b){var h;c.loader=="wait"?(f.push(b),g===0&&(d.apply(c.API,[f,e]),c.container.removeClass("cycle-loading"))):(h=a(c.slides[c.currSlide]),d.apply(c.API,[b,e]),h.show(),c.container.removeClass("cycle-loading"))}var f=[];b=a(b);var g=b.length;b.hide().each(function(){function k(){--b===0&&(--g,h(i))}var b=0,i=a(this),j=i.is("img")?i:i.find("img");j=j.filter(":not(.cycle-loader-ignore)");if(!j.length){--g,f.push(i);return}b=j.length,j.each(function(){this.complete?k():a(this).load(function(){k()}).error(function(){--b===0&&(c.API.log("slide skipped; img not loaded:",this.src),--g===0&&c.loader=="wait"&&d.apply(c.API,[f,e]))})})}),g&&c.container.addClass("cycle-loading")}var d;if(!c.loader)return;d=c.API.add,c.API.add=e})}(jQuery),function(a){function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts(),d=a.children().index(b),e=d,f=c.currSlide<e;if(c.currSlide==e)return;c.nextSlide=e,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b])}"use strict",a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>&bull;</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d,e){if(c.pager){var f=c.API.getComponent(c,"pager");f.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c,d){var e;c.pager&&(e=c.API.getComponent("pager"),e.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c;b.pager&&b.pagerTemplate&&(c=b.API.getComponent("pager"),c.empty())})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){b.API.getComponent("next").off(b.nextEvent).on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").off(b.prevEvent).on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()}),b.swipe&&(b.container.on("swipeleft.cycle",function(){b.API.next()}),b.container.on("swiperight.cycle",function(){b.API.prev()}))}),a(document).on("cycle-update-view",function(a,b,c,d){if(b.allowWrap)return;var e=b.disabledClass,f=b.API.getComponent("next"),g=b.API.getComponent("prev"),h=b._prevBoundry||0,i=b._nextBoundry||b.slideCount-1;b.currSlide==i?f.addClass(e).prop("disabled",!0):f.removeClass(e).prop("disabled",!1),b.currSlide===h?g.addClass(e).prop("disabled",!0):g.removeClass(e).prop("disabled",!1)}),a(document).on("cycle-destroyed",function(b,c){a(c.next).off(c.nextEvent),a(c.prev).off(c.prevEvent),c.container.off("swipeleft.cycle swiperight.cycle")})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(!c.progressive)return;var d=c.API,e=d.next,f=d.prev,g=d.prepareTx,h,i=a.type(c.progressive);if(i=="array")h=c.progressive;else if(a.isFunction(c.progressive))h=c.progressive(c);else if(i=="string"){h=a(c.progressive).html();if(!a.trim(h))return;try{h=a.parseJSON(h)}catch(j){d.log("error parsing progressive slides",j);return}}g&&(d.prepareTx=function(a,b){var d,e;if(a||h.length===0){g.apply(c.API,[a,b]);return}b&&c.currSlide==c.slideCount-1?(e=h[0],h=h.slice(1),c.container.one("cycle-slide-added",function(a,b){b.API.advanceSlide(1)}),c.API.add(e)):!b&&c.currSlide===0?(d=h.length-1,e=h[d],h=h.slice(0,d),c.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1)}),c.API.add(e,!0)):g.apply(c.API,[a,b])}),e&&(d.next=function(){var a=this.opts();if(h.length&&a.currSlide==a.slideCount-1){var b=h[0];h=h.slice(1),a.container.one("cycle-slide-added",function(a,b){e.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else e.apply(a.API)}),f&&(d.prev=function(){var a=this.opts();if(h.length&&a.currSlide===0){var b=h.length-1,c=h[b];h=h.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else f.apply(a.API)})})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.API,{tmpl:function(b,c,d){if(b&&c)return b.replace(/\{\{((\.)?.*?)\}\}/g,function(b,e){var f,g,h=c,i=e.split(".");if(i.length>1){g=c;for(f=0;f<i.length;f++)h=g,g=g[i[f]]||e}else g=c[e];return a.isFunction(g)?g.call(h,c):g!==undefined&&g!==null?g:d&&d[e]!==undefined?d[e]:e})}})}(jQuery);
1
  /*!
2
+ * jQuery Cycle2; ver: BETA-20121102
3
  * http://jquery.malsup.com/cycle2/
4
  * Copyright (c) 2012 M. Alsup; Dual licensed: MIT/GPL
5
  */
6
+ (function(a){function c(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))}function d(a){return(a||"").toLowerCase()}"use strict";var b="BETA-20121030";a.fn.cycle=function(b){var e;return this.length===0&&!a.isReady?(e={s:this.selector,c:this.context},c("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(b)}),this):this.each(function(){var e,f,g,h,i=a(this);if(i.data("cycle.opts"))return;if(i.data("cycle-log")===!1||b&&b.log===!1||f&&f.log===!1)c=a.noop;c("--c2 init--"),e=i.data();for(var j in e)e.hasOwnProperty(j)&&/^cycle[A-Z]+/.test(j)&&(h=e[j],g=j.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c(g+":",h,"("+typeof h+")"),e[g]=h);f=a.extend({},a.fn.cycle.defaults,e,b||{}),f.timeoutId=0,f.paused=0,f.container=i,f._maxZ=f.maxZ,f.API=a.extend({_container:i},a.fn.cycle.API),f.API.log=c,f.API.trigger=function(a,b){return f.container.trigger(a,b),f.API},i.data("cycle.opts",f),i.data("cycle.API",f.API),f.API.trigger("cycle-bootstrap",[f,f.API]),f.API.addInitialSlides(),f.API.preInitSlideshow(),f.slides.length&&f.API.initSlideshow()})},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var b=this.opts(),c=b.slides;b.slideCount=0,b.slides=a(),c=c.jquery?c:b.container.find(c),b.random&&c.sort(function(){return Math.random()-.5}),b.API.add(c)},preInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-pre-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.preInit)&&c.preInit(b),b._preInitialized=!0},postInitSlideshow:function(){var b=this.opts();b.API.trigger("cycle-post-initialize",[b]);var c=a.fn.cycle.transitions[b.fx];c&&a.isFunction(c.postInit)&&c.postInit(b)},initSlideshow:function(){var b=this.opts(),c=b.container;b.API.calcFirstSlide(),b.container.css("position")=="static"&&b.container.css("position","relative"),a(b.slides[b.currSlide]).css("opacity",1).show(),b.API.stackSlides(b.slides[b.currSlide],b.slides[b.nextSlide],!b.reverse),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.hover(function(){b.paused=1,b.API.trigger("cycle-paused",[b])},function(){b.paused=0,b.API.trigger("cycle-resumed",[b])})),b.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},b.timeout+b.delay)),b._initialized=!0,b.API.updateView(),b.container.on("cycle-paused cycle-resumed",function(a){b.container[a.type==="cycle-paused"?"addClass":"removeClass"]("cycle-paused")}),b.API.trigger("cycle-initialized",[b]),b.API.postInitSlideshow()},add:function(b,c){var d=this.opts(),e=d.slideCount,f=!1,g;a(b).each(function(b){var e,f=a(this);c?d.container.prepend(f):d.container.append(f),d.slideCount++,e=d.API.buildSlideOpts(f),c?d.slides=a(f).add(d.slides):d.slides=d.slides.add(f),d.API.initSlide(e,f,--d._maxZ),f.data("cycle.opts",e),d.API.trigger("cycle-slide-added",[d,e,f])}),d.API.updateView(),f=d._preInitialized&&e<2&&d.slideCount>=1,f&&(d._initialized?d.timeout&&(g=d.slides.length,d.nextSlide=d.reverse?g-1:1):d.API.initSlideshow())},calcFirstSlide:function(){var a=this.opts(),b;b=parseInt(a.startingSlide||0,10);if(b>=a.slides.length||b<0)b=0;a.currSlide=b,a.reverse?(a.nextSlide=b-1,a.nextSlide<0&&(a.nextSlide=a.slides.length-1)):(a.nextSlide=b+1,a.nextSlide==a.slides.length&&(a.nextSlide=0))},calcNextSlide:function(){var a=this.opts(),b;a.reverse?(b=a.nextSlide-1<0,a.nextSlide=b?a.slideCount-1:a.nextSlide-1,a.currSlide=b?0:a.nextSlide+1):(b=a.nextSlide+1==a.slides.length,a.nextSlide=b?0:a.nextSlide+1,a.currSlide=b?a.slides.length-1:a.nextSlide-1)},calcTx:function(b,d){var e=b,f;return d&&e.manualFx&&(f=a.fn.cycle.transitions[e.manualFx]),f||(f=a.fn.cycle.transitions[e.fx]),f||(f=a.fn.cycle.transitions.fade,c('Transition "'+e.fx+'" not found. Using fade.')),f},prepareTx:function(a,b){var c=this.opts(),d,e,f,g,h;if(c.slideCount<2){c.timeoutId=0;return}a&&(c.API.stopTransition(),c.busy=!1,clearTimeout(c.timeoutId),c.timeoutId=0);if(c.busy)return;if(c.timeoutId===0&&!a)return;e=c.slides[c.currSlide],f=c.slides[c.nextSlide],g=c.API.getSlideOpts(c.nextSlide),h=c.API.calcTx(g,a),c._tx=h,a&&g.manualSpeed!==undefined&&(g.speed=g.manualSpeed),c.nextSlide!=c.currSlide&&(a||!c.paused&&c.timeout)?(c.API.trigger("cycle-before",[g,e,f,b]),h.before&&h.before(g,e,f,b),d=function(){c.busy=!1,h.after&&h.after(g,e,f,b),c.API.trigger("cycle-after",[g,e,f,b]),c.API.queueTransition(g),c.API.updateView()},c.busy=!0,h.transition?h.transition(g,e,f,b,d):c.API.doTransition(g,e,f,b,d),c.API.calcNextSlide()):c.API.queueTransition(g)},doTransition:function(b,c,d,e,f){var g=b,h=a(c),i=a(d),j=function(){i.animate(g.animIn||{opacity:1},g.speed,g.easeIn||g.easing,f)};i.css(g.cssBefore||{}),h.animate(g.animOut||{},g.speed,g.easeOut||g.easing,function(){h.css(g.cssAfter||{}),g.sync||j()}),g.sync&&j()},queueTransition:function(a){var b=this.opts();if(b.nextSlide===0&&--b.loop===0){b.API.log("terminating; loop=0"),b.timeout=0,b.API.trigger("cycle-finished",[b]),b.nextSlide=b.currSlide;return}a.timeout&&(b.timeoutId=setTimeout(function(){b.API.prepareTx(!1,!b.reverse)},a.timeout))},stopTransition:function(){var a=this.opts();a.slides.filter(":animated").length&&(a.slides.stop(!1,!0),a.API.trigger("cycle-transition-stopped",[a])),a._tx&&a._tx.stopTransition&&a._tx.stopTransition(a)},advanceSlide:function(a){var b=this.opts();return clearTimeout(b.timeoutId),b.timeoutId=0,b.nextSlide=b.currSlide+a,b.nextSlide<0?b.nextSlide=b.slides.length-1:b.nextSlide>=b.slides.length&&(b.nextSlide=0),b.API.prepareTx(!0,a>=0),!1},buildSlideOpts:function(b){var e=this.opts(),f,g,h=b.data()||{};for(var i in h)h.hasOwnProperty(i)&&/^cycle[A-Z]+/.test(i)&&(f=h[i],g=i.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,d),c("["+(e.slideCount-1)+"]",g+":",f,"("+typeof f+")"),h[g]=f);h=a.extend({},a.fn.cycle.defaults,e,h),h.slideNum=e.slideCount;try{delete h.API,delete h.slideCount,delete h.currSlide,delete h.nextSlide,delete h.slides}catch(j){}return h},getSlideOpts:function(b){var c=this.opts();b===undefined&&(b=c.currSlide);var d=c.slides[b],e=a(d).data("cycle.opts");return a.extend({},c,e)},initSlide:function(b,c,d){var e=this.opts();c.css(b.slideCss||{}),d>0&&c.css("zIndex",d),isNaN(b.speed)&&(b.speed=a.fx.speeds[b.speed]||a.fx.speeds._default),b.sync||(b.speed=b.speed/2),c.addClass(e.slideClass)},updateView:function(){var a=this.opts();if(!a._initialized)return;var b=a.API.getSlideOpts(),c=a.slides[a.currSlide];a.slideActiveClass&&a.slides.removeClass(a.slideActiveClass).eq(a.currSlide).addClass(a.slideActiveClass),a.hideNonActive&&a.slides.filter(":not(."+a.slideActiveClass+")").hide(),a.API.trigger("cycle-update-view",[a,b,c])},getComponent:function(b){var c=this.opts(),d=c[b];return typeof d=="string"?/^\s*\>/.test(d)?c.container.find(d):a(d):d.jquery?d:a(d)},stackSlides:function(b,c,d){var e=this.opts();b||(b=e.slides[e.currSlide],c=e.slides[e.nextSlide],d=!e.reverse),a(b).css("zIndex",e.maxZ);var f,g=e.maxZ-2,h=e.slideCount;if(d){for(f=e.currSlide+1;f<h;f++)a(e.slides[f]).css("zIndex",g--);for(f=0;f<e.currSlide;f++)a(e.slides[f]).css("zIndex",g--)}else{for(f=e.currSlide-1;f>=0;f--)a(e.slides[f]).css("zIndex",g--);for(f=h-1;f>e.currSlide;f--)a(e.slides[f]).css("zIndex",g--)}a(c).css("zIndex",e.maxZ-1)},getSlideIndex:function(a){return this.opts().slides.index(a)}},a.fn.cycle.log=c,a.fn.cycle.version=function(){return"Cycle2: "+b},a.fn.cycle.transitions={custom:{},none:{before:function(a,b,c,d){a.API.stackSlides(c,b,d),a.cssBefore={opacity:1,display:"block"}}},fade:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:0,display:"block"}),b.animIn={opacity:1},b.animOut={opacity:0}}},fadeout:{before:function(b,c,d,e){var f=b.API.getSlideOpts(b.nextSlide).slideCss||{};b.API.stackSlides(c,d,e),b.cssBefore=a.extend(f,{opacity:1,display:"block"}),b.animOut={opacity:0}}},scrollHorz:{before:function(a,b,c,d){a.API.stackSlides(b,c,d);var e=a.container.css("overflow","hidden").width();a.cssBefore={left:d?e:-e,top:0,opacity:1,display:"block"},a.cssAfter={zIndex:a._maxZ-2},a.animIn={left:0},a.animOut={left:d?-e:e}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:undefined,manualSpeed:undefined,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})})(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{autoHeight:0}),a(document).on("cycle-initialized",function(b,c){function e(){c.container.height(c.container.width()/d)}var d;a.type(c.autoHeight)=="number"&&c.autoHeight>=0?c._sentinel=a(c.slides[c.autoHeight]).clone().css({position:"static",visibility:"hidden",display:"block"}).prependTo(c.container).removeClass().addClass("cycle-sentinel cycle-slide"):a.type(c.autoHeight)=="string"&&/\d+\:\d+/.test(c.autoHeight)&&(d=c.autoHeight.match(/(\d+)\:(\d+)/),d=d[1]/d[2],a(window).on("resize",e),c._autoHeightOnResize=e,setTimeout(function(){a(window).triggerHandler("resize")},15))}),a(document).on("cycle-destroyed",function(b,c){c._sentinel&&c._sentinel.remove(),c._autoHeightOnResize&&a(window).off("resize",c._autoHeightOnResize)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>"}),a(document).on("cycle-update-view",function(b,c,d,e){var f;a.each(["caption","overlay"],function(){var a=this,b=d[a+"Template"];c[a]&&b&&(f=c.API.getComponent(a),f.html(c.API.tmpl(b,d,e)))})}),a(document).on("cycle-destroyed",function(b,c){var d;a.each(["caption","overlay"],function(){var a=this,b=c[a+"Template"];c[a]&&b&&(d=c.API.getComponent("caption"),d.empty())})})}(jQuery),function(a){"use strict";var b=a.fn.cycle;a.fn.cycle=function(c){var d,e,f,g=a.makeArray(arguments);return a.type(c)=="number"?this.cycle("goto",c):a.type(c)=="string"?this.each(function(){var h;d=c,f=a(this).data("cycle.opts");if(f===undefined){b.log('slideshow must be initialized before sending commands; "'+d+'" ignored');return}d=d=="goto"?"jump":d,e=f.API[d];if(a.isFunction(e))return h=a.makeArray(g),h.shift(),e.apply(f.API,h);b.log("unknown command: ",d)}):b.apply(this,arguments)},a.extend(a.fn.cycle,b),a.extend(b.API,{next:function(){var a=this.opts(),b=a.reverse?-1:1;if(a.allowWrap===!1&&a.currSlide+b>=a.slideCount)return;a.API.advanceSlide(b),a.API.trigger("cycle-next",[a]).log("cycle-next")},prev:function(){var a=this.opts(),b=a.reverse?1:-1;if(a.allowWrap===!1&&a.currSlide+b<0)return;a.API.advanceSlide(b),a.API.trigger("cycle-prev",[a]).log("cycle-prev")},destroy:function(){var a=this.opts();clearTimeout(a.timeoutId),a.timeoutId=0,a.API.stop(),a.API.trigger("cycle-destroyed",[a]).log("cycle-destroyed"),a.container.removeData("cycle.opts")},jump:function(a){var b,c=this.opts(),d=parseInt(a,10);if(isNaN(d)||d<0||d>=c.slides.length){c.API.log("goto: invalid slide index: "+d);return}if(d==c.currSlide){c.API.log("goto: skipping, already on slide",d);return}c.nextSlide=d,clearTimeout(c.timeoutId),c.timeoutId=0,c.API.log("goto: ",d," (zero-index)"),b=c.currSlide<c.nextSlide,c.API.prepareTx(!0,b)},stop:function(){var b=this.opts(),c=b.container;clearTimeout(b.timeoutId),b.timeoutId=0,b.API.stopTransition(),b.pauseOnHover&&(b.pauseOnHover!==!0&&(c=a(b.pauseOnHover)),c.off("mouseenter mouseleave")),b.API.trigger("cycle-stopped",[b]).log("cycle-stopped")},pause:function(){var a=this.opts();a.paused=!0,a.API.trigger("cycle-paused",[a]).log("cycle-paused")},resume:function(){var a=this.opts();a.paused=!1,a.API.trigger("cycle-resumed",[a]).log("cycle-resumed")},reinit:function(){var a=this.opts();a.API.destroy(),a.container.cycle()},remove:function(b){var c=this.opts(),d,e,f=[],g=1;for(var h=0;h<c.slides.length;h++)d=c.slides[h],h==b?e=d:(f.push(d),a(d).data("cycle.opts").slideNum=g,g++);e&&(c.slides=a(f),c.slideCount--,a(e).remove(),b==c.currSlide&&c.API.advanceSlide(1),c.API.trigger("cycle-slide-removed",[c,b,e]).log("cycle-slide-removed"),c.API.updateView())}}),a(document).on("click.cycle","[data-cycle-cmd]",function(b){b.preventDefault();var c=a(this),d=c.data("cycle-cmd"),e=c.data("cycle-context")||".cycle-slideshow";a(e).cycle(d,c.data("cycle-arg"))})}(jQuery),function(a){function b(b,c){var d;if(b._hashFence){b._hashFence=!1;return}d=window.location.hash.substring(1),b.slides.each(function(e){if(a(this).data("cycle-hash")===d)return c===!0?b.startingSlide=e:(b.nextSlide=e,b.API.prepareTx(!0,!1)),!1})}"use strict",a(document).on("cycle-pre-initialize",function(c,d){b(d,!0),d._onHashChange=function(){b(d,!1)},a(window).on("hashchange",d._onHashChange)}),a(document).on("cycle-update-view",function(a,b,c){c.hash&&(b._hashFence=!0,window.location.hash=c.hash)}),a(document).on("cycle-destroyed",function(b,c){c._onHashChange&&a(window).off("hashchange",c._onHashChange)})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{loader:!1}),a(document).on("cycle-bootstrap",function(b,c){function e(b,e){function h(b){var h;c.loader=="wait"?(f.push(b),g===0&&(d.apply(c.API,[f,e]),c.container.removeClass("cycle-loading"))):(h=a(c.slides[c.currSlide]),d.apply(c.API,[b,e]),h.show(),c.container.removeClass("cycle-loading"))}var f=[];b=a(b);var g=b.length;b.hide().each(function(){function k(){--b===0&&(--g,h(i))}var b=0,i=a(this),j=i.is("img")?i:i.find("img");j=j.filter(":not(.cycle-loader-ignore)");if(!j.length){--g,f.push(i);return}b=j.length,j.each(function(){this.complete?k():a(this).load(function(){k()}).error(function(){--b===0&&(c.API.log("slide skipped; img not loaded:",this.src),--g===0&&c.loader=="wait"&&d.apply(c.API,[f,e]))})})}),g&&c.container.addClass("cycle-loading")}var d;if(!c.loader)return;d=c.API.add,c.API.add=e})}(jQuery),function(a){function b(b,c,d){var e,f=b.API.getComponent("pager");f.each(function(){var f=a(this);if(c.pagerTemplate){var g=b.API.tmpl(c.pagerTemplate,c,d[0]);e=a(g).appendTo(f)}else e=f.children().eq(b.slideCount-1);e.on(b.pagerEvent,function(a){a.preventDefault(),b.API.page(f,a.currentTarget)})})}function c(a,b){var c=this.opts(),d=a.children().index(b),e=d,f=c.currSlide<e;if(c.currSlide==e)return;c.nextSlide=e,c.API.prepareTx(!0,f),c.API.trigger("cycle-pager-activated",[c,a,b])}"use strict",a.extend(a.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>&bull;</span>"}),a(document).on("cycle-bootstrap",function(a,c,d){d.buildPagerLink=b}),a(document).on("cycle-slide-added",function(a,b,d,e){b.pager&&(b.API.buildPagerLink(b,d,e),b.API.page=c)}),a(document).on("cycle-slide-removed",function(b,c,d,e){if(c.pager){var f=c.API.getComponent("pager");f.each(function(){var b=a(this);a(b.children()[d]).remove()})}}),a(document).on("cycle-update-view",function(b,c,d){var e;c.pager&&(e=c.API.getComponent("pager"),e.each(function(){a(this).children().removeClass(c.pagerActiveClass).eq(c.currSlide).addClass(c.pagerActiveClass)}))}),a(document).on("cycle-destroyed",function(a,b){var c;b.pager&&b.pagerTemplate&&(c=b.API.getComponent("pager"),c.empty())})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){b.API.getComponent("next").off(b.nextEvent).on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").off(b.prevEvent).on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()});if(b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(a){b.API.next()}),b.container.on(d,function(){b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b,c,d){if(b.allowWrap)return;var e=b.disabledClass,f=b.API.getComponent("next"),g=b.API.getComponent("prev"),h=b._prevBoundry||0,i=b._nextBoundry||b.slideCount-1;b.currSlide==i?f.addClass(e).prop("disabled",!0):f.removeClass(e).prop("disabled",!1),b.currSlide===h?g.addClass(e).prop("disabled",!0):g.removeClass(e).prop("disabled",!1)}),a(document).on("cycle-destroyed",function(b,c){a(c.next).off(c.nextEvent),a(c.prev).off(c.prevEvent),c.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{progressive:!1}),a(document).on("cycle-pre-initialize",function(b,c){if(!c.progressive)return;var d=c.API,e=d.next,f=d.prev,g=d.prepareTx,h,i=a.type(c.progressive);if(i=="array")h=c.progressive;else if(a.isFunction(c.progressive))h=c.progressive(c);else if(i=="string"){h=a(c.progressive).html();if(!a.trim(h))return;try{h=a.parseJSON(h)}catch(j){d.log("error parsing progressive slides",j);return}}g&&(d.prepareTx=function(a,b){var d,e;if(a||h.length===0){g.apply(c.API,[a,b]);return}b&&c.currSlide==c.slideCount-1?(e=h[0],h=h.slice(1),c.container.one("cycle-slide-added",function(a,b){b.API.advanceSlide(1)}),c.API.add(e)):!b&&c.currSlide===0?(d=h.length-1,e=h[d],h=h.slice(0,d),c.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1)}),c.API.add(e,!0)):g.apply(c.API,[a,b])}),e&&(d.next=function(){var a=this.opts();if(h.length&&a.currSlide==a.slideCount-1){var b=h[0];h=h.slice(1),a.container.one("cycle-slide-added",function(a,b){e.apply(b.API),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(b)}else e.apply(a.API)}),f&&(d.prev=function(){var a=this.opts();if(h.length&&a.currSlide===0){var b=h.length-1,c=h[b];h=h.slice(0,b),a.container.one("cycle-slide-added",function(a,b){b.currSlide=1,b.API.advanceSlide(-1),b.container.removeClass("cycle-loading")}),a.container.addClass("cycle-loading"),a.API.add(c,!0)}else f.apply(a.API)})})}(jQuery),function(a){"use strict",a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(b,c,d){var e=new RegExp(c.tmplRegex,"g");if(b&&c)return b.replace(e,function(b,e){var f,g,h=c,i=e.split(".");if(i.length>1){g=c;for(f=0;f<i.length;f++)h=g,g=g[i[f]]||e}else g=c[e];return a.isFunction(g)?g.call(h,c):g!==undefined&&g!==null?g:d&&d[e]!==undefined?d[e]:e})}})}(jQuery);
js/jquery.cycle2.tile.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: BETA-20120923 */
2
  (function(a){"use strict",a.fn.cycle.transitions.tileSlide=a.fn.cycle.transitions.tileBlind={before:function(b,c,d,e){b.API.stackSlides(c,d,e),a(c).show(),b.container.css("overflow","hidden"),b.tileDelay=b.tileDelay||b.fx=="tileSlide"?100:125,b.tileCount=b.tileCount||7,b.tileVertical=b.tileVertical!==!1,b.container.data("cycleTileInitialized")||(b.container.on("cycle-destroyed",this.onDestroy),b.container.data("cycleTileInitialized",!0))},transition:function(b,c,d,e,f){function w(a){g.eq(a).animate(s,{duration:b.speed,easing:b.easing,complete:function(){(e?o-1===a:0===a)&&b._tileAniCallback()}}),setTimeout(function(){(e?o-1!==a:0!==a)&&w(e?a+1:a-1)},b.tileDelay)}b.slides.not(c).not(d).hide();var g=a(),h=a(c),i=a(d),j,k,l,m,n,o=b.tileCount,p=b.tileVertical,q=b.container.height(),r=b.container.width();p?(k=Math.floor(r/o),m=r-k*(o-1),l=n=q):(k=m=r,l=Math.floor(q/o),n=q-l*(o-1)),b.container.find(".cycle-tiles-container").remove();var s,t={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};p?s=b.fx=="tileSlide"?{top:q}:{width:0}:s=b.fx=="tileSlide"?{left:r}:{height:0};var u=a('<div class="cycle-tiles-container"></div>');u.css({zIndex:h.css("z-index"),overflow:"visible",position:"absolute",top:0}),u.insertBefore(d);for(var v=0;v<o;v++)j=a("<div></div>").css(t).css({width:o-1===v?m:k,height:o-1===v?n:l,marginLeft:p?v*k:0,marginTop:p?0:v*l}).append(h.clone().css({position:"relative",maxWidth:"none",width:h.width(),margin:0,padding:0,marginLeft:p?-(v*k):0,marginTop:p?0:-(v*l)})),g=g.add(j);u.append(g),h.hide(),i.show().css("opacity",1),w(e?0:o-1),b._tileAniCallback=function(){i.show(),h.hide(),u.remove(),f()}},stopTransition:function(a){a.container.find("*").stop(!0,!0),a._tileAniCallback&&a._tileAniCallback()},onDestroy:function(a){var b=this.opts();b.container.find(".cycle-tiles-container").remove()}}})(jQuery);
1
+ /*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: BETA-20121011 */
2
  (function(a){"use strict",a.fn.cycle.transitions.tileSlide=a.fn.cycle.transitions.tileBlind={before:function(b,c,d,e){b.API.stackSlides(c,d,e),a(c).show(),b.container.css("overflow","hidden"),b.tileDelay=b.tileDelay||b.fx=="tileSlide"?100:125,b.tileCount=b.tileCount||7,b.tileVertical=b.tileVertical!==!1,b.container.data("cycleTileInitialized")||(b.container.on("cycle-destroyed",this.onDestroy),b.container.data("cycleTileInitialized",!0))},transition:function(b,c,d,e,f){function w(a){g.eq(a).animate(s,{duration:b.speed,easing:b.easing,complete:function(){(e?o-1===a:0===a)&&b._tileAniCallback()}}),setTimeout(function(){(e?o-1!==a:0!==a)&&w(e?a+1:a-1)},b.tileDelay)}b.slides.not(c).not(d).hide();var g=a(),h=a(c),i=a(d),j,k,l,m,n,o=b.tileCount,p=b.tileVertical,q=b.container.height(),r=b.container.width();p?(k=Math.floor(r/o),m=r-k*(o-1),l=n=q):(k=m=r,l=Math.floor(q/o),n=q-l*(o-1)),b.container.find(".cycle-tiles-container").remove();var s,t={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};p?s=b.fx=="tileSlide"?{top:q}:{width:0}:s=b.fx=="tileSlide"?{left:r}:{height:0};var u=a('<div class="cycle-tiles-container"></div>');u.css({zIndex:h.css("z-index"),overflow:"visible",position:"absolute",top:0}),u.insertBefore(d);for(var v=0;v<o;v++)j=a("<div></div>").css(t).css({width:o-1===v?m:k,height:o-1===v?n:l,marginLeft:p?v*k:0,marginTop:p?0:v*l}).append(h.clone().css({position:"relative",maxWidth:"none",width:h.width(),margin:0,padding:0,marginLeft:p?-(v*k):0,marginTop:p?0:-(v*l)})),g=g.add(j);u.append(g),h.hide(),i.show().css("opacity",1),w(e?0:o-1),b._tileAniCallback=function(){i.show(),h.hide(),u.remove(),f()}},stopTransition:function(a){a.container.find("*").stop(!0,!0),a._tileAniCallback&&a._tileAniCallback()},onDestroy:function(a){var b=this.opts();b.container.find(".cycle-tiles-container").remove()}}})(jQuery);
templates/black/slider.php CHANGED
@@ -16,7 +16,7 @@
16
  ?>
17
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
18
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
19
- <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height']);//$slide; ?>" alt="" />
20
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
21
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
22
  <div class="cycloneslider-caption">
16
  ?>
17
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
18
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
19
+ <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
20
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
21
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
22
  <div class="cycloneslider-caption">
templates/blue/slider.php CHANGED
@@ -16,7 +16,7 @@
16
  ?>
17
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
18
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
19
- <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height']);//$slide; ?>" alt="" />
20
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
21
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
22
  <div class="cycloneslider-caption">
16
  ?>
17
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
18
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
19
+ <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
20
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
21
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
22
  <div class="cycloneslider-caption">
templates/default/slider.php CHANGED
@@ -11,12 +11,10 @@
11
  data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
12
  data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
13
  >
14
- <?php foreach($slides as $i=>$slide):
15
-
16
- ?>
17
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
18
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
19
- <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height']);//$slide; ?>" alt="" />
20
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
21
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
22
  <div class="cycloneslider-caption">
11
  data-cycle-prev="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-prev"
12
  data-cycle-next="#cycloneslider-<?php echo $slider_id; ?> .cycloneslider-next"
13
  >
14
+ <?php foreach($slides as $i=>$slide): ?>
 
 
15
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
16
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
17
+ <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
18
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
19
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
20
  <div class="cycloneslider-caption">
templates/myrtle/slider.php CHANGED
@@ -14,7 +14,7 @@
14
  <?php foreach($slides as $i=>$slide): ?>
15
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
16
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
17
- <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height']);//$slide; ?>" alt="" />
18
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
19
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
20
  <div class="cycloneslider-caption">
14
  <?php foreach($slides as $i=>$slide): ?>
15
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
16
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
17
+ <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
18
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
19
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
20
  <div class="cycloneslider-caption">
templates/thumbnails/slider.php CHANGED
@@ -14,7 +14,7 @@
14
  <?php foreach($slides as $i=>$slide): ?>
15
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
16
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
17
- <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height']);//$slide; ?>" alt="" />
18
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
19
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
20
  <div class="cycloneslider-caption">
@@ -35,7 +35,7 @@
35
  <ul class="clearfix">
36
  <?php foreach($slider_metas as $i=>$slider_meta): ?>
37
  <li>
38
- <img src="<?php echo cycloneslider_thumb( $slider_meta['id'], 30, 30 ) ?>" alt="" />
39
  </li>
40
  <?php endforeach; ?>
41
  </ul>
14
  <?php foreach($slides as $i=>$slide): ?>
15
  <div <?php echo ($slider_metas[$i]['fx']!='default') ? 'data-cycle-fx="'.$slider_metas[$i]['fx'].'"' : ''; ?> <?php echo ($slider_metas[$i]['speed']!='') ? 'data-cycle-speed="'.$slider_metas[$i]['speed'].'"' : ''; ?> <?php echo ($slider_metas[$i]['timeout']!='') ? 'data-cycle-timeout="'.$slider_metas[$i]['timeout'].'"' : ''; ?> class="cycloneslider-slide">
16
  <?php if ($slider_metas[$i]['link']!='') : ?><a target="<?php echo ('_blank'==$slider_metas[$i]['link_target']) ? '_blank' : '_self'; ?>" href="<?php echo $slider_metas[$i]['link'];?>"><?php endif; ?>
17
+ <img src="<?php echo cycloneslider_thumb($slider_metas[$i]['id'], $slider_settings['width'], $slider_settings['height'], false, $slider_metas[$i]); ?>" alt="" />
18
  <?php if ($slider_metas[$i]['link']!='') : ?></a><?php endif; ?>
19
  <?php if(!empty($slider_metas[$i]['title']) or !empty($slider_metas[$i]['description'])) : ?>
20
  <div class="cycloneslider-caption">
35
  <ul class="clearfix">
36
  <?php foreach($slider_metas as $i=>$slider_meta): ?>
37
  <li>
38
+ <img src="<?php echo cycloneslider_thumb( $slider_meta['id'], 30, 30, false, $slider_meta ) ?>" alt="" />
39
  </li>
40
  <?php endforeach; ?>
41
  </ul>