$(document).ready(function() { 

//blog
$('#blog .wrap .entries').rssfeed('http://deadsara.tumblr.com/rss', {
  limit: 3,
  snippet: true,
});


 
$('.carousel').jcarousel({
	wrap: 'both',
	scroll: 2
});
   






	
$('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!');
		return false; 
	});


$("#photos a").fancybox({
		'speedIn'		:	0, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
});

//videos

$.getJSON("http://pipes.yahoo.com/pipes/pipe.run?_id=78e170a7518e9d15aa8a7680b077d1e9&_render=json&_callback=?", function(obj) {
 $.each(obj.value.items, function() {
 $('<div class="vid"></div>')
 .append('<a class="vidtitle" href="' + this["media:group"]["media:player"].url + '&autoplay=1"><span class="vidthumb" style="background-image: url(img/play.png), url(' + this["media:group"]["media:thumbnail"][0].url + ');"></span>' + this["media:group"]["media:title"].content + '</a>')
  .appendTo('#videos');
  
   $('#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("watch\\?v=", "i"), 'v/'),
                  'type'                : 'swf', 
                  'swf'                 : {'allowfullscreen':'true'}
                  });
                 return false;

            }); 
  
  
});
});



}); //end


















