var $j = jQuery.noConflict();

$j(function(){

    $j("#sidebar li a").hover(function(){
    	$j(this).stop().animate({
    		paddingLeft: "20px&"
    	}, 400);
    }, function() {
    	$j(this).stop().animate({
    		paddingLeft: 0
    	}, 400);
    });
	
	$j(".prev-arrow").click(function(){
		//alert("test");
		$j(".member-list").append($j(".member-list").children().first());
	});
	
	$j(".next-arrow").click(function(){
		//alert("test");
		$j(".member-list").prepend($j(".member-list").children().last());
	});
	
	$j("#product_information").append('<p><a href="javascript:history.go(-1);">&laquo; Return to the Store</a></p>');
	
	$j("a[href='http://www.theoryofchange.org/store/']").attr("href", "javascript:alert('Coming Soon!')");
	//$j("a[href='http://www.theoryofchange.org/forum/']").attr("href", "javascript:alert('Coming Soon!')");
	$j("a[href='http://www.theoryofchange.org/store/']").attr("href", "javascript:alert('Coming Soon!')");
	//$j("a[href='http://www.theoryofchange.org/toco-software/support-and-training/']").attr("href", "javascript:alert('Coming Soon!')");
	
	$j(".nav ul li .sub-menu ul li").each
	(
		function()
		{
			$j(this).mouseenter
			(
				function()
				{
					$j(".sub-menu", this).css("display", "block");	
				}
			);
			$j(this).mouseleave
			(
				function()
				{
					$j(".sub-menu", this).css("display", "none");	
				}
			);
		}
	)

});
