$(function(){
	prettyPrint();
})

$(function(){
	$('pre').hoverIntent({
		sensitivity: 3,   //滑鼠滑動的敏感度,最少要設定為1    
		interval: 400,   //滑鼠滑過後要延遲的秒數    
		over: widthAuto,  //滑鼠滑過要執行的函式   
		timeout: 700,    //滑鼠滑出前要延遲的秒數    
		out: widthFixed  //滑鼠滑出要執行的函式
	})
})

function widthAuto(){
	//var oDiv = document.getElementById('box');
	//var $oDiv = $('#box');
	var auto = this.scrollWidth;
	if(this.scrollWidth > this.offsetWidth){
		if(!$(this).is(':animated')){
			$(this).animate({width:auto},500);
		}
	}
}

function widthFixed(){
	if(!$(this).is(':animated')){
		$(this).animate({width:600},500);
	}
}