jQuery(document).ready(function(){
	RELMAN.relmanslider({
		fireWhen: 'now',
		widthOnUl: 'yes',
		rotateSpeed: 4000
	});


	if(document.getElementById("player")){
		// install flowplayer into flowplayer container 
	    var player = $f("player", "/images/flowplayer-3.1.5.swf"); 
	     
	    // setup button action. it will fire our overlay  
	    jQuery("a.overlayvideo").overlay({ 
         
	        // use the Apple effect for overlay 
	        effect: 'apple', 
         
	        // when overlay is opened, load our player 
	        onLoad: function() { 
	            player.load(); 
	        }, 
	         
	        // when overlay is closed, unload our player 
	        onClose: function() { 
	            player.unload(); 
	        } 
	    }); 
	}
	flowplayer("a.relmanPlayer", "/images/flowplayer-3.1.5.swf");

	jQuery("a.relmanCaptionsPlayer").each(function(){
		var $this = jQuery(this);
		var therel = $this.attr("rel");
		jQuery(this).flowplayer("/images/flowplayer-3.1.5.swf", {
			clip: {
				captionUrl: therel
			},
	    	plugins:  { 
	 	
	 	       captions: { 
	 	           url: '/images/flowplayer.captions-3.1.5-dev.swf',
	 	           captionTarget: 'content' 
	 	       },
	 	       content: { 
	 	           	url:'flowplayer.content-3.1.0.swf',
	 	           	bottom: 25, 
	 	           	width: '80%', 
	 	           	height:40, 
	 	           	backgroundColor: 'transparent', 
	 	           	backgroundGradient: 'none', 
	 	           	borderRadius: 4, 
				   	border: 0, 
					display: 'none',
					style: { 
		                'body': { 
			                fontSize: '14', 
			                fontFamily: 'Arial', 
			                textAlign: 'center', 
			                color: '#000000' 
		                } 
		            }
				} 
			} 
		});
	});
});
