1var timeron = true; 2var bbrecent = false; 3var stopbb; 4var bbslidetimer; 5 6$(document).ready(function(){ 7 if(Math.abs($("#neatbbslides").attr("numslides")) > 0) { 8 $('#slide1g').imagesLoaded(function() { 9 $("#loadingbb").hide(); 10 resizeImgToBillboard($("#slide1g"),"neatbb"); 11 $("#slide1").fadeIn(Math.abs($("#neatbbslides").attr("bbspeed")), function() { 12 previewEffects('1'); 13 }); 14 15 $("#neatbbslides").attr("cbb","1"); 16 if(Math.abs($("#neatbbslides").attr("numslides")) > 1) { 17 bbslidetimer = setTimeout(function(){ neatbbswap(2) },$("#neatbbslides").attr("bbtime")); 18 } 19 }); 20 } 21 22 if($("#neatbbslides").attr("data-admin") !== "1") { 23 if($("#neatbbslides").attr("bill_placement") !== "full") { 24 sizebillboardheight(); 25 } 26 sizebillboardfonts(); 27 sizebillboardfonttop(); 28 } 29 }); 30 31 32 $(window).resize(function() { 33 if($("#neatbbslides").attr("bill_placement") !== "full") { 34 sizebillboardheight(); 35 } 36 sizebillboardfonts(); 37 sizebillboardfonttop(); 38 }); 39 40 var lastScrollTop = 0; 41 42 $(window).scroll(function(){ 43 if($("body").width() > 800) { 44 if($("#neatbbslides").attr("data-parallax") == "1") { 45 $(".billboardphoto").css({"transform": "translate3d(0px, "+$(document).scrollTop().valueOf() / 2 +"px, 0px)"}); 46 } 47 } 48 }); 49 50 51/* ############################# BILLBOARD FUNCTIONS ####################################### */ 52 53function sizebillboardheight() { 54 if($("#neatbbslides").attr("bill_placement") == "insidecontainer") { 55 if($("#billtext").parent().width() > Math.abs($("#neatbbslides").attr("innermaxwidth"))) { 56 pl = ($("#billtext").parent().width() - Math.abs($("#neatbbslides").attr("innermaxwidth"))) / 2; 57 $("#billtext").css({"width":Math.abs($("#neatbbslides").attr("innermaxwidth"))+"px", "left":pl+"px"}); 58 } else { 59 $("#billtext").css({"width":"100%", "left":"0px"}); 60 } 61 } else { 62 $("#billtext").css({"width":"100%", "left":"0px"}); 63 } 64 hp = Math.abs($("#neatbbslides").attr("bh")) / 1024; 65 nh = $("#billtext").width() * hp; 66 $("#neatbbslides").css({"height":nh+"px"}); 67 68} 69function sizebillboardfonttop() { 70 $(".billtextinner").each(function(i){ 71 divtop = $(this).attr("tp"); 72 divleft = $(this).attr("lp"); 73 tpix = ($("#neatbbslides").height() * divtop) / 100; 74 lpix = ($("#neatbbslides").width() * divleft) / 100; 75 $(this).css({"top":tpix+"px", "left":lpix+"px"}); 76 }); 77} 78 79 80 function sizebillboardfonts() { 81 $(".billtextinner div").each(function(i){ 82 fs = Math.abs($(this).attr("font-size").replace("px", "")); 83 fp = fs / 1024; 84 nfs = $("#billtext").width() * fp; 85 $(this).css({"font-size":nfs+"px"}); 86 }); 87 } 88 function previewEffects(x) { 89 to = 0; 90 var timer = new Array(); 91 $(".billtextinner").hide(); 92 $(".thebbtext"+x).each(function() { 93 tid = $(this).attr("textid"); 94 time = Math.abs($(this).attr("slide_text_1_time")); 95 effect = $(this).attr("slide_text_1_effect"); 96 // alert(effect+" "+time); 97 previeweffecttimeout(tid,to,time,effect,x) 98 to = to + time; 99 }); 100 101 } 102 103function previeweffecttimeout(tid,to,time,effect,x) { 104 var timer = new Array(); 105 timer[tid] = setTimeout(function() { 106 showAnimation(tid,time,effect,x); 107 108 }, to); 109} 110 111 112function showAnimation(tid,time,effect,x) { 113 left = Math.abs($("#text"+x+""+tid).attr("x")); 114 tp = Math.abs($("#text"+x+""+tid).attr("y")); 115 116 117 118 width = $("#text"+x+""+tid).width(); 119 $("#billtext"+x+""+tid).css({"display":"none", "visibility":"none"}); 120 121 mid = ((1024 * left) / 100) + (width / 2); 122 midperc = (mid / 1024); 123 124 nl = ($("#billtext").width() * midperc) - (width / 2); 125 126 dif = (1024 / $("#billtext"+x+""+tid).parent().width()); 127 addwidth = (((width * dif) / 100) / 100) * width; 128 l = Math.abs($("#billtext"+x+""+tid).parent().width()) * (Math.abs(left) / 100); 129 l = left + dif ; 130 t = Math.abs($("#billtext"+x+""+tid).parent().height()) * (Math.abs(tp) / 100); 131 if(left <=1) { 132 nl = 1; 133 } 134 135 // $("#log").show().html("left: "+left+" width: "+width+" parent width: "+$("#billtext"+x+""+tid).parent().width()+" difference: "+dif+" L: "+l+" middle: "+mid+" mid percent: "+midperc+" new left: "+nl+""); 136 //$("#log").show().html($("#billtext").parent().width()); 137 138 if(bbrecent !== true) {
139 //$("#billtext"+x+""+tid).css({ "left":nl+"px","top":t+"px"}); 140 } 141 142 if(effect == "fadeIn") { 143 $("#billtext"+x+""+tid).stop(true,true).fadeIn(time); 144 } 145 if(effect == "slideDown") { 146 $("#billtext"+x+""+tid).stop(true,true).slideDown(time); 147 } 148 if(effect == "showleft") { 149 $("#billtext"+x+""+tid).css({"display":"inline", "visibility":"visible", "left":"-=60"}); 150 $("#billtext"+x+""+tid).stop(true,true).animate({"opacity":"1", "left":"+=60"},time, "easeOutBack"); 151 } 152 153 if(effect == "showright") { 154 $("#billtext"+x+""+tid).css({"display":"inline","opacity":"0", "visibility":"visible", "left":"+=60"}); 155 $("#billtext"+x+""+tid).stop(true,true).animate({"opacity":"1", "left":"-=60"},time, "easeOutBack"); 156 } 157 if(effect == "showtop") { 158 $("#billtext"+x+""+tid).css({"display":"inline","opacity":"0", "visibility":"visible", "top":"-=60"}); 159 $("#billtext"+x+""+tid).stop(true,true).animate({"opacity":"1", "top":"+=60"},time, "easeOutBack"); 160 } 161 162 if(effect == "showbottom") { 163 $("#billtext"+x+""+tid).css({"display":"inline","opacity":"0", "visibility":"visible", "top":"+=60"}); 164 $("#billtext"+x+""+tid).stop(true,true).animate({"opacity":"1", "top":"-=60"},time, "easeOutBack"); 165 } 166 167} 168 169 170function removebbtext() { 171 $(".billtextinner").fadeOut(200); 172} 173 174 175function neatbbswapclick(x) { 176 window['timeron'] = false; 177 window.clearInterval(bbslidetimer); 178 $("#neatbbslides").attr("bbspeed",100) 179 $(".neatbbslide").each(function(i){ 180 var this_id = this.id; 181 $("#"+this_id+"g").removeClass("burnsin").removeClass("burnsout"); 182 }); 183 $(".bbtext").hide(); 184 if(x !== $("#neatbbslides").attr("cbb")) { 185 neatbbswap(x); 186 } 187 188} 189 190function checkBBText(x) { 191 var thisspeed1 = Math.abs($("#billtextinner"+x).attr("tm1")); 192 var thisspeed2 = Math.abs($("#billtextinner"+x).attr("tm2")); 193 194 if($("#billtextinner"+x).attr("eff1") == "fadeIn") { 195 $("#text"+x+"a").stop(true,true).fadeIn(thisspeed1); 196 } 197 if($("#billtextinner"+x).attr("eff1") == "slideDown") { 198 $("#text"+x+"a").stop(true,true).slideDown(thisspeed1); 199 } 200 201 setTimeout(function() { 202 if($("#billtextinner"+x).attr("eff2") == "fadeIn") { 203 $("#text"+x+"b").stop(true,true).fadeIn(thisspeed2); 204 } 205 if($("#billtextinner"+x).attr("eff2") == "slideDown") { 206 $("#text"+x+"b").stop(true,true).slideDown(thisspeed2); 207 } 208 209 }, thisspeed1); 210 211} 212 213 function neatbbswap(x) { 214 removebbtext(); 215 216 $(".slidenav li").removeClass("bnon"); 217 218 $("#bn"+x).addClass("bnon"); 219 resizeImgToBillboard($("#slide"+x+"g"),"neatbb"); 220 221 if($("#neatbbslides").attr("trans") == 'neatbbfade') { 222 neatbbfade(x); 223 } 224 if($("#neatbbslides").attr("trans") == 'neatbbslidedown') { 225 neatbbslidedown(x); 226 } 227 228 if($("#neatbbslides").attr("trans") == 'neatbbslideswap') { 229 neatbbslideswap(x); 230 } 231 if($("#neatbbslides").attr("trans") == 'neatbbslidelr') { 232 neatbbslidelr(x); 233 } 234 // alert(stopbb+" + "+timeron+" + "+$("#neatbbslides").attr("bbtime")+" + "+x+" + "+loop); 235 if(timeron == true) { 236 if(x == Math.abs($("#neatbbslides").attr("numslides"))) { 237 n = 1; 238 if($("#neatbbslides").attr("loopslides") !== "true") { 239 var stopbb = true; 240 } 241 } else { 242 n = x+1; 243 } 244 if(stopbb !== true) { 245 if(timeron == true) { 246 bbslidetimer = window.setTimeout(function(){ neatbbswap(n) },$("#neatbbslides").attr("bbtime")); 247 } 248 } 249 } 250 } 251 252 253 function neatbbfade(x) { 254 $(".bbtext").each(function() { 255 $(this).fadeOut(Math.abs($("#neatbbslides").attr("bbspeed"))); 256 }); 257 258 $(".neatbbslide").each(function(i){ 259 var this_id = this.id; 260 $("#"+this_id).fadeOut(Math.abs($("#neatbbslides").attr("bbspeed")), function() { 261 // $("#"+this_id+"g").removeClass("burnsin").removeClass("burnsout"); 262 // $("#log").show().append(this_id+" | "); 263 }); 264 }); 265 if(window['timeron'] == true) { 266 $("#slide"+x).addClass($("#slide"+x).attr("data-effect")); 267 } 268 $("#slide"+x).fadeIn(Math.abs($("#neatbbslides").attr("bbspeed")), function() { 269 previewEffects(x); 270 271 $(".neatbbslide").each(function(i){ 272 var this_id = this.id; 273 if(this_id !== "slide"+x) { 274 // $("#"+this_id+"g").removeClass("burnsin").removeClass("burnsout"); 275 // $("#log").show().append(this_id+" - "+x+" | "); 276 } 277 }); 278 279 }); 280 281 $("#neatbbslides").attr("cbb",x); 282 283 } 284 285function neatbbslidedown(x) { 286 $("#slide"+$("#neatbbslides").attr("cbb")).stop(true,true).animate({ 287 marginTop:$("#neatbbslides").attr("bbheight")+'px' 288 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { }); 289 290 $("#slide"+x).css('margin-top', '-'+$("#neatbbslides").attr("bbheight")+'px'); 291 $("#slide"+x).css('display', 'inline'); 292 293 $("#slide"+x).stop(true,true).animate({ 294 marginTop:'0px' 295 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { 296 $("#neatbbslides").attr("cbb",x); 297 }); 298} 299 300function neatbbslideswap(x) { 301 $("#slide"+$("#neatbbslides").attr("cbb")).stop(true,true).animate({ 302 marginTop:$("#neatbbslides").attr("bbheight")+'px' 303 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { }); 304 305 $("#slide"+x).css('margin-top', $("#neatbbslides").attr("bbheight")+'px'); 306 $("#slide"+x).css('display', 'inline'); 307 308 $("#slide"+x).stop(true,true).animate({ 309 marginTop:'0px' 310 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { 311 $("#neatbbslides").attr("cbb",x); 312 }); 313} 314 315 316function neatbbslidelr(x) { 317 $("#slide"+$("#neatbbslides").attr("cbb")).stop(true,true).animate({ 318 marginLeft:'-'+$("#neatbbslides").attr("bbwidth")+'px' 319 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { }); 320 321 $("#slide"+x).css('margin-left', $("#neatbbslides").attr("bbwidth")+'px'); 322 $("#slide"+x).css('display', 'inline'); 323 324 $("#slide"+x).stop(true,true).animate({ 325 marginLeft:'0px' 326 }, Math.abs($("#neatbbslides").attr("bbspeed")), function() { 327 $("#neatbbslides").attr("cbb",x); 328 }); 329 330} 331 332 333function resizeImgToBillboard(bgImg,where) { 334 noupsize = 0; 335 captionPhotoOn = 0; 336 showScroll = 0; 337 landscapeLeft = 0; 338 portraitLeft = 0; 339 containheight = 0; 340 containwidth = 0; 341 fullscreenmenu = 0; 342 disableshowscroll = true; 343// alert("ok"); 344// add_pad = parseInt(bgImg.css("paddingLeft").replace("px", "") )*2; 345// add_border = parseInt(bgImg.css("border-left-width").replace("px", "")) * 2; 346 add_pad = 0; 347 add_border = 0; 348// alert(add_pad+" "+add_border); 349 var imgwidth = parseInt(bgImg.attr("ww") ); 350 var imgheight = parseInt(bgImg.attr("hh")); 351 352// var imgwidth = bgImg.width(); 353// var imgheight = bgImg.height(); 354 355// alert(imgwidth +" X "+imgheight); 356 if(where == "window") { 357 var winwidth = $(window).width(); 358 if((add_menu_height == true)&&((imgheight < ($(window).height() - $("#blogFullScreenMenu").outerHeight())))&&(noupsize == 1)) { 359 addMenu = true; 360 } 361 if(containheight == "1" &&imgheight > imgwidth) { 362 addMenu = true; 363 } 364 if(containwidth == "1" &&imgwidth > imgheight) { 365 addMenu = true; 366 } 367// alert(imgheight +" < "+ $(window).height() +" - "+$("#blogFullScreenMenu").outerHeight()); 368 if(addMenu == true) { 369 winheight = $(window).height() - $("#blogFullScreenMenu").outerHeight(); 370 } else { 371 winheight = $(window).height(); 372 } 373 } else { 374 var winwidth = $("#"+where).width(); 375 var winheight = $("#"+where).height() ; 376 var thewinheight = $("#"+where).height(); 377 } 378 379 var widthratio = winwidth / imgwidth; 380 var heightratio = winheight / imgheight; 381 var widthdiff = heightratio * imgwidth; 382 var heightdiff = widthratio * imgheight; 383// alert(winwidth+' X '+winheight+' image: '+imgwidth+' X '+imgheight); 384 if((noupsize == '1')&&((imgwidth<winwidth)||(imgheight<winheight))) { 385// alert("AAAAAA"); 386 if(imgheight > winheight) { 387 if(imgheight > imgwidth) { 388 leftmove = portraitLeft; 389 } else { 390 leftmove = landscapeLeft; 391 } 392 393 mt = 0; 394 if(fullscreenmenu == true) { 395 menuTop = $("#blogFullScreenMenu").css('top').replace("px", ""); 396 } else { 397 menuTop = false; 398 } 399 400 if(menuTop <= 0) { 401 menuHeight = $("#blogFullScreenMenu").outerHeight(); 402 mt = menuHeight; 403 } 404 bgImg.css({ 405 width:'auto', 406 height: winheight+'px', 407 marginLeft: leftmove 408 409 }); 410 } else { 411 // alert("BBBBBB"); 412 413 if(imgheight > imgwidth) { 414 leftmove = portraitLeft; 415 } else { 416 leftmove = landscapeLeft; 417 } 418 mt = (winheight - imgheight) / 2; 419 if(fullscreenmenu == true) { 420 menuTop = $("#blogFullScreenMenu").css('top').replace("px", ""); 421 } else { 422 menuTop = false; 423 } 424 425 if(menuTop <= 0) { 426 menuHeight = $("#blogFullScreenMenu").outerHeight(); 427 mt = mt + menuHeight; 428 } 429 430 431 432 if(imgwidth > winwidth) { 433 newwidth = winwidth; 434// alert(newwidth); 435 height = imgheight *widthratio; 436 437 bgImg.css({ 438 width:newwidth+'px', 439 height: height+'px', 440 marginLeft: landscapeLeft 441 442 }); 443 } else { 444 445 // alert("WTF"); 446 bgImg.css('margin-top',''+mt+'px'); 447 bgImg.css('margin-left',leftmove); 448 } 449 } 450 } else if((imgheight > imgwidth)&&(containheight =='1')) { 451// alert("CCCCCCC"); 452 453 mt = 0; 454 if(fullscreenmenu == true) { 455 menuTop = $("#blogFullScreenMenu").css('top').replace("px", ""); 456 } else { 457 menuTop = false; 458 } 459 460 if(menuTop <= 0) { 461 menuHeight = $("#blogFullScreenMenu").outerHeight(); 462 mt = menuHeight; 463 } 464 465 bgImg.css({ 466 width:'auto', 467 'margin-top': ''+mt+'px', 468 469 height: winheight- add_pad - add_border+'px', 470 marginLeft: portraitLeft 471 }); 472 } else if((imgwidth >= imgheight)&&(containwidth =='1')) { 473// alert("DDDDDDD"); 474 475 if(heightratio >widthratio ) { 476 height = imgheight *widthratio; 477 if(height < winheight) { 478 mt = Math.abs((winheight - height) / 2); 479 } else { 480 mt = '0'; 481 } 482 bgImg.css({ 483 width:winwidth- add_pad - add_border+'px', 484 height: height- add_pad - add_border+'px', 485 marginTop: mt+'px', 486 marginLeft: landscapeLeft 487 488 }); 489 } else { 490 mt = 0; 491 if(fullscreenmenu == true) { 492 menuTop = $("#blogFullScreenMenu").css('top').replace("px", ""); 493 } else { 494 menuTop = 0; 495 } 496 497 if(menuTop <= 0) { 498 menuHeight = $("#blogFullScreenMenu").outerHeight(); 499 mt = menuHeight; 500 } 501 502 newwidth = (winheight- add_pad - add_border) * (imgwidth / imgheight); 503// alert(newwidth); 504 505 bgImg.css({ 506 width:newwidth+'px', 507 'margin-top': ''+mt+'px', 508 height: winheight- add_pad - add_border+'px', 509 marginLeft: landscapeLeft 510 511 }); 512 } 513 514 515 } else { 516 517 518 if(heightdiff>winheight) { 519 borderW = parseInt(bgImg.css("border-left-width")); 520 bgImg.css({ 521 width: winwidth+'px', 522 'margin-left': '-'+borderW+'px', 523 height: heightdiff+'px' 524 }); 525 mt = (heightdiff - winheight) / 2; 526 527 528 if(mt > 0) { 529 // alert(mt); 530 bgImg.css('margin-top','-'+mt+'px'); 531 showScroll = 1; 532 } 533 } else { 534 535 if(widthdiff > winwidth) { 536 ml = Math.abs((widthdiff - winwidth )/ 2); 537 } else { 538 ml= '0'; 539 } 540 541 bgImg.css({ 542 width: widthdiff+'px', 543 height: winheight+'px', 544 marginLeft: '-'+ml+'px' 545 }); 546 } 547 } 548 newml = $(bgImg).outerWidth() / 2; 549 newmt = ((thewinheight - $(bgImg).height()) / 2); 550// bgImg.css('margin-left','-'+newml+'px'); 551 bgImg.css('margin-top',''+newmt+'px'); 552 553// alert(newmt+' - '+winheight +' - '+ $(bgImg).outerHeight()); 554 if(bgImg.attr("data-margin-top") == "null") { 555 bgImg.attr("data-margin-top",newmt) 556 } 557 // alert(bgImg.attr("data-margin-top")); 558} 559 560 561 562function scrolltocontent() { 563 $('html').animate({scrollTop:$("#neatbbslides").height()}, 'slow'); 564 $('body').animate({scrollTop:$("#neatbbslides").height()}, 'slow'); 565} 566 567 568 569/*########################### END BILLBOARD FUCTIONS ########################################## */
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.