function showVideo(id) {
	document.write("<object width=\"198\" height=\"200\"><param name=\"movie\" value=\"http://www.youtube.com/v/"+id+">&amp;hl=en&amp;fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/"+id+"&amp;hl=en&amp;fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"197\" height=\"200\"></embed></object>");
}

$(document).ready(function() {
	
	var height = $(document).height();
	var document_height = $('#wrapper').outerHeight();
	
	$('#wrapper_bg_1, #background, #midground, #foreground').css({height: height, width: '100%'});
	
//	 background animation
//	$('#foreground').animate({backgroundPosition:"(-10000px 2000px)"}, 240000, 'linear');
//			
//	$('#midground').animate({backgroundPosition:"(-10000px -2000px)"}, 360000, 'linear');
//	
//	$('#background').animate({backgroundPosition:"(10000px 0px)"}, 600000, 'linear');

	
	//first page post listing Fix
	$('.buffer .post:nth-child(2n)').css("padding", "0 20px 20px 10px");
	
	//navigation Fix
	$('#navi ol li:last a').css("background", "none")
	
	//Last post from index Categories - Fix
	$('.last_posts_from_cat ul').each(function() {
    	  $(this).children('li:last').addClass('last');
	});
	
	
	//Post Date
	$('.date').hover(
	  function () {
	    $(this).animate({left:0});
	  }, 
	  function () {
	  	var element = $(this) 
	  	setTimeout(function () { element.animate({left:47}) }, 300);
	  }
	);
	
	jQuery('#sidebar ul li a').each( function() {
		
		var element = $(this);
		
		element.parent().wrapInner('<span/>');
		
		element.parent().parent().prepend(element);
		element.wrapInner('<h6/>');
		element.append(element.next());
		
		var text = element.find('span').text();
		
		if ( jQuery.trim(text).length == 0)
		{
			$(this).find('span').remove();
		}
	});
	
});
