
// written by: b-man -> Batman?

$(document).ready(function(){
	
	/****** Banner Image Cycle with Selectable Menu ******/
	
	$('#cycle_images').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 12000,
        pager:  '#banner_menu',
		cleartype: true, 
		cleartypeNoBg: false,
		pagerAnchorBuilder: function(idx, slide) {
            return '#banner_menu li:eq(' + (idx) + ') a';
        }
    });
	
	/****** 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 *******/
	/* Requires the /js/custom_jquery/video_display.js to be included on page */
	var video_array = new Array();
	
	video_array['cfa'] = new Array();
	video_array['cfa']['flv'] 	= 'flashmedia/kaplan_demos/CFA/CFA_Institute_Presentation.flv';
	video_array['cfa']['image']	= '/images/cfa/video_why_pursue.jpg';
	video_array['cfa']['title']	= 'About the CFA<sup class="reg">&reg;</sup> Program';
	video_array['cfa']['vid_width'] = 600;
	video_array['cfa']['vid_height'] = 306;
	video_array['cfa']['pop_width'] = 630;
	video_array['cfa']['pop_height'] = 371;
	
	video_array['caia'] = new Array();
	video_array['caia']['flv'] 	= 'flashmedia/kaplan_demos/CAIA/CAIA_Video.flv';
	video_array['caia']['image']	= '/images/caia/video_why_pursue.jpg';
	video_array['caia']['title']	= 'Why Pursue the CAIA Designation?';
	video_array['caia']['vid_width'] = 600;
	video_array['caia']['vid_height'] = 363;
	video_array['caia']['pop_width'] = 630;
	video_array['caia']['pop_height'] = 430;

	$(this).show_multiple_video_popup(
		"showVideo",
		video_array,
		"homepageflash1", 
		"video_dialog", 
		"rtmp://cp72569.edgefcs.net/ondemand/", "rtmp", 
		"home_video"
	);
	
	
	/****** JQuery Tab function ******/	
	
   	$('#tabs').tabs();
});

