//Script load

//Site load

$(window).load(function() {
$('#site-load').fadeOut("slow");
});

// Header rize

$(function() {
x=document.body.clientHeight;
y=x - 50;
document.getElementById("head-container").style.height=y+'px';
});
$(window).resize(function() {
x=document.body.clientHeight;
y=x - 50;
document.getElementById("head-container").style.height=y+'px';
});

//Menu rize

$(function() {
x=document.body.clientWidth;
y=x - 40;
z=Math.floor(y/6);
$('.category ul').width(y+'px');
$('.category li').width(z+'px');
});
$(window).resize(function() {
x=document.body.clientWidth;
y=x - 40;
z=Math.floor(y/6);
$('.category ul').width(y+'px');
$('.category li').width(z+'px');
});

//Font rize

function AutoFsize(){
var wpx = $("#menu .category").width();
var wpar = (Math.floor((wpx)/(1024/100)));// 横幅px ÷ (最少幅px/100)
$("#menu .category").css("font-size",wpar+"%");
}
setInterval(AutoFsize,1000);//ミリ秒ごとに横幅チェック

//easing

$(function(){
$("a[href*='#']").easingScroll({
easing: "easeInOutExpo",
duration: 800
});
});

//Scroll follow

$(document).ready(function() {
$('#easing').scrollFollow({
container:'liquid',
speed:500,
offset:0,
topAdjust:-216,
topOverrun:0,
bottomAdjust:100,
bottomOverrun:0
});
});

//Entry click

$(function(){
$(".entry").click(function(){
window.location=$(this).find("a").attr("href");
return false;
});
});

//Menu animation

$(function(){
$('.nav').flashyNav({
rolloverDuration: 200,	//the default duration for the rollover
easingMethod: 'easeInOutQuint'	//easing method used for animation
});
});

//Radiko Popup

$(function() {
	$(".r-popup").click(function(){
		window.open(this.href, "WindowName","width=600,height=500,resizable=yes,scrollbars=yes");
		return false;
	});
});

//Search

$(function(){
$("#site-search").click(function(){
if(this.value == "サイト内検索"){
$(this).val("").css("color","#232323");
}
});
$("#site-search").append(function(){
if(this.value == ""){
$(this).val("サイト内検索").css("color","#969696");
}
});
});



