<?php
								$slide_sh = get_post_meta($post->ID, 'lioit_slideshow_imgs', true);
								?>
								<?php if ($slide_sh == true) { ?>
								
								
								<script type="text/javascript">
								jQuery(document).ready(function($) {
						
										//inner slideshow
									$('.postSlideshow').cycle({
									timeout:0,
									speed: 'normal',
									pager:  '.slidePager',
									next:'.slide_next',
									prev:'.slide_prev',
									before: resize_slideshow
									});
						
						function resize_slideshow(curr, next, opts, fwd){
								//get the height of the current slide
								var $ht = $(this).height();
								//set the container's height to that of the current slide
								$(this).parent().animate({
								height : $ht
										 });
						}
						$('.postSlideshow').click(function() {
							$('.postSlideshow').cycle('next');
						});
						
								});
							</script>
								<div class="postSlideshow">
										<?php
										global $wpdb, $post;
										
										$meta = get_post_meta($post->ID, 'lioit_slideshow_imgs', false);
										if (!is_array($meta)) $meta = (array) $meta;
										if (!empty($meta)) {
										$meta = implode(',', $meta);
										$images = $wpdb->get_col("
										SELECT ID FROM $wpdb->posts
										WHERE post_type = 'attachment'
										AND ID in ($meta)
										ORDER BY menu_order ASC
										");
										foreach ($images as $att) {
										// get image's source based on size, can be 'thumbnail', 'medium', 'large', 'full' or registed post thumbnails sizes
										$src = wp_get_attachment_image_src($att, 'full');
										$src = $src[0];
										?>
								<img src="<?php echo $src; ?>" alt=""  >
									<?php  }
										} ?>
										
								</div> <!--End Slideshow-->
                                <div class="slideshowControl">
                                <a class="slide_next"><i class="icon-angle-right"></i></a>
                                <a class="slide_prev"><i class="icon-angle-left"></i></a>
                                <div class="slidePager"></div>
                                </div> <!--Slideshow control-->
								<?php } ?>