(function($) {
	$(document).ready(function() {
		$('div.block a.switch').click(function(e) {
			e.preventDefault();
			$(this).toggleClass('off').parent().next().children().eq(0).animate({height: "toggle", opacity: "toggle"}, "slow");
		}).hover(
			function() { $(this).stop().fadeTo("fast", 1); }, 
		    function() { $(this).stop().fadeTo("fast", 0.8); }
		).fadeTo(0, 0.8);
		
		$(".social a img").hover(
		      function () { $(this).stop().fadeTo("fast", 1); }, 
		      function () { $(this).stop().fadeTo("fast", 0.6); }
		).fadeTo(0, 0.6);
		    
					
		$(".post a:has(img), .shop-item a:has(img)").attr('rel', 'images');							

		$(".post a:has(img), .shop-item a:has(img), a.t_image").fancybox({
			'overlayColor'	: '#000',
			'titlePosition'	: 'over',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'fade'
		});							
					
		$(".up a").click(function(e) {
			e.preventDefault();
			$.scrollTo(0, 600);		
		});
	
		$(':input[title]').each(function() {
			var $this = $(this);
			if ($this.val() === '') {
				$this.val($this.attr('title')).addClass('hint');
			}
			$this.focus(function() {
				if ($this.val() === $this.attr('title')) {
					$this.val('').removeClass('hint');
				}
			});
			$this.blur(function() {
				if($this.val() === '') {
					$this.val($this.attr('title')).addClass('hint');
				}
			});
		});
	});
})(jQuery);
