This JavaScript Function Works Alone, But Not With Other JavaScript Functions
===

I have this javascript :

    <script type="text/javascript">
    $(document).ready(function($) {
            $('#target-share ul li').click(function() {
                $('input#shareto').val($(this).data('val'));
            });
        });
    </script>

and it really works as I expected. but when I add this another javascript to do drop-down animation, that javascript not working anymore :

    <script type="text/javascript">
    $(document).ready(function() {
    	$("#select-shareto a").click(function () {
    		var newClass = $(this).find("span").attr('class');
    		var newText = $(this).find("span").text();
    		$("#select-shareto a").removeClass("selected");
    		$(this).addClass("selected");
          	$("a#to-chosen span").removeClass().addClass(newClass).text(newText);
    		$("a#to-chosen").toggleClass("opened");
    		$('#select-shareto').slideToggle('fast');
    	  	return false;
        });
    	
    	$('a#to-chosen').click(function() {
    		$(this).toggleClass("opened");
    		$('#select-shareto').slideToggle('fast', function() {
    			// Animation complete.
    		});
    	});
    });
    </script>

those javascript actually affected on this HTML code :

    <div id="target-share">
    <a href="#" title="" id="to-chosen" class="default"><span class="to-admin">Admin</span></a>
    <ul id="select-shareto">
    <li data-val="0-1">
    <a href="#" title="" class="selected"><span class="to-Finance">Finance</span></a>
    </li>
    <li data-val="1-1">
    <a href="#" title=""><span class="to-admin-private">Admin Private</span></a>
    </li>
    <li data-val="1-0">
    <a href="#" title=""><span class="to-ceo">CEO</span></a>
    </li>
    <li data-val="0-0">
    <a href="#" title=""><span class="to-ceo-private">CEO Private</span></a>
    </li>                                    
    </ul>
    <input id="shareto" type="text" value="0-1" name="shareto">
    </div><!-- #target-share -->

any idea how to make those 2 javascript works side-by-side? thanks.