
/*	ログイン
----------------------------------------------------*/

$(function(){
    $('dd','#login_link,#user_link').hide();
    $('dt','#login_link,#user_link').click(function(){
        var next = $(this).next();
        if(next.is(':visible')){
            next.slideUp("fast");
        }else{
            next.slideDown("fast");

        }
    });
	
});


$(function(){
	$("#whole").append("<div class='glayLayer'></div>");
		if($.browser.msie && $.browser.version<7){
			$(".glayLayer").get(0).style.setExpression("top","$(document).scrollTop()+'px'");
			$("#header_right").append("<div class='glayLayer'></div>");
			$(".glayLayer").click(function(){
			$(".glayLayer").hide();
			$('dd','#login_link,#user_link').hide();
	});

	}
	

$(".glayLayer").click(function(){
		$(this).hide();
		$('dd','#login_link,#user_link').hide();
	});

	$('dt','#login_link,#user_link').click(function(){
		$(".glayLayer").show();
		return false;
	});
});



/*	グロナビとアーカイブとメインカラムの高さ揃える
----------------------------------------------------*/

//$(function(){
  //  $('#sub_inner,#main').flatHeights();
//});

$(function(){
  $main_height = $('#main').height();
  $sub_inner_height = $('#sub_inner').height();
	$('#sub_archive_inner').height($sub_inner_height+1);
	/*$('#quiz #sub_inner').height($main_height+24);
	$('#quiz #sub_archive_inner').height($sub_inner_height+25);*/
	$('#movie_post #sub_inner').height($main_height-595);
	$('#movie_post #sub_archive_inner').height($sub_inner_height-596);
});

/*
$(document).ready(function() {
    $("#main,#sub_inner,#sub_archive_inner").equalbox();
});*/


/* ブラウザサイズを取得してdiv.scroll-paneに入れる */

$(function(){
    $body_height = $(window).height();
	$('.scroll-pane,').height($body_height-125);
});

/* ブラウザがリサイズされた場合の処理 */

$(window).resize(function(){
    $body_height = $(window).height();
	$('.scroll-pane').height($body_height-125);
});


$(function(){
    $body_height = $(window).height();
	$('.scroll-pane1').height($body_height-125);
});

/* ブラウザがリサイズされた場合の処理 */

$(window).resize(function(){
    $body_height = $(window).height();
	$('.scroll-pane1').height($body_height-125);
});



/*	スクロールバー
----------------------------------------------------*/

$(function()
{
	var pane = $('.scroll-pane');
	pane.jScrollPane(
		{
		hijackInternalLinks: true,
		showArrows: true,
		autoReinitialise: true
		}
	);	
/*
	var move_pane = $('.scroll-pane1');
	move_pane.jScrollPane(
		{
		hijackInternalLinks: true,
		showArrows: true,
		autoReinitialise: true
}
	);
	var api = move_pane.data('jsp');
	$('#moveTest').bind(
		'click',
		function()
		{
			//alert(api);
			// Note, there is also scrollByX and scrollByY methods if you only
			// want to scroll in one dimension
			//api.scrollBy(parseInt($('#byX').val()), parseInt($('#byY').val()));
			api.scrollBy(0,900);
			return false;
		}
	);

	$('a[href*=#]').bind(
		'click',
		function() {
	    var $target=$(this.hash);
	    var targetY=$target.offset().top;
		api.scrollTo(0,targetY);
		return false;	
  
	  }
	);
*/  



}
);


