// <!-- HOVER MENU -->
$(function(){

    $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");


});


<!-- FANCY BOX -->
jQuery(document).ready(function() {
$("a#single").fancybox({
		'titlePosition'  : 'over',
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000'
});

$("a[rel=reports_group_01]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000'
	});

$("a[rel=reports_group_02]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000'
	});

$("a[rel=reports_group_03]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000'
	});

$("a[rel=reports_group_04]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000'
	});
$("#skyguard-video").fancybox({
	    'padding'           : 10,
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'height'            : 389,
		'width'	            : 640,
		'overlayOpacity'	: '0.6',
		'overlayColor'		: '#000',
		'onComplete'		: videoStarted,
		'onClosed'			: videoClosed
	});

});

// <!-- Video Support Functions -->

// Send Google Analytics event when video is started.
var videoStartTime = null;
function videoStarted(){
	videoStartTime = new Date();
	_gaq.push(['_trackEvent', 'Videos', 'Video Started', 'FleetVideo', 1]);
}

// Send Google Analytics event when video is either closed or aborted.
function videoClosed() {
	var videoEndTime = new Date();
	// The video is just over 90 seconds long, but it start to wrap up at about
	// 80 seconds.  So if the user has lasted 80 seconds, consider the video 'watched'.
	if (videoEndTime - videoStartTime >= 80 * 1000) {
		_gaq.push(['_trackEvent', 'Videos', 'Video Completed No Contact', 'FleetVideo', 1]);
	} else {
		_gaq.push(['_trackEvent', 'Videos', 'Video Aborted', 'FleetVideo', 1]);
	}		
}
