/**
 * Login page javascript for UpUp.com
 *
 * @author Matt Golus
 * @author Dan Dietz
 * @copyright UpUp LLC
 * @since 3/17/2011
 */
$(function () {
    //$('#content>div').hide();

    //Register login/signup secondary nav
    $("#nav a").click(function (event) {
    	event.preventDefault();
    	
        $oLi = $(this).parent();
        
        $oLi.addClass('active')
        	.siblings()
        		.removeClass('active');

        $('#content>div').hide();
        $($(this).attr('href')).show();

        $('#heading h2').html($(this).html());
    });
    
	// Default Select Sign Up
	var sCurrentPage = window.location.pathname.replace('/','#');
	
	if(sCurrentPage){
		jQuery('#nav .menu li a[href="' + sCurrentPage + '"]').trigger('click');
	}else{
		jQuery("#nav a:eq(1)").trigger('click');
	}
});
