jQuery(document).ready(function(){
	jQuery("ul li:first-child").addClass("first");
	jQuery("ul li:last-child").addClass("last");
	
	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('#featured-img a').lightBox();
	jQuery('a[href=#top]').click(function(){
		$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
	});	
	jQuery('a[rel="external"]').click(function(){
	    this.target = "_blank";
	});	

	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;
			}
			});
	});	
});
$('#slides').cycle({
    fx:      'scrollHorz',
    delay:   3000,
	pause: 1,
	easing: 'easeOutExpo'
});
