jQuery(document).ready(function(){
	jQuery("ul li:first-child").addClass("first");
	jQuery("ul li:last-child").addClass("last");
	jQuery('.entry-content ul li, #secondary ul li, .entry-content ol li, #secondary ol li').wrapInner('<span class="li"></span>');	
	var config = {   
	sensitivity: 3, 
	interval: 20,  
	over: doOpen, 
	timeout: 100, 
	out: doClose  
	};
	
	function doOpen() {
	jQuery(this).addClass("hover");
	jQuery('ul:first',this).stop(true, true).slideDown('fast');
	}
	function doClose() {
	jQuery(this).removeClass("hover");
	jQuery('ul:first',this).stop(true, true).slideUp('fast');
	}	
	jQuery("#access ul li").hoverIntent(config);	
	jQuery('a[href=#top]').click(function(){
		$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
	});	
	
	jQuery('a[rel="external"]').click(function(){
	    this.target = "_blank";
	});	
    jQuery('.widget_ns_mailchimp input[name="ns_widget_mailchimp_email"]').val('Email*');
	jQuery('input[type="text"], textarea').each(function() {
			var default_value = this.value;	
			jQuery(this).focus(function() {
			if(this.value == default_value) {
			this.value = '';
			}
			});
			jQuery(this).blur(function() {
			if(this.value == '') {
			this.value = default_value;
			}
			});
	});	
});
