function s_open() {
	$('#slidedown').slideDown(500, function() {
    $('#showflash').html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="984" height="477" id="../../flash/slidedown" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="../../../flash/slidedown.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffb12c" />	<embed src="../../../flash/slidedown.swf" quality="high" bgcolor="#ffb12c" width="984" height="477" name="../../flash/slidedown" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>');
    $('#showflash object').show();  
  });
}

function s_close() {
  $('#showflash object').remove();
  $('#slidedown').slideUp();
}

$(document).ready(function(){

	$("ul.dropdown").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

	$(".topnav li a").hover(function() { //When trigger is clicked...

		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.dropdown").slideDown(100).show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul.dropdown").slideUp('fast'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() {
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});


	$("#aboutVid").fancybox({
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'titleShow'			: false
	});
	
	$("#kits").fancybox({
		'frameWidth'		: 1024,
		'frameHeight'		: 786,
		'titleShow'			: false
	});
	
	$("#fancybox").fancybox({
		'frameWidth'		: 1024,
		'frameHeight'		: 786,
		'titleShow'			: false
	});
	
	$(".fancybox").fancybox({
		'titleShow'			: false
	});

	$("#accordion").accordion({
		active: false,
		collapsible: true
	});
		
	$('#dropdown_biztown').toggle(function() {
		$('#biztown_links').show("slow");
		$('#inclass_links').hide("slow");
		},
		function() {
		$('#biztown_links').hide("slow");
	});
	
	$('#dropdown_inclass').toggle(function() {
		$('#inclass_links').show("slow");
		$('#biztown_links').hide("slow");
		},
		function() {
		$('#inclass_links').hide("slow");
	});
	
	$("div.slide-area").carousel({
    	autoSlide: true, 
	    autoSlideInterval: 5000,
        pagination: true,
		nextBtn: true,
		prevBtn: true
   	});
   	
   	$("#biztownvid").fancybox({
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'width'				: 665,
		'height'			: 410,
		'titleShow'			: false
	});
	
	$("a[rel=help]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
		}
	});

});

