///***

$(document).ready(function(){

///***



	$f("a.bannerVid", {

		src: "swf/flowplayer-3.1.3.swf",

		cachebusting: true

		}, {

		clip: { 

			baseUrl: 'http://brooksgibbs.com/flv/',

			autoPlay: true,

			autoBuffering: false,

			scaling: 'original'

		},

		canvas: { 

			backgroundGradient: "none", 

			backgroundColor: "#000000" 

		},

		plugins: {

			// Control Bar parameters

			controls: {

				// setup a background image 

				background: 'url(images/player_control_bg.jpg) repeat-x', 

				backgroundGradient: 'none',

				// all: false, 

				// scrubber: true, 

				// play: true, 

				// timer: true,

				// mute: true, 

				bufferColor: '#333333', 

				progressColor: '#888888',             

				buttonColor: '#888888', 

				buttonOverColor: '#666666', 

				timeColor: '#333333',

				// Set height 

				height: 30, 

				// Set auto hide 

				autoHide: 'always', 

				// A few other settings              

				width: '100%',  

				bottom: 5, 

				left: '50%'

			}

		},

	});



	// Initiate cycle and set parameters

	$('div.scrollable').cycle({ 

		fx:     'scrollHorz', 

		speed:  'slow', 

		timeout: 0, 

		next:   'div#nextBannerButton a', 

		prev:   'div#prevBannerButton a',

		pager: '#navi',

		pagerAnchorBuilder: pagerFactory

	});

	// Create the pager on the banner slider

	function pagerFactory(idx, slide) {

		var s = idx > 2 ? ' style="display:none"' : '';

		return '<a href="#"></a>';

	};

	// Unload and Unexpose the video when moving the slider while playing

	$('div#nextBannerButton a, div#prevBannerButton a, #navi a').click(function(){

		$f().unload();

		$.unexpose();

	});	

	

	// Create overlay on hover for other portfolio items

	$('div.fpOtherWorkColumn').hoverIntent(function(){		

		$(this).children('div.fpThumbOverlay').fadeIn(500);

	},function(){

		$(this).children('div.fpThumbOverlay').fadeOut(500);

	});

	

///***	

});

///***