1//jQuery = jQuery.noConflict(true); 2 3// pozice mysi 4var mouseXJ = 0; 5var mouseYJ = 0; 6 7if (typeof jQuery == 'function') { 8 var gallery4u, panoramaGallery4u; 9 jQuery(document).ready(function() { 10 gallery4u = new Gallery4u; //inicializace 11 12 panoramaGallery4u = new PanoramaGallery4u; //inicializace panoramatu 13 as4uSlider = new As4uSlider(800, gallery4u); 14 15 jQuery(document).mousemove(function(e) { 16 gallery4u.jMousePosX = e.pageX; 17 gallery4u.jMousePosY = e.pageY; 18 }); 19 jQuery(document).keydown(function(event) { 20 gallery4u.keyPressed(event.keyCode); 21 }); 22 23 gallery4u.initReviews(); 24 25 }); 26 if (typeof $ == "undefined") var $ = jQuery; 27} 28 29// panorama gallery - 24.11.2011 30 31function PanoramaGallery4u() { 32 //format rel - galleryPanorama[typ,obrID,rozmer2_x,rozmer2_y] 33 this.rExp = /galleryPanorama\[(.*?),(.*?),(.*?),(.*?)\]/; //parsing regexp for params 34 35 this.init(); 36} 37 38PanoramaGallery4u.prototype.init = function() { 39 var obj = this; 40 jQuery('img.gallery_panorama').each(function(index) { 41 if (jQuery(this).attr('rel')) { 42 var rel = jQuery(this).attr('rel'); 43 rel = rel.replace(/\s/g, ''); 44 var matched = rel.match(obj.rExp); 45 if (matched) { 46 47 var obr = matched[2]; 48 var w = parseInt(matched[3]); 49 var h = parseInt(matched[4]); 50 //zobrazit ve strance 51 if (matched[1] == '1') { 52 var div = jQuery('<div>').insertBefore(jQuery(this)).css('width', w).css('height', h); 53 div.load('//' + location.host + '/galerie/obrazky/panorama.php?obr=' + obr + '&w=' + w + '&h=' + h + '&frame=true&ver=' + Math.floor(Math.random() * 1000000 + 1)); 54 jQuery(this).detach(); 55 //vyskakovacà okno 56 } else if (matched[1] == '2') { 57 var a = jQuery('<a>').insertBefore(jQuery(this)); 58 a.attr('href', 'javascript:;'); 59 a.click(function() { 60 as4uPopup.nooverlay = false; 61 as4uPopup.show('//' + location.host + '/galerie/obrazky/panorama.php?obr=' + obr + '&w=' + w + '&h=' + h, w + 20, h + 10, "", true); 62 //snizime z-index overlay 63 jQuery('.as4uPopupOverlay').css('zIndex', 10); 64 as4uPopup.nooverlay = true; 65 }); 66 jQuery(this).appendTo(a); 67 jQuery(this).attr('rel', ''); 68 } 69 70 } 71 } 72 }); 73}; 74 75 76 77 78// gallery4u - galerie2 - 10.2010 79// v 1.5 - 17.1.2012 - oprava bug - galleryID definovano pro skupinu obrazku na webu -> multiinit delal problemy 80 81function Gallery4u(rExp, onclosefocus) { 82 this.galSizeH = 0; 83 this.galSizeW = 0; 84 this.galScroll = 0; 85 this.galMiniH = 0; 86 this.galTopDivH = 0; 87 this.galId = 0; 88 89 this.aktualFoto = 0; 90 this.predesleFoto = 0; 91 this.dalsiFoto = 0; 92 this.oldFoto = 0; 93 94 this.casovacBloku; 95 this.casovacPrehravani; 96 this.gallang = 'cs'; 97 this.loadOne = false;
98 99 this.jMousePosX = 0; 100 this.jMousePosY = 0; 101 102 this.jMousePosXold = 0; 103 this.jMousePosYold = 0; 104 105 this.fotos = new Array; 106 107 this.baseAjaxUrl = '/galerie/ajax.php?'; 108 109 //21.11.2011 - Novy parametr pro galleryID - all - pokud je all nacteme vsechny fotky z adresare 110 //gallery4u[obrID,adrID,minisize,lang,galleryID] 111 this.rExp = /gallery4u\[(.*?),(.*?),(.*?),(.*?),(.*?)\]/; //parsing regexp for params 112 this.rExp2 = /gallery4u\[(.*?),(.*?),(.*?),(.*?)\]/; //parsing regexp for params 113 this.rExpCompatibility = /showgalery\((.*?),(.*?),(.*?),(.*?)\)/; 114 115 // 2.7.2013 - Parametry pro funkci automatickeho skryvani ovladacich prvku pri nehybani mysi [Katka] 116 this.mCekani = 3000; // [ms] Cas, po ktery se mys nesmi hybat, aby se prvky skryly 117 this.mCitlivost = 500; // [ms] Perioda kontroly pohybu mysi 118 this.mCasSkryvani = 400; // [ms] Cas, jak dlouho se budou skryvat a odkryvat ovladaci prvky 119 this.skryvatSipky = false; // bool Skrývat Å¡ipky pÅi pÅechodu na dalšà snÃmek 120 121 this.cas = 9; // [s] doÄasná promÄnná pro ÅeÅ¡enà délky Äasu zobrazenà jedné fotky 122 123 if (rExp) 124 this.rExp = rExp; 125 126 this.init(onclosefocus); 127 128} 129//onclosefocus - after close gallery return focus to some element 130Gallery4u.prototype.init = function(onclosefocus) { 131 var obj = this; 132 if (typeof this.fotos == "undefined") this.fotos = new Array; 133 jQuery('a').each(function(index) { 134 if (!jQuery(this).hasClass('gallery_initialized')) { 135 var initThis = false; 136 if (jQuery(this).attr('rel')) { 137 //if (!jQuery(this).hasClass('gallery4u-initialized')) { 138 var rel = jQuery(this).attr('rel'); 139 rel = rel.replace(', ', ','); 140 if (rel.indexOf("allery4u") > 0) { 141 rel = rel.split(' ').join(','); 142 } 143 144 145 var matched = rel.match(obj.rExp); 146 147 if (!matched) { 148 var matched = rel.match(obj.rExp2); 149 } 150 if (matched) { 151 initThis = true; 152 jQuery(this).removeAttr('onclick'); 153 if (matched[1]) { 154 155 if (matched[5]) { 156 var galleryID = matched[5]; 157 } else { 158 var galleryID = 1; 159 } 160 161 if (typeof obj.fotos[galleryID] == "undefined") { 162 obj.fotos[galleryID] = new Array; 163 } 164 //obj.fotos[galleryID][obj.fotos[galleryID].length] = matched[1]; 165 obj.fotos[galleryID].push(matched[1]); 166 167 jQuery(this).click(function() { 168 obj.showgallery(matched[1], matched[2], matched[3], matched[4], galleryID); 169 return false; 170 }); 171 // jQuery(this).addClass('gallery4u-initialized'); 172 jQuery(this).addClass('gallery_initialized'); 173 } 174 } 175 //} 176 177 } 178 //back compatibility 179 if (jQuery(this).attr('onclick') && !initThis) { 180 try { 181 var val = this.getAttributeNode('onclick').value; 182 var matched = val.match(obj.rExpCompatibility); 183 184 185 if (matched) { 186 187 matched[1] = matched[1].replace("'", '').replace("'", '').replace(' ', ''); 188 matched[2] = matched[2].replace("'", '').replace("'", '').replace(' ', ''); 189 matched[3] = matched[3].replace("'", '').replace("'", '').replace(' ', ''); 190 matched[4] = matched[4].replace("'", '').replace("'", '').replace(' ', ''); 191 192 if (matched[5]) { 193 matched[5] = matched[5].replace("'", '').replace("'", '').replace(' ', ''); 194 var galleryID = matched[5]; 195 } else { 196 var galleryID = 1; 197 } 198 199 if (typeof obj.fotos[galleryID] == "undefined") { 200 obj.fotos[galleryID] = new Array; 201 } 202 203 obj.fotos[galleryID].push(matched[1]); 204 205 jQuery(this).click(function() { 206 obj.showgallery(matched[1], matched[2], matched[3], matched[4], matched[2]); 207 return false;
208 }); 209 210 this.getAttributeNode('onclick').value = ''; 211 jQuery(this).addClass('gallery_initialized'); 212 } 213 } catch (e) {} 214 } 215 216 } 217 }); 218 219 if (onclosefocus) { 220 this.onclosefocus = onclosefocus; 221 } 222} 223 224Gallery4u.prototype.initAndShow = function(element) { 225 //if (typeof element.onclick == "function") { 226 if (!jQuery(element).hasClass('gallery_initialized')) { 227 element.onclick = ''; 228 jQuery(element).removeAttr('onclick'); 229 this.init(); // 27.3.2017 tady je to inicializovane, pokud ti jiz nebylo 230 //if (jQuery(element).attr('onclick').indexOf('window.open') !== -1) 231 //element.onclick(); 232 //} 233 } else { 234 //jQuery(element).removeClass('gallery_initialized'); 235 //jQuery(element).removeAttr('onclick'); 236 } 237 //this.init(); // 27.3.2017 tady je to zbytecne znovu inicializovane 238 239 240 jQuery(element).removeAttr('onmouseover'); 241} 242 243Gallery4u.prototype.showgallery = 244 function(obr, gal, minisize, lang, galleryID) { 245 var galeryDiv; 246 galleryID = galleryID.replace(' ', ''); 247 minisize = 120; 248 249 250 this.galMiniH = minisize; 251 this.galId = gal.replace(' ', ''); 252 this.gallang = lang.replace(' ', ''); 253 this.galleryID = galleryID.replace(' ', ''); 254 //21.11.2011 - Pokud galleryID = all - vypsat veschny fotky z daneho adresare 255 if (galleryID) { 256 if (galleryID.toLowerCase() == 'all') { 257 var url = "//" + location.host + "/galerie/obrazky/gallery.php?akce=getImagesFromGallery&adr=" + gal; 258 var toto = this; 259 galleryID = gal + '_' + galleryID; 260 this.galleryID = galleryID; 261 if (typeof this.fotos[galleryID] == "undefined") { 262 this.fotos[galleryID] = new Array; 263 jQuery.ajax({ 264 url: url, 265 async: false, 266 dataType: 'xml', 267 success: function(xml) { 268 if (jQuery(xml).find('status').text() == "ok") { 269 jQuery(xml).find('image').each(function(index, element) { 270 if (jQuery(this).text()) 271 toto.fotos[galleryID].push(jQuery(this).text()); 272 }); 273 } 274 } 275 }); 276 } 277 } 278 } 279 280 281 282 283 if (!document.getElementById('galery_view')) { 284 jQuery('<div id="galery_view" onkeyup="checkKey(event)" style="position: absolute; display: none; top: 0px; left: 0px; z-index:11; width: 0px; height: 0px; padding: 0px; margin: 0px;"></div>').appendTo(jQuery('body')); 285 } 286 if (!document.getElementById('galery_view_transparent')) { 287 jQuery('<div id="galery_view_transparent" onkeyup="checkKey(event)" style="position: absolute; display: none; top: 0px; left: 0px; z-index:10; background: black; width: 500px; height: 500px; padding: 0px; margin: 0px; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70); -moz-opacity: 0.7; opacity: 0.7;"></div>').appendTo(jQuery('body')); 288 jQuery('<div><img src="/images/gallery/loading.gif" alt="load" style="display: none; border: 0;" /></div>').appendTo(jQuery('body')); 289 } 290 291 document.getElementById('galery_view').style.display = ''; 292 document.getElementById('galery_view_transparent').style.display = ''; 293 294 295 galeryDiv = '<div style="width: 0px; height: ' + (minisize) + 'px; padding: 0px; margin: 0px;" id="gal_minidiv"></div>'; 296 galeryDiv += '<div style="width: 0px; padding: 0px; margin: 0px; height: 0px;" id="gal_topdiv"></div>'; 297 298 this.minidiv = jQuery('<div>', { 299 id: "gal_minidiv", 300 css: { 301 width: '0', 302 height: minisize, 303 padding: '0', 304 margin: '0' 305 } 306 }).appendTo(jQuery('#galery_view')); 307 308 this.topdiv = jQuery('<div>', { id: "gal_topdiv", css: { width: 0, padding: 0, margin: 0, height: 0 } }).addClass("closeFotoClick").appendTo(jQuery('#galery_view')); 309 //document.getElementById('galery_view').innerHTML = galeryDiv; 310 //jQuery('#galery_view').html(galeryDiv); 311 312 if (typeof this.fotos[galleryID] == "undefined") { 313 this.fotos[galleryID] = new Array; 314 this.fotos[galleryID].push(obr); 315 } 316 317 this.galWinDim(); 318 this.skryvaniOn(); 319 this.showObrGal(obr, galleryID); 320 this.loadMini(galleryID); 321 var obj = this; 322 //setTimeout(function(){obj.loadMiniWait();},100); 323 324 this.showOvlGal(); 325 //kompatibilita s as4uPopup - potlaceni popup okna na pozadi 326 try { 327 jQuery('.as4uPopupDataContainer').css('zIndex', 5); 328 } catch (e) { 329 330 } 331 } 332 333 334 335
336//zobrazeni galerie 337Gallery4u.prototype.showOvlGal = 338 function() { 339 var obj = this; 340 341 if (jQuery('#galery_view_transparent').css("display") == "") { 342 if ((this.jMousePosXold == this.jMousePosX) && (this.jMousePosYold == this.jMousePosY) && (this.oldFoto == this.aktualFoto)) { 343 344 jQuery("#gal_popis_transparent").hide(500); 345 jQuery("#gal_popis").hide(10); 346 jQuery("#gal_a_predchozi").hide(10); 347 jQuery("#gal_a_dalsi").hide(10); 348 jQuery("#gal_a_close").hide(10); 349 350 setTimeout(function() { obj.showOvlGal(); }, 100); 351 352 } else { 353 354 this.oldFoto = this.aktualFoto; 355 356 jQuery("#gal_popis_transparent").show(200); 357 jQuery("#gal_popis").show(10); 358 jQuery("#gal_a_predchozi").show(10); 359 jQuery("#gal_a_dalsi").show(10); 360 jQuery("#gal_a_close").show(10); 361 362 setTimeout(function() { obj.showOvlGal(); }, 3000); 363 364 } 365 366 this.jMousePosXold = this.jMousePosX; 367 this.jMousePosYold = this.jMousePosY; 368 } 369 } 370 371 372Gallery4u.prototype.galWinDim = 373 function() { 374 if (jQuery(document).width() < jQuery(window).width()) { 375 this.galSizeW = jQuery(document).width(); 376 } else { 377 this.galSizeW = jQuery(window).width(); 378 } 379 this.galSizeH = jQuery(window).height(); 380 381 382 383 if (this.galSizeH == 0) { 384 alert('Error'); 385 } else { 386 document.getElementById('galery_view_transparent').style.height = (this.galSizeH) + 'px'; 387 document.getElementById('galery_view').style.height = (this.galSizeH) + 'px'; 388 document.getElementById('galery_view_transparent').style.width = (this.galSizeW) + 'px'; 389 document.getElementById('galery_view').style.width = (this.galSizeW) + 'px'; 390 var obj = this; 391 //this.casovacBloku = setTimeout(function(){obj.galWinDim();},100); 392 if (this.resizeIsSet !== true) { 393 jQuery(window).resize(function() { 394 obj.galWinDim(); 395 }); 396 jQuery(window).scroll(function() { 397 obj.galWinDim(); 398 }); 399 this.resizeIsSet = true; 400 } 401 } 402 403 if (document.documentElement && document.documentElement.scrollTop) { 404 this.galScroll = document.documentElement.scrollTop; 405 } else if (document.body) { 406 this.galScroll = document.body.scrollTop; 407 } else { 408 this.galScroll = 0; 409 } 410 document.getElementById('galery_view_transparent').style.top = (this.galScroll) + 'px'; 411 document.getElementById('galery_view').style.top = (this.galScroll) + 'px'; 412 413 if (document.getElementById('gal_minidiv')) { 414 this.galTopDivH = this.galSizeH - this.galMiniH; 415 document.getElementById('gal_topdiv').style.height = (this.galTopDivH) + 'px'; 416 document.getElementById('gal_topdiv').style.width = (this.galSizeW) + 'px'; 417 document.getElementById('gal_minidiv').style.width = (this.galSizeW) + 'px'; 418 } 419 if (document.getElementById('gal_miniobal')) { 420 document.getElementById('gal_miniobal').style.width = (this.galSizeW) + 'px'; 421 } 422 } 423 424 425Gallery4u.prototype.showObrGal = 426 function(obr, galleryID) { 427 if (!galleryID && this.galleryID) 428 var galleryID = this.galleryID; 429 430 jQuery('#gal_topdiv img.panzoom_c').removeClass('g4u-ready'); 431 $('#gal_topdiv').addClass("gal_loader"); 432 433 if (this.aktualFoto != obr) { 434 jQuery('#gallyery4uLoadingContDiv').children().css('visibility', 'hidden'); 435 if (document.getElementById('igal4u' + this.aktualFoto)) { 436 document.getElementById('igal4u' + this.aktualFoto).style.border = '2px solid black'; 437 } 438 if (document.getElementById('igal4u' + obr)) { 439 document.getElementById('igal4u' + obr).style.border = '2px solid white'; 440 } 441 442 this.aktualFoto = obr; 443 444 var params = "&subakce=obrshow" + 445 "&obr=" + obr + 446 "&galTopDivH=" + this.galTopDivH + 447 "&galSizeW=" + this.galSizeW; 448 var obj = this; 449 450 jQuery("#gal_topdiv").load(this.baseAjaxUrl + 'akce=gal_mini&lanG=' + this.gallang + params, '', 451 function() { 452 obj.initReviews(); 453 if (obj.skryvatSipky) obj.skryvaniSet(); 454 else jQuery("body").trigger("mousemove"); 455 obj.afterLoadMini(galleryID); 456 if (typeof obj.fotos[galleryID] != "undefined") { 457 if (obj.fotos[galleryID].length <= 1) { 458 jQuery('#gal_popis_transparent').css('top', 5); 459 jQuery('#gal_a_close').css('top', 0); 460 jQuery('#gal_popis').css('top', 0); 461 jQuery('#gal_a_predchozi').css('display', 'none'); 462 jQuery('#gal_a_dalsi').css('display', 'none'); 463 } 464 } 465 466 if ($(".panzoom_c").length) { 467 if (typeof PanZoom === "function") { 468 inipanzoom(); 469 } else { 470 $.getScript(location.protocol + '//' + document.location.host + "/js/panzoom/panzoom.js", function() { 471 inipanzoom(); 472 }); 473 } 474 } 475 476 var im = jQuery('#gal_topdiv img.panzoom_c')[0]; 477 if (im) { 478 var g4uReveal = function() { 479 setTimeout(function() { 480 im.classList.add('g4u-ready'); 481 $('#gal_topdiv').removeClass("gal_loader"); 482 }, 0); 483 };
484 if (im.complete && im.naturalWidth) g4uReveal(); 485 else im.addEventListener('load', g4uReveal, { once: true }); 486 } 487 488 489 } 490 ); 491 492 493 if (this.slideshowJede) this.slideshowIndicator(); 494 495 } 496 } 497 498Gallery4u.prototype.initReviews = 499 function() { 500 var obj = this; 501 jQuery('.revStar').mouseover(function() { 502 var sInfoArr = jQuery(this).attr('rel').split(';'); 503 obj.imageStarSelected(sInfoArr[0], sInfoArr[1]); 504 }).mouseout(function() { 505 var sInfoArr = jQuery(this).attr('rel').split(';'); 506 obj.imageStarSelected(sInfoArr[0], sInfoArr[2]); 507 }); 508 509 $(".revStar").click(function(e) { 510 var sInfoArr = jQuery(this).attr('rel').split(';'); 511 obj.imgReviewsSet(sInfoArr[0], sInfoArr[1]); 512 e.stopPropagation(); 513 514 }); 515 516 517 } 518 519Gallery4u.prototype.imgReviewsSet = 520 function(imgSet, score) { 521 var obj = this; 522 523 var hlasovaci_kod = ''; 524 if (jQuery("#hlasovaci_kod").length > 0) { 525 hlasovaci_kod = jQuery("#hlasovaci_kod").val(); 526 } 527 528 529 var params = "&imgSet=" + imgSet + 530 "&score=" + score + 531 "&hlasovaci_kod=" + hlasovaci_kod + 532 "&subakce=set_score"; 533 534 535 jQuery.get(obj.baseAjaxUrl + 'akce=gal_mini&lanG=' + obj.gallang + params, 536 function(xml) { 537 jQuery(xml).find('response').each(function() { 538 if (jQuery(this).find('action').text() == 'showData') { 539 540 jQuery('.image_hodnoceni_div_star_' + imgSet).html(jQuery(this).find('showData').text()); 541 542 } else if (jQuery(this).find('action').text() == 'showRewForm') { 543 544 if (jQuery("#hlasovaci_kod").length > 0) { 545 alert(jQuery(this).find('alert').text()); 546 } else { 547 obj.imgReviewsSetKode(imgSet, score); 548 } 549 550 } else if (jQuery(this).find('action').text() == 'showAlert') { 551 552 if (jQuery(this).find('showData').length > 0) { 553 jQuery('.image_hodnoceni_div_star_' + imgSet).html(jQuery(this).find('showData').text()); 554 } 555 556 alert(jQuery(this).find('alert').text()); 557 558 if (jQuery(this).find('status').text() == 'OK') { 559 closeajax(); 560 } 561 562 } 563 }); 564 }, "xml"); 565 566 } 567 568 569Gallery4u.prototype.imgReviewsSetKode = 570 function(imgSet, score) { 571 572 jQuery('#ajax_content').html('NaÄÃtám data...'); 573 as4uAjaxAlertShow('800', '350'); 574 575 jQuery('#ajax_content').load(this.baseAjaxUrl + 'akce=gal_mini&subakce=formhlasovani&htmlAjax=yes&imgSet=' + imgSet + '&score=' + score, function() { 576 jQuery('#ajax_transparent').css('z-index', 51); 577 jQuery('#ajax_view').css('z-index', 52); 578 579 }); 580 581 } 582 583Gallery4u.prototype.registraceGalRew = 584 function(imgSet, score) { 585 586 jQuery('#ajax_content').html('NaÄÃtám data...'); 587 as4uAjaxAlertShow('800', '350'); 588 589 jQuery('#ajax_content').load(this.baseAjaxUrl + 'akce=gal_mini&subakce=formregistrace&htmlAjax=yes&imgSet=' + imgSet + '&score=' + score, function() { 590 jQuery('#ajax_transparent').css('z-index', 51); 591 jQuery('#ajax_view').css('z-index', 52); 592 }); 593 594 } 595 596Gallery4u.prototype.sendRegGalRew = 597 function(imgSet, score) { 598 var obj = this; 599 var oksend = true; 600 601 if (jQuery('#hlasovani_jmeno').length > 0) { 602 if (jQuery('#hlasovani_jmeno').val() == "") { 603 jQuery('#hlasovani_jmeno').css("background-color", "red"); 604 oksend = false; 605 } 606 } 607 608 if (jQuery('#hlasovani_prijmeni').length > 0) { 609 if (jQuery('#hlasovani_prijmeni').val() == "") { 610 jQuery('#hlasovani_prijmeni').css("background-color", "red"); 611 oksend = false;
612 } 613 } 614 615 if (as4u_kontrola_emailu(jQuery('#hlasovani_email').val()) == false) { 616 jQuery('#hlasovani_email').css("background-color", "red"); 617 oksend = false; 618 } 619 620 if (jQuery('#hlasovani_telefon').length > 0) { 621 if (jQuery('#hlasovani_telefon').val() == "") { 622 jQuery('#hlasovani_telefon').css("background-color", "red"); 623 oksend = false; 624 } 625 } 626 627 if (jQuery('#hlasovani_adresa').length > 0) { 628 if (jQuery('#hlasovani_adresa').val() == "") { 629 jQuery('#hlasovani_adresa').css("background-color", "red"); 630 oksend = false; 631 } 632 } 633 634 635 if (oksend == true) { 636 637 jQuery.post(this.baseAjaxUrl + 'akce=gal_mini&subakce=sendreg', { 638 hlasovani_jmeno: jQuery("#hlasovani_jmeno").val(), 639 hlasovani_prijmeni: jQuery("#hlasovani_prijmeni").val(), 640 hlasovani_email: jQuery("#hlasovani_email").val(), 641 hlasovani_telefon: jQuery("#hlasovani_telefon").val(), 642 hlasovani_adresa: jQuery("#hlasovani_adresa").val() 643 }, 644 function(xml) { 645 jQuery(xml).find('response').each(function() { 646 if (jQuery(this).find('status').text() == 'OK') { 647 alert(jQuery(this).find('alert').text()); 648 if (imgSet > 0) { 649 obj.imgReviewsSetKode(imgSet, score); 650 } else { 651 closeajax(); 652 } 653 } else { 654 alert(jQuery(this).find('alert').text()); 655 } 656 }); 657 }, "xml"); 658 659 } else { 660 alert('VyplÅte nebo zkontrolujte ozanÄené položky'); 661 } 662 663 } 664 665 666 667Gallery4u.prototype.loadMini = 668 function(galleryID) { 669 var obj = this; 670 var fotoids = ''; 671 if (typeof this.fotos[galleryID] != "undefined") 672 var fotoids = this.fotos[galleryID].join(","); 673 674 var params = "&subakce=mini" + 675 "&gal=" + this.galId + 676 "&obrarr=" + fotoids + 677 "&galSizeW=" + this.galSizeW + 678 "&minih=" + this.galMiniH; 679 if (this.fotos[galleryID].length > 1) { 680 jQuery("#gal_minidiv").css('height', obj.galMiniH); 681 jQuery("#gal_minidiv").load(this.baseAjaxUrl + 'akce=gal_mini&lanG=' + obj.gallang + params, '', 682 function() { 683 obj.afterLoadMini(galleryID); 684 jQuery("<link href='//code.jquery.com/ui/1.8.18/themes/ui-darkness/jquery-ui.css' rel='stylesheet' type='text/css' media='screen,projection,tv' />").appendTo("head"); 685 jQuery("<style type='text/css' media='screen,projection,tv'>.ui-slider-horizontal .ui-slider-handle{top:-.4em;}.ui-slider .ui-slider-handle{width:1em;height:1em;}.ui-slider-horizontal{height:.4em;width:10em;float:left;margin:.5em 1em;}</style>").appendTo("head"); 686 jQuery("<div id='g4u_slideshow_time'></div>").insertBefore('#g4u_slideshow_loading'); 687 jQuery("#g4u_slideshow_time").slider({ 688 min: 1, 689 max: 15, 690 value: 5, 691 change: function(e, ui) { 692 obj.loaderW = ui.value * 10; 693 } 694 }).css({ 695 margin: "5px", 696 height: "8px" 697 }).find(".ui-slider-handle").css({ 698 height: "14px", 699 top: "-4px" 700 }); // 27.1.2014 Katka - oprava rozpadlé galerie pÅi použità nÄkterých skinů jQuery UI 701 } 702 ); 703 } else { 704 jQuery("#gal_minidiv").html(''); 705 jQuery("#gal_minidiv").css('height', 50); 706 } 707 } 708 709 710 711Gallery4u.prototype.imageStarSelected = 712 function(id, iStar) { 713 for (var i = 1; i <= 5; i++) { 714 if (i <= iStar) { 715 jQuery('.star_' + id + '_' + i).attr("src", "/images/gallery/hvezdicka_zluta.png"); 716 } else { 717 jQuery('.star_' + id + '_' + i).attr("src", "/images/gallery/hvezdicka_cerna.png"); 718 } 719 } 720 } 721 722 723 724Gallery4u.prototype.afterLoadMini = 725 function(galleryID) { 726 var obj = this; 727 728 jQuery('.nextFotoClick').each(function() { 729 jQuery(this).click(function(e) { 730 e.stopPropagation(); 731 obj.nextFoto(); 732 }); 733 }); 734 jQuery('.prevFotoClick').each(function() { 735 jQuery(this).click(function(e) { 736 e.stopPropagation(); 737 obj.prevFoto(); 738 }); 739 }); 740 jQuery('.closeFotoClick').each(function() { 741 jQuery(this).click(function(e) { 742 if (!$(".panzoom_c").length) { 743 e.stopPropagation(); 744 obj.closeGalery(); 745 } 746 }); 747 }); 748 jQuery(".g4u_zavrit").click(function(e) { 749 e.stopPropagation(); 750 obj.closeGalery(); 751 document.documentElement.style.overflow = 'auto'; 752 document.body.scroll = "yes"; 753 }); 754 jQuery("#gal_a_close").click(function(e) { 755 e.stopPropagation(); 756 obj.closeGalery(); 757 document.documentElement.style.overflow = 'auto'; 758 document.body.scroll = "yes"; 759 }); 760 jQuery('.showFotoClick').each(function() { 761 jQuery(this).click(function(e) { 762 e.stopPropagation(); 763 if (jQuery(this).attr('rel')) { 764 obj.showObrGal(jQuery(this).attr('rel'), galleryID); 765 } 766 }); 767 }); 768 769 try { 770 if (this.fotos[galleryID].length > 0 && this.aktualFoto) { 771 var minuleVpoli = 0; 772 var nastavDalsi = 0; 773 try { 774 if (document.getElementById('agal4u' + this.aktualFoto)) { 775 document.getElementById('agal4u' + this.aktualFoto).focus(); 776 /*jQuery('#agal4u' + this.aktualFoto).keydown(function(event) { 777 obj.keyPressed(event.keyCode); 778 });*/ 779 } 780 if (document.getElementById('igal4u' + this.aktualFoto)) 781 document.getElementById('igal4u' + this.aktualFoto).style.border = '2px solid white'; // style=\"border: 2px solid black;\" 782 } catch (e) {} 783 784 //var sznFoto = document.getElementById('seznam_fotek').innerHTML; 785 var sznFotoArr = this.fotos[galleryID]; 786 787 this.predesleFoto = 0; 788 this.dalsiFoto = 0; 789 790 for (i = 0; i < sznFotoArr.length; i++) { 791 792 if (this.aktualFoto == sznFotoArr[i]) { 793 this.predesleFoto = minuleVpoli; 794 nastavDalsi = 1; 795 } else if (nastavDalsi == 1) { 796 this.dalsiFoto = sznFotoArr[i]; 797 break; 798 } 799 minuleVpoli = sznFotoArr[i]; 800 } 801 if (this.dalsiFoto == 0 && this.fotos[galleryID].length > 1) { 802 this.dalsiFoto = this.fotos[galleryID][0]; 803 } 804 if (this.aktualFoto == this.fotos[galleryID][0]) { 805 this.predesleFoto = this.fotos[galleryID][this.fotos[galleryID].length - 1]; 806 } 807 808 setTimeout(function() { obj.waitLoadPopis(); }, 100); 809 } 810 } catch (e) { 811 //alert('Chyba galleryID - '+galleryID); 812 } 813 814 } 815 816Gallery4u.prototype.waitLoadPopis = 817 function() { 818 var obj = this; 819 820 if (document.getElementById('galIdPopisObr')) { 821 if (document.getElementById('galIdPopisObr').innerHTML == this.aktualFoto) { 822 823 var widthPop = jQuery('#gal_popis').width(); // document.getElementById('gal_popis').offsetWidth; 824 var heightPop = jQuery('#gal_popis').height(); //document.getElementById('gal_popis').offsetHeight; 825 826 document.getElementById('gal_popis_transparent').style.width = widthPop + 'px'; 827 document.getElementById('gal_popis_transparent').style.height = heightPop + 'px'; 828 829 } else { 830 setTimeout(function() { obj.waitLoadPopis(); }, 100); 831 } 832 } else { 833 setTimeout(function() { obj.waitLoadPopis(); }, 100); 834 } 835 } 836 837Gallery4u.prototype.galPopisClose = 838 function() { 839 document.getElementById('gal_popis').style.display = 'none'; 840 document.getElementById('gal_popis_transparent').style.display = 'none'; 841 } 842 843 844Gallery4u.prototype.prevFoto = 845 function() { 846 if (this.predesleFoto > 0) { 847 this.showObrGal(this.predesleFoto, this.galleryID); 848 } 849 } 850 851Gallery4u.prototype.nextFoto = 852 function() { 853 if (this.dalsiFoto > 0) { 854 this.showObrGal(this.dalsiFoto, this.galleryID); 855 } 856 } 857
858Gallery4u.prototype.galPlay = 859 function() { 860 //if(this.dalsiFoto > 0 && this.stopSlideshow != true){ 861 if (this.dalsiFoto > 0) { 862 this.nextFoto(); 863 this.slideshowIndicator(); 864 //clearTimeout(this.casovacPrehravani); 865 var obj = this; 866 867 //obj.casovacPrehravani = setTimeout(function(){obj.galPlay();}, jQuery("#g4u_slideshow_time").slider("value")*1000); 868 } else { 869 //clearTimeout(this.casovacPrehravani); 870 clearInterval(this.loaderInterval); 871 //this.stopSlideshow = false; 872 } 873 //this.stopSlideshow = false; 874 } 875 876Gallery4u.prototype.slideshowIndicator = 877 function() { 878 // this.loaderW = 50; 879 this.loaderW = jQuery("#g4u_slideshow_time").slider("value") * 10; 880 if (this.loaderInterval) 881 clearInterval(this.loaderInterval); 882 jQuery('#g4u_slideshow_loading').css({ width: this.loaderW + 'px', height: 15, display: 'block', float: 'left', background: '#666666', margin: '2px 0px' }); 883 var obj = this; 884 this.loaderInterval = setInterval(function() { obj.loaderRewrite(); }, 100); 885 this.slideshowJede = true; 886 } 887 888Gallery4u.prototype.loaderRewrite = 889 function() { 890 if (this.slideshowJede && this.loaderW - 1 >= 0) { 891 this.loaderW--; 892 jQuery('#g4u_slideshow_loading').css({ width: this.loaderW + 'px' }); 893 } else { 894 clearInterval(this.loaderInterval); 895 if (this.loaderW - 1 < 0) this.galPlay(); 896 } 897 } 898 899Gallery4u.prototype.galPlayStop = 900 function() { 901 clearTimeout(this.casovacPrehravani); 902 this.loaderW = 1; 903 //this.stopSlideshow = true; 904 this.slideshowJede = false; 905 }; 906 907Gallery4u.prototype.closeGalery = 908 function() { 909 clearTimeout(this.casovacPrehravani); 910 if (document.getElementById('galery_view')) { 911 document.getElementById('galery_view').style.display = 'none'; 912 document.getElementById('galery_view').style.height = '0px'; 913 document.getElementById('galery_view').style.width = '0px'; 914 document.getElementById('galery_view').style.innerHTML = ''; 915 } 916 917 if (document.getElementById('galery_view_transparent')) { 918 document.getElementById('galery_view_transparent').style.display = 'none'; 919 document.getElementById('galery_view_transparent').style.height = '0px'; 920 document.getElementById('galery_view_transparent').style.width = '0px'; 921 } 922 923 this.aktualFoto = 0; 924 this.predesleFoto = 0; 925 this.dalsiFoto = 0; 926 this.skryvaniOff(); 927 if (this.onclosefocus) 928 jQuery(this.onclosefocus).focus(); 929 930 //kompatibilita s as4uPopup - potlaceni popup okna na pozadi 931 try { 932 jQuery('.as4uPopupDataContainer').css('zIndex', ''); 933 } catch (e) {} 934 935 } 936 937Gallery4u.prototype.keyPressed = 938 function(keycode) { 939 //39 - right 940 //37 - left 941 //32 - space 942 //27 - esc 943 if (keycode == 39 || keycode == 32) { 944 this.nextFoto(); 945 } 946 if (keycode == 37) { 947 this.prevFoto(); 948 } 949 if (keycode == 27) { 950 this.closeGalery(); 951 document.body.scroll = "yes"; 952 document.documentElement.style.overflow = 'auto'; 953 } else if (keycode == 83) { 954 this.galPlayStop(); 955 } else if (keycode == 80) { 956 this.galPlay(); 957 } 958 959 } 960 961// 2.7.2013 - Funkce automatickeho skryvani ovladacich prvku pri nehybani mysi [Katka] 962 963Gallery4u.prototype.skryvaniOn = 964 function() { 965 this.mNoMove = 0; 966 this.mOpacity = 1; 967 var obj = this; 968 jQuery("body").off("mousemove").on("mousemove", function() { 969 if (!obj.zrovnaSkryto) { 970 if (obj.mNoMove < 0) { 971 //jQuery("#galery_view, #galery_view *").css("cursor", ""); 972 jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis_transparent").stop(true).fadeTo(obj.mCasSkryvani, 0.7); 973 jQuery("#gal_popis").stop(true).fadeTo(obj.mCasSkryvani, 1); 974 obj.mOpacity = 1; 975 } 976 if (obj.mNoMove != 0) obj.mNoMove = 0; 977 } 978 }); 979 clearInterval(this.mInterval); 980 obj.mInterval = setInterval(function() { 981 if (obj.mNoMove >= 0) { 982 obj.mNoMove++; 983 if (obj.mNoMove >= obj.mCekani / obj.mCitlivost) { 984 jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis, #gal_popis_transparent").fadeTo(obj.mCasSkryvani, 0, function() { 985 //jQuery("#galery_view, #galery_view *").css("cursor", "none"); 986 obj.zrovnaSkryto = true; 987 setTimeout(function() { 988 obj.zrovnaSkryto = false;
989 }, obj.mCasSkryvani); 990 }); 991 obj.mNoMove = -1; 992 obj.mOpacity = 0; 993 } 994 } 995 }, (this.mCitlivost)); 996 } 997 998Gallery4u.prototype.skryvaniOff = 999 function() { 1000 jQuery("body").off("mousemove"); 1001 clearInterval(this.mInterval); 1002 this.mOpacity = 1; 1003 this.mNoMove = 0; 1004 } 1005 1006Gallery4u.prototype.skryvaniSet = 1007 function() { 1008 jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis_transparent").css("opacity", this.mOpacity * 0.7); 1009 jQuery("#gal_popis").css("opacity", this.mOpacity); 1010 } 1011 1012 1013 1014 1015 1016// konec nove galsrie 1017 1018/******************************************************************************* 1019 * ************************************************************************* 1020 * GALERIE SLIDER - as4uSlider - 28.12.2011 - Jan Navratil 1021 * - <img class="as4uSlider" rel="as4uSlider[adrID]" src="/images/gallery/slider4u_editor.jpg" /> 1022 *******************************************************************************/ 1023 1024//constructor 1025function As4uSlider(animTime, gallery) { 1026 this.rExp = /as4uSlider\[(.*?)\]/; //parsing regexp for params 1027 this.animTime = animTime ? animTime : 1000; 1028 this.stayTime = 2000; 1029 this.gallery = gallery; 1030 this.init(); //inicializace 1031 this.autoAnim = true; 1032 this.smerAnimace = 'rtl'; //ltr - left-to-right, rtl - right-to-left 1033} 1034 1035/** 1036 * Inicializace slideru 1037 */ 1038As4uSlider.prototype.init = function() { 1039 var obj = this; 1040 1041 jQuery('img.as4uSlider').each(function(index) { 1042 if (jQuery(this).attr('rel')) { 1043 var rel = jQuery(this).attr('rel'); 1044 rel = rel.replace(/\s/g, ''); 1045 var matched = rel.match(obj.rExp); 1046 if (matched) { 1047 var adr = matched[1]; 1048 1049 var div = jQuery('<div>').insertBefore(jQuery(this)).addClass('as4uSliderCont'); 1050 1051 var dd = jQuery('<div>').addClass('as4uSliderImageCont').appendTo(div); 1052 var imgW = dd.width(); 1053 var imgH = dd.height(); 1054 dd.detach(); 1055 1056 div.load('//' + location.host + '/galerie/obrazky/as4uSlider.php?adr=' + adr + '&w=' + imgW + '&h=' + imgH, function() { 1057 obj.initFinish(div); 1058 }); 1059 jQuery(this).detach(); 1060 1061 } 1062 } 1063 }); 1064 1065 jQuery('img.as4u_galadr_show_style_2').each(function(index) { 1066 if (jQuery(this).attr('rel')) { 1067 var rel = jQuery(this).attr('rel'); 1068 rel = rel.replace(/\s/g, ''); 1069 var matched = rel.match(obj.rExp); 1070 if (matched) { 1071 var adr = matched[1]; 1072 1073 var div = jQuery('<div>').insertBefore(jQuery(this)).attr('id', 'as4u_galadr_show_style_2_Cont_' + index); 1074 1075 var dd = jQuery('<div>').addClass('as4uSliderImageCont_s2').appendTo(div); 1076 var imgW = dd.width(); 1077 var imgH = dd.height(); 1078 dd.detach(); 1079 1080 var imgdef = $(this); 1081 1082 var imgwh = ""; 1083 1084 var classList = imgdef.attr('class').split(/\s+/); 1085 1086 $.each(classList, function(index, item) { 1087 if (item.indexOf("obrhlp") !== -1) { 1088 var help = item.split("_"); 1089 imgwh += "&" + help[0] + "=" + help[2]; 1090 } 1091 }); 1092 1093 setTimeout(function() { 1094 $('#as4u_galadr_show_style_2_Cont_' + index).load('//' + location.host + '/galerie/obrazky/as4uSlider.php?type=2&adr=' + adr + '&w=' + imgW + '&h=' + imgH + "&index=" + index + imgwh, function() { 1095 1096 }); 1097 }, 10); 1098 1099 jQuery(this).detach(); 1100 1101 } 1102 } 1103 }); 1104 1105 jQuery('img.as4u_galadr_show_style_3').each(function(index) { 1106 if (jQuery(this).attr('rel')) { 1107 var rel = jQuery(this).attr('rel'); 1108 rel = rel.replace(/\s/g, ''); 1109 var matched = rel.match(obj.rExp); 1110 if (matched) { 1111 var adr = matched[1]; 1112 1113 var div = jQuery('<div>').insertBefore(jQuery(this)).addClass('as4u_galadr_show_style_3_Cont'); 1114 1115 var dd = jQuery('<div>').addClass('as4uSliderImageCont_s3').appendTo(div); 1116 var imgW = dd.width(); 1117 var imgH = dd.height(); 1118 dd.detach(); 1119 1120 div.load('//' + location.host + '/galerie/obrazky/as4uSlider.php?type=3&adr=' + adr + '&w=' + imgW + '&h=' + imgH, function() { 1121 //obj.initFinish(div); 1122 }); 1123 jQuery(this).detach(); 1124 1125 } 1126 } 1127 }); 1128 1129} 1130 1131//div - kontejner kde jsou nactene obrazky 1132As4uSlider.prototype.initFinish = function(div) { 1133 1134 var div = jQuery(div); 1135 var obj = this; 1136 1137 div.find('.as4uSliderImageCont').each(function(index) { 1138 var img = jQuery(this).find('img:first-child'); 1139 var kont = jQuery(this); 1140 //resizujeme vnitrni obrazky 1141 /*var w = img.width();
1142 var h = img.height(); 1143 var n_w = jQuery(this).width(); 1144 var n_h = h*(n_w/w); 1145 if (w > 0 && h > 0) { 1146 img.css({width:n_w, height:n_h}); 1147 } */ 1148 obj.imageResize(kont); 1149 1150 img.click(function() { 1151 obj.clickEvent(div, this.parentNode); 1152 }); 1153 kont.click(function() { 1154 obj.clickEvent(div, this); 1155 }); 1156 1157 1158 }); 1159 div.data('animate', this.autoAnim); 1160 div.bind('mouseover', function() { 1161 jQuery(div).data('animate', false); 1162 }); 1163 div.bind('mouseout', function() { 1164 jQuery(div).data('animate', obj.autoAnim); 1165 setTimeout(function() { 1166 if (jQuery(div).data('animate') == true) { 1167 obj.animate(div); 1168 } 1169 }, 500); 1170 }); 1171 1172 this.animate(div); 1173 1174}; 1175 1176 1177As4uSlider.prototype.animate = function(div) { 1178 try { 1179 if (div.find('div.as4uSliderImageCont').length <= 3) return; 1180 clearTimeout(div.data('timeout')); 1181 } catch (e) {} 1182 if (div && div.data('animate') == true) { 1183 var obj = this; 1184 var item = div; 1185 if (typeof div.data('fce') != "function") { 1186 div.data('fce', function() { 1187 if (item.data('animate') == true) { 1188 obj.clickEvent(item, jQuery(item).find(obj.smerAnimace == 'ltr' ? '.as4uSliderFirst' : '.as4uSliderThird').eq(0)); 1189 } 1190 }); 1191 } 1192 1193 div.data('timeout', 1194 setTimeout(div.data('fce'), this.stayTime) 1195 ); 1196 1197 1198 } 1199} 1200 1201As4uSlider.prototype.imageResize = function(imgDiv) { 1202 var img = jQuery(imgDiv).find('img:first-child'); 1203 var w = img.width(); 1204 var h = img.height(); 1205 var n_w = jQuery(imgDiv).width(); 1206 var n_h = jQuery(imgDiv).height(); // h*(n_w/w); 1207 if (n_w > 0 && n_h > 0) { 1208 img.css({ width: n_w, height: n_h }); 1209 } 1210} 1211 1212function log(data) { 1213 try { 1214 console.log(data); 1215 } catch (e) {} 1216} 1217 1218As4uSlider.prototype.clickEvent = function(div, imgCont) { 1219 var obj = this; 1220 if (jQuery(div).data('blockAnimate') != true) { 1221 //zablokujeme animaci 1222 jQuery(div).data('blockAnimate', true); 1223 1224 var imgCont = jQuery(imgCont); 1225 var animTime = this.animTime; 1226 //click na prvni element 1227 if (imgCont.hasClass('as4uSliderFirst') && div.find('div.as4uSliderImageCont').length > 3) { 1228 var prev = div.find('.as4uSliderFirst').prev(); 1229 if (prev.length == 0) { 1230 prev = div.find('div:last-child'); 1231 if (prev.length == 0) { //typicky v IE se to stane :/ 1232 var els = div.find('div.as4uSliderImageCont'); 1233 var prev = els.eq(els.length - 1); 1234 } 1235 } 1236 this.imageResize(prev); 1237 /*var next = div.find('.as4uSliderThird').next(); 1238 if (!next) { 1239 next = div.find('div:first-child'); 1240 } */ 1241 1242 var first = imgCont; 1243 var second = div.find('.as4uSliderSecond'); 1244 var third = div.find('.as4uSliderThird'); 1245 //animace prev elementu 1246 prev.css({ display: 'block', opacity: 0 }); 1247 prev.animate({ 1248 left: first.css('left'), 1249 opacity: 1 1250 }, animTime, function() { 1251 prev.removeClass('as4uSliderNoVisible'); 1252 prev.addClass('as4uSliderFirst'); 1253 prev.removeAttr('style'); 1254 jQuery(div).data('blockAnimate', false); 1255 }); 1256 1257 1258 var full_w = second.width(); 1259 //animace velikosti obrazku 1260 var f_img = first.find('img:first-child'); 1261 var f_w = f_img.width(); 1262 var f_h = f_img.height(); 1263 var n_f_w = full_w; 1264 var n_f_h = f_h * (n_f_w / f_w); 1265 1266 var s_img = second.find('img:first-child'); 1267 var s_w = s_img.width(); 1268 var s_h = s_img.height(); 1269 var n_s_w = first.width(); 1270 var n_s_h = s_h * (n_s_w / s_w); 1271 1272 1273 1274 //animace first elementu 1275 first.switchClass("as4uSliderFirst", "as4uSliderSecond", animTime); 1276 f_img.animate({ 1277 width: n_f_w, 1278 height: n_f_h 1279 }, animTime); 1280 1281 //animace second elementu 1282 second.switchClass("as4uSliderSecond", "as4uSliderThird", animTime); 1283 s_img.animate({ 1284 width: n_s_w, 1285 height: n_s_h 1286 }, animTime); 1287 1288 //animace third elementu 1289 third.animate({ 1290 left: prev.css('left'), 1291 opacity: 0 1292 }, animTime, function() { 1293 third.removeClass('as4uSliderThird'); 1294 third.addClass('as4uSliderNoVisible'); 1295 third.removeAttr('style'); 1296 obj.animate(div); 1297 }); 1298 } else if (imgCont.hasClass('as4uSliderThird') && div.find('div.as4uSliderImageCont').length > 3) { 1299 1300 var next = imgCont.next(); 1301 if (next.length == 0) { 1302 next = div.find('div:first-child'); 1303 if (next.length == 0) { //typicky v IE se to stane :/ 1304 var els = div.find('div.as4uSliderImageCont'); 1305 var next = els.eq(0); 1306 } 1307 } 1308 this.imageResize(next); 1309 1310 var first = div.find('.as4uSliderFirst'); 1311 var second = div.find('.as4uSliderSecond'); 1312 var third = imgCont; 1313 1314 var full_w = second.width(); 1315 //animace velikosti obrazku 1316 var f_img = third.find('img:first-child'); 1317 var f_w = f_img.width(); 1318 var f_h = f_img.height(); 1319 var n_f_w = full_w; 1320 var n_f_h = f_h * (n_f_w / f_w); 1321 1322 var s_img = second.find('img:first-child'); 1323 var s_w = s_img.width();
1324 var s_h = s_img.height(); 1325 var n_s_w = first.width(); 1326 var n_s_h = s_h * (n_s_w / s_w); 1327 1328 1329 next.css({ display: 'block', opacity: 0 }); 1330 next.animate({ 1331 left: third.css('left'), 1332 opacity: 1 1333 }, animTime, function() { 1334 next.removeClass('as4uSliderNoVisible'); 1335 next.addClass('as4uSliderThird'); 1336 next.removeAttr('style'); 1337 jQuery(div).data('blockAnimate', false); 1338 }); 1339 1340 third.switchClass("as4uSliderThird", "as4uSliderSecond", animTime); 1341 third.css('zIndex', 4); 1342 f_img.animate({ 1343 width: n_f_w, 1344 height: n_f_h 1345 }, animTime); 1346 second.switchClass("as4uSliderSecond", "as4uSliderFirst", animTime); 1347 s_img.animate({ 1348 width: n_s_w, 1349 height: n_s_h 1350 }, animTime); 1351 1352 first.animate({ 1353 left: next.css('left'), 1354 opacity: 0 1355 }, animTime, function() { 1356 first.removeClass('as4uSliderFirst'); 1357 first.addClass('as4uSliderNoVisible'); 1358 first.removeAttr('style'); 1359 obj.animate(div); 1360 }); 1361 //click na element - otevÅenà galerie - obrázk ujednoho 1362 } else if (imgCont.hasClass('as4uSliderSecond') || div.find('div.as4uSliderImageCont').length <= 3) { 1363 //[obrID,adrID,minisize,lang,galleryID] 1364 var rel = imgCont.attr('rel'); 1365 if (rel) { 1366 var matched = rel.split(','); 1367 this.gallery.fotos[matched[4]] = [matched[4]]; 1368 if (matched[1]) //galleryID bude id fotky 1369 this.gallery.showgallery(matched[0], matched[1], matched[2], matched[3], matched[4]); 1370 } 1371 jQuery(div).data('blockAnimate', false); 1372 } 1373 } 1374 1375} 1376 1377 1378function loadGalleryStruktura(id, nid, el) { 1379 if (!nid) var nid = 0; 1380 var url = location.protocol + '//' + location.host + '/galerie/administrace/ajax.php?' + strukturaGetUrlString(); 1381 url += '&subsubakce=potomci&nid=' + nid + '&akce=struktura'; 1382 1383 1384 $.post(url, function(html) { 1385 $('#' + id).html(html); 1386 $(el).attr('rel', id); 1387 $(el).attr('onclick', ''); 1388 $(el).html('-'); 1389 $(el).click(function() { 1390 //$('.'+$(this).attr('rel')).toggle(); 1391 if ($(this).html() == '+') { 1392 $(this).html('-'); 1393 $('#' + $(this).attr('rel')).css('display', 'block'); 1394 } else { 1395 $(this).html('+'); 1396 $('#' + $(this).attr('rel')).css('display', 'none'); 1397 } 1398 }); 1399 }); 1400 1401} 1402 1403function strukturaFind(searchText, id) { 1404 var url = location.protocol + '//' + location.host + '/galerie/administrace/ajax.php?' + strukturaGetUrlString(); 1405 url += '&subsubakce=hledat&akce=struktura'; 1406 $('#' + id).load(url, { hledat: searchText }, function() {}); 1407 return false; 1408} 1409 1410 1411function strukturaGetUrlString() { 1412 var urlString = ""; 1413 var joiner = ''; 1414 var htmlAjax = false; 1415 $('.get_variables').each(function() { 1416 if ($(this).attr('name').indexOf('js_') !== -1) { 1417 if ($(this).attr('name').replace('js_', '') == 'htmlAjax') htmlAjax = true; 1418 urlString += joiner + $(this).attr('name').replace('js_', '') + '=' + $(this).val(); 1419 joiner = '&'; 1420 } 1421 }); 1422 if (htmlAjax == false) { 1423 urlString += '&htmlAjax=yes'; 1424 } 1425 return urlString; 1426}
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.