";
$i = 0;
if ($options['bu_slider_posts_number'] == '')
$no = '5';
else $no = $options['bu_slider_posts_number'];
while (have_posts() && $i<$no) :
the_post();
$permalink = get_permalink();
$text = get_post_meta($post->ID, 'slider_text' , true);
$image = get_post_meta($post->ID, 'slider_post_image' , true);
$title = get_the_title();
if ($image != ''){
$out .= "
$title
$text
";
}
else {
$out .= "
$title
$text
";
}
$i++;
endwhile;
$out .= "";
endif;
$wp_query = $tmp_query;
$csEffect = 'random';
$csSpw = get_option('cs-spw') ? get_option('cs-spw') : 7;
$csSph = get_option('cs-sph') ? get_option('cs-sph') : 5;
if ($options['bu_slider_delay'] == '')
$csDelay = '3500';
else $csDelay = $options['bu_slider_delay'];
if ($options['bu_slider_navigation'] == '1')
$csNavigation = 'false';
else $csNavigation = 'true';
?>
var $ = jQuery.noConflict();
$("#coin-slider").coinslider({
width : 640,
height : 330,
spw : $csSpw,
sph : $csSph,
delay : $csDelay,
navigation : $csNavigation,
effect : '$csEffect'
});
OUT;
echo $out;