(function ($j) {
	$j.fn.showhideFAQ = function() { return this.each(function(i){		
		$j(this).css('cursor', 'pointer');
		$j(this).click(function() {
			$j('.faq-answer', this).slideToggle();
			return false;
		});
	})};
})(jQuery);
(function ($j) {
	$j.fn.revealIMG = function() { return this.each(function(i){		
		$j(this).css('cursor', 'pointer');
		$j(this).hover(function() {
			/*///// ONMOUSEOVER /////*/
			$j('.bottom', this).animate({opacity: 'toggle'}, {duration: (.5*1000), easing: 'easeOutQuad'});
			$j('.top', this).animate({opacity: 'toggle'}, {duration: (.5*1000), easing: 'easeOutQuad'});
		}, function () { 
			/*///// ONMOUSEOUT /////*/
			$j('.bottom', this).animate({opacity: 'toggle'}, {duration: (.5*1000), easing: 'easeOutQuad'});
			$j('.top', this).animate({opacity: 'toggle'}, {duration: (.5*1000), easing: 'easeOutQuad'});
		});
	})};
})(jQuery);

(function() {
$(document).ready(function() {
	$j('#slides').cycle({fx: 'fade', easing: 'easeInOutQuad', speed: 1000, timeout:  6000, width: '960', height: '171'});
	
	/*///////////////////// MAIN FUNCTIONS /////////////////////*/
	function centerObject(obj){
		var pageW = $j(window).width();
		var pageH = $j(window).height();
		var objW = $j(obj).outerWidth();
		var objH = $j(obj).outerHeight();
		$j(obj).css({left: (pageW - objW)/2, top: ((pageH - objH)/2)});
	}
	function fadeObject(obj, speed){
		$j(obj).animate({opacity: 'toggle'}, {duration: (speed*1000), easing: 'easeOutQuad'});
	}
	
	function showRecipes(obj){
		//centerObject(obj);
		fadeObject(obj, '.5');
	}
	
	$j('.recipe-link').click(function () {
		showRecipes('#recipe-links');
		return false;
	});
	
	$j('#recipe-links #close').hover(function () { 
		$j(this).css('cursor', 'pointer');
	});
	$j('#recipe-links #close').click(function () {
		showRecipes('#recipe-links');
		return false;
	});
	
	$j('a', this).css('cursor', 'pointer');
	
	/*///////////////////// HOVER FUNCTIONS /////////////////////*/	
	/*////////// CYCLE THROUGH BOXES //////////*/
	/*$j('.navtop').each(function() {
		$j('.sub', this).hide();
		$j(this).hover(function () { 
			$j('a', this).css('cursor', 'pointer');
			$j('.sub', this).animate({opacity: 'toggle'}, {duration: (.5*1000), easing: 'easeOutQuad'});
		}, function () {
			$j('.sub', this).hide();
		});
	});*/
});

})();
