/***************************************/
/* Behaviour for MBFR Coppermine Theme */
/***************************************/

/*******************************/
/* Wait until page has loaded! */
/*******************************/
$(document).ready(function() {


/**************/
/* Admin Menu */
/**************/
$('.dropdown_admin')
	.mouseenter(function() {
		$(this).addClass('active');
		$('ul', this).slideDown(100);
	})
	.mouseleave(function() {
		$('ul', this).slideUp(100);
		$(this).removeClass('active');
	});

/******************/
/* Dropdown Menus */
/******************/
$('.dropdown_menu')
	.mouseenter(function() {
		$('ul', this).slideDown(100);
	})
	.mouseleave(function() {
		$('ul', this).slideUp(100);
	});

/*************************/
/* Flowplayer for Videos */
/*************************/
$("#flowplayer").flowplayer("/swf/flowplayer-3.1.5.swf", {
	clip: {
		autoPlay: true,
		autoBuffering: true
	},
	canvas: {
		backgroundColor: "#ffffff"
	},
	plugins: {
		controls: {
			backgroundColor: '#999999',
			backgroundGradient: [0.6,0.3,0,0,0],
			borderRadius: '0px',
			bufferColor: '#660000',
			bufferGradient: 'none',
			buttonColor: '#666666',
			buttonOverColor: '#cc0000',
			durationColor: '#dcdcdc',
			height: 24,
			opacity: 1.0,
			progressColor: '#cc0000',
			progressGradient: 'medium',
			sliderColor: '#666666',
			sliderGradient: 'none',
			timeBgColor: '#999999',
			timeColor: '#ffffff',
			tooltipColor: '#999999',
			tooltipTextColor: '#ffffff',
			volumeSliderColor: '#666666',
			volumeSliderGradient: 'none'
		}
	}
});


/***********************************/
/* Form Element Focus Highlighting */
/***********************************/

$("input[type='text'], input[type='password'], textarea, select").focus(
	function() {
		$(this).addClass("focused");
	}).blur(
	function() {
		$(this).removeClass("focused");
	}
);

$("form").submit(
	function() {
		$("input[type='text'], input[type='password'], textarea, select").each(
			function() {
				$(this).removeClass("focused");
			}
		);
	}
);


/*********************/
/* End of page ready */
/*********************/
});



