1///////////////////////////////////////////// 2////drawing_background_star; 3 4///setting 5var starurl="./common/images/common/stars/" 6var starmax=25; 7 8 9function drawstar() { 10 var filenum; 11 var tate; 12 var yoko; 13 var classnum; 14 var hensu; 15 for(var i=0; i<25; i++){ 16 kazu = Math.floor(Math.random()*25+1); 17 tate = Math.floor(Math.random()*$(window).height()); 18 yoko = Math.floor(Math.random()*($(window).width())-$('img.mainbg').width())*0.7; 19 filenum="s"+kazu; 20 classnum="s"+i; 21 hensu="<img src=\""+ starurl + filenum + ".gif\" class=\"" + classnum + "\">"; 22 $("#backimage").append(hensu); 23 $("."+classnum).css({ "top":tate, "left":yoko }); 24 } 25} 26 27function removestar() { 28 $('#backimage img').remove(); 29 } 30 31 32function fadecontents() { 33 hidestar(); 34 $('#contents').fadeIn(1000); 35 $('#footer').fadeIn(1000); 36 $('#copy').delay(1100).fadeIn(800,showstar); 37 resizeimage(); 38} 39 40function hidestar(){ 41 $('#backimage').hide(); 42 } 43 44function showstar(){ 45 //$('#backimage').show(); 46 $('#backimage').fadeIn(500); 47 } 48 49 50///////////////////////////////////////////// 51////resize and ajust contens; 52 53function resizeanddraw(){ 54 removestar(); 55 resizeimage() ; 56 drawstar(); 57 } 58 59var resizeTimer = null; 60$(window).bind('resize', function() { 61 if (resizeTimer) clearTimeout(resizeTimer); 62 resizeTimer = setTimeout(resizeanddraw, 200); 63}); 64 65function resizeimage() { 66 var ww = $(window).width(); 67 var wh = $(window).height(); 68 var sl = 'img.mainbg'; 69 var ma = 1000; 70 $(sl).each(function(){ 71 var w = $(this).width(); 72 var h = $(this).height(); 73 var whw = h/w; 74 75 if(ww>=1700){ 76 var neww1=1400; 77 $(this).width(neww1); 78 $(this).height(neww1*whw); 79 $('#contents').height(neww1*whw); 80 $('#mainvisual').css({"left":(ww-neww1)*0.7}) 81 $('#contents').width(ww); 82 $('#mainvisual').css({"z-index":-800}); 83 $('#footer').width(ww); 84 }else if(ww<=1200){ 85 var neww2=950; 86 $(this).width(neww2); 87 $(this).height(neww2*whw); 88 $('#contents').height(neww2*whw); 89 if(ww<980){ 90 $('#contents').width(978); 91 $('#footer').width(978); 92 }else{ 93 $('#contents').width(ww); 94 $('#footer').width(ww); 95 } 96 $('#mainvisual').css({"left":"auto","right":13}) 97 $('#mainvisual').css({"z-index":-800}); 98 }else{ 99 100 var neww = ww*0.8; 101 var newh = neww*whw; 102 $(this).width(neww); 103 $(this).height(newh); 104 $('#contents').height(newh); 105 if(wh>newh+15){ 106 $('#contents').height(wh-27); 107 } 108 $('#mainvisual').css({"left":(ww-neww)*0.7}) 109 $('#contents').width(ww); 110 $('#mainvisual').css({"z-index":-800}); 111 $('#footer').width(ww); 112 } 113 }); 114}; 115ã 116 117///////////////////////////////////////////// 118////text animation; 119function naviover(target){ 120 var mae=$(target+' .navi_discription').text(); 121 var str = "^^GO TO CONTENS"; 122 var progress = 0; 123 var timer; 124 $(target).hover( 125 function(){ 126 clearInterval(timer); 127 progress = 0; 128 $(this).css({'background-position':'-310px 0'}); 129 timer = setInterval(function() { 130 $(target+' .navi_discription').text(str.substring(0, progress++) + (progress & 1 ? '_' : '')); 131 if (progress >= str.length+1) clearInterval(timer); 132 }, 100); 133 }, 134 function(){ 135 clearInterval(timer); 136 progress = 0; 137 $(this).css({'background-position':'-155px 0'}); 138 $(target+' .navi_discription').text(mae); 139 timer = setInterval(function() { 140 $(target+' .navi_discription').text(mae.substring(0, progress++) + (progress & 1 ? '_' : '')); 141 if (progress >= mae.length+1) clearInterval(timer); 142 }, 20); 143 } 144 ); 145} 146 147 148function textaction(target){ 149 var mae=$(target).text(); 150 var str = "//"; 151 var progress = 0; 152 var timer2; 153 $(target).hover( 154 function(){ 155 clearInterval(timer2); 156 progress = 0; 157 timer2 = setInterval(function() { 158 $(target).text(str.substring(0, progress++) +mae); 159 if (progress >= str.length) clearInterval(timer); 160 }, 100); 161 }, 162 function(){ 163 clearInterval(timer2); 164 var progress = 0; 165 $(target).text(mae) 166 } 167 ); 168} 169 170/////////////////////////////////// 171$(function() { 172 // scroll up 173 $('a[href*=#]').click(function() { 174 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 175 var target = $(this.hash); 176 target = target.length && target; 177 if (target.length) { 178 var sclpos = 30; 179 var scldurat = 1200; 180 var targetOffset = target.offset().top - sclpos; 181 $('html,body') 182 .animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"}); 183 return false;
184 } 185 } 186 }); 187 188 // rollover fade 189 $("a img.fadehover").hover( 190 function(){ 191 $(this).fadeTo(500, 0.4); 192 }, 193 function(){ 194 $(this).fadeTo(200, 1.0); 195 } 196 ); 197 198 /////set test effect 199 naviover('#navi_1'+'.navi_btn'); 200 naviover('#navi_2'+'.navi_btn'); 201 naviover('#navi_3'+'.navi_btn'); 202 naviover('#navi_4'+'.navi_btn'); 203 naviover('#navi_5'+'.navi_btn'); 204 naviover('#navi_6'+'.navi_btn'); 205 naviover('#navi_7'+'.navi_btn'); 206 naviover('#navi_8'+'.navi_btn'); 207 naviover('#navi_9'+'.navi_btn'); 208 naviover('#navi_10'+'.navi_btn'); 209 naviover('#navi_11'+'.navi_btn'); 210 naviover('#navi_12'+'.navi_btn'); 211 naviover('#main_logo'); 212 213 $(".douga").colorbox({fixed:true ,transition:"fade",onOpen:hidestar, onClosed:fadecontents, innerWidth:662,innerHeight:398}); 214 215 216 //////rollover replace 217 $('a img.imgover').each(function() { 218 var img = $(this); 219 var src = img.attr('src'); 220 var src_on = src.substr(0, src.lastIndexOf('.'))+ '_on' + src.substring(src.lastIndexOf('.')); 221 $('<img>').attr('src', src_on); 222 img.hover(function() { 223 img.attr('src', src_on); 224 }, function() { 225 img.attr('src', src); 226 }); 227 }); 228 229 230 231}); 232 233/////load atom 234function initialize() { 235 var feed = new google.feeds.Feed("http://6109.jp/brs-news/atom1.0.xml"); 236 feed.setNumEntries(10); 237 feed.load(function(result) { 238 if (!result.error) { 239 var container = document.getElementById("feed"); 240 var useFeed = ""; 241 for (var i = 0; i < result.feed.entries.length; i++) { 242 var entry = result.feed.entries[i]; 243 var pdate = new Date(entry.publishedDate); 244 var pday = pdate.getDate(); 245 var pmonth = pdate.getMonth() + 1; 246 var pyear = pdate.getFullYear(); 247 useFeed += '<dt>'+pyear+'.'+pmonth+'.'+pday+'</dt><dd><a href="' + entry.link + '">' + entry.title + '</a></dd>'; 248 } 249 container.innerHTML = useFeed ; 250 } 251 }); 252 253} 254 255//google.setOnLoadCallback(initialize); 256 257 258function datdwn() { 259 if($('#feed').position().top > 104-$('#feed').height()+22){ 260 $('#feed').animate({"top": '-=30px'},"fast","swing"); 261 }else{ 262 $('#feed').animate({"top": 104-$('#feed').height()},"fast","swing"); 263 } 264} 265 266function datup() { 267 if($('#feed').position().top < -22){ 268 $('#feed').animate({"top": '+=30px'},"fast","swing"); 269 }else{ 270 $('#feed').animate({"top": '8'},"fast","swing"); 271 } 272} 273 274 275 276function startfunc(){ 277 /* 278 if (navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('iPad') > 0 || navigator.userAgent.indexOf('iPod') > 0 ) { 279 fadecontents(); 280 }else{ 281 if(window.location.hash==""){ 282 $.colorbox({href:"flash.html",fixed:true ,transition:"fade", onClosed:fadecontents, innerWidth:662,innerHeight:398,title:"Preview: Episode08"}); 283 }else{*/ 284 fadecontents(); 285 /*} 286 }*/ 287} 288 289 290/////////////////////////////////// 291// 292$(window).load(function() { 293 resizeimage(); 294 drawstar(); 295 $('.arrup').bind('click', function() {datup();}); 296 $('.arrdwn').bind('click', function() {datdwn();}); 297});
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.