$(window).ready(function() {

		var dragOpts = {
	 		cursor: 'move',
			handle: '.tab',
			stack: {group: '.box1, .box2, .box3', min: 1}, 
			zIndex: 5000 	};
			$('.box1, .box2, .box3').draggable(dragOpts);	
    });

		$('.gallery1').cycle({ 
		    fx:     'scrollRight', 
		    speed:  '500', 
		    timeout: 0, 
		    next:   '.gallery-next1', 
		    prev:   '.gallery-prev1' 
		});

		// script inside the domReady method is executed after page is scriptable
		flashembed.domReady(function() {
		
			// a- tags with class "myPlayer" are transformed into video players 
			flowplayer("a.myPlayer", "/swf/flowplayer.commercial-3.1.3.swf", {
			
				key: '$809eab103f807fe293b', 
			
				// use a minimalistic controlbar 
			    plugins:  { 
			        controls:  { 

						backgroundColor: '#000000', 
			            backgroundGradient: 'none',												
			            all:false, 
			            scrubber:true,					
			            // custom colors 
			            bufferColor: '#333333', 
			            progressColor: '#FFFFFF',             
			            buttonColor: '#FFFFFF', 
			            buttonOverColor: '#CDCDCD'					

			        } 
			    },

				canvas: {
					backgroundColor:'#ffffff',
					backgroundGradient: 'high',					
		            bufferColor: '#cdcdcd', 
		            sliderColor: '#000000', 
		            tooltipTextColor: '#000000'
				},

				screen: {
					height: 370,
					bottom:0		
				}
			});	
				
			$(".box1").animate( { left:"250px" }, { queue:false, duration:1000 } )
			$(".box2").animate( { left:"400px", top:"-300px" }, { queue:false, duration:1000 } )
			$(".box3").animate( { left:"-150px", top: "-550px" }, { queue:false, duration:1000 } )					
				
});