<?php header("content-type: application/x-javascript"); ?> 

<?php
define('WP_DEBUG', false);
@ini_set('log_errors','On'); 
@ini_set('display_errors','Off'); 
require_once( '../../../../wp-load.php' );
?>

<?php
    //Get portfolio slider settings
    $pp_portfolio_slider_timer = get_option('pp_portfolio_slider_timer');
    if(empty($pp_portfolio_slider_timer))
    {
    	$pp_portfolio_slider_timer = 5;
    }
    
    $pp_portfolio_slider_autoplay = get_option('pp_portfolio_slider_autoplay');
?>
jQuery(document).ready(function(){
    jQuery('#portfolio_slider').flexslider({
    	animation: "<?php echo $pp_portfolio_slider_animation; ?>",
    	<?php
    	if(empty($pp_portfolio_slider_autoplay))
    	{
    	?>
    	slideshow: false,
    	<?php
    	}
    	?>
    	slideshowSpeed: <?php echo $pp_portfolio_slider_timer*1000; ?>
    });
});