$(document).ready(function() {
	$('.toggle').hide();

	$('a.toggle-btn').click(function() {
			var id = $(this).attr('id');
	    $('#toggle-box-' + id).toggle(200);
	    $('#hide-' + id).hide();
	    return false;
	  });

	$('a.toggle-cancel').click(function() {
			var id = $(this).attr('id');
	    $('#toggle-box-' + id).hide();
	    $('#hide-' + id).show(200);
	    return false;
		});
		
	$("ul#main-nav li a").mouseover(function() {
		
		$(this).parent().find("div.subnav").fadeIn(200);

		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("div.subnav").hide();
		});

		//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"
	});	
	
	$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade',
		random: '1',
		timeout: '5000',
		speed: '700'
	});
		
});
});
