﻿//more links.
jQuery(
    function($)
    {        
        jQuery(document).ready(        
            function()
            {                         
                //constants.                   	          	          
                var moreShowLimit = 4;                                                                                                
                
                //click.	            
	            $(".viewmore").click(
	                function()
	                {
	                    var showing = 0;
	                    var hideMore = true;
	                
	                    $(this).parent().find("ul li").each(
	                        function()
	                        {	                            
                                var listItem = $(this);                                
	                            
                                if (!listItem.is(":visible"))
                                {
                                    if (showing < moreShowLimit)
	                                {
	                                    listItem.slideDown("slow");
	                                    showing++;
	                                }	                            	                            
	                                else	                                
	                                {
                                        hideMore = false;                          
                                        return false;
                                    }
                                }                                
	                        }	                        
                        );
                        
                        if (hideMore)
                            $(this).hide();
                        
	                    return false;
	                }
                );                                 
            }
        );            
    }
);
