// READYイベン? $(function() { $('body').ready(function() { visSlidePicBtn(); }); }); // 応募するまでスクロールする function scrollNaviList() { if(document.getElementById('job_navi_list') != null){ var offset = $('#job_navi_list').offset(); window.scroll(0, offset.top); } } // 先輩ボイスまでスクロールする function scrollVoiceList() { if(document.getElementById('job_voice_list') != null){ var offset = $('#job_voice_list').offset(); window.scroll(0, offset.top); } } // 特典までスクロールする function scrollPrivilege() { if(document.getElementById('privilege') != null){ var offset = $('#privilege').offset(); window.scroll(0, offset.top); } } // チェ?リストに追? $(function() { $('.checklistadd').click(function() { if ($('#ipop').is(':hidden')) { addCheckList($(this)); ipopOpen(); } else { ipopClose(); } }); }); $(function() { $('#ipop_close').click(function() { ipopClose(); }); }); // ポップオープン function ipopOpen() { $('#ipop').fadeIn('200'); } // ポップクローズ function ipopClose() { $('#ipop').fadeOut('200') } function slideDownForApple(ex, ms) { var ch = $(ex).height(); $(ex).css({ overflow: 'hidden', height: "0px", '-webkit-transition': 'none', display: "block"}); setTimeout(function() { $(ex).css({ height: ch + 'px', '-webkit-transition': 'height ' + ms + 'ms ease-out'}); },0); $(ex).one('webkitTransitionEnd', function(){ $(this).css({ height: "auto", '-webkit-transition': 'none'}); }); } function slideUpForApple(ex, ms) { var ch = $(ex).height(); $(ex).css({ overflow: 'hidden', height: ch + 'px', '-webkit-transition': 'none', display: "block"}); setTimeout(function() { $(ex).css({ height: "0px", '-webkit-transition': 'height ' + ms + 'ms ease-out'}); },0); $(ex).one('webkitTransitionEnd', function(){ $(this).css({ display: "none", height: "auto", '-webkit-transition': 'none'}); }); } // スライドメニュー function slideMenu(el) { var cld = $(el).parent().next(); var hh = $(cld).innerHeight(); if ($(cld).is(':hidden')) { if (isApple()) { $(cld).slideDown('1500'); } else { $(cld).slideDown('1500'); } $(el).toggleClass("shop").toggleClass("shop2"); } else { if (isApple()) { $(cld).slideUp('1500'); } else { $(cld).slideUp('1500'); } $(el).toggleClass("shop").toggleClass("shop2"); } return false; } // スライドピクチャ var clickcnt = 0; var img_x = 0; var cmt_x = 0; function slidePic(el) { if ($(el).attr('id') == 'prev') { if (clickcnt > 0) { if (isApple()) { img_x += 195; cmt_x += 300; $('#imagelist').css({ '-webkit-transform': 'translateX(' + img_x + 'px)', '-webkit-transition': '-webkit-transform 400ms ease-out' }); $('#commentlist').css({ '-webkit-transform': 'translateX(' + cmt_x + 'px)', '-webkit-transition': '-webkit-transform 400ms ease-out' }); } else { $('#imagelist').animate( {left: '+=195'}, 'slow'); $('#commentlist').animate( {left: '+=300'}, 'slow'); } clickcnt -= 1; } } else if ($(el).attr('id') == 'next') { if (clickcnt < $('#imagelist img').length - 1) { if (isApple()) { img_x -= 195; cmt_x -= 300; $('#imagelist').css({ '-webkit-transform': 'translateX(' + img_x + 'px)', '-webkit-transition': '-webkit-transform 400ms ease-out' }); $('#commentlist').css({ '-webkit-transform': 'translateX(' + cmt_x + 'px)', '-webkit-transition': '-webkit-transform 400ms ease-out' }); } else { $('#imagelist').animate( {left: '-=195'}, 'slow'); $('#commentlist').animate( {left: '-=300'}, 'slow'); } clickcnt += 1; } } visSlidePicBtn(); } function visSlidePicBtn() { if (clickcnt <= 0) { $('.imagearea #prev').css({visibility: 'hidden'}); } else { $('.imagearea #prev').css({visibility: 'visible'}); } if (clickcnt >= $('#imagelist img').length - 1) { $('.imagearea #next').css({visibility: 'hidden'}); } else { $('.imagearea #next').css({visibility: 'visible'}); } } $(function() { // iPadの場合?み実? var agent = navigator.userAgent; if(agent.search(/iPad/) != -1) { // videoタグを非表示に変更し、リサイズを行う //$(".video_file_tag").css("display","none"); //$(".video_file_tag").width(280); //$(".video_file_tag").height(186); // 動画の再生時に再生位置を?頭に変更 $("video").each(function(){ var start_video = document.getElementById($(this).attr("id")); start_video.addEventListener("canplay", function(){ start_video.currentTime = start_video.startTime; }); }); }else{ // iPad以外?場合、表示にし、サイズ?1にする $(".video_file_tag").css("display",""); $(".video_file_tag").width(1); $(".video_file_tag").height(1); } // 再生用画像押下時?求人???? $('.videofile').click( function(){ var startTarget = $(this).attr("class"); show_video_tag(startTarget); } ); // 再生用ボタン押下時?求人???? $('.btn_videofile').click( function(){ var startTarget = $(this).attr("class"); startTarget = startTarget.replace("btn_videofile", "videofile"); show_video_tag(startTarget); } ); // 再生用画像押下時?求人?ービ??? $('.movie img[class^=btn_videofile_], .movie img[class^=videofile_], .movie a[class^=btn_videofile_]').click( function(){ var startTarget = $(this).attr("class"); startTarget = startTarget.replace("btn_videofile_", "videofile_"); show_video_tag(startTarget); } ); // videoタグを表示、?生用画像を非表示 function show_video_tag(startTarget) { if(startTarget != "") { if(agent.search(/iPad/) != -1) { $("#" + startTarget).attr("controls","true"); $("#" + startTarget).css("display",""); $("#" + startTarget).css("position","static"); $("." + startTarget).css("display","none"); } } } }); // 動画の一時停止 function videoStop() { // iPadの場合?み実? var agent = navigator.userAgent; if(agent.search(/iPad/) != -1) { // 動画の再生を一時停止 $("video").each(function(){ var stopTarget = $(this).attr("id"); var stop_video = document.getElementById(stopTarget); stop_video.pause(); // 動画のインターフェースを非表示 $(this).removeAttr("controls"); // 再生用画像を表示 if($("#img_" + stopTarget).css("display") == "none") { $("." + stopTarget).css("display",""); $("#img_" + stopTarget).css("position","absolute"); if(stopTarget == "videofile") { // 求人??画面 $("#img_" + stopTarget).css("left","-284px"); $("#img_" + stopTarget).css("bottom","4px"); $("#movie_arrow_shop_" + stopTarget).css("left","-180px"); } else { // 求人?ービ?画面 $("#img_" + stopTarget).css("left","0px"); $("#img_" + stopTarget).css("bottom","3px"); } } }) } } // 動画再生ペ?ジ遷移 function videoPlayOpen(playerUrl,movieId,ofFlg) { if(document.getElementById('movie_form') != null){ document.body.removeChild(document.getElementById('movie_form')); } var myform = document.createElement('form'); var movie_id = movieId; myform.setAttribute('id', 'movie_form'); document.body.appendChild(myform); var officalParam = ''; if(ofFlg == 1){ officalParam = '?of=y' } with(myform){ var input = document.createElement('input'); with(input){ // input設? setAttribute('type' , 'hidden'); setAttribute('name' , 'movie_id'); setAttribute('value' , movie_id); } // form設? method = 'post'; //2016/07/28 ChromeFlash無効化による動画再生Playerの変更対? Andorid1-3の場?httpで動画再生 start var regex = /Android[\s]?([1-3]{1}\.)/i; match = regex.exec(navigator.userAgent); if(match) action = 'http://' + window.location.hostname + playerUrl+movieId+'/'+officalParam; else action = playerUrl+movieId+'/'+officalParam; //2016/07/28 ChromeFlash無効化による動画再生Playerの変更対? Andorid1-3の場?httpで動画再生 end target = '_blank'; appendChild(input); submit(); } } $(function() { $('.treatment_btn').click(function() { $('.more_area').toggle(); }); $('.slick-slides').slick({ centerMode: true, arrows: false, slidesToShow: 1, infinite: false, }); $('.group-slider').slick({ slidesToShow: 3, slidesToScroll: 3, accessibility: false, arrows: false, }); var h = $('#fixedMenu').height(); $('#jobdetail').css('padding-bottom',h); var windowWidth = $(window).width(); var kininaru = $('#kininaru'); var fixedMenuOuter = $('#fixedMenu'); var fixedMenu = $('#fixedMenu ul'); //fixedMenu.hide(); var _ua = navigator.userAgent; var isCannotRotateBrowser = (_ua.indexOf('Android 2.') !== -1) && (_ua.indexOf('Chrome') === -1); if (isCannotRotateBrowser) { kininaru.attr('style', 'display:none; -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-transition: initial; transition: initial;'); } fixedMenuOuter.css("height","64px"); $(window).scroll(function () { if ($(this).scrollTop() > 100) { scrollHeight = $(document).height(); scrollPosition = $(window).height() + $(window).scrollTop(); if ( (scrollHeight - scrollPosition) <= 100) { fixedMenu.fadeOut(); if (isCannotRotateBrowser) { kininaru.fadeOut(); } else { kininaru.removeClass('active'); } } else { if(isLandscape() == 1){ fixedMenu.fadeIn(); if (isCannotRotateBrowser) { kininaru.fadeIn(); } else { kininaru.addClass('active'); } }else{ fixedMenu.fadeOut(); if (isCannotRotateBrowser) { kininaru.fadeOut(); } else { kininaru.removeClass('active'); } } } } else { fixedMenu.fadeOut(); if (isCannotRotateBrowser) { kininaru.fadeOut(); } else { kininaru.removeClass('active'); } } }); $('.dxFreespaceEllipsis').each(function(i) { txtHeight = $(this).find('.addTxt01').height(); if (txtHeight <= 90) { $(this).find('.dxFreeMoreTxt').css('display', 'none'); } else { $(this).find('.addTxt01').css('height', '10em'); $(this).find('.addTxt01').css('overflow', 'hidden'); } }); $('div a[id^=player]').each(function(i){ flowWidth = $(this).width(); flowHeight = flowWidth / 16 * 9; $(this).height(flowHeight); }); // 1:vertically 2:horizontally var isLandscape = function(){ var deviceScreenType = 1; if (window.innerHeight < window.innerWidth) { deviceScreenType=2; } return deviceScreenType; } }); $(function() { $('.menuarea').bind({ /* フリ?開始時 */ 'touchstart': function(e) { this.touchX = event.changedTouches[0].pageX; this.slideX = $(this).position().left; }, /* フリ?中 */ 'touchmove': function(e) { e.preventDefault(); this.slideX = this.slideX - (this.touchX - event.changedTouches[0].pageX ); $(this).css({left:this.slideX}); this.accel = (event.changedTouches[0].pageX - this.touchX) * 5; this.touchX = event.changedTouches[0].pageX; }, /* フリ?終? */ 'touchend': function(e) { this.slideX += this.accel $(this).animate({left : this.slideX },100,'linear'); this.accel = 0; w = - ( $(this).width() - $(this).parent(".shopmenu").width() ); if (this.slideX > 0) { this.slideX = 0; $(this).animate({left:this.slideX},500); } if (this.slideX < w) { this.slideX = w; $(this).animate({left:this.slideX},500); } } }); $('.menuarea .privilege a[data-privilege_id^="privilege"]').click(function(){ var privilege_id = "#" + $(this).data("privilege_id"); var target_offset = $(privilege_id).offset().top; $('.menuarea li.select').removeClass('select'); $(this).parent('li').addClass('select'); $('body,html').animate({scrollTop:target_offset}, 200, 'swing'); }); // 1:vertically 2:horizontally var isLandscape = function(){ var deviceScreenType = 1; if (window.innerHeight < window.innerWidth) { deviceScreenType=2; } return deviceScreenType; } }); $(window).on('load resize', function() { var w = $('#movie_img').width(); var h = $('#movie_img').height(); w = w / 2 - 50; h = h / 2 - 50; $('#play_btn').css('left', w); $('#play_btn').css('bottom', h); }); $(window).load(function() { $('.read-more').each(function() { var $p = $(this); var $p_inner = $('.read-more-innner', $p); var h_parent = $p.height(); var h_ajust = 10; var h_child = $p_inner.height(); var h_target = $p.data('read_more_height'); if(!(h_parent < (h_target === undefined ? 400 : h_target))) { $('+ .more-btn-wrap', $p).show(); $p.css('max-height', 'initial').css('height', h_parent); $p_inner.css('height', h_parent); $('+ .more-btn-wrap .more_btn_l', $p).click(function() { if(!$p.hasClass('open')) { $p.css('height', h_child + h_ajust).css('transition', 'all .5s ease').css('-moz-transition', 'all .5s ease').css('-webkit-transition', 'all .5s ease').addClass('open'); $p_inner.css('height', h_child + h_ajust).css('transition', 'all .5s ease').css('-moz-transition', 'all .5s ease').css('-webkit-transition', 'all .5s ease'); $('span', this).text('閉じ?'); } else { $p.css('height', h_parent).css('transition', 'all .5s ease').css('-moz-transition', 'all .5s ease').css('-webkit-transition', 'all .5s ease').removeClass('open'); $p_inner.css('height', h_parent).css('transition', 'all .5s ease').css('-moz-transition', 'all .5s ease').css('-webkit-transition', 'all .5s ease'); $('span', this).text('続きを見る'); } }); } }); }); $(function() { $('.tel-modal').click(function() { openModal($('#detail-callcenter-popover-tel')); }); $('.tel-close').click(function() { closeModal($('#detail-callcenter-popover-tel')); }); $('.mail-modal').click(function() { openModal($('#detail-callcenter-popover-mail')); }); $('.mail-close').click(function() { closeModal($('#detail-callcenter-popover-mail')); }); function openModal($target) { if (!$target) return; $target.after('
'); $('#job-modal-overlay').click(function(){closeModal($target);}); $target.addClass('open'); setTimeout(function(){$target.addClass('show')}, 20); } function closeModal($target) { if (!$target) return; $target.removeClass('show'); setTimeout(function(){ $target.removeClass('open'); $('#job-modal-overlay').remove(); }, 210); } });