$(document).ready(function() { 
    
	






$('input.clear').each(function() {
	$(this)
		.data('default', $(this).val())
		.addClass('inactive')
		.focus(function() {
			$(this).removeClass('inactive');
			if ($(this).val() == $(this).data('default') || '') {
				$(this).val('');
			}
		})
		.blur(function() {
			var default_val = $(this).data('default');
			if ($(this).val() == '') {
				$(this).addClass('inactive');
				$(this).val($(this).data('default'));
			}
		});
	});



$('#signup').submit(function() { 
        $(this).ajaxSubmit();
        $('#email').val('thanks! check your inbox');
		return false; 
	});


jQuery('#posts').rssfeed('http://thehoursband.tumblr.com/rss', {
  limit: 3,
  snippet: false,
});


jQuery("#photos a").fancybox();

jQuery('#videos a').click(function() {
                 $.fancybox({
                  'padding'             : 0,
                  'autoScale'   		: false,
                  'transitionIn'        : 'none',
                  'transitionOut'       : 'none',
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 383,
				  'href'				: this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1'),
                  'type'                : 'swf', 
                  'swf'                 : {'allowfullscreen':'true'}
                  });
                 return false;

            }); 


$('.title').hide();

$('#wrapper ul li').hoverIntent(function() {
	$(this).find('.title').fadeIn('fast'),
	$(this).animate({borderTopColor:'#ffffff', borderBottomColor:'#ffffff', borderLeftColor:'#ffffff', borderRightColor:'#ffffff'}, 'normal');
							 }, function() {
	$(this).find('.title').fadeOut('slow'),
	$(this).animate({borderTopColor:'#333', borderBottomColor:'#333', borderLeftColor:'#333', borderRightColor:'#333'}, 'fast');
							 });

}); 

