$(function() {
	
	$('#tabs').tabs();

	/****** Banner Image Cycle with Selectable Menu ******/
	
	$('#cycle_videos').cycle({
        fx:     'scrollHorz',
        speed:  'slow',
        timeout: 8000,
        pager:  '#video_menu',
        easing:  'easeinout', //for the srollHorz effect
        next:   '#next', 
    	prev:   '#prev',
		cleartype: true, 
		cleartypeNoBg: false,
		pagerAnchorBuilder: function(idx, slide) {
            return '#video_menu li:eq(' + (idx) + ') a';
        }
    });
    
    /***** Fade in the Shuffle buttons on mouseover *****/
    
    $('#video_hover').hover(
    	function(){
    		$('#vid_left').show();
    		$('#vid_right').show();
    	},
    	function(){
    		$('#vid_left').fadeOut('fast');
    		$('#vid_right').fadeOut('fast');
    	}
    );
    
    /** Video Dialog box and JWPlayer videos **/
	
	var video_array = new Array();
	
	video_array['michael'] = new Array();
	video_array['michael']['flv'] 	= 'flashmedia/kaplan_demos/CFA/Testimonials/Michael.flv';
	video_array['michael']['image']	= '/images/cfa/video_michael_lrg.jpg';
	video_array['michael']['title']	= 'Michael Smith';
	video_array['michael']['vid_width'] = 480;
	video_array['michael']['vid_height'] = 384;
	video_array['michael']['pop_width'] = 510;
	video_array['michael']['pop_height'] = 450;
 	
	video_array['adam'] = new Array();
	video_array['adam']['flv'] 		= 'flashmedia/kaplan_demos/CFA/Testimonials/Adam.flv';
	video_array['adam']['image']	= '/images/cfa/video_adam_lrg.jpg';
	video_array['adam']['title']	= 'Adam Kindreich';
	video_array['adam']['vid_width'] = 480;
	video_array['adam']['vid_height'] = 384;
	video_array['adam']['pop_width'] = 510;
	video_array['adam']['pop_height'] = 450;
	
	video_array['montine'] = new Array();
	video_array['montine']['flv'] 	= 'flashmedia/kaplan_demos/CFA/Testimonials/Montine.flv';
	video_array['montine']['image']	= '/images/cfa/video_montine_lrg.jpg';
	video_array['montine']['title']	= 'Montine Jordan';
	video_array['montine']['vid_width'] = 480;
	video_array['montine']['vid_height'] = 384;
	video_array['montine']['pop_width'] = 510;
	video_array['montine']['pop_height'] = 450;
	
	video_array['kevin'] = new Array();
	video_array['kevin']['flv'] 	= 'flashmedia/kaplan_demos/CFA/Testimonials/Kevin.flv';
	video_array['kevin']['image']	= '/images/cfa/video_kevin_lrg.jpg';
	video_array['kevin']['title']	= 'Kevin Zvargvlis';
	video_array['kevin']['vid_width'] = 480;
	video_array['kevin']['vid_height'] = 384;
	video_array['kevin']['pop_width'] = 510;
	video_array['kevin']['pop_height'] = 450;
		
	$(this).show_multiple_video_popup(
		"testimonial",
		video_array,
		"homepageflash1", 
		"video_dialog", 
		"rtmp://cp72569.edgefcs.net/ondemand/", "rtmp", 
		"video_container"
	);
	
	return false;

});
