$(function() {		
	$("a[rel]").overlay({
		closeOnClick: true, 
		finish:  { 
        	top: 30
   		}, 
		onBeforeLoad: function() {
			this.getBackgroundImage().expose({color: '#444'});
			this.getContent().find("a.fplayer").flowplayer(0).load();
		},
		onLoad: function() { 
            		
        }, 
		onClose: function() {
			$.expose.close();
			$f().unload();
			//document.getElementById('hidvideo').value="Rotation";
			//below function was called when we had rotating videos.
			//once video is closed to start rotating items again.
			//startCycleFeatured(); 
								
		}
		
		
	});  
	flowplayer("a.fplayer","/flowplayer/flowplayer.commercial-3.1.0.swf", { 
   				key: '#@b43dbbf2e0c9dbe5a6c', 
				clip: { 
        			scaling: 'fit'   
    			}, 
				canvas: { 
    				background: '#000000', 
     				backgroundGradient: 'none'
				}
			
	});
	
});

 
 //function callVideo(){	
	//document.getElementById('hidvideo').value="NoRotation";	
//}
//function callVideo2(){	
	//document.getElementById('hidvideo').value="NoRotation";	
//}

