function openVideo() {
    // the gallery will be continuous
    var theoptions = {
        counterType:    "skip"
    };

    // The objects created here need to be similar to those returned by
    // Shadowbox.buildObject.

    // create a video object
    var fvideo = {
        player:     "swf",
        title:      "Meet Our Pastor",
        content:    "video.swf",
        height:     510,
        width:      640,
        options:    theoptions
    };

    Shadowbox.open([fvideo]);
}

$(document).ready(function(){ 
		
	$('.header span a').click(function(e) {
		$(this).toggleClass("selected");
		e.preventDefault();
		$('#index-main').slideToggle('fast', function() { });
	});
	
	if($('#video-link').length > 0){
		Shadowbox.init();
		
		$('#video-link').click(function(e) {
			e.preventDefault();
			openVideo();
			
		});
	}
}); 
