<?php 

function ventoux_flexslidersc( $atts, $content = null ) {
	extract( shortcode_atts( array(
			'id'			=> '',
			'animation'			=> '',
			'direction'			=> '',
			'speed'			=> '',
			'navigation'			=> '',
			
		),
		$atts ) );

	wp_enqueue_scripts('vidall_slider');
$output = '<div class="flexslider" id="'. $id .'">';
$output .= '<ul class="slides">';
$output .= do_shortcode( $content );
$output .= '</ul>';
$output .= '</div>';
$output .= "<script>\n";
$output .= "jQuery(window).load(function() {\n";
$output .= "jQuery('#".$id."').flexslider({\n";
$output .= "animation: \"".$animation."\",\n";
$output .= "direction: \"".$direction."\",\n";
$output .= "slideshowSpeed: \"".$speed."000\",\n";
$output .= "controlNav: ".$navigation.",\n";
$output .= "prevText: \"\",\n";
$output .= "nextText: \"\",\n";
$output .= "});\n";
$output .= "});\n";
$output .= '</script>';


return $output;
}
add_shortcode('ventoux_flexsldr','ventoux_flexslidersc');

function ventoux_flexslidersc_images( $atts, $content = null ) {
	extract( shortcode_atts( array(
			
			
		),
		$atts ) );
$images = '<li>';
$images .= '<img src="'. do_shortcode( $content ) .'" />';
$images .= '</li>';


return $images;
}
add_shortcode('ventoux_flexsldr_images','ventoux_flexslidersc_images');