document.createElement("header");
document.createElement("nav");
document.createElement("section");
document.createElement("article");
document.createElement("footer");
$(function ()
{
    var a = $.browser;
    if (a.msie == !0 && a.version < 7)
    {
        return a = "<p>\u304a\u4f7f\u3044\u306e\u30d6\u30e9\u30a6\u30b6\u306f\u30b5\u30dd\u30fc\u30c8\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002<br />\u6700\u65b0\u30d6\u30e9\u30a6\u30b6\u3078\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u304a\u9858\u3044\u81f4\u3057\u307e\u3059\u3002</p>", 
        a += '<ul style="padding-bottom:40px; overflow:hidden; height:1%;"><li class="left"><a href="http://mozilla.jp/firefox/" target="_blank"><img src="/_common/img/browser_firefox_01.png" width="98" height="36" alt="Firefox" /></a></li>', 
        a += '<li class="left"><a href="http://www.google.co.jp/chrome/" target="_blank"><img src="/_common/img/browser_chrome_01.png" width="100" height="36" alt="Google Chrome" /></a></li>', 
        a += '<li class="left"><a href="http://www.apple.com/jp/safari/" target="_blank"><img src="/_common/img/browser_safari_01.png" width="90" height="36" alt="Safari" /></a></li>', 
        a += '<li class="left"><a href="http://www.microsoft.com/japan/windows/internet-explorer/" target="_blank"><img src="/_common/img/browser_ie_01.png" width="102" height="36" alt="Internet Explorer" /></a></li>', 
        a += "</ul>", $("#contents").prepend(a), $("section").css("display", "block"), $("#index").hide(), 
        $("nav, #recommend").remove(), !1;
    }
    $("nav ul ul, section").hide().css("position", "absolute");
    $(".hovtive").hovtive();
    a = location.pathname.split("/");
    a[1] == "press" ? $('nav a[href^="/#section_03"]').parent().next().children().css("display", "block") : a[1] != "privacypolicy" && a[1] != "service" && ($("nav a").address(function ()
    {
        return $(this).attr("href").replace(/^#/, "");
    }), $.address.change(function (a)
    {
        a = a.pathNames;
        switch (a.length)
        {
            case 0:
                gnavHandler("");
                $.address.title("\u30ea\u30d6\u30e9\u30d7\u30e9\u30b9\u682a\u5f0f\u4f1a\u793e");
                break;
            case 1:
                gnavHandler("#" + a[0]);
                $.address.title($("a[href='#" + a[0] + "']").text() + " | \u30ea\u30d6\u30e9\u30d7\u30e9\u30b9\u682a\u5f0f\u4f1a\u793e");
                break;
            case 2:
                gnavHandler2("#" + a[0]), lnavHandler("#" + a[1])
        }
        return!1
    }));
    isSmartphone() || $("nav a").live("mouseover mouseout", function (a)
    {
        switch (a.type)
        {
            case "mouseover":
                var a = document.createElement("div"), d = $("#container").position(), b = $(this).position();
                $(this).parent().parent().position();
                $(a).css(
                {
                    position : "fixed", top : b.top + parseInt($("nav").css("top").replace(/px/g, "")), left : 0, 
                    width : 0, height : 20, opacity : 0, backgroundColor : "#6cd9d0", zIndex :- 1
                }).attr("data-href", $(this).attr("href")).animate({
                    width : d.left, opacity : 0.8
                },
                300, "easeOutCubic");
                $("body").append(a);
                $(this).animate({
                    color : "#12b3a5"
                },
                "fast");
                break;
            case "mouseout":
                $("body > div[data-href='" + $(this).attr("href") + "']").animate({
                    opacity : 0, backgroundColor : "#ffffff", width : 0
                },
                600, "easeOutCubic", function ()
                {
                    $(this).remove()
                }), $(this).animate({
                    color : "#333333"
                },
                "fast")
        }
    });
    $(".kv", "#section_05").click(function ()
    {
        var a = document.createElement("img");
        $(a).attr("src", $(this).attr("href")).hide();
        $("body").append('<div id="overlay"></div>');
        $("html, body").css("height", "100%");
        $("#overlay").css(
        {
            height : "100%", width : "100%", backgroundColor : "#000000", position : "fixed", top : 0, 
            left : 0, zIndex : 1E3, opacity : 0.8, display : "none"
        }).fadeIn(400, function ()
        {
            $("body").append('<div id="graph" class="alignCenter"></div>');
            $("#graph").css(
            {
                height : 1, width : 100, backgroundColor : "#f5f5f5", zIndex : 1001, position : "fixed", 
                top : "50%", left : 0, display : "none"
            }).append('<p id="kvClose" class="hovtive"><a id="close" href="#"><img src="/_common/img/btn_close_01.png" width="26" height="26" alt="\u9589\u3058\u308b" /></a></p>').show().animate({
                width : "100%"
            },
            600, "easeOutCubic", function ()
            {
                $(this).animate({
                    height : 470, marginTop :- 235
                },
                500, "easeOutCubic", function ()
                {
                    $(this).append(a);
                    $(a).fadeIn()
                })
            });
            $("#close, #overlay").click(function ()
            {
                $("#overlay, #graph").fadeOut(500, function ()
                {
                    $(this).remove()
                });
                return!1
            })
        });
        return!1
    });
    $("#start a").click(function ()
    {
        $("img", this).animate({
            width : 0, height : 0, marginTop : 66, marginLeft : 66
        },
        1300, "easeInOutBack", function ()
        {
            $(this).parent().parent().remove()
        });
        jQuery.support.opacity ? $("#karadaInput").delay(400).css("display", "block").animate({
            marginTop :- 187, opacity : 1
        },
        800, "easeInOutQuint") : $("#karadaInput").delay(400).css({
            display : "none", marginTop :- 187
        }).fadeIn("normal", function ()
        {
            this.style.removeAttribute("filter")
        });
        $("#sex").attr("value") != "" && $("#karadaInput dd:first > span:nth-child(" + (parseInt($("#sex").attr("value")) + 1) + ") img").css("marginLeft", 
         - 16);
        return!1
    });
    $(".radio").click(function ()
    {
        $("img", $(this).parent()).css("marginLeft", 0);
        $("img", this).css("marginLeft", - 16);
        $("#sex").attr("value", $(this).attr("data-sex"))
    });
    $("#karadaInput form").submit(function ()
    {
        var a = $(this).serialize();
        $.ajax(
        {
            url : "/_common/php/kv.php", type : "post", cache :!1, data : a,
            success : function (a)
            {
                a = $(a).find("data");
                $("#error").remove();
                if ($(a).find("error").text())
                {
                    $("#karadaInput form").append('<p id="error" class="mb_none alignCenter">' + $(a).find("message").text().replace(/\u00a5n/g, 
                    "<br />") + "</p>");
                }
                else
                {
                    $("#karadaInput").animate({
                        marginLeft : 80
                    },
                    800, "easeInOutQuart");
                    $("#bodytype2").delay(0).show().animate({
                        marginLeft :- 418, width : 431
                    },
                    800, "easeInOutQuart");
                    var b = $("#bodytype2 p img");
                    b.height = 32;
                    b.width = 32;
                    b.stop().css(
                    {
                        top : parseInt($(a).find("y").text()), left : parseInt($(a).find("x").text()), 
                        width : b.width * 5, height : b.height * 5, marginTop : b.height * 5 / 2 *- 1, 
                        marginLeft : b.width * 5 / 2 *- 1, opacity : 0
                    }).delay(300).animate(
                    {
                        width : b.width, height : b.height, marginTop : b.height / 2 *- 1, marginLeft : b.width / 2 *- 1, 
                        opacity : 1
                    },
                    1200, "easeOutBounce");
                    a = $(a).find("sex").text() == 0 ? 1 : 2;
                    $("#bodytype2 li").hide();
                    $("#bodytype2 li:nth-child(" + a + ")").show();
					$("#karadavision").append('<a href="/karadavision/" style="position:absolute;display:block;bottom:0;line-height:50px;text-align:center;width:100%;">このツールは <img src="/_common/img/btn_karadavision_01.png" /> を利用しています</a>');
					/*$("#karadavision").append($("<a>").attr("href", "/karadavision/")).find("a").append($("<img />").attr("src", "/_common/img/btn_karadavision_01.png").css(
					{
						position:'absolute',
						left:'50%',
						bottom:0,
						marginLeft:-101
					}
					).fadeIn('slow'));*/
                }
            }
        });
        return!1
    })
});
$(window).load(function ()
{
    swfobject.embedSWF("/_common/swf/libra.swf", "recommend", "261", "181", "10.0.0", "/_common/swf/expressInstall.swf", 
    null, {
        wmode : "transparent", menu :!1
    }, null);
    isSmartphone() || $("#recommend").css("display", "block")
});
function isSmartphone()
{
    var a = navigator.userAgent;
    return a.indexOf("iPhone") ==- 1 && a.indexOf("iPad") ==- 1 && a.indexOf("iPod") ==- 1 && a.indexOf("Android") ==- 1 ?!1 :!0
}
function gnavStay(a)
{
    var a = "#section_01", c = document.createElement("div");
    $(c).attr("id", "stay");
    var d = $("#container").position(), b = $(a).position(), a = $(a).parent().parent().position();
    $(c).css(
    {
        position : "fixed", top : b.top + parseInt($("nav").css("top").replace(/px/g, "")), left : 0, 
        width : d.left + $(this).width() + 4 + a.left, height : 20, opacity : 0.9, backgroundColor : "#6BDBB9", 
        zIndex :- 1
    })
}
function gnavHandler2(a)
{
    var c = a == "" ? "#index" : a, d = c.substring(c.length - 1) - 1, b = $("nav ul").find("ul");
    $("nav > ul").attr("data-active", a);
    $(b).hide();
    $(b[d]).show().css("opacity", 1);
    $.browser.msie && $(b[d]).animate({}, 0, 0, function ()
    {
        this.style.removeAttribute("filter")
    });
    $(b[d]).find("li").css("marginLeft", 0);
    $("section").hide();
    $(c).show().css({
        opacity : 1, top : 0
    });
    $.browser.msie && $(c).animate({}, 0, 0, function ()
    {
        this.style.removeAttribute("filter")
    });
    a = $("body").height();
    $(c).css("padding-bottom", a - $("article:last-child", c).height() - parseInt($(c).parent().css("top").replace("px", 
    "")));
    return!1
}
function gnavHandler(a)
{
    var c = a == "" ? "#index" : a;
    $(c).position();
    for (var d = $(c).height(), b = c.substring(c.length - 1) - 1, h = $("nav ul").find("ul"), g = 400, 
    k = 60, i = $(h[b]).find("li"), l = i.length, f = $("#contents").find("section"), j = $("body").height(), 
    e = 0, m = f.length;
    e < m;
    e++)$(f[e]).css("display") == "block" && $(f[e]).stop(!0, !0).animate({
        top : j, opacity : 0
    },
    1E3, "easeOutQuart", function ()
    {
        $(this).css({
            display : "none"
        })
    });
    f = String($("nav > ul").attr("data-active"));
    f != "null" && (e = $("nav > ul").find("ul"), $(e[f.substring(f.length - 1) - 1]).stop(!1, !0).animate({
        top : j, opacity : 0
    },
    1E3, "easeOutQuart", function ()
    {
        $(this).css({
            display : "none", opacity : 1, top : 0
        })
    }));
    $("nav > ul").attr("data-active", a);
    $(h[b]).stop().css({
        top : 0, opacity : 1, display : "block"
    }).css("opacity", "none");
    $.browser.msie && $(h[b]).animate({}, 0, 0, function ()
    {
        this.style.removeAttribute("filter")
    });
    $(i).css({
        marginLeft :- 100, opacity : 0
    });
    for (e = 0; e < l; e++)
    {
        jQSub(i[e]).stop().delay(e * k).animate({
            opacity : 1, marginLeft : 0 
        },
        g, "easeOutQuart");
    }
    g = 500;
    jQSub(c).css({
        top : d *- 1, opacity : 0, display : "block"
    }).stop().delay(280).animate({
        top : 0, opacity : 1
    },
    g, "easeOutQuint");
    $("html, body").stop().animate({
        scrollTop : 0
    },
    g, "easeOutQuart");
    $(c).css("padding-bottom", j - $("article:last-child", c).height() - parseInt($(c).parent().css("top").replace("px", 
    "")));
    return!1
}
function lnavHandler(a)
{
    var c = $(a).position(), a = parseInt($(a).css("marginTop").replace("px", ""));
    $("html, body").stop().animate({
        scrollTop : c.top + a
    },
    600, "easeInOutQuint");
    return!1
}
var jQSub = jQuery.sub();
jQSub.fn.animate = function (a, c, d, b)
{
    a.opacity != void 0 && (b = function ()
    {
        $.browser.msie && this.style.removeAttribute("filter")
    });
    jQuery.fn.animate.call(this, a, c, d, b)
};
function removeFilter(a)
{
    $.browser.msie && $(a).get(0).style.removeAttribute("filter")
}
function nakanaka()
{
    document.write("<a href='http://nakanohito.jp/' style='overflow:hidden; height:1px; width:1px; display:block;'>");
    document.write("<img src='http://nakanohito.jp/an/?u=226769&h=1018684&w=48&guid=ON&t=&version=js&refer=" + escape(parent.document.referrer) + "&url=" + escape(parent.document.URL) + "' border='0' width='48' height='48' />");
    document.write("</a>")
};

