var _ua = (function(d) { var c = { 0: (d.indexOf('windows') != -1 && d.indexOf('phone') != -1) || d.indexOf('iphone') != -1 || d.indexOf('ipod') != -1 || (d.indexOf('android') != -1 && d.indexOf('mobile') != -1) || (d.indexOf('firefox') != -1 && d.indexOf('mobile') != -1) || d.indexOf('blackberry') != -1, iPhone: (d.indexOf('iphone') != -1), Android: (d.indexOf('android') != -1 && d.indexOf('mobile') != -1) }; var b = (d.indexOf('windows') != -1 && d.indexOf('touch') != -1) || d.indexOf('ipad') != -1 || (d.indexOf('android') != -1 && d.indexOf('mobile') == -1) || (d.indexOf('firefox') != -1 && d.indexOf('tablet') != -1) || d.indexOf('kindle') != -1 || d.indexOf('silk') != -1 || d.indexOf('playbook') != -1; var a = !c[0] && !b; return { Mobile: c, Tablet: b, PC: a } })(window.navigator.userAgent.toLowerCase()); function addBrowserClass() { var c = function(e, d) { if (document.documentElement.className) { document.documentElement.className += ' ' } document.documentElement.className += e + (d !== '' ? ' ' + e + (d * 1).toString().replace('.', '_') : '') }; var b = window.navigator.userAgent.toLowerCase(); var a = window.navigator.appVersion.toLowerCase(); if (get = b.match(/msie (\d+(\.\d+)?)/i)) { c('ie', get[1]) } else { if (get = b.match(/Trident.+rv\:(\d+(\.\d+)?)/i)) { c('ie', get[1]) } else { if (get = b.match(/chrome\/(\d+(\.\d+)?)/i)) { c('chrome', get[1]) } else { if (get = b.match(/firefox\/(\d+(\.\d+)?)/i)) { c('firefox', get[1]) } else { if (get = b.match(/opera\/(\d+(\.\d+)?)/i)) { c('opera', get[1]) } else { if (get = b.match(/safari\/(\d+(\.\d+)?)/i)) { c('safari', get[1]) } } } } } } if (get = b.match(/iPhone OS (\d+(\.\d+)?)/i)) { c('ios', get[1]) } if (get = b.match(/iPhone;/i)) { c('iphone', '') } else { if (get = b.match(/iPod;/i)) { c('ipod', '') } else { if (get = b.match(/iPad;/i)) { c('ipad', '') } else { if (get = b.match(/Android (\d+(\.\d+)?)/i)) { c('android', get[1]) } } } } } addBrowserClass(); // list_style float clear $(function() { //firefox蛻、螳� if (ua.isFirefox) { $('html').addClass('ua-firefox'); } if ($(".list_style").get([0])) { $(".list_style li:nth-child(odd)").css({ "clear": "both" }); $(".list_style li:nth-child(1),.list_style li:nth-child(2)").addClass("top_border"); } //讀懃エ「繝懊ャ繧ッ繧ケ $('#searchBtn').on('click', function() { $('#searchBox').addClass('show'); }); $('#searchClose').on('click', function() { $('#searchBox').removeClass('show'); }); }); // buy box $(function() { $(".btn_on_demand").on("click", function() { var showbox = $(this).parent().parent().next().next(); if (showbox.is(':visible')) { $(".inner_box").fadeOut(200); } else { $(".inner_box").fadeOut(200); showbox.fadeIn(200); } return false; }) $(document).click(function() { $(".inner_box").fadeOut(200); }); $(".inner_box").click(function() { event.stopPropagation(); }); }) // to top $(function() { $(".btn_top img").on("click", function() { $("html,body").animate({ scrollTop: 0 }, 500); }) }) //header x-scroll $(window).on("load scroll", function() { $(".header_wrap").css("left", -$(window).scrollLeft()); }); // rollover.js function initRollOverImages() { var image_cache = new Object(); $("img.Hover").each(function(i) { var imgsrc = this.src; var dot = this.src.lastIndexOf('.'); var imgsrc_on = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4); image_cache[this.src] = new Image(); image_cache[this.src].src = imgsrc_on; $(this).hover( function() { this.src = imgsrc_on; }, function() { this.src = imgsrc; }); }); } $(function() { initRollOverImages }); //open profile $(function() { var profile = $(".my_profile"); $(".open_profile").on("click", function() { if (profile.is(":visible")) { profile.fadeOut(200, function() { $(".open_profile").fadeTo(300, "1"); $(".open_profile img").addClass("over"); }); } else { profile.fadeIn(); $(this).css({ "opacity": ".7" }); $("img", this).removeClass("over"); } return false; }) $(document).click(function() { profile.fadeOut(200, function() { $(".open_profile").css({ "opacity": "1" }); $(".open_profile img").addClass("over"); }); }); profile.click(function() { event.stopPropagation(); }); }) if ($(".slider_box .slide").length) { $(".slider_box .slide").each(function() { $(this).parents(".box").css({ "height": "430px" }); }) } //open special index $(function() { var op_sp = $(".special_contents"); $(".open_special").on("mouseover", function() { if (op_sp.is(":visible")) { op_sp.fadeOut(200, function() { $(".open_special").fadeTo(300, "1"); }); } else { op_sp.fadeIn(); $(this).css({ "opacity": ".7" }); } }) op_sp.on("mouseleave", function() { op_sp.fadeOut(200, function() { $(".open_special").css({ "opacity": "1" }); }); }) $(".open_special").on("click", function() { return false; }) $(document).on("click", function() { op_sp.fadeOut(200, function() { $(".open_special").css({ "opacity": "1" }); }); }); op_sp.on("click", function(event) { event.stopPropagation(); }); }) //scroller.js $(function(jQuery) { jQuery.fn.scRoller = function() { return this.each(function() { $(this).click(function() { $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top - 90 }); return false; }); }); }; }); $(function() { $('.information').hover(function() { $(this).find('.menu__information').fadeIn(); $(this).find('.menu__information').css('visibility', 'visible'); }, function() { $(this).find('.menu__information').fadeOut(); }); });