jQuery.noConflict();
jQuery(document).ready(function($){
	
	$('a[rel="external"]').click(function(event) {
		event.preventDefault()
		window.open( $(this).attr('href') );
	});
	
	$('#nav li').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
	
	$("#nav").superfish({
		hoverClass:	 'hover', 
		delay:		  0,
		speed:		  'fast',
		animation:	  {opacity:'show',height:'show'},
		autoArrows:	 false,
		dropShadows: false
	});
	
	$(".jump").change(function() {
		var val = $(this).val();
		if (val != '') location.href = val;
	});
	
	$("#latest_tweet").tweet({
		username: "billMcCollum",
		join_text: "auto",
		avatar_size: 32,
		count: 1,
		auto_join_text_default: "Bill said,<br/>",
		auto_join_text_ed: "we",
		auto_join_text_ing: "we were",
		auto_join_text_reply: "we replied to",
		auto_join_text_url: "we were checking out",
		loading_text: "loading tweets &hellip;"
	});
	
	$('#banner').cycle({
		fx: 'fade',
		timeout: 5000
	});
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast',
		theme: 'dark_square',
		showTitle: false
	});
	
	var subscribeEmail = $('#subscribe_email').val();
	var subscribeZip = $('#subscribe_zip').val();
	$('#subscribe_email, #subscribe_zip').focus(function() {
		$(this).val('').removeClass('watermarked');
	}).blur(function() {
		var wm = ( $(this).attr('id') == 'subscribe_email' ) ? subscribeEmail : subscribeZip ;
		if ( $(this).val() == subscribeEmail || $(this).val() == subscribeZip || $(this).val() == '' ) $(this).val(wm).addClass('watermarked');
	});
	
});