$(function(){




    $('a[href*=#]').click(function() {
    
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
        
            var $target = $(this.hash);
            
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            
            if ($target.length) {
            
                var targetOffset = $target.offset().top;
                
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                    
                return false;
                
            }
            
        }
        
    });
    
	
	
});

// Function dropped in to add separator in wp_list_pages within WTC nav.

$(document).ready(function(){
	$("ul#wtc-flatbreadsnav li:not(:last-child)").append("&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;");
	$("ul#wtc-primarynav li:not(:last-child)").append("&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;");
	$("ul#wtc-bwrapsnav li:not(:last-child)").append("&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;");
});
