$(function() { 			
var numElements_single = $('.post').size();
	
	var wrapperWidth_single = numElements_single * 830;
	
	var wrapperWidth_image = numElements_single * 570;

	var wrapperWidth = wrapperWidth_single;
	
	var wrapperImage = wrapperWidth_image;
	
	$( '.blog #wrapper, .category #wrapper, .single #wrapper' ).css( {width: wrapperWidth} );
	
	$( '.tag-board-of-the-week #wrapper' ).css( {width: wrapperImage} );

});

$(function() {
	$("#wrapper").css("overflow-y","visible");
});

$(function() {
 $('#boardnav').hover(
  function () {
   $(this).stop().animate({'marginLeft':'-80px'},800);
  },
  function () {
   $(this).stop().animate({'marginLeft':'-770px'},800);
  }
 );
});

$(function() {
 $('#details').hover(
  function () {
   $(this).stop().animate({'marginLeft':'-10px'},800);
  },
  function () {
   $(this).stop().animate({'marginLeft':'-810px'},800);
  }
 );
});

// Image Fade Rollovers

$(document).ready(function() {
	$('.fadeThis').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(600, 1);
	  }, function () {
	    $span.stop().fadeTo(400, 0);
	  });
	});
});

// Fancy Box

$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("#fancybox").fancybox({
				'width'				: 780,
				'height'			: 445,
			    'padding'           : 1,
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.6
	});
	
	$("#fancymap").fancybox({
				'width'				: 935,
				'height'			: 625,
			    'padding'           : 1,
		        'autoScale'     	: false,
		        'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.6
	});
});

// Tool Tips

$(function() {
		$('img').tipsy({delayIn: 600, fade: true, gravity: 'n'});
	});