﻿jQuery(document).ready(function($){

	$('#sidebar_img').toggle(function(){
		$(this).html("<a href=\"javascript:void(0);\">顯示側邊欄</a>");
		$(this).addClass("show-sidebar");
		$(this).removeClass("close-sidebar");
		$('#sidebar').hide();
		$('#content').animate({width: "880px"}, 1000);
		},function(){
		$(this).html("<a href=\"javascript:void(0);\">關閉側邊欄</a>");
		$(this).addClass("close-sidebar");
		$(this).removeClass("show-sidebar");
		$('#sidebar').delay(1000).fadeIn(1000);
		$('#content').animate({width: "640px"}, 800);
	});

//	$(window).scroll(function() { 
//	var scrollTop = $(window).scrollTop();
//		if (scrollTop > 415) {
//			if ($.browser.msie6) {
//				$('#out').css({top:scrollTop}).stop().animate('400');
//			} else {
//				$('#out').css({position:'fixed',top:'0px'}).stop().animate('400');
//			}
//		} else {
//			$('#out').css({top:'415px'}).stop().animate('400');
//		}
//	});

});

