

$(document).ready(function() {




    $("#uploadChoice div").click(function() {

        //var index = $('#uploadChoice div').index(this);
        var index = $(this).prevAll().length;
        if (index == 0) { $('#items .img').slideUp("slow", function() { $('#items .txt').slideDown("slow"); }); }
        if (index == 1) {
            $('#items .img').slideUp("slow", function() {
                $('#items .txt').slideUp("slow", function() {
                    $('#items .img').slideDown("slow");
                });
            });
        }
        if (index == 2) {
            $('#items .img').slideUp("slow", function() {
                $('#items .txt').slideDown("slow", function() {
                    $('#items .img').slideDown("slow");
                });
            });

        }

    }
		);



    $('#registerPanel h1').click(function() {
        openRegisterPanel();


    });
    


    function openRegisterPanel() {

        $('#registerPanel .main').slideDown("slow");
        $('#loginPanel .topleft').slideUp("slow");

        $('#registerPanel h1').css('text-decoration', 'none');
        $('#registerPanel h1').css('cursor', 'auto');

        $('#loginPanel h1').css('text-decoration', 'underline');
        $('#loginPanel h1').css('cursor', 'pointer');

    }

    $('#loginPanel h1').click(function() {

        $('#registerPanel .main').slideUp("slow");
        $('#loginPanel .topleft').slideDown("slow");

        $('#loginPanel h1').css('text-decoration', 'none');
        $('#loginPanel h1').css('cursor', 'auto');

        $('#registerPanel h1').css('text-decoration', 'underline');
        $('#registerPanel h1').css('cursor', 'pointer');
    });









});



