1/* 2$(function() { 3 $.fn.scrollBottom = function() { 4 return $(document).height() - this.scrollTop() - this.height(); 5 }; 6 7 var tmmb = $("#tmmb").offset().top; 8 9 var $el = $('#headerAndMenuInner'); 10 var $window = $(window); 11 $window.bind("scroll resize load", function() { 12 var gap = $window.height() - $el.height() - 10; 13 var visibleFoot = 1 - $window.scrollBottom(); 14 var scrollTop = $window.scrollTop(); 15 mb = Math.abs(scrollTop) + Math.abs($window.height()); 16 mtop = Math.abs(tmmb) - $window.height(); 17 //$("#log").show().append(mb+" > tmmb: "+tmmb+" whL "+$window.height()+" Top: "+mtop+" ||"); 18 if(mb > tmmb){ 19 $("#headerAndMenu").css({ 20 21 top: "-"+mtop+"px", 22 "position":"fixed", 23 "height":"100%" 24 }); 25 26 27 } else { 28 29 $("#headerAndMenu").css({ 30 top: "0px", 31 bottom: "auto", 32 "position":"absolute", 33 "height":"auto" 34 }); 35 } 36 }); 37}); 38*/ 39 40showminimenu = "1"; 41var mm; 42$(document).ready(function(){ 43 clfmenumenu(); 44 45 $(".showclfthumbs").unbind().bind( "click", function() {showclfthumbs() }); 46 $("#showclfmenumain").unbind().bind( "click", function() {showclfmenumain() }); 47 $(".buyclfphoto").unbind().bind( "click", function() { clfbuyphoto()}); 48 $(".clffree").unbind().bind( "click", function() { clffreephoto()}); 49/* 50$("#homefeaturerecent").hover(function() { 51 checkrecentscroll(); 52 }, function() { 53 $("#homefeaturerecent").css({"overflow-y":"hidden"}); 54 }); 55*/ 56 57 58 checkrecentscroll(); 59 if(showminimenu == "1" && main_full_screen == "1") { 60 if($("body").width() > 800) { 61 np = "fixed"; 62 } else { 63 np = "relative"; 64 } 65 if($("#shopmenucontainer").css("display")!=="none") { 66 shopmenuheight = $("#shopmenucontainer").height(); 67 } else { 68 shopmenuheight = 0; 69 } 70 if($("#clfmenu").css("display")!=="none" && $("#clfmenu").css("display")!=="undefined") { 71 clfmenuheight = $("#clfmenu").height(); 72 } else { 73 clfmenuheight = 0; 74 } 75 76 $("#mainfeature").css({"top": Math.abs($("#headerAndMenu").height()) + Math.abs(clfmenuheight)+"px", "height":$(window).height() - Math.abs($("#headerAndMenu").height()) - Math.abs(shopmenuheight) - Math.abs(clfmenuheight)+"px" }); 77 placeCLFnav(); 78 $(".homefeaturerecent").css({"top":$("#headerAndMenu").height() + Math.abs(clfmenuheight)+"px"}); 79 } else { 80 if(main_full_screen == "1") { 81 // $("#headerAndMenu").hide(); 82 } 83 } 84 sizecatphoto('catphoto'); 85 sizecatphoto('mainfeature'); 86 sizemainfeature(); 87 sizecatphoto('featsidemenuitem'); 88 89 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"=1&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 90 $("#mainfeature").append(data); 91 sizecatphoto('mainfeature'); 92 sizemainfeature(); 93 if(norightclick == '1') { 94 disablerightclick(); 95 } 96 97 98 $("#main-1").imagesLoaded( function() { 99 if($("#main-1").find(".homephotos").attr("blurbg") == "1") { 100 // $("#main-1").find(".homephotos").parent().parent().parent().parent().prepend('<div class="mainphotobg" id="mainphotobg-1" style="position: absolute; left: 0; display: block; background: url(\''+$("#main-1").find(".homephotos").attr("src")+'\') no-repeat center center fixed; background-size: cover;"></div><div class="mainphotobggrid"></div>'); 101 } 102 103 addclfswipe("main-1"); 104 105 106 107 $("#loadingstuff").fadeOut(200); 108 109 setTimeout(function(){ $("#main-1").fadeIn(400)}, 200 ); 110 sizemainfeature(); 111 if(totalmslides > 1) { 112 startmainfeature(); 113 setTimeout(function() { 114 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"=2&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 115 $("#mainfeature").append(data); 116 sizecatphoto('mainfeature'); 117 sizemainfeature(); 118 if(norightclick == '1') { 119 disablerightclick(); 120 } 121 122 }); 123 }, slide_speed); 124 125 setTimeout(function() { 126 127 if($("#main-"+totalmslides).length == 0) { 128 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"="+totalmslides+"&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 129 $("#mainfeature").append(data); 130 sizecatphoto('mainfeature'); 131 sizemainfeature(); 132 if(norightclick == '1') { 133 disablerightclick(); 134 } 135 136 });
137 } 138 }, slide_speed); 139 140 141 } 142 }); 143 // sideitemsposition(); 144 145 if(titleplacement == "br") { 146 if(logoplacement == "br") { 147 $("#pagefeattitletext").css({"bottom":$("#mainfeaturelogo").height() + 8+"px","right":"0px","text-align":"right"}); 148 } else { 149 $("#pagefeattitletext").css({"bottom":"8px","right":"0px","text-align":"right"}); 150 } 151 } 152 if(titleplacement == "tl") { 153 if(logoplacement == "tl") { 154 $("#pagefeattitletext").css({"top":$("#mainfeaturelogo").height()+"px","left":"0px"}); 155 } else { 156 $("#pagefeattitletext").css({"top":"8px","left":"0px"}); 157 } 158 } 159 if(titleplacement == "bl") { 160 if(logoplacement == "bl") { 161 $("#pagefeattitletext").css({"bottom":$("#mainfeaturelogo").height() + 8+"px","left":"0px"}); 162 } else { 163 $("#pagefeattitletext").css({"bottom":"8px","left":"0px"}); 164 } 165 } 166 if(titleplacement == "tr") { 167 if(logoplacement == "tr") { 168 $("#pagefeattitletext").css({"top":$("#mainfeaturelogo").height() + 8+"px","right":"0px","text-align":"right"}); 169 } else { 170 $("#pagefeattitletext").css({"top":"8px","right":"0px","text-align":"right"}); 171 } 172 } 173 174 175 }); 176 177 $(".mainfeaturenav").click(function() { 178 clearInterval(mainfeatrun); 179 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 180 }); 181 182 $(".homephotos").hover(function(){ 183 $(this).stop().animate({"opacity":hoveropacity}, 200); 184 }, function(){ 185 $(this).stop().animate({"opacity":initialopacity}, 200); 186 }); 187 $(window).resize(function() { 188 if($("#clfthumbs").attr("data-showing") !== "1") { 189 clfmenumenu(); 190 } 191 sizecatphoto('catphoto'); 192 sizecatphoto('mainfeature'); 193 setTimeout(function() { 194 sideitemsposition(); 195 sizecatphoto('featsidemenuitem'); 196 }, 200); 197 placeCLFnav(); 198 sizemainfeature(); 199 }); 200 $(".featmenu").click(function() { 201 if($("#featmenumain").height() > ($(window).height() - $("#mainfeaturelogo").height())) { 202 $("#featmenumain").css({"height":$(window).height() - $("#mainfeaturelogo").height()+"px", "overflow-y":"scroll" }); 203 204 } 205 $("#featmenumain").css({"top":$("#mainfeaturelogo").height() + 8+"px","left":"0px"}); 206 207 $("#featmenumain").toggle(200); 208 }); 209 showchecksmall(); 210 211 $(window).resize(function() { 212 showchecksmall(); 213 }); 214}); 215 216function clfmenumenu() { 217 menuwidth = 48; 218 $("#clfmoremenu li").hide(); 219 $( "#clfmenuleft li" ).each(function( index ) { 220 if (!$(this).hasClass("moresub")) { 221 mainmenuwidth = Math.round($(window).width()) - Math.round($("#clfmenuright").outerWidth()) - Math.round($("#clfmoremenubutton").outerWidth()); 222 checkmenuwidth = menuwidth + Math.round($(this).outerWidth()); 223 if($(this).attr("id")!=="clfmoremenubutton") { 224 if(Math.round(checkmenuwidth) < Math.round(mainmenuwidth)){ 225 // $("#log").show().append("show: "+$(this).attr("data-menu-item")+" = "+checkmenuwidth+" > "+mainmenuwidth+" - "+$(window).width()+" more: "+Math.round($("#clfmoremenubutton").outerWidth())+"<br> "); 226 $("#clfmenuleft").children("[data-menu-item='" +$(this).attr("data-menu-item") + "']").show(); 227 $("#clfmoremenu").children("[data-menu-item='" +$(this).attr("data-menu-item") + "']").hide(); 228 } else { 229 mm = true; 230 231 // $("#log").show().append("hide: "+$(this).attr("data-menu-item")+" = "+checkmenuwidth+" > "+mainmenuwidth+" - "+$(window).width()+" more: "+Math.round($("#clfmoremenubutton").outerWidth())+" <br> "); 232 $("#clfmenuleft").children("[data-menu-item='" +$(this).attr("data-menu-item") + "']").hide(); 233 $("#clfmoremenu").children("[data-menu-item='" +$(this).attr("data-menu-item") + "']").show(); 234 } 235 } 236 menuwidth = checkmenuwidth; 237 } 238}); 239 if(mm == true) { 240 $("#clfmoremenubutton").show(); 241 } else { 242 $("#clfmoremenubutton").hide(); 243 } 244} 245function clfbuyphoto() { 246 clearInterval(mainfeatrun); 247 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 248 buyphoto('',$("#main-"+$("#mainfeature").attr("data-cur")).attr("data-picid")); 249} 250function clffreephoto() { 251 clearInterval(mainfeatrun); 252 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 253 freephoto($("#main-"+$("#mainfeature").attr("data-cur")).attr("data-picid"),$("#main-"+$("#mainfeature").attr("data-cur")).attr("data-did"),$("#main-"+$("#mainfeature").attr("data-cur")).attr("data-free")); 254} 255function fixclfdisplay() { 256 $("#clfdisplay").css({"position":"fixed", "top":"0px","left":"0px","width":"100%"}); 257} 258function unfixclfdisplay() { 259 $("#clfdisplay").css({"position":"relative", "top":"auto","left":"auto","width":"auto"}); 260 261 clfmenumenu(); 262} 263function showclfmenumain() { 264 clearInterval(mainfeatrun); 265 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 266 fixclfdisplay(); 267 gototop(); 268 $("#clfmenumain").css({"top":$("#clfmenu").height()+"px"}).slideDown(300); 269 $("#showclfmenumain").unbind().bind( "click", function() {closeclfmenumain() }); 270} 271function closeclfmenumain() { 272 unfixclfdisplay(); 273 $("#clfmenumain").css({"top":$("#clfmenu").height()+"px"}).slideUp(300); 274 $("#showclfmenumain").unbind().bind( "click", function() {showclfmenumain() }); 275} 276 277 278 279function showclfthumbs() { 280 clearInterval(mainfeatrun); 281 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 282 fixclfdisplay(); 283 $(".hideonthumbs").hide(); 284 $("#clfthumbsbg").fadeIn(100, function() { 285 if($("#clfthumbs").attr("data-populated") == "1") { 286 $("#clfthumbs").fadeIn(300, function() { 287 $("#clfthumbs").attr("data-showing","1"); 288 getclfthumbposition('thumbendpage'); 289 }); 290 291 } else { 292 $("#clfthumbs").css({"top":$("#clfmenu").height()+"px"}).append('<div style="margin: auto; margin-top: 180px; text-align: center;"><img src="'+tempfolder+'/sy-graphics/loading-page.gif"></div>').show(); 293 $("#clfthumbsmenu").show(); 294 setTimeout(function() { 295 $.get(tempfolder+"/sy-inc/show/show-thumbnails.php?page=1&date_id="+$("#vinfo").attr("did")+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 296 $("#clfthumbs").html("").append('<div id="displayThumbnailPage">'+data+'</div><div class="clear"></div><div id="thumbendpage"></div>'); 297 setTimeout(hideLoadingMore,1000); 298 $("#clfthumbs").attr("data-populated","1"); 299 $("#clfthumbs").attr("data-showing","1"); 300 getclfthumbposition('thumbendpage'); 301 }); 302 },500); 303 } 304 }); 305 $(".showclfthumbs").unbind().bind( "click", function() {closeclfthumbs(200) }); 306 307} 308
309function closeclfthumbs(closespeed) { 310 $("#clfthumbs").fadeOut(closespeed, function() { 311 unfixclfdisplay(); 312 window.clearInterval(thumbpopulate); 313 $("#clfthumbs").attr("data-showing","0"); 314 $("#clfthumbsbg").fadeOut(100, function() { 315 $(".hideonthumbs").show(); 316 clfmenumenu(); 317 }); 318 }); 319 $(".showclfthumbs").unbind().bind( "click", function() {showclfthumbs() }); 320} 321 322 323function getclfthumbposition(d){ 324 thumbpopulate = setInterval("getclfthumbpositionhere('thumbendpage')",500); 325} 326 327function getclfthumbpositionhere(d){ 328 divEnd = document.getElementById(d).offsetTop; 329 var screenWidth = GetScreenWidth(); 330 var screenHeight = GetScreenHeight(); 331 var divY = findPosY(document.getElementById(d)) 332 var pageHeight = document.documentElement.scrollHeight; 333 var clientHeight = document.documentElement.clientHeight; 334 if(window.pageYOffset) { 335 scrollPos = window.pageYOffset; 336 } else { 337 scrollPos = document.documentElement.scrollTop; 338 } 339 if(scrollPos > 1000) { 340 $("#gototop").fadeIn(400); 341 } else { 342 $("#gototop").fadeOut(400); 343 } 344 // $("#log").show().append(scrollPos+' - '+screenHeight+' - '+divEnd+' <br>'); 345 346 if((scrollPos + screenHeight) > (divEnd - 400)) { 347 var curPage = $("#vinfo").attr("thumbPageID"); 348 curPage = parseInt(curPage); 349 var date_id = $("#vinfo").attr("did"); 350 var sub_id = $("#vinfo").attr("sub_id"); 351 var keyWord = $("#vinfo").attr("keyWord"); 352 var kid = $("#vinfo").attr("kid"); 353 var orderBy = $("#vinfo").attr("orderBy"); 354 var pic_camera_model = $("#vinfo").attr("pic_camera_model"); 355 var pic_upload_session = $("#vinfo").attr("pic_upload_session"); 356 var orientation = $("#vinfo").attr("orientation"); 357 var untagged = $("#vinfo").attr("untagged"); 358 var acdc = $("#vinfo").attr("acdc"); 359 var view = $("#vinfo").attr("view"); 360 var cat_id = $("#vinfo").attr("cat_id"); 361 var plid = $("#vinfo").attr("plid"); 362 var nextPage = parseInt(curPage + 1); 363 var pic_client = $("#vinfo").attr("pic_client"); 364 var search_date = $("#vinfo").attr("search_date"); 365 var search_length = $("#vinfo").attr("search_length"); 366 var from_time = $("#vinfo").attr("from_time"); 367 if(document.getElementById("page-"+nextPage)) { 368 if(document.getElementById("page-"+nextPage)){ 369 if(curPage % thumb_limit === 0) { 370 $("#navthumbpages").show(); 371 window.clearInterval(thumbpopulate); 372 } else { 373 374 showLoadingMore(); 375 $.get(tempfolder+"/sy-inc/show/show-thumbnails.php?page="+nextPage+"&date_id="+date_id+"&sub_id="+sub_id+"&cat_id="+cat_id+"&pic_client="+pic_client+"&keyWord="+keyWord+"&kid="+kid+"&orderBy="+orderBy+"&acdc="+acdc+"&view="+view+"&pic_upload_session="+pic_upload_session+"&untagged="+untagged+"&pic_camera_model="+pic_camera_model+"&orientation="+orientation+"&acdc="
375+acdc+"&price_list="+plid+"&mobile="+ismobile+"&search_date="+search_date+"&search_length="+search_length+"&from_time="+from_time, function(data) { 376 $("#displayThumbnailPage").append(data); 377 setTimeout(hideLoadingMore,1000); 378 }); 379 $("#vinfo").attr("thumbPageID",nextPage); 380 } 381 } 382 } 383 } 384 385} 386 387 388 389function placeCLFnav() { 390 if($("#clfmenu").css("display")!=="none") { 391 clfmenuheight = $("#clfmenu").height(); 392 } else { 393 clfmenuheight = 0; 394 } 395 396 if(navplacement == "tr" || navplacement == "tl") { 397 $(".mainfeaturenavcontainer").css({"top":$("#headerAndMenu").height() + Math.abs(clfmenuheight)+"px"}); 398 } else { 399 $(".mainfeaturenavcontainer").css({"top":$("#mainfeature").height()+$("#headerAndMenu").outerHeight(true) - $(".mainfeaturenavcontainer").height() - 8+"px"}); 400 } 401} 402function showchecksmall() { 403 if($("body").width() <= 800) { 404 $("#mainfeature").css({ "width":"100%"}); 405 $(".homefeaturerecent").css({"position":"relative", "width":"100%", "height":"auto", "overflow":"auto", "top":"auto"}); 406 // $(".mainfeaturenavcontainer").css({"right":"0"}); 407 } else { 408 $("#mainfeature").css({ "width":$("#mainfeature").attr("data-width")+"%", "position":"absolute"}); 409 sizemainfeature(); 410 $(".homefeaturerecent").css({"top":$("#headerAndMenu").height()+"px"}); 411 412 // $(".mainfeaturenavcontainer").css({"right":100 - $("#mainfeature").attr("data-width")+"%"}); 413 checkrecentscroll(); 414 } 415} 416function checkrecentscroll() { 417 if($("body").width() <= 800) { 418 419 } else { 420 if($("#shopmenucontainer").css("display")!=="none") { 421 shopmenuheight = $("#shopmenucontainer").height(); 422 } else { 423 shopmenuheight = 0; 424 } 425 if($("#clfmenu").css("display")!=="none") { 426 clfmenuheight = $("#clfmenu").height(); 427 } else { 428 clfmenuheight = 0; 429 } 430 431 $("#homefeaturerecent").css({"top":$("#headerAndMenu").height() + Math.abs(clfmenuheight)+"px","height":$(window).height() - Math.abs($("#headerAndMenu").height()) - Math.abs(shopmenuheight) - Math.abs(clfmenuheight)+"px", "position":"absolute", "width":100 - $("#mainfeature").attr("data-width")+"%"}); 432 if($(window).height() - $("#headerAndMenu").height() - Math.abs(shopmenuheight) - Math.abs(clfmenuheight) < $(".homefeaturerecent .inner").height()) { 433 $("#homefeaturerecent").css({"height":$(window).height() - Math.abs($("#headerAndMenu").height()) - Math.abs(shopmenuheight) - Math.abs(clfmenuheight)+"px","overflow-y":"scroll"}); 434 } 435 } 436} 437function startmainfeature() { 438 mainfeatrun = setInterval(function() { changem('next','','')}, mainfeaturetimer); 439} 440function stopmainfeature() { 441 clearInterval(mainfeatrun); 442} 443function changepp() { 444 if($("#mainfeaturepp").hasClass("icon-pause")) { 445 stopmainfeature(); 446 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 447 } else { 448 slide_speed = slide_show_slide_speed; 449 change_effect = slide_show_change_effect; 450 changem('next','',''); 451 startmainfeature(); 452 $("#mainfeaturepp").removeClass("icon-play").addClass("icon-pause"); 453 } 454} 455 456 457 458function addclfswipe(id) { 459org_change_effect = change_effect; 460 $("#"+id).swipe( { 461 swipeLeft: function() { 462 change_effect = 'slide'; 463 slide_speed = 300; 464 changem('next','',''); 465 clearInterval(mainfeatrun); 466 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 467 change_effect = org_change_effect; 468 469 }, 470 swipeRight: function() { 471 change_effect = 'slide'; 472 slide_speed = 300; 473 changem('prev','',''); 474 clearInterval(mainfeatrun); 475 $("#mainfeaturepp").removeClass("icon-pause").addClass("icon-play"); 476 change_effect = org_change_effect; 477 }, 478 allowPageScroll: 'vertical', 479 excludedElements: "button, input, select, textarea, .noSwipe", 480 tap: function(event, target) { 481 // window.open($(target).closest('.carusel-cnt').find('carusel-cnt-link').attr('href'), '_self'); 482 }, 483 // threshold:0 484 485 486 }); 487} 488 489function clickclfthumb(id) { 490 $('html').animate({scrollTop:0}, 0); 491 $('body').animate({scrollTop:0}, 0); 492 493 changem('',id,'click'); 494 closeclfthumbs(0); 495} 496 497function changem(tmi,id,click) { 498 if(click == "click") { 499 change_effect = 'fade'; 500 slide_speed = 100; 501 } 502 if(tmi == "next") { 503 thisslide = Math.abs($("#mainfeature").attr("data-cur")) + 1; 504 dira = 'left'; 505 dirb = 'right';
506 if(thisslide > totalmslides) { 507 thisslide = 1; 508 } 509 } 510 if(tmi == "prev") { 511 thisslide = Math.abs($("#mainfeature").attr("data-cur")) - 1; 512 dira = 'right'; 513 dirb = 'left'; 514 if(thisslide <= 0) { 515 thisslide = totalmslides; 516 } 517 } 518 if(id > 0) { 519 thisslide = id; 520 } 521 522 523 if($("#main-"+thisslide).length == 0) { 524 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"="+thisslide+"&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 525 $("#mainfeature").append(data); 526 sizecatphoto('mainfeature'); 527 sizemainfeature(); 528 change_effect = "fade"; 529 slide_speed = 100; 530 changeslide(); 531 if(norightclick == '1') { 532 disablerightclick(); 533 } 534 535 }); 536 537 } else { 538 539 changeslide(); 540 541 } 542} 543 544 545function changeslide() { 546 $("#main-"+$("#mainfeature").attr("data-cur")).imagesLoaded( function() { 547 $("#main-"+$("#mainfeature").attr("data-cur")).find("img").fadeIn(400); 548 }); 549 550 if(thisslide !== $("#mainfeature").attr("data-cur")) { 551 var refW = $("#mainfeature").width(); 552 if(change_effect == "fade") { 553 $("#main-"+$("#mainfeature").attr("data-cur")).fadeOut(slide_speed); 554 $("#main-"+thisslide).fadeIn(slide_speed, function() { 555 $(this).find(".svg-image-blur").fadeIn(400); 556 }); 557 // if ($("#mainfeature").attr("data-cur") == "1") { $("#mainphotobg-1").fadeOut(slide_speed); } 558 } else { 559 $("#main-"+$("#mainfeature").attr("data-cur")).hide('slide', {direction: dira, easing: 'easeOutExpo'}, slide_speed); 560 // if ($("#mainfeature").attr("data-cur") == "1") { $("#mainphotobg-1").hide('slide', {direction: dira, easing: 'easeOutExpo'}, slide_speed); } 561 562 $("#main-"+thisslide).show('slide', {direction: dirb, easing: 'easeOutExpo'}, slide_speed, function() { 563 }); 564 } 565 566 567 568 addclfswipe("main-"+thisslide); 569 $("#mainfeature").attr("data-cur",thisslide) 570 $("#mscount").html("").append(thisslide); 571 nextslide = thisslide + 1; 572 if(nextslide > totalmslides) { 573 nextslide = 1; 574 } 575 prevslide = thisslide - 1; 576 if(prevslide <= 0) { 577 prevslide = totalmslides; 578 } 579 setTimeout(function() { 580 if($("#main-"+nextslide).length == 0) { 581 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"="+nextslide+"&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 582 $("#mainfeature").append(data); 583 sizecatphoto('mainfeature'); 584 sizemainfeature(); 585 if(norightclick == '1') { 586 disablerightclick(); 587 } 588 }); 589 } 590 }, slide_speed); 591 592 setTimeout(function() { 593 if($("#main-"+prevslide).length == 0) { 594 $.get(tempfolder+"/sy-inc/show/show-actions.php?"+gettingfeature+"="+prevslide+"&featid="+featid+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 595 $("#mainfeature").append(data); 596 sizecatphoto('mainfeature'); 597 sizemainfeature(); 598 if(norightclick == '1') { 599 disablerightclick(); 600 } 601 }); 602 } 603 }, slide_speed); 604 $(".homephotos").hover(function(){ 605 $(this).stop().animate({"opacity":hoveropacity}, 200); 606 }, function(){ 607 $(this).stop().animate({"opacity":initialopacity}, 200); 608 }); 609 610 } 611} 612function sizecatphoto(classname) { 613 $("."+classname).each(function(){ 614 if(classname == "catphoto") { 615 var ratio = catphotoratio; 616 var sizecontainer = "catphotocontainerinner"; 617 } 618 if(classname == "mainfeature") { 619 var ratio = mainphotoratio; 620 var sizecontainer = "mainfeature"; 621 if(main_full_screen == 1) { 622 if(showminimenu == "1") { 623 if($("#shopmenucontainer").css("display")!=="none") { 624 shopmenuheight = $("#shopmenucontainer").height(); 625 } else { 626 shopmenuheight = 0; 627 } 628 if($("#clfmenu").css("display")!=="none") { 629 clfmenuheight = $("#clfmenu").height(); 630 } else { 631 clfmenuheight = 0; 632 } 633 634 wh = $(window).height() - Math.abs($("#headerAndMenu").height()) - Math.abs(shopmenuheight) - Math.abs(clfmenuheight); 635 } else { 636 wh = $(window).height(); 637 } 638 639 var ratio = wh / $("#mainfeature").width(); 640 } 641 } 642 if(classname == "featsidemenuitem") { 643 ratio = side_menu_photo_ratio; 644 } 645 646 var refW = $(this).width(); 647 refH = refW * ratio; 648 if(classname == "mainphoto") { 649 // $("#mainfeature").css({"height":refH+"px","min-height":refH+"px"}); 650 } 651 652 $(this).css({"height":refH+"px","min-height":refH+"px"}); 653 var refRatio = refW/refH; 654 var imgH = Math.abs($(this).find(".homephotos").attr("hh")); 655 var imgW = Math.abs($(this).find(".homephotos").attr("ww")); 656 657 658 if(imgH > refH) { 659 mt = (imgH - refH) / 2; 660 } else { 661 mt = 0; 662 } 663 pid = $(this).find("img").attr("id"); 664 665 if ( (imgW/imgH) < refRatio ) { 666 newH = imgH * (refW / imgW); 667 mt = (newH - refH) / 2; 668 $(this).find(".homephotos").css({"width":refW+"px","height":"auto", "margin-top":"-"+mt+"px"}); 669 } else { 670 newW = imgW * (refH / imgH); 671 ml = (newW - refW) / 2; 672 $(this).find(".homephotos").css({"height":refH+"px","width":"auto", "margin-left":"-"+ml+"px"}); 673 } 674 }) 675 676} 677 678 679 680 681function sizemainfeature() { 682 683 if($("#shopmenucontainer").css("display")!=="none") { 684 shopmenuheight = $("#shopmenucontainer").height(); 685 } else { 686 shopmenuheight = 0; 687 } 688 if($("#clfmenu").css("display")!=="none") { 689 clfmenuheight = $("#clfmenu").height(); 690 } else { 691 clfmenuheight = 0; 692 } 693 $("#maincol").css({"height":$(window).height() - Math.abs($("#headerAndMenu").height()) - Math.abs(shopmenuheight)+"px"}); 694 $(".mainphoto").each(function(){ 695 var ratio = mainphotoratio; 696 if(main_full_screen == 1) { 697 var ratio = $("#mainfeature").height() / $("#mainfeature").width(); 698 } 699 var sizecontainer = "maincontainerinner"; 700 var refW = $("#mainfeature").width(); 701 refH = refW * ratio; 702 // $("#mainfeature").css({"height": refH+"px"}); 703 $(this).css({"height":refH+"px","min-height":refH+"px"}); 704 var refRatio = refW/refH; 705 var imgH = Math.abs($(this).find(".homephotos").attr("hh")); 706 var imgW = Math.abs($(this).find(".homephotos").attr("ww")); 707 if(imgH > refH) { 708 mt = (imgH - refH) / 2; 709 } else { 710 mt = 0; 711 } 712 pid = $(this).find(".homephotos").attr("id"); 713 714 if ( (imgW/imgH) < refRatio ) { 715 newH = imgH * (refW / imgW); 716 mt = (newH - refH) / 2; 717 $(this).find(".homephotos").css({"width":refW+"px","height":"auto", "margin-top":"-"+mt+"px", "margin-left":"0px"}); 718 } else { 719 newW = imgW * (refH / imgH); 720 ml = (newW - refW) / 2; 721 722 $(this).find(".homephotos").css({"height":refH+"px","width":"auto", "margin-left":"-"+ml+"px", "margin-top":"0px"}); 723 } 724 var contain = false; 725 if(contain_portrait == "1" && imgH >= imgW) { 726 contain = true; 727 } 728 if(contain_landscape== "1" && imgW > imgH) { 729 contain = true; 730 } 731 732 733 734 if(contain == true) { 735 newH = imgH * (refW / imgW); 736 newW = imgW * (refH / imgH); 737 /*
738 if($(this).find(".homephotos").attr("blurbg") == "1") { 739 $(this).find(".homephotos").parent().prepend('<div class="mainphotobg" style="position: absolute; left: 0; display: block; background: url(\''+$(this).find(".homephotos").attr("src")+'\') no-repeat center center fixed; background-size: cover;"></div>'); 740 } 741 */ 742 if(newW > refW) { 743 newW = refW; 744 $(this).find(".homephotos").css({"width":newW+"px", "height":"auto","margin-left":"0px", "margin-top":(refH - newH) / 2+"px", "box-shadow":"0px 0px 24px rgba(0,0,0,.6)"}); 745 } else { 746 $(this).find(".homephotos").css({"width":"auto", "height":refH+"px","margin-left":(refW - newW) / 2 +"px", "margin-top":"0px", "box-shadow":"0px 0px 24px rgba(0,0,0,.6)"}); 747 } 748 $(this).find(".homephotos").attr("blurbg","1"); 749 } 750 751 // $("#log").show().append(newW +" x "+ newH+" | ref: "+refW+" "); 752 753 754 if(titleplacement == "br") { 755 if(logoplacement == "br") { 756 $(".mainphotoheadlinetext").css({"bottom":$("#mainfeaturelogo").height() + 8+"px","right":"0px","text-align":"right"}); 757 } else { 758 $(".mainphotoheadlinetext").css({"bottom":"8px","right":"0px","text-align":"right"}); 759 } 760 } 761 if(titleplacement == "tl") { 762 if(logoplacement == "tl") { 763 $(".mainphotoheadlinetext").css({"top":$("#mainfeaturelogo").height() + 8+"px","left":"0px"}); 764 } else { 765 $(".mainphotoheadlinetext").css({"top":"8px","left":"0px"}); 766 } 767 } 768 if(titleplacement == "bl") { 769 if(logoplacement == "bl") { 770 $(".mainphotoheadlinetext").css({"bottom":$("#mainfeaturelogo").height() + 8+"px","left":"0px"}); 771 } else { 772 $(".mainphotoheadlinetext").css({"bottom":"8px","left":"0px"}); 773 } 774 } 775 if(titleplacement == "tr") { 776 if(logoplacement == "tr") { 777 $(".mainphotoheadlinetext").css({"top":$("#mainfeaturelogo").height() + 8+"px","right":"0px","text-align":"right"}); 778 } else { 779 $(".mainphotoheadlinetext").css({"top":"8px","right":"0px","text-align":"right"}); 780 } 781 } 782 783 784 785 }) 786 787} 788 789function findphotostoggle() { 790 $("#homefindphotos").toggle(400); 791} 792 793 794 795function sideitemsposition(){ 796 setInterval("getsideitemsposition('siderecentpagesmarker')",500); 797} 798function getsideitemsposition(d){ 799 if(document.getElementById(d)) { 800 divEnd = document.getElementById(d).offsetTop; 801 var screenWidth = GetScreenWidth(); 802 var screenHeight = GetScreenHeight(); 803 var divY = findPosY(document.getElementById(d)) 804 var pageHeight = document.documentElement.scrollHeight; 805 var clientHeight = document.documentElement.clientHeight; 806 if(window.pageYOffset) { 807 scrollPos = window.pageYOffset; 808 } else { 809 scrollPos = document.documentElement.scrollTop; 810 } 811 if(scrollPos > 1000) { 812 $("#gototop").fadeIn(400); 813 } else { 814 $("#gototop").fadeOut(400); 815 } 816 hrfh = $(".homefeaturerecent").scrollTop() + $(".homefeaturerecent").height(); 817 if($("body").width() > 800) { 818 cks = hrfh; 819 } else { 820 cks = scrollPos; 821 } 822 if((divEnd) < (cks + 300)) { 823 824 var curPage = $("#siderecentpagesmarker").attr("curpage"); 825 curPage = parseInt(curPage); 826 827 var nextPage = parseInt(curPage + 1); 828 var total_topics = $("#siderecentpagesmarker").attr("total"); 829 var pages = $("#siderecentpagesmarker").attr("pages"); 830 var category = $("#siderecentpagesmarker").attr("category"); 831 // $("#log").show().append(scrollPos+" + "+screenHeight+" > "+divEnd+" pages: "+pages+" nextpage "+nextPage+" | "); 832 833 if(nextPage<=pages) { 834 $("#loadingmoreitems").fadeIn(200); 835 $.get(tempfolder+"/sy-inc/show/show-actions.php?action=getpages&sp="+nextPage+"&category="+category+"&show="+$("#siderecentpagesmarker").attr("show")+"&sub_id="+$("#vinfo").attr("sub_id"), function(data) { 836 $("#sidefeaturepages").append(data); 837 $("#loadingmoreitems").fadeOut(200); 838 checkrecentscroll(); 839 sizecatphoto('featsidemenuitem'); 840 841 }); 842 $("#siderecentpagesmarker").attr("curpage",nextPage); 843 } 844 } 845 } 846}
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.