1(function($){ 2 3 var agent = navigator.userAgent, 4 $win = $(window), 5 spNav = 0, 6 isIE = agent.match(/msie/i), 7 isIE6 = agent.match(/msie [6.]/i), 8 isIE7 = agent.match(/msie [7.]/i), 9 isIE8 = agent.match(/msie [8.]/i), 10 isIE9 = agent.match(/msie [9.]/i), 11 isIE10 = agent.match(/msie [10.]/i), 12 modern = 1; 13 if(agent.search(/iPhone/) != -1){ 14 agent = 'iPhone'; 15 }else if(agent.search(/iPad/) != -1){ 16 agent = 'iPad'; 17 }else if(agent.search(/Android/) != -1){ 18 agent = 'Android'; 19 }else{ 20 agent = 'PC'; 21 } 22 if(isIE) { 23 if(isIE6){ 24 modern = 0; 25 }else if(isIE7) { 26 modern = 0; 27 }else if(isIE8) { 28 modern = 0; 29 }else if(isIE9) { 30 modern = 0; 31 }else { 32 modern = 1; 33 } 34 } 35 var bool=0; 36 $(function() { 37 $.fn.khp.ezro(); 38 $.fn.khp.init(); 39 $.fn.khp.bg(); 40 $.fn.khp.breakpoint(0); 41 $.fn.khp.slider(); 42 // $.fn.khp.gmap(); 43 }); 44 $.fn.khp={ 45 //easy rollover[gif/jpeg] 46 ezro: function () { 47 $("a.ezro img") 48 .hover(function(){ 49 $(this).css({opacity:"0.75",filter:"alpha(opacity=75)","-ms-filter":"alpha(opacity=75)","-khtml-opacity":"0.75","-moz-opacity":"0.75"}); 50 },function(){ 51 $(this).css({opacity:"1",filter:"alpha(opacity=100)","-ms-filter":"alpha(opacity=100)","-khtml-opacity":"1","-moz-opacity":"1"}); 52 }); 53 }, 54 init: function(){ 55 var url = location.href, 56 params = url.split("/"), 57 winW=$win.innerWidth(); 58 //ç»é¢ãµã¤ãºå¤æ´æï¼PCãã¹ããåãæ¿ãæï¼ã«ãã¼ã¸ããªãã¬ãã·ã¥ 59 $(window).bind('exitBreakpoint1',function(){ 60 window.location.reload(); 61 }); 62 $(window).bind('exitBreakpoint641', function(){ 63 window.location.reload(); 64 }); 65 if(params[3]=='index.html'||params[3]==''){//ããããã¼ã¸ã®ã¨ãã®ã¿å®è¡(ã«ã¼ããã£ã¬ã¯ããªã§ãªãå ´åã¯æ°å¤ã夿´ãã¦ãã ãã) 66 if(agent=='PC'){//PCã®ã¨ãã®ã¿å®è¡ 67 $(".contents").mCustomScrollbar(); 68 } 69 if(winW > 640){ 70 $('body').backstretch([ 71 // { url: "images/common/mv_movie.mp4", mute: true, alignY: 0, isVideo: true, loop: true } //ï¼åç»ã®å ´å 72 "/images/common/mv01.jpg", 73 "/images/common/mv02.jpg", 74 ], { 75 fade: 1500, 76 duration: 5500 77 }); 78 // MVåç»ã®æã«ä¸å±¤èæ¯ãç¡ãæ¹ã綺éºãªããï¼ä»»æï¼ 79 // $('body').removeClass('bg_body'); 80 }else{ 81 $("#mv").responsiveSlides({ 82 speed: 1500 83 }); 84 } 85 }else{//ä¸å±¤ãã¼ã¸ã®ã¨ãã®ã¿å®è¡ 86 if(winW > 640){ 87 if($('.backstretch').length>0){ 88 $('body').backstretch("destroy"); 89 // $('body').backstretch("destroy").backstretch("/images/common/mv_lower.jpg"); 90 // JSã§åãæ¿ããã¨ç»é¢ãã©ã¤ãã®ã§ãä¸å±¤ã®èæ¯ã¯cssã§è¨å® 91 } 92 $('body').addClass('bg_body'); 93 }else{ 94 $("#mv").responsiveSlides('destroy'); 95 } 96 } 97 function setSize(){ 98 99 var winW=$win.innerWidth(); 100 101 if(winW>640){ 102 var winH=$win.height(), 103 leadH=winH-64-160-15, 104 headerL=(winW-950)/2, 105 contH=winH-64-15-60; 106 $('#lead').css('height',leadH); 107 $('#contents .contents').css('min-height',contH); 108 if(winW>1200){ 109 $('#bg').css('height',winH); 110 }else{ 111 $('#bg').removeAttr('style'); 112 } 113 if(winH<640){ 114 $('header h1').css('height',winH-473); 115 }else{ 116 $('header h1').removeAttr('style'); 117 } 118 }else{ 119 $('#contents>.contents,header h1').removeAttr('style'); 120 $('#lead').css('height',$('#mv img').height()); 121 } 122 } 123 setSize(); 124 // $(win).on('load',function(){ 125 // setSize(); 126 // }); 127 $win.resize(function(){ 128 setTimeout(function(){ 129 setSize(); 130 131 },400); 132 }); 133 }, 134 bg: function(){ 135 $('#bg,#loading').css('height',$(window).height()); 136 $("#loading").hide(); 137 }, 138 breakpoint: function(bool){ 139 // ç»é¢ãµã¤ãºãã¨ã«ç»ååãæ¿ã 140 var target='.flx-img'; 141 function flximg(type){ 142 $(target).each(function() { 143 $(this).attr('src', $(this).data(type)); 144 }); 145 } 146 if($('body').hasClass('breakpoint-641')&&bool==1){ 147 flximg('pc'); 148 }else if($('body').hasClass('breakpoint-1')&&bool==1){ 149 flximg('sp'); 150 } 151 $(window).setBreakpoints({ 152 distinct: true, 153 breakpoints: [ 1, 641 ] 154 }); 155 $(window).bind('enterBreakpoint641',function() { 156 flximg('pc'); 157 $('.gNav').removeAttr('style'); 158 }); 159 $(window).bind('enterBreakpoint1',function() { 160 flximg('sp'); 161 if(!spNav){
162 $('.gNav').clone(true).insertAfter($('#pjax')); 163 $('#hMenu').append('<div id="gNavBtn"><img src="/images/common/sp/btn_menu01.png" alt="MENU" /></div>'); 164 spNav = 1; 165 $('.gNav').removeAttr('style'); 166 $('#gNavBtn').click(function(){ 167 $('#hMenu>.gNav').slideToggle(); 168 }); 169 } 170 }); 171 }, 172 slider:function(){ 173 $( document ).ready(function( $ ) { 174 $( '#slider' ).sliderPro({ 175 width: 640, 176 height: 440, 177 fade: true, 178 arrows: true, 179 buttons: false, 180 thumbnailArrows: true, 181 autoplay: false 182 }); 183 }); 184 } 185 }; 186if(agent=='PC'&&modern==1){ 187 $(document).on('click', 'a.pjax', function(event) { 188 event.preventDefault(); 189 var href = $(this).attr('href'); 190 // ãã§ã¼ãã¢ã¦ãã¨ãã§ã¯ãã®å¦ç 191 $("#pjax").animate({opacity:0}, 1000, function(){ 192 $.pjax({ 193 url:href, 194 container:"#pjax", 195 fragment:"#pjax", 196 timeout:3000 197 }); 198 }); 199 $("#loading").show(); 200 }); 201 202 $(document).on('pjax:end', function() { 203 $("#loading").hide(); 204 $('#pjax').animate({ 205 opacity : 1 206 }, 1500); 207 $.fn.khp.ezro(); 208 $.fn.khp.init(); 209 $.fn.khp.bg(); 210 $.fn.khp.breakpoint(1); 211 $.fn.khp.slider(); 212 }); 213 $(document).on('pjax:success', function(e, data) { 214 $('header').html($(data).filter('header')); 215 }); 216} 217})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.