1!function ($) { 2 3 4 //ãã¡ã¤ã«èªã¿è¾¼ãã æã«å¯¾è±¡ã¡ãã¥ã¼ãã¯ãã¼ã³ãããã¨ããã¾ã§ 5 var $win = $(window); 6 //var $sc_menu = ''; 7 var $targetMenu = ''; 8 //var $clone_sc_menu = ''; 9 var $cloneTargetMenu = ''; 10 var headerMenuFlg = false; 11 var $fixedMenu = ''; 12 var hmpScFlg = 0; 13 var hmpFlg = 0; 14 var $heightDiv = ''; 15 var $bg = $('#bg'); 16 var device = $bg.data('device'); 17 18 setTimeout(function(){ 19 $.marquee_init($('#header.normal-header')); 20 },1000); 21 22 //ã¹ã¯ãã¼ã«æã¡ãã¥ã¼åä½ 23 //$hmpScFlg 0.ããªã,1.ã¹ã¯ãã¼ã«æã¡ãã¥ã¼,2.é常ã¡ãã¥ã¼ 24 //$hmpFlg 0.ã¡ãã¥ã¼ãã¼ã,1.ãããã¼å ã¡ãã¥ã¼ 25 if($('.parts-area').data('area') == 'header'){ 26 hmpScFlg = $('.parts-area').data('hmp-sc-flg'); 27 hmpFlg = $('.parts-area').data('hmp-flg'); 28 } 29 30 //ã¹ã¯ãã¼ã«æã¡ãã¥ã¼è¡¨ç¤º 31 if(hmpScFlg == 1){ 32 //spãã¼ã¸ã§é常ãããã¼(ã¡ãã¥ã¼ãã¼ãå«ã)ä½¿ç¨ 33 if($('header').hasClass('pos3') || $('header').hasClass('pos5')){ 34 if($('#parts5').length){ 35 $targetMenu = $('#parts5.menu-parts'); 36 headerMenuFlg = true; 37 } 38 //spãã¼ã¸ã§é常ãããã¼ã®ã¿ä½¿ç¨ 39 }else if($('header').hasClass('pos4')){ 40 if($('#parts1').find('.menu-parts').length){ 41 $targetMenu = $('#parts1').find('.menu-parts'); 42 headerMenuFlg = true; 43 } 44 //é常ãã¼ã¸ 45 }else{ 46 //ãããã¼å ã¡ãã¥ã¼ 47 if(hmpFlg){ 48 if($('#parts1').find('.menu-parts').length){ 49 $targetMenu = $('#parts1').find('.menu-parts'); 50 headerMenuFlg = true; 51 } 52 //ãã¼ãã¡ãã¥ã¼ 53 }else{ 54 if($('#parts5').length){ 55 $targetMenu = $('#parts5.menu-parts'); 56 headerMenuFlg = true; 57 } 58 } 59 } 60 61 //ãããã¼ã¿ã°ã®å¤ã«ã¹ã¯ãã¼ã«ã¡ãã¥ã¼è¤è£½(ãã©ã©ãã¯ã¹ã§ãã¾ãåããªããªã©æ¸å¿µãæ§æçã«) 62 if($targetMenu.length){ 63 $cloneTargetMenu = $targetMenu.clone(true).insertAfter($('header')).attr('id','hd-sc-menu').css('display','none'); 64 //#4083 matuuchi 65 if($cloneTargetMenu.find(".marquee-menu").length){ 66 67 $cloneTargetMenu.find('nav > ul').removeClass('marquee-menu'); 68 $cloneTargetMenu.find('nav > ul > li > ul.current').addClass('marquee-menu'); 69 70 } 71 } 72 73 //é常ã¡ãã¥ã¼è¡¨ç¤º 74 }else if(hmpScFlg == 2){ 75 //spãã¼ã¸ã§é常ãããã¼(ã¡ãã¥ã¼ãã¼ãå«ã)ä½¿ç¨ 76 if($('header').hasClass('pos3') || $('header').hasClass('pos5')){ 77 if($('header').find('.menu-parts').length){ 78 $targetMenu = $('#parts5.menu-parts'); 79 } 80 //spãã¼ã¸ã§é常ãããã¼ã®ã¿ä½¿ç¨ 81 }else if($('header').hasClass('pos4')){ 82 if($('#parts1').find('.menu-parts').length){ 83 $targetMenu = $('#parts1'); 84 } 85 //é常ãã¼ã¸ 86 }else{ 87 //ãããã¼å ã¡ãã¥ã¼ 88 if(hmpFlg){ 89 if($('#parts1').find('.menu-parts').length){ 90 $targetMenu = $('#parts1'); 91 } 92 //ãã¼ãã¡ãã¥ã¼ 93 }else{ 94 if($('#parts5').length){ 95 $targetMenu = $('#parts5.menu-parts'); 96 } 97 } 98 } 99 100 //ãã©ã©ãã¯ã¹ã§ãªããã°é«ããã¨ãããã®divã使 101 if (!(real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture'))) { 102 if ($targetMenu) { 103 $heightDiv = $('<div id="height-div"></div>').insertAfter($targetMenu).css('height',$targetMenu.height()); 104 $heightDiv.css('display','none'); 105 } 106 } 107 } 108 109 110 $.extend({ 111 scroll_section_init: function() { 112 if($targetMenu && $targetMenu.length){ 113 var menu_posX = $targetMenu.offset().top + $targetMenu.height(); 114 var menu_posY = $targetMenu.offset().left; 115 116 // ã¹ã¯ãã¼ã«ã§ãã¡ãã¥ã¼ã¤ãã¦ãã 117 $win.on('load scroll', function() { 118 var value = $(this).scrollTop(); 119 120 if (BaseUrl.match(/(dsadmin\/SpPages)/)) { 121 value = value + 56; 122 } 123 124 if (($cloneTargetMenu.length && ($cloneTargetMenu.css('display') == 'none') && (hmpScFlg == 1)) || hmpScFlg == 2) { 125 126 if (value > menu_posX) { 127 //éãã¢ãã¡ã¼ã·ã§ã³ 128 if(hmpScFlg == 1){ 129 $.visible_hdmenu(); 130 }else{ 131 $.visible_normal_hdmenu(); 132 } 133 }else if (value < menu_posX && hmpScFlg == 2) { 134 //éããã¢ãã¡ã¼ã·ã§ã³ 135 $.hidden_normal_hdmenu(); 136 } 137 }else{ 138 if (value < menu_posX ) { 139 140 //éããã¢ãã¡ã¼ã·ã§ã³ 141 $.hidden_hdmenu(); 142 } 143 } 144 }); 145 146 } 147 //éãã¢ãã¡ã¼ã·ã§ã³(ã¹ã¯ãã¼ã«ã¡ãã¥ã¼) 148 },visible_hdmenu: function() { 149 150 if(!$cloneTargetMenu.length) return; 151 152 if (!$cloneTargetMenu.hasClass('is-fixed')) { 153 154 //ã¹ã¯ãã¼ã«ã¡ãã¥ã¼è¡¨ç¤ºã®å ´å 155 if($cloneTargetMenu.length && (hmpScFlg == 1)){ 156 157 $cloneTargetMenu.find('.menu-bottom').remove(); 158 159 if(headerMenuFlg){ 160 //ã¹ã¿ã¤ã«ãããããªãã®ã§ä¸æ¦ãã¹ã¦åé¤ 161 $cloneTargetMenu.removeAttr('style'); 162 $cloneTargetMenu.css('display','none'); 163 } 164 } 165 166 $cloneTargetMenu.addClass('is-fixed').hide(); 167 168 setTimeout(function() { 169 170 $cloneTargetMenu.find('.logo').css('display','block'); 171 $cloneTargetMenu.animate({height: 'show'}, 'slow'); 172 173 $cloneTargetMenu.find('nav').find('li').find('a').attr('id',''); 174 175 /*$firstLi = $cloneTargetMenu.find('.nav > li'); 176 177 console.log($firstLi.length); 178 $firstLiWidth = $firstLi.width(); 179 console.log($firstLiWidth); 180 $firstLi.css('width',$firstLiWidth);*/ 181 182 183 184 //ãµãã¡ãã¥ã¼è¡¨ç¤ºæä¸é層ç®ã伸ã³ãã®é²æ¢ 185 $cloneTargetMenu.find('.nav > li').each(function(){ 186 $(this).css('width',$(this).innerWidth() + 1); 187 });
188 189 190 $cloneTargetMenu.find('nav').addClass('normal-menu'); 191 192 //ã¡ãã¥ã¼ãåç´å¯¾å¿ 193 if($cloneTargetMenu.find(".logo").length && $cloneTargetMenu.find('nav.normal-menu').length){ 194 var padding = ($cloneTargetMenu.find(".logo").height() / 2) - ($cloneTargetMenu.find('nav.normal-menu').height() / 2); 195 $cloneTargetMenu.find('nav.normal-menu').css("padding-top",padding+"px"); 196 } 197 198 199 //$cloneTargetMenu.find('a').removeAttr('style'); 200 //$cloneTargetMenu.find('span').removeAttr('style'); 201 202 //ãã©ã©ãã¯ã¹ 203 if (real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) { 204 $("#header").animate({height: 'hide'}, 'slow'); 205 } 206 207 $.marquee_init($('#hd-sc-menu')); 208 }, 50); 209 } 210 //éããã¢ãã¡ã¼ã·ã§ã³(ã¹ã¯ãã¼ã«ã¡ãã¥ã¼) 211 },hidden_hdmenu: function() { 212 if(!$cloneTargetMenu.length) return; 213 214 if ($cloneTargetMenu.hasClass('is-fixed')) { 215 $cloneTargetMenu.animate({height: 'hide'}, 'slow'); 216 217 setTimeout(function() { 218 $cloneTargetMenu.removeClass('is-fixed').css('display','none'); 219 $cloneTargetMenu.find('.logo').css('display','none'); 220 }, 500); 221 222 //ãã©ã©ãã¯ã¹ 223 if (real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) { 224 $("#header").animate({height: 'show'}, 'slow'); 225 } 226 } 227 },visible_normal_hdmenu:function(){ 228 229 if($targetMenu.length){ 230 231 //ãã©ã©ãã¯ã¹ 232 if (real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) { 233 $("#parts1").animate({height: 'hide'}, 'slow'); 234 }else{ 235 $targetMenu.css('position','fixed'); 236 if($heightDiv.length){ 237 $heightDiv.css('display','block'); 238 } 239 } 240 241 var targetTop = 0; 242 var targetLeft = 0; 243 244 if(BaseUrl.match(/(dsadmin)/) && $("#ad-preview").length){ 245 246 targetTop = parseInt($("#ad-preview").css("padding-top"),10); 247 targetLeft = parseInt($("#ad-preview").css("padding-left"),10) / 2;; 248 249 if(!targetTop) targetTop = ($("#ad-preview").css("margin-top")) ? parseInt($("#ad-preview").css("margin-top"),10) : 0; 250 if(!targetLeft) targetLeft = ($("#ad-preview").css("margin-left")) ? parseInt($("#ad-preview").css("margin-left"),10) / 2 : 0; 251 252 /* 253 var attr = $bg.attr("data-sp-type"); 254 if( typeof attr !== 'undefined' && attr !== false ){ 255 targetLeft = targetLeft / 2; 256 } 257 */ 258 } 259 260 $targetMenu.css('top',targetTop); 261 $targetMenu.css('left',targetLeft); 262 $targetMenu.css('z-index','10'); 263 $targetMenu.css('width','100%'); 264 265 $targetMenu.closest("#header").addClass("normal-hdmenu"); 266 267 //ãµãã¡ãã¥ã¼è¡¨ç¤ºæä¸é層ç®ã伸ã³ãã®é²æ¢ 268 if($cloneTargetMenu.length){ 269 $cloneTargetMenu.find('.nav > li').each(function(){ 270 $(this).css('width',$(this).innerWidth() + 1); 271 }); 272 } 273 274 $.marquee_init($('#hd-sc-menu')); 275 } 276 277 },hidden_normal_hdmenu:function(){ 278 279 if($targetMenu.length){ 280 $targetMenu.closest("#header").removeClass("normal-hdmenu"); 281 282 283 $targetMenu.css('position',''); 284 if(BaseUrl.match(/(dsadmin)/) && $("#ad-preview").length){ 285 $targetMenu.css('top','0'); 286 $targetMenu.css('left','0'); 287 288 } 289 290 //ãã©ã©ãã¯ã¹ 291 if (real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) { 292 $("#parts1").animate({height: 'show'}, 'slow'); 293 }else{ 294 if($heightDiv.length){ 295 $heightDiv.css('display','none'); 296 } 297 } 298 299 } 300 301 } 302 }); 303 304 if(!(real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture'))){ 305 $.scroll_section_init(); 306 } 307 308}($);
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.