/* 
 * @author Diego Novo
 * @copyright Studio Vatore
 */

$(function() {
	// hide all the sub-menus
	$("div.toggle").next().hide();

	// add a link nudging animation effect to each link
    $("#store a, #store div.toggle").hover(function() {
        $(this).stop().animate( {
			//color:"black"
        }, 300);
    }, function() {
        $(this).stop().animate( {
			//color:"#808080"
        }, 300);
    });

	// add a click function that toggles the sub-menu when the corresponding
	// span element is clicked
	$("div.toggle").click(function() {
		$(this).next().toggle(1000);

		// switch the plus to a minus sign or vice-versa
		var v = $(this).html().substring( 0, 1 );
		if ( v == "+" )
			$(this).html( "-" + $(this).html().substring( 1 ) );
		else if ( v == "-" )
			$(this).html( "+" + $(this).html().substring( 1 ) );
	});
});
