// JavaScript Document


function wrapper_resize(){
		var wrapperh = $(document).height() + 250 + "px";
		$("#wrapper").css({	height: wrapperh } );	
		
}
	
	
function home_arrange() {
		
		
	//HOME PAGE ITEMS in home.php
		//BLOG BOX
		var left = $("#tweet_box").width() + 100 + "px";
        var top = $("#tweet_box").height() + 300 + "px";
		
		$("#recent_blogging_box").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
		
		//VIMEO BOX
		var position = $("#recent_blogging_box").offset();
		var left = 700 + "px";
        var top = position.top - $("#vimeo_box").height() -75 + "px";
		
		$("#vimeo_box").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
	}

function index_arrange() {
		
	//POST ITEMS in index.php
		//INDEX PAGE - MOVING post_2 to 6 (post_1 is static)
		
		var left = 475 + "px";
        var top = 150 + $("#post_1").height() + "px";
		
		$("#post_2").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
		
		var left = 700 + "px";
        var top = 150 + $("#post_1").height() - $("#post_3").height() + "px";
		
		$("#post_3").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
		
		var left = 175 + "px";
        var top = 150 + $("#post_1").height() + 75 + "px";
		
		$("#post_4").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );

		var position = $("#post_3").offset();
		var left = 775 + "px";
        var top = position.top - 24 + $("#post_3").height() + 75 + "px";
		
		$("#post_5").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );

		var position = $("#post_4").offset();
		var left = 400 + "px";
        var top = position.top - 24 + $("#post_4").height() + "px";
		
		$("#post_6").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );


		var position = $("#post_6").offset();
		var left = 625 + "px";
        var top = position.top - 24 + $("#post_3").height() + "px";
		
		$("#post_7").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );	

		var position = $("#post_6").offset();
		var left = 175 + "px";
        var top = position.top - 24 + $("#post_3").height() + "px";
		
		$("#post_8").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );		

		//next and previous posts box
		var position = $("#post_7").offset();
		var left = 775 + "px";
        var top = position.top + $("#post_7").height() + "px";
		
		$("#navigation_group").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );

	}


function single_arrange()
{
		//COMMENTS BOX
		var left = 625 + "px";
        var top = $("#single_blog_post_box").height() + 198 + 75 + "px";
		
		$("#comments_box").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
		
		//IMAGE 1 BOX
		var left = 100 + "px";
        var top = $("#menu_box").height() + 150 + "px";
		
		$("#blog_post_image_1").css({ 	position: 'absolute',
						   		left: left,
                				top: top } );
}

