/*
if(document.URL == "http://27.34.132.167/?page_id=17") page=1;
else if(document.URL == "http://27.34.132.167/?page_id=2") page=2;
else if(document.URL == "http://27.34.132.167/?page_id=36") page=3;
else if(document.URL == "http://27.34.132.167/?page_id=35") page=4;
else if(document.URL == "http://27.34.132.167/?page_id=7") page=5;
else {
 if(getUrlVars()["menu"] == "1") page=1;
 else if(getUrlVars()["menu"] == "2") page=2;
 else if(getUrlVars()["menu"] == "3") page=3;
 else if(getUrlVars()["menu"] == "4") page=4;
 else if(getUrlVars()["menu"] == "5") page=5;
 else page=1;
}
*/



if(document.URL == "http://27.34.132.167/?page_id=17") page=1;
else if(document.URL == "http://27.34.132.167/?page_id=2") page=2;
else if(document.URL == "http://27.34.132.167/?page_id=36") page=3;
else if(document.URL == "http://27.34.132.167/?page_id=35") page=4;
else if(document.URL == "http://27.34.132.167/?page_id=7") page=5;
else {
 if(getUrlVars()["menu"] == "1") page=1;
 else if(getUrlVars()["menu"] == "2") page=2;
 else if(getUrlVars()["menu"] == "3") page=3;
 else if(getUrlVars()["menu"] == "4") page=4;
 else if(getUrlVars()["menu"] == "5") page=5;
 else page=99;
}

page--;


$(function(){
$(".accordion li > a").each(function() {
$(this).next().hide();

$(this).click(function() {
var params = {height:"toggle", opacity:"toggle"};
//$(this).next().animate(params).parent().siblings().children("ul:visible").animate(params);
//return $(this).next().length?false:true;
});
});
$(".accordion > li:eq(" + page + ") > a").next().show();
});


function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i <hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}


//　検索キーワード　効果
$(function(){
    $("#q").focus(function() {
        if($(this).val() == $(this).attr('defaultValue'))
            $(this).val('');
    }).blur(function() {
        if(jQuery.trim($(this).val()) == "") {
            $(this).val($(this).attr('defaultValue'));
        }
    });
});


//　拡大縮小ボタン
$(function(){
$("body").css("font-size",$.cookie('fsize'));
});
function font(size){
$("body").css("font-size",size);
$.cookie("fsize",size,{expires:30,path:'/'});//※1
}
