1var timer1, timer2; 2var nowMove1; 3var nowPos1; 4 5$( function(){ 6 $(window).resize( function(){ 7 index_setDummyHaikei(); 8 } ); 9 $(window).load( function(){ 10 index_setDummyHaikei(); 11 } ); 12 //ãããããã¼ 13 index_initTopBanner(); 14 $(document).on( 'click', '#top_dot a', function(){ 15 nowPos1 = $('#top_dot li').index( $(this).closest('li') ); 16 index_changeTopBanner( ); 17 return false; 18 } ); 19 $('#top_l_allow a, #top_r_allow').click( function(){ 20 if ( nowMove1 ) { 21 nowMove1 = false; 22 if ( $(this).closest('div').attr('id') == 'top_l_allow' ) { 23 nowPos1--; 24 } else { 25 nowPos1++; 26 } 27 index_changeTopBanner( ); 28 } 29 return false; 30 } ); 31 $(window).resize( function(){ 32 //ããã¼ãµã¤ãºã®æå¤§å¤ã¯1024pxã¨ãã 33 var bannerSize = Math.round( Math.min( $('#top_header').width() * 0.8, 1024 ) ); 34 $('#top_banner').css( { width: ( bannerSize * $('#top_banner li').length ) + 'px' } ); 35 var setPos = - ( bannerSize / 2 ) - $('#top_banner').width() / 3 + $('#top_header').width() / 2 - ( bannerSize * nowPos1 ); 36 $('#top_banner').animate( { marginLeft: setPos+'px' }, 0 ); 37 } ); 38 //ã«ãã´ãªåãæ¿ã 39 $('#category_area a').click( function(){ 40 index_changeCategory( $(this) ); 41 return false; 42 } ); 43 //ãã£ã¨è¦ã 44 $(document).on( 'click', '#category_more a', function(){ 45 index_appendCategory( $(this) ); 46 return false; 47 } ); 48 //åºå 49 $(document).on( 'click', '#ad_area a,#ad_area2 a', function(){ 50 $.post( 51 'index.html', 52 { mode: 'advertise', id: $(this).data('id') }, 53 function( data ) { 54 } 55 ); 56 } ); 57 //SNSã¢ã¤ã³ã³ 58 $(window).scroll( function(){ 59 index_setSNS(); 60 } ); 61 index_setSNS(); 62 //ä¸ã«æ»ã 63 $(window).resize( function(){ 64 index_setReturn(); 65 } ); 66 $(document).scroll( function(){ 67 index_setReturn(); 68 } ); 69} ); 70 71function index_initTopBanner() { 72 //3ã¤ã®ç¹°ãè¿ãã使ããäºã¤ç®ããã¹ã¿ã¼ãããã 73 var txt = $('#top_banner ul').html(); 74 $('#top_banner ul').html( txt + txt + txt ); 75 nowPos1 = 0; 76 //丸å°ã®å¤æ´ 77 var txt = ""; 78 for ( i=0; i<( $('#top_banner li').length / 3 ); i++ ) { 79 txt += ( nowPos1 == i ? '<li>â</li>' : '<li><a href="#" class="noscroll">â</a></li>' ); 80 } 81 $('#top_dot ul').html( txt ); 82 index_setPositionTopBanner(); 83} 84function index_changeTopBanner( ) { 85 clearTimeout( timer1 ); 86 //ãã¼ã¿ãã§ã㯠87 if ( nowPos1 < -1 ) nowPos1 = -1; 88 if ( nowPos1 > ( $('#top_banner li').length / 3 ) ) nowPos1 = $('#top_banner li').length / 3; 89 //ããã¼ãµã¤ãºã®æå¤§å¤ã¯1024pxã¨ãã 90 var bannerSize = Math.round( Math.min( $('#top_header').width() * 0.8, 1024 ) ); 91 $('#top_banner').css( { width: ( bannerSize * $('#top_banner li').length ) + 'px' } ); 92 var setPos = - ( bannerSize / 2 ) - $('#top_banner').width() / 3 + $('#top_header').width() / 2 - ( bannerSize * nowPos1 ); 93 $('#top_banner').animate( { marginLeft: setPos+'px' }, 300, function(){ 94 if ( nowPos1 <= -1 ) { 95 //左端 96 nowPos1 = $('#top_banner li').length / 3 - 1; 97 setPos = - ( bannerSize / 2 ) - $('#top_banner').width() / 3 + $('#top_header').width() / 2 - ( bannerSize * nowPos1 ); 98 $('#top_banner').animate( { marginLeft: setPos+'px' }, 0 ); 99 } else if ( nowPos1 >= ( $('#top_banner li').length / 3 ) ) { 100 //å³ç«¯ 101 nowPos1 = 0; 102 setPos = - ( bannerSize / 2 ) - $('#top_banner').width() / 3 + $('#top_header').width() / 2 - ( bannerSize * nowPos1 ); 103 $('#top_banner').animate( { marginLeft: setPos+'px' }, 0 ); 104 } 105 //丸å°ã®å¤æ´ 106 var txt = ""; 107 for ( i=0; i<( $('#top_banner li').length / 3 ); i++ ) { 108 txt += ( nowPos1 == i ? '<li>â</li>' : '<li><a href="#" class="noscroll">â</a></li>' ); 109 } 110 $('#top_dot ul').html( txt ); 111 nowMove1 = true; 112 timer1 = setTimeout( function(){ 113 nowPos1++; 114 index_changeTopBanner( ); 115 }, 5000 ); 116 } ); 117} 118 119function index_setPositionTopBanner() { 120 //åæä½ç½®ã«æ»ã 121 clearTimeout( timer1 ); 122 if ( $(window).width() < 1500 ) { 123 //ç»é¢ãµã¤ãºã«åããããµã¤ãº 124 $('#top_banner').css( { width: ( $('#top_header').width() * 0.8 * $('#top_banner li').length ) + 'px' } ); 125 var bannerSize = $('#top_banner').width() / $('#top_banner li').length;
126 var initPos = - ( bannerSize * ( $('#top_banner li').length / 3 ) - bannerSize * 0.125 ); 127 } else { 128 //å¹ ã¯1024pxã§åºå® 129 $('#top_banner').css( { width: ( 1024 * $('#top_banner li').length ) + 'px' } ); 130 var bannerSize = $('#top_banner').width() / $('#top_banner li').length; 131 var initPos = - ( bannerSize / 2 ) - $('#top_banner').width() / 3 + $(window).width() / 2; 132 } 133 $('#top_banner').css( { marginLeft: initPos + 'px' } ); 134 nowMove1 = true; 135 timer1 = setTimeout( function(){ 136 nowPos1++; 137 index_changeTopBanner( ); 138 }, 5000 ); 139} 140 141function index_changeCategory( obj ){ 142 var position; 143 $('#category_more').fadeOut( 100 ); 144 $('#category_list').slideUp( 300, function(){ 145 $.post( 'index.html', 146 { mode:'category', id: obj.data('id'), tp:'change' }, 147 function( data ){ 148 var tmp = data.split("<!--atmark-->"); 149 if ( tmp[0] == 'OK' ) { 150 if ( $('#tour_area').css('display') == 'block' ) { 151 position = $('#category_area').offset().top; 152 } else { 153 position = $('#category_area').offset().top + $('#category_area').height(); 154 } 155 $('body,html').animate({scrollTop:position}, 200, 'swing'); 156 //ã«ãã´ãªæ ã®å¤æ´ 157 $('#category_area a').removeClass( 'category_on' ); 158 obj.addClass( 'category_on' ); 159 //å 容æ¸è¾¼ 160 $('#category_list ul').html( tmp[1] ); 161 //ãã¿ã³ãã§ã㯠162 if ( tmp[2] != '' ) { 163 $('#category_more a').data( { id: obj.data('id'), no:'8' } ); 164 $('#category_more').fadeIn( 100 ); 165 } 166 } 167 $('#category_list').slideDown( 300, function(){ 168 index_setDummyHaikei(); 169 } ); 170 } 171 ); 172 } ); 173} 174 175function index_appendCategory( obj ){ 176 $('#category_more').fadeOut( 100, function(){ 177 var bakID = obj.data('id'); 178 $.post( 'index.html', 179 { mode:'category', id: obj.data('id'), no: obj.data('no'), tp:'append' }, 180 function( data ){ 181 var tmp = data.split("<!--atmark-->"); 182 if ( tmp[0] == 'OK' ) { 183 //å 容æ¸è¾¼ 184 $('#category_list ul').append( tmp[1] ); 185 //ãã¿ã³ãã§ã㯠186 if ( tmp[2] != '' ) { 187 $('#category_more a').data( { id: bakID, no:tmp[2] } ); 188 $('#category_more').fadeIn( 100 ); 189 } 190 index_setDummyHaikei(); 191 } 192 } 193 ); 194 } ); 195} 196 197function index_setSNS() { 198 $('#sns_link').stop().animate( { top: ( $(window).scrollTop() + $(window).height() / 2 - $('#sns_link').height() / 2 ) + 'px' }, 100 ); 199} 200 201function index_setReturn(){ 202 if ( $('#return_top').length <= 0 ) $('body').append('<a id="return_top" href="#">ä¸ã«æ»ã</a>'); 203 if ( $(window).scrollTop() >= $(window).height() ) { 204 if ( ( $(document).height() - $('#footer_area').height() - $(window).height() ) <= $(window).scrollTop() ) { 205 $('#return_top').css( { bottom: ( $(window).scrollTop() - ( $(document).height() - $(window).height() - $('#footer_area').height() - 10 ) ) + 'px' } ); 206 } else { 207 $('#return_top').css( { bottom: '10px' } ); 208 } 209 $('#return_top').show(); 210 } else { 211 $('#return_top').hide(); 212 } 213} 214 215function index_setDummyHaikei(){ 216 if ( $('#m8tabi').length > 0 ) { 217 $('#main_dummy').height( $('#category_area').outerHeight() ); 218 //8æ ã®é«ããè¨å®ãã 219 var h = $('#widget_area_wrap').offset().top - $('#m8tabi').offset().top; 220 $('#main_dummy2').height( h ); 221 } 222}
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.