jQuery(document).ready(function(){
		
	
		
	jQuery("#videoMontage a").hover(function(){
		jQuery(this).animate({
			opacity: "0"
		}, 500);
	}, function(){
		jQuery(this).animate({
			opacity: "1"
		}, 500);
	});
	
		jQuery("#testimonials a").hover(function(){
		jQuery(this).animate({
			opacity: "0"
		}, 500);
	}, function(){
		jQuery(this).animate({
			opacity: "1"
		}, 500);
	});
	
	 jQuery("#galleryLink a").hover(function(){
		jQuery(this).animate({
			opacity: "0"
		}, 500);
	}, function(){
		jQuery(this).animate({
			opacity: "1"
		}, 500);
	});
	
	jQuery("#videoMarketing a").hover(function(){
		jQuery(this).animate({
			opacity: "0"
		}, 500);
	}, function(){
		jQuery(this).animate({
			opacity: "1"
		}, 500);
	});
	


});


function showVideo(videoNumber){
	
	
	var videos = ["montage2.flv", "testimonials.flv", "videoMontage2.flv"];
	var startingScreen = "<div id=\"videoPlayer\"><img src=\"/wp-content/themes/dom/images/players/p1.jpg\" onclick=\"showVideo(1)\" /></div>";
	
	if(videoNumber < 3) {		
		
		
		var flashvars = {
			videoURL: "http://www.deptofmarketing.com/" + videos[videoNumber],
			skinURL : "http://www.deptofmarketing.com/SkinOverPlayStopSeekMuteVol.swf",
			videoHeight: 202,
			videoWidth : 329,
			xOffset : 0, 
			yOffset : 50
			};
		
		/* var params = {wmode:"transparent"}; */

			swfobject.embedSWF("/dofmPlayer.swf", "videoPlayer", "359", "303", "10.0.0.0","/expressInstall.swf", flashvars,  null);
			
		
		}
	else if(videoNumber == 3){
		
		jQuery("#playerBack").addClass('hidePlayer');
		jQuery("#slideShow").removeClass('hidePlayer');
		jQuery("#belowVideoNav").removeClass('hidePlayer');
                jQuery("#videoWrapper").html(startingScreen);
		startSlideshow();
	}
	
	else{
		jQuery("#playerBack").removeClass('hidePlayer');
		jQuery("#slideShow").addClass('hidePlayer');
		jQuery("#belowVideoNav").addClass('hidePlayer');
		
		
	}
	
	
	
	
}

function startSlideshow(){	

    jQuery('#slides').cycle({ 
    fx:     'scrollHorz', 
    speed:   300, 
    timeout: 4000,
    width: 530,
    next:   '#next',
    prev:   '#prev',
    pause:   1 
});
	
}

