$(document).ready(function(){

	// Lazy Load
	$("img").lazyload({ 
		placeholder : "http://them-thangs.com/wp-content/themes/themthangs/Images/loader.gif"
	});

	$(function(){
		$('#newsHolder').jScrollPane({scrollbarWidth: 8});
	});

	var getTitleWidth = $('#postHeader h1').width() +20;
	var getNavWidth = $('#postHeader #pagination').width() +20;

	//Hide Sidebar
	$('#sidebar .show').hide(); 
	$('#sidebar .hide, #sidebar .close').click(function(){
 		$('#sidebar').animate({right: "-180"}, 500);
		$('#sidebar .show').fadeIn();
		$('#sidebar .hide').hide();

 		$('#postHeader h1').animate({left: -getTitleWidth}, 1000);
 		$('#postHeader #pagination').animate({left: -getNavWidth}, 500);
		return false;
	});

	//Show Sidebar
	$('#sidebar .show').click(function(){
 		$('#sidebar').animate({right: "+0"}, 500);
		$('#sidebar .hide').fadeIn();
		$('#sidebar .show').hide();

 		$('#postHeader h1').animate({left: +0}, 500);
 		$('#postHeader #pagination').animate({left: +0}, 800);
		return false;
	});

});