/*
 * Barry Winbolt
 * http://www.barrywinbolt.com/
 */

jQuery( document ).ready( function( $ ) {
	$( '#secondary-nav > li' ).hover(function() {
		$( '#secondary-nav > li' ).removeClass( 'hover' );
		$( this ).addClass( 'hover' );
	}, function() {
		$( this ).removeClass('hover');
	});

	$( ':input.defaultValue' ).each(function() {
		var $this = $( this ), v = $.trim( $this.val() );
		$this
			.click( function() {
				if ( $.trim( $this.val() ) == v )
					$this.val( '' );
			})
			.blur( function() {
				if ( !$.trim( $this.val() ).length )
					$this.val( v );
			});
	});

	$( 'a[href^="http:"]' ).not( '[href*="' + window.location.host.toLowerCase() + '"]' ).click(function() {
		window.open( $(this).attr( 'href' ) );
		return false;
	});

	if ( jQuery().fancybox )
		$( '#newsletter' ).fancybox({ 'type': 'iframe', 'width': 700 });
});
