//jQuery set

$(function() {
	// for エラー: jQuery.dequeue is not a function
	( function( $ ) {
		$.dequeue = function( a , b ){
				return $(a).dequeue(b);
		};
	
	 })( jQuery ); 
 
	//facebox
	$('a[rel*=facebox]').facebox({
		loading_image : 'loading.gif',
		close_image   : 'closelabel.gif'
	});
	
	//page scroll
	var url = "http://" + location.hostname + location.pathname;
	$('a[href*=#]',$("#sideBar") ).click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
			 && location.hostname == this.hostname) {
			var id = this.href.substring(this.href.indexOf('#'));
			$(id).ScrollTo('slow');
			return false;
		}
	});
	
	//menu slide
	$("#sideBarContents").width(0);
	$('#sideBarTab').mouseout(function() {
		if($("#sideBarContents").width()>=300){
			$("#sideBarContents").animate({ width:0 },"slow");
		}
	});
	$('#sideBarTab').mouseover(function() {
		if($("#sideBarContents").width()==0){
			$("#sideBarContents").animate({ width:383 },"slow");
			//$(this).toggleClass('active');
		}
	});
});