/* Javascript functions for Produce Pages */

var restaurantSlide;
var recipeSlide;

// Have the rest of the Restaurants show/hide
function toggleRestaurants() {
	if ($('restaurantButton').get('html') == 'Show') {
		restaurantSlide.slideIn();
		$('restaurantButton').set('html', 'Hide');
	} else {
		restaurantSlide.slideOut();
		$('restaurantButton').set('html', 'Show');
	}
}

// Have the rest of the Recipes show/hide
function toggleRecipes() {
	if ($('recipeButton').get('html') == 'Show') {
		recipeSlide.slideIn();
		$('recipeButton').set('html', 'Hide');
	} else {
		recipeSlide.slideOut();
		$('recipeButton').set('html', 'Show');
	}
}

// Script to run when the DOM is loaded and ready
window.addEvent('domready', function() {
	// Restaurant Slider
	restaurantSlide = new Fx.Slide('restaurantSlide', {mode: 'vertical'});
	restaurantSlide.hide();

	// Recipe Slider
	recipeSlide = new Fx.Slide('recipeSlide', {mode: 'vertical'});
	recipeSlide.hide();
});