PageSourceSearch

https://www.jh.cz/js/gallery4u.js?ver=20260924033434

js jh.cz collected 2026-09-24 18:41:16 UTC 46,006 bytes, 1,409 lines download raw bytes

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.p
257hp?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'}}).appendTo(jQuery('#galery_view'));
305                                
306    this.topdiv = jQuery('<div>', {id: "gal_topdiv", css: {width: 0, padding: 0, margin: 0, height: 0}}).addClass("closeFotoClick").appendTo(jQuery('#galery_view'));
307    //document.getElementById('galery_view').innerHTML = galeryDiv;
308    //jQuery('#galery_view').html(galeryDiv);
309    
310    if (typeof this.fotos[galleryID] == "undefined") {
311      this.fotos[galleryID] = new Array;
312      this.fotos[galleryID].push(obr); 
313    }
314    
315    this.galWinDim();  
316    this.skryvaniOn();
317    this.showObrGal(obr,galleryID);
318    this.loadMini(galleryID);
319    var obj = this;            
320    //setTimeout(function(){obj.loadMiniWait();},100);
321    
322    this.showOvlGal();
323      //kompatibilita s as4uPopup - potlaceni popup okna na pozadi
324    try {
325      jQuery('.as4uPopupDataContainer').css('zIndex',5);
326    } catch(e) {
327    
328    }
329  }
330
331
332
333
334//zobrazeni galerie
335Gallery4u.prototype.showOvlGal = 
336  function(){
337    var obj = this;
338    
339    if(jQuery('#galery_view_transparent').css("display") == ""){    
340      if((this.jMousePosXold == this.jMousePosX) && (this.jMousePosYold == this.jMousePosY) && (this.oldFoto == this.aktualFoto)){
341        
342        jQuery("#gal_popis_transparent").hide(500);
343        jQuery("#gal_popis").hide(10);
344        jQuery("#gal_a_predchozi").hide(10);
345        jQuery("#gal_a_dalsi").hide(10);
346        jQuery("#gal_a_close").hide(10);
347        
348        setTimeout(function(){obj.showOvlGal();}, 100);
349        
350      } else {
351        
352        this.oldFoto = this.aktualFoto;
353        
354        jQuery("#gal_popis_transparent").show(200);
355        jQuery("#gal_popis").show(10);
356        jQuery("#gal_a_predchozi").show(10);
357        jQuery("#gal_a_dalsi").show(10);
358        jQuery("#gal_a_close").show(10);
359        
360        setTimeout(function(){obj.showOvlGal();}, 3000);
361        
362      }
363      
364      this.jMousePosXold = this.jMousePosX;
365      this.jMousePosYold = this.jMousePosY;
366    }    
367  }  
368
369
370Gallery4u.prototype.galWinDim = 
371  function() { 
372    if (jQuery(document).width() < jQuery(window).width()) {
373      this.galSizeW = jQuery(document).width();
374    } else {
375      this.galSizeW = jQuery(window).width();
376    } 
377    this.galSizeH = jQuery(window).height();
378    
379
380    
381    if(this.galSizeH == 0){
382      alert('Error');
383    } else {
384      document.getElementById('galery_view_transparent').style.height = (this.galSizeH) + 'px';
385      document.getElementById('galery_view').style.height = (this.galSizeH) + 'px';
386      document.getElementById('galery_view_transparent').style.width = (this.galSizeW) + 'px';
387      document.getElementById('galery_view').style.width = (this.galSizeW) + 'px';
388      var obj = this;
389      //this.casovacBloku = setTimeout(function(){obj.galWinDim();},100);
390      if (this.resizeIsSet !== true) { 
391        jQuery(window).resize(function(){
392          obj.galWinDim();         
393        });
394        jQuery(window).scroll(function(){
395          obj.galWinDim();         
396        });
397        this.resizeIsSet = true;
398      } 
399    }
400  
401    if (document.documentElement && document.documentElement.scrollTop) {
402      this.galScroll = document.documentElement.scrollTop;
403    } else if (document.body) {
404      this.galScroll = document.body.scrollTop;
405    } else {
406      this.galScroll = 0;
407    }
408    document.getElementById('galery_view_transparent').style.top = (this.galScroll) + 'px';
409    document.getElementById('galery_view').style.top = (this.galScroll) + 'px';
410    
411    if(document.getElementById('gal_minidiv')){
412       this.galTopDivH = this.galSizeH - this.galMiniH ;
413      document.getElementById('gal_topdiv').style.height = (this.galTopDivH) + 'px';
414      document.getElementById('gal_topdiv').style.width = (this.galSizeW) + 'px';
415      document.getElementById('gal_minidiv').style.width = (this.galSizeW) + 'px';
416    }
417    if(document.getElementById('gal_miniobal')){
418      document.getElementById('gal_miniobal').style.width = (this.galSizeW) + 'px';
419    }  
420  }
421
422
423Gallery4u.prototype.showObrGal = 
424  function(obr,galleryID){
425    if (!galleryID && this.galleryID)
426      var galleryID = this.galleryID;
427      
428
429    if(this.aktualFoto != obr){
430      jQuery('#gallyery4uLoadingContDiv').children().css('visibility', 'hidden');
431      if(document.getElementById('igal4u' + this.aktualFoto)){
432        document.getElementById('igal4u' + this.aktualFoto).style.border = '2px solid black';
433      }
434      if(document.getElementById('igal4u' + obr)){
435        document.getElementById('igal4u' + obr).style.border = '2px solid white';
436      }
437      
438      this.aktualFoto = obr;
439  
440      var params = "&subakce=obrshow" +
441                   "&obr=" + obr + 
442                   "&galTopDivH=" + this.galTopDivH + 
443                   "&galSizeW=" + this.galSizeW;
444      var obj = this;
445            
446      jQuery("#gal_topdiv").load(this.baseAjaxUrl + 'akce=gal_mini&lanG=' + this.gallang + params, '',
447        function(){
448          obj.initReviews();
449          if (obj.skryvatSipky) obj.skryvaniSet();
450          else jQuery("body").trigger("mousemove");
451          obj.afterLoadMini(galleryID);
452          if (typeof obj.fotos[galleryID] != "undefined") {
453            if (obj.fotos[galleryID].length <= 1) { 
454              jQuery('#gal_popis_transparent').css('top', 5);             
455              jQuery('#gal_a_close').css('top', 0);
456              jQuery('#gal_popis').css('top', 0);  
457              jQuery('#gal_a_predchozi').css('display','none');
458              jQuery('#gal_a_dalsi').css('display','none');
459            }
460          }
461          
462        if($(".panzoom_c").length){
463            if (typeof PanZoom === "function") {
464                inipanzoom();
465            }else{
466                $.getScript(location.protocol + '//' + document.location.host + "/js/panzoom/panzoom.js",function(){                   
467                    inipanzoom();
468                });
469            }
470        }
471        }
472      );
473          
474          
475      if (this.slideshowJede) this.slideshowIndicator();
476      
477    }
478  }
479
480Gallery4u.prototype.initReviews =
481  function(){
482    var obj = this;
483    jQuery('.revStar').mouseover(function() {
484      var sInfoArr = jQuery(this).attr('rel').split(';');
485      obj.imageStarSelected(sInfoArr[0], sInfoArr[1]);
486    }).mouseout(function(){
487      var sInfoArr = jQuery(this).attr('rel').split(';');
488      obj.imageStarSelected(sInfoArr[0], sInfoArr[2]);
489    });
490
491    $(".revStar").click(function(e) {
492      var sInfoArr = jQuery(this).attr('rel').split(';');
493      obj.imgReviewsSet(sInfoArr[0], sInfoArr[1]);
494      e.stopPropagation();
495
496    });
497
498
499  }
500
501Gallery4u.prototype.imgReviewsSet =
502  function(imgSet, score){
503    var obj = this;
504
505    var hlasovaci_kod = '';
506    if(jQuery("#hlasovaci_kod").length > 0){
507      hlasovaci_kod = jQuery("#hlasovaci_kod").val();
508    }
509
510
511    var params = "&imgSet=" + imgSet +
512                 "&score=" + score +
513                 "&hlasovaci_kod=" + hlasovaci_kod +
514                 "&subakce=set_score";
515
516
517    jQuery.get(obj.baseAjaxUrl + 'akce=gal_mini&lanG=' + obj.gallang + params,
518      function(xml){
519        jQuery(xml).find('response').each(function(){
520          if(jQuery(this).find('action').text() == 'showData'){
521
522            jQuery('.image_hodnoceni_div_star_' + imgSet).html(jQuery(this).find('showData').text());
523
524          } else if(jQuery(this).find('action').text() == 'showRewForm'){
525
526            if(jQuery("#hlasovaci_kod").length > 0){
527              alert(jQuery(this).find('alert').text());
528            } else {
529              obj.imgReviewsSetKode(imgSet, score);
530            }
531
532          } else if(jQuery(this).find('action').text() == 'showAlert'){
533
534            if(jQuery(this).find('showData').length > 0){
535              jQuery('.image_hodnoceni_div_star_' + imgSet).html(jQuery(this).find('showData').text());
536            }
537
538            alert(jQuery(this).find('alert').text());
539
540            if(jQuery(this).find('status').text() == 'OK'){
541              closeajax();
542            }
543
544          }
545       });
546    	}, "xml");
547
548  }
549
550
551Gallery4u.prototype.imgReviewsSetKode =
552  function(imgSet, score){
553
554    jQuery('#ajax_content').html('Načítám data...');
555    as4uAjaxAlertShow('800', '350');
556
557    jQuery('#ajax_content').load(this.baseAjaxUrl + 'akce=gal_mini&subakce=formhlasovani&htmlAjax=yes&imgSet=' + imgSet + '&score=' + score, function() {
558      jQuery('#ajax_transparent').css('z-index', 51);
559      jQuery('#ajax_view').css('z-index', 52);
560      
561    });
562
563  }
564
565Gallery4u.prototype.registraceGalRew =
566  function(imgSet, score){
567
568    jQuery('#ajax_content').html('Načítám data...');
569    as4uAjaxAlertShow('800', '350');
570
571    jQuery('#ajax_content').load(this.baseAjaxUrl + 'akce=gal_mini&subakce=formregistrace&htmlAjax=yes&imgSet=' + imgSet + '&score=' + score, function() {
572      jQuery('#ajax_transparent').css('z-index', 51);
573      jQuery('#ajax_view').css('z-index', 52);
574    });
575
576  }
577
578Gallery4u.prototype.sendRegGalRew =
579  function(imgSet, score){
580    var obj = this;
581    var oksend = true;
582
583    if(jQuery('#hlasovani_jmeno').length > 0){
584      if(jQuery('#hlasovani_jmeno').val() == ""){
585        jQuery('#hlasovani_jmeno').css("background-color", "red");
586        oksend = false;
587      }
588    }
589
590    if(jQuery('#hlasovani_prijmeni').length > 0){
591      if(jQuery('#hlasovani_prijmeni').val() == ""){
592        jQuery('#hlasovani_prijmeni').css("background-color", "red");
593        oksend = false;
594      }
595    }
596
597    if(as4u_kontrola_emailu(jQuery('#hlasovani_email').val()) == false){
598      jQuery('#hlasovani_email').css("background-color", "red");
599      oksend = false;
600    }
601
602    if(jQuery('#hlasovani_telefon').length > 0){
603      if(jQuery('#hlasovani_telefon').val() == ""){
604        jQuery('#hlasovani_telefon').css("background-color", "red");
605        oksend = false;
606      }
607    }
608
609    if(jQuery('#hlasovani_adresa').length > 0){
610      if(jQuery('#hlasovani_adresa').val() == ""){
611        jQuery('#hlasovani_adresa').css("background-color", "red");
612        oksend = false;
613      }
614    }
615
616
617    if(oksend == true){
618
619      jQuery.post(this.baseAjaxUrl + 'akce=gal_mini&subakce=sendreg',
620        {
621         hlasovani_jmeno: jQuery("#hlasovani_jmeno").val(),
622         hlasovani_prijmeni: jQuery("#hlasovani_prijmeni").val(),
623         hlasovani_email: jQuery("#hlasovani_email").val(),
624         hlasovani_telefon: jQuery("#hlasovani_telefon").val(),
625         hlasovani_adresa: jQuery("#hlasovani_adresa").val()
626        },
627        function(xml){
628          jQuery(xml).find('response').each(function(){
629            if(jQuery(this).find('status').text() == 'OK'){
630              alert(jQuery(this).find('alert').text());
631              if(imgSet > 0){
632                obj.imgReviewsSetKode(imgSet, score);
633              } else {
634                closeajax();
635              }
636            } else {
637              alert(jQuery(this).find('alert').text());
638            }
639         });
640      	}, "xml");
641
642    } else {
643      alert('Vyplňte nebo zkontrolujte ozančené položky');
644    }
645
646  }
647
648
649
650Gallery4u.prototype.loadMini = 
651  function(galleryID){   
652    var obj = this; 
653    var fotoids = '';
654    if (typeof this.fotos[galleryID] != "undefined")
655      var fotoids = this.fotos[galleryID].join(",");
656        
657    var params = "&subakce=mini" +
658                 "&gal=" + this.galId + 
659                 "&obrarr=" + fotoids +
660                 "&galSizeW=" + this.galSizeW +
661                 "&minih=" + this.galMiniH;
662    if (this.fotos[galleryID].length > 1) {
663      jQuery("#gal_minidiv").css('height',obj.galMiniH);
664      jQuery("#gal_minidiv").load(this.baseAjaxUrl +'akce=gal_mini&lanG=' + obj.gallang + params, '',
665        function(){
666          obj.afterLoadMini(galleryID);
667          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");
668          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");
669          jQuery("<div id='g4u_slideshow_time'></div>").insertBefore('#g4u_slideshow_loading');
670          jQuery("#g4u_slideshow_time").slider({
671            min: 1,
672            max: 15,
673            value: 5,
674            change: function(e,ui){
675              obj.loaderW = ui.value*10;
676            }
677          }).css({
678            margin: "5px",
679            height: "8px"
680          }).find(".ui-slider-handle").css({
681            height: "14px",
682            top: "-4px"
683          }); // 27.1.2014 Katka - oprava rozpadlé galerie při použití některých skinů jQuery UI
684        }
685      );
686    } else {
687      jQuery("#gal_minidiv").html('');    
688      jQuery("#gal_minidiv").css('height',50);
689    }
690  }
691
692
693
694Gallery4u.prototype.imageStarSelected = 
695  function(id, iStar){
696    for (var i=1;i<=5;i++){
697      if(i <= iStar){
698        jQuery('.star_' + id + '_' + i).attr("src","/images/gallery/hvezdicka_zluta.png");
699      } else {
700        jQuery('.star_' + id + '_' + i).attr("src","/images/gallery/hvezdicka_cerna.png");
701      }
702    }
703  }
704
705
706
707Gallery4u.prototype.afterLoadMini = 
708  function (galleryID){
709    var obj = this;
710
711    jQuery('.nextFotoClick').each(function(){
712      jQuery(this).click(function(e){
713          e.stopPropagation();
714          obj.nextFoto();
715        });    
716    });
717    jQuery('.prevFotoClick').each(function(){
718      jQuery(this).click(function(e){
719          e.stopPropagation();
720          obj.prevFoto();
721        });    
722    });
723    jQuery('.closeFotoClick').each(function(){
724      jQuery(this).click(function(e){
725          if(!$(".panzoom_c").length){
726          e.stopPropagation();
727          obj.closeGalery();
728          }
729        });    
730    });
731    jQuery(".g4u_zavrit").click(function(e){
732        e.stopPropagation();
733          obj.closeGalery();
734          document.documentElement.style.overflow = 'auto'; 
735          document.body.scroll = "yes";
736    });
737    jQuery("#gal_a_close").click(function(e){
738        e.stopPropagation();
739        obj.closeGalery();
740        document.documentElement.style.overflow = 'auto';  
741        document.body.scroll = "yes";
742    });
743    jQuery('.showFotoClick').each(function(){
744      jQuery(this).click(function(e){
745          e.stopPropagation();
746          if (jQuery(this).attr('rel')) {            
747            obj.showObrGal(jQuery(this).attr('rel'),galleryID);
748          }
749        });    
750    });
751    
752    try {
753    if(this.fotos[galleryID].length > 0 && this.aktualFoto){
754      var minuleVpoli = 0;
755      var nastavDalsi = 0;
756      try {
757        if (document.getElementById('agal4u' + this.aktualFoto)) {
758          document.getElementById('agal4u' + this.aktualFoto).focus();
759          /*jQuery('#agal4u' + this.aktualFoto).keydown(function(event) {
760            obj.keyPressed(event.keyCode);
761          });*/
762        }   
763        if (document.getElementById('igal4u' + this.aktualFoto))       
764          document.getElementById('igal4u' + this.aktualFoto).style.border = '2px solid white'; // style=\"border: 2px solid black;\"
765      } catch(e) {}
766      
767      //var sznFoto = document.getElementById('seznam_fotek').innerHTML;
768      var sznFotoArr = this.fotos[galleryID];
769      
770      this.predesleFoto = 0;
771      this.dalsiFoto = 0;
772      
773      for (i=0;i<sznFotoArr.length;i++){
774        
775        if(this.aktualFoto == sznFotoArr[i]){
776          this.predesleFoto = minuleVpoli;
777          nastavDalsi = 1;
778        } else if (nastavDalsi == 1){
779          this.dalsiFoto = sznFotoArr[i];
780          break;
781        }
782        minuleVpoli = sznFotoArr[i];
783      }
784      if (this.dalsiFoto == 0 && this.fotos[galleryID].length > 1) {
785        this.dalsiFoto = this.fotos[galleryID][0];
786      }
787      if (this.aktualFoto == this.fotos[galleryID][0]) {
788        this.predesleFoto =  this.fotos[galleryID][this.fotos[galleryID].length-1]; 
789      }
790      
791      setTimeout(function(){obj.waitLoadPopis();},100);
792    }
793    } catch (e) {
794      //alert('Chyba galleryID - '+galleryID);
795    }
796    
797  }
798
799Gallery4u.prototype.waitLoadPopis = 
800  function(){
801    var obj = this;
802    
803    if(document.getElementById('galIdPopisObr')){
804      if(document.getElementById('galIdPopisObr').innerHTML == this.aktualFoto){
805  
806        var widthPop =  jQuery('#gal_popis').width();// document.getElementById('gal_popis').offsetWidth;
807        var heightPop = jQuery('#gal_popis').height();//document.getElementById('gal_popis').offsetHeight;
808        
809        document.getElementById('gal_popis_transparent').style.width = widthPop + 'px';
810        document.getElementById('gal_popis_transparent').style.height = heightPop + 'px';
811      
812      } else {
813        setTimeout(function(){obj.waitLoadPopis();},100);
814      }
815    } else {
816      setTimeout(function(){obj.waitLoadPopis();},100);
817    }
818  }
819
820Gallery4u.prototype.galPopisClose = 
821  function(){
822    document.getElementById('gal_popis').style.display = 'none';
823    document.getElementById('gal_popis_transparent').style.display = 'none';
824  }
825
826
827Gallery4u.prototype.prevFoto = 
828  function(){
829    if(this.predesleFoto > 0){
830      this.showObrGal(this.predesleFoto,this.galleryID);
831    }
832  }
833
834Gallery4u.prototype.nextFoto = 
835  function(){
836    if(this.dalsiFoto > 0){
837      this.showObrGal(this.dalsiFoto,this.galleryID);
838    }
839  }
840
841Gallery4u.prototype.galPlay = 
842  function(){
843    //if(this.dalsiFoto > 0 && this.stopSlideshow != true){
844    if(this.dalsiFoto > 0){
845      this.nextFoto();
846      this.slideshowIndicator();
847      //clearTimeout(this.casovacPrehravani);
848      var obj = this;
849
850      //obj.casovacPrehravani = setTimeout(function(){obj.galPlay();}, jQuery("#g4u_slideshow_time").slider("value")*1000);
851    } else {
852      //clearTimeout(this.casovacPrehravani);
853      clearInterval(this.loaderInterval);
854      //this.stopSlideshow = false;
855    }
856    //this.stopSlideshow = false;
857  }
858
859Gallery4u.prototype.slideshowIndicator = 
860  function() {
861//    this.loaderW = 50;
862    this.loaderW = jQuery("#g4u_slideshow_time").slider("value")*10;
863    if (this.loaderInterval)
864      clearInterval(this.loaderInterval);
865    jQuery('#g4u_slideshow_loading').css({width:this.loaderW+'px',height: 15, display:'block',float:'left',background:'#666666', margin: '2px 0px'});
866    var obj = this;
867    this.loaderInterval = setInterval(function(){obj.loaderRewrite();}, 100);
868    this.slideshowJede = true;
869  }
870
871Gallery4u.prototype.loaderRewrite = 
872  function() {
873    if (this.slideshowJede && this.loaderW-1 >= 0) {
874      this.loaderW--;
875      jQuery('#g4u_slideshow_loading').css({width: this.loaderW+'px'});
876    } else {
877      clearInterval(this.loaderInterval);  
878      if (this.loaderW-1 < 0) this.galPlay();
879    } 
880  }
881
882Gallery4u.prototype.galPlayStop = 
883  function(){
884    clearTimeout(this.casovacPrehravani);
885    this.loaderW = 1;
886    //this.stopSlideshow = true;
887    this.slideshowJede = false;
888  };
889
890Gallery4u.prototype.closeGalery = 
891  function(){
892    clearTimeout(this.casovacPrehravani);
893    if (document.getElementById('galery_view')) {
894        document.getElementById('galery_view').style.display = 'none';
895        document.getElementById('galery_view').style.height = '0px';
896        document.getElementById('galery_view').style.width = '0px';
897        document.getElementById('galery_view').style.innerHTML = '';
898    }
899    
900    if (document.getElementById('galery_view_transparent')) {
901        document.getElementById('galery_view_transparent').style.display = 'none';
902        document.getElementById('galery_view_transparent').style.height = '0px';
903        document.getElementById('galery_view_transparent').style.width = '0px';
904    }
905  
906    this.aktualFoto = 0;
907    this.predesleFoto = 0;
908    this.dalsiFoto = 0;
909    this.skryvaniOff();
910    if (this.onclosefocus)
911      jQuery(this.onclosefocus).focus();
912    
913      //kompatibilita s as4uPopup - potlaceni popup okna na pozadi
914    try {
915      jQuery('.as4uPopupDataContainer').css('zIndex','');
916    } catch(e) {}
917      
918  }
919
920Gallery4u.prototype.keyPressed = 
921  function(keycode){
922    //39 - right
923    //37 - left
924    //32 - space
925    //27 - esc
926    if (keycode == 39 || keycode == 32) {
927      this.nextFoto();  
928    }
929    if (keycode == 37) {
930      this.prevFoto();   
931    }
932    if (keycode == 27) {
933        this.closeGalery();
934        document.body.scroll = "yes";
935        document.documentElement.style.overflow = 'auto';
936    } else if(keycode == 83){
937      this.galPlayStop();
938    } else if(keycode == 80){
939      this.galPlay();
940    }
941  
942  }
943
944  // 2.7.2013 - Funkce automatickeho skryvani ovladacich prvku pri nehybani mysi [Katka]
945
946Gallery4u.prototype.skryvaniOn = 
947  function(){
948    this.mNoMove = 0;
949    this.mOpacity = 1;
950    var obj = this;
951    jQuery("body").off("mousemove").on("mousemove", function(){
952      if (!obj.zrovnaSkryto) {
953        if (obj.mNoMove < 0) {
954          //jQuery("#galery_view, #galery_view *").css("cursor", "");
955          jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis_transparent").stop(true).fadeTo(obj.mCasSkryvani, 0.7);
956          jQuery("#gal_popis").stop(true).fadeTo(obj.mCasSkryvani, 1);
957          obj.mOpacity = 1;
958        }
959        if (obj.mNoMove != 0) obj.mNoMove = 0;
960      }
961    });
962    clearInterval(this.mInterval);
963    obj.mInterval = setInterval(function(){
964      if (obj.mNoMove >= 0) {
965        obj.mNoMove++;
966        if (obj.mNoMove >= obj.mCekani/obj.mCitlivost) {
967          jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis, #gal_popis_transparent").fadeTo(obj.mCasSkryvani, 0, function(){
968            //jQuery("#galery_view, #galery_view *").css("cursor", "none");
969            obj.zrovnaSkryto = true;
970            setTimeout(function(){
971              obj.zrovnaSkryto = false;
972            }, obj.mCasSkryvani);
973          });
974          obj.mNoMove = -1;
975          obj.mOpacity = 0;
976        }
977      }
978    }, (this.mCitlivost));
979  }
980
981Gallery4u.prototype.skryvaniOff = 
982  function(){
983    jQuery("body").off("mousemove");
984    clearInterval(this.mInterval);
985    this.mOpacity = 1;
986    this.mNoMove = 0;
987  }
988
989Gallery4u.prototype.skryvaniSet = 
990  function(){
991    jQuery("#gal_a_close, #gal_a_predchozi, #gal_a_dalsi, #gal_popis_transparent").css("opacity", this.mOpacity*0.7);
992    jQuery("#gal_popis").css("opacity", this.mOpacity);
993  }
994
995
996
997
998
999// konec nove galsrie
1000
1001/*******************************************************************************
1002 *   *************************************************************************
1003 *   GALERIE SLIDER - as4uSlider - 28.12.2011 - Jan Navratil
1004 *   - <img class="as4uSlider" rel="as4uSlider[adrID]" src="/images/gallery/slider4u_editor.jpg" /> 
1005 *******************************************************************************/
1006 
1007  //constructor 
1008function As4uSlider(animTime,gallery) {
1009  this.rExp = /as4uSlider\[(.*?)\]/; //parsing regexp for params  
1010  this.animTime = animTime ? animTime : 1000;
1011  this.stayTime = 2000; 
1012  this.gallery = gallery;
1013  this.init(); //inicializace 
1014  this.autoAnim = true;
1015  this.smerAnimace = 'rtl'; //ltr - left-to-right, rtl - right-to-left
1016}
1017
1018  /**
1019   * Inicializace slideru
1020   */     
1021As4uSlider.prototype.init = function() {
1022  var obj = this;  
1023  
1024  jQuery('img.as4uSlider').each(function(index) {
1025    if (jQuery(this).attr('rel')) {
1026      var rel = jQuery(this).attr('rel');
1027      rel = rel.replace(/\s/g, '');
1028      var matched = rel.match(obj.rExp);      
1029      if (matched) {       
1030        var adr = matched[1];
1031  
1032        var div = jQuery('<div>').insertBefore( jQuery(this) ).addClass('as4uSliderCont');
1033        
1034        var dd = jQuery('<div>').addClass('as4uSliderImageCont').appendTo(div);
1035        var imgW = dd.width();
1036        var imgH = dd.height();
1037        dd.detach();
1038                  
1039        div.load('//'+location.host+'/galerie/obrazky/as4uSlider.php?adr='+adr+'&w='+imgW+'&h='+imgH, function() {
1040          obj.initFinish(div);
1041        });
1042        jQuery(this).detach(); 
1043        
1044      }
1045    }
1046  });  
1047  
1048  jQuery('img.as4u_galadr_show_style_2').each(function(index) {
1049    if (jQuery(this).attr('rel')) {
1050      var rel = jQuery(this).attr('rel');
1051      rel = rel.replace(/\s/g, '');
1052      var matched = rel.match(obj.rExp);      
1053      if (matched) {       
1054        var adr = matched[1];
1055  
1056        var div = jQuery('<div>').insertBefore( jQuery(this) ).attr('id', 'as4u_galadr_show_style_2_Cont_' + index);
1057        
1058        var dd = jQuery('<div>').addClass('as4uSliderImageCont_s2').appendTo(div);
1059        var imgW = dd.width();
1060        var imgH = dd.height();
1061        dd.detach();
1062        
1063        var imgdef = $(this);
1064        
1065        var imgwh= "";
1066        
1067        var classList =  imgdef.attr('class').split(/\s+/);
1068       
1069        $.each(classList, function(index, item) {
1070            if(item.indexOf("obrhlp") !== -1){
1071                var help = item.split("_");
1072                imgwh += "&" + help[0] + "=" + help[2];
1073            }
1074        });
1075        
1076        setTimeout(function(){  
1077            $('#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() {
1078                
1079            });
1080        }, 10);
1081        
1082        jQuery(this).detach(); 
1083        
1084      }
1085    }
1086  });  
1087  
1088  jQuery('img.as4u_galadr_show_style_3').each(function(index) {
1089    if (jQuery(this).attr('rel')) {
1090      var rel = jQuery(this).attr('rel');
1091      rel = rel.replace(/\s/g, '');
1092      var matched = rel.match(obj.rExp);      
1093      if (matched) {       
1094        var adr = matched[1];
1095  
1096        var div = jQuery('<div>').insertBefore( jQuery(this) ).addClass('as4u_galadr_show_style_3_Cont');
1097        
1098        var dd = jQuery('<div>').addClass('as4uSliderImageCont_s3').appendTo(div);
1099        var imgW = dd.width();
1100        var imgH = dd.height();
1101        dd.detach();
1102                  
1103        div.load('//'+location.host+'/galerie/obrazky/as4uSlider.php?type=3&adr='+adr+'&w='+imgW+'&h='+imgH, function() {
1104          //obj.initFinish(div);
1105        });
1106        jQuery(this).detach(); 
1107        
1108      }
1109    }
1110  });  
1111  
1112}
1113
1114  //div - kontejner kde jsou nactene obrazky
1115As4uSlider.prototype.initFinish = function(div) {
1116  
1117  var div = jQuery(div);
1118  var obj = this;
1119  
1120  div.find('.as4uSliderImageCont').each(function(index) {
1121    var img = jQuery(this).find('img:first-child');
1122    var kont = jQuery(this);
1123      //resizujeme vnitrni obrazky
1124    /*var w = img.width();
1125    var h = img.height();
1126    var n_w = jQuery(this).width();
1127    var n_h = h*(n_w/w);
1128    if (w > 0 && h > 0) {
1129      img.css({width:n_w, height:n_h});
1130    }                      */
1131    obj.imageResize(kont);
1132    
1133    img.click(function(){
1134      obj.clickEvent(div,this.parentNode);
1135    });
1136    kont.click(function(){
1137      obj.clickEvent(div,this);
1138    });
1139        
1140    
1141  });
1142  div.data('animate', this.autoAnim);
1143  div.bind('mouseover', function() {
1144    jQuery(div).data('animate', false);
1145  });
1146  div.bind('mouseout', function() {
1147    jQuery(div).data('animate', obj.autoAnim);
1148    setTimeout(function() {
1149      if (jQuery(div).data('animate') == true) {
1150        obj.animate(div);
1151      }
1152    }, 500);
1153  });
1154
1155  this.animate(div);
1156
1157};
1158
1159
1160As4uSlider.prototype.animate = function(div) { 
1161  try {
1162    if (div.find('div.as4uSliderImageCont').length <= 3) return;
1163    clearTimeout(div.data('timeout'));
1164  } catch (e) {}
1165  if (div && div.data('animate') == true) {
1166    var obj = this;
1167    var item = div;
1168    if (typeof div.data('fce') != "function") {
1169      div.data('fce', function() {       
1170        if (item.data('animate') == true) {          
1171          obj.clickEvent(item,jQuery(item).find(obj.smerAnimace == 'ltr' ? '.as4uSliderFirst' :  '.as4uSliderThird').eq(0));
1172        }
1173      }); 
1174    }
1175    
1176    div.data('timeout',
1177      setTimeout(div.data('fce'), this.stayTime)
1178    );
1179    
1180      
1181  }
1182}
1183
1184As4uSlider.prototype.imageResize = function(imgDiv) {
1185  var img = jQuery(imgDiv).find('img:first-child');
1186  var w = img.width();
1187  var h = img.height();
1188  var n_w = jQuery(imgDiv).width();
1189  var n_h = jQuery(imgDiv).height();// h*(n_w/w);
1190  if (n_w > 0 && n_h > 0) {
1191    img.css({width:n_w, height:n_h});
1192  }
1193}
1194
1195function log(data) {
1196  try {
1197    console.log(data);  
1198  } catch(e) {}
1199}
1200
1201As4uSlider.prototype.clickEvent = function(div,imgCont) {
1202  var obj = this;
1203  if (jQuery(div).data('blockAnimate') != true) {
1204      //zablokujeme animaci    
1205    jQuery(div).data('blockAnimate', true);
1206     
1207    var imgCont = jQuery(imgCont);
1208    var animTime = this.animTime;
1209      //click na prvni element
1210    if (imgCont.hasClass('as4uSliderFirst') && div.find('div.as4uSliderImageCont').length > 3) {
1211      var prev = div.find('.as4uSliderFirst').prev();
1212      if (prev.length == 0) {
1213        prev = div.find('div:last-child'); 
1214        if (prev.length == 0) { //typicky v IE se to stane :/
1215          var els = div.find('div.as4uSliderImageCont');
1216          var prev = els.eq(els.length-1);           
1217        } 
1218      }
1219      this.imageResize(prev);
1220      /*var next = div.find('.as4uSliderThird').next(); 
1221      if (!next) {
1222        next = div.find('div:first-child');  
1223      } */
1224      
1225      var first = imgCont;
1226      var second = div.find('.as4uSliderSecond');
1227      var third =  div.find('.as4uSliderThird');    
1228      //animace prev elementu
1229      prev.css({display:'block',opacity:0}
1229);
1230      prev.animate({
1231        left: first.css('left'),
1232        opacity: 1
1233      },animTime, function() {        
1234        prev.removeClass('as4uSliderNoVisible');
1235        prev.addClass('as4uSliderFirst');      
1236        prev.removeAttr('style');        
1237        jQuery(div).data('blockAnimate', false);        
1238      });     
1239      
1240      
1241      var full_w = second.width();
1242        //animace velikosti obrazku
1243      var f_img = first.find('img:first-child');
1244      var f_w = f_img.width();
1245      var f_h = f_img.height();
1246      var n_f_w = full_w; 
1247      var n_f_h = f_h*(n_f_w/f_w);
1248      
1249      var s_img = second.find('img:first-child');
1250      var s_w = s_img.width();
1251      var s_h = s_img.height();
1252      var n_s_w = first.width();
1253      var n_s_h = s_h*(n_s_w/s_w);
1254      
1255      
1256      
1257      //animace first elementu
1258      first.switchClass( "as4uSliderFirst", "as4uSliderSecond", animTime );     
1259      f_img.animate({
1260        width: n_f_w,
1261        height: n_f_h
1262      },animTime);
1263      
1264      //animace second elementu
1265      second.switchClass( "as4uSliderSecond", "as4uSliderThird", animTime );
1266      s_img.animate({
1267        width: n_s_w,
1268        height: n_s_h
1269      },animTime);    
1270      
1271      //animace third elementu
1272      third.animate({
1273        left: prev.css('left'),
1274        opacity: 0      
1275      },animTime, function() {
1276        third.removeClass('as4uSliderThird');
1277        third.addClass('as4uSliderNoVisible');      
1278        third.removeAttr('style');
1279        obj.animate(div);
1280      });      
1281    } else if (imgCont.hasClass('as4uSliderThird') && div.find('div.as4uSliderImageCont').length > 3) {
1282      
1283      var next = imgCont.next(); 
1284      if (next.length == 0) {
1285        next = div.find('div:first-child'); 
1286        if (next.length == 0) { //typicky v IE se to stane :/
1287          var els = div.find('div.as4uSliderImageCont');
1288          var next = els.eq(0);           
1289        }  
1290      } 
1291      this.imageResize(next);
1292      
1293      var first = div.find('.as4uSliderFirst');
1294      var second = div.find('.as4uSliderSecond');
1295      var third = imgCont;
1296      
1297      var full_w = second.width();
1298        //animace velikosti obrazku
1299      var f_img = third.find('img:first-child');
1300      var f_w = f_img.width();
1301      var f_h = f_img.height();
1302      var n_f_w = full_w; 
1303      var n_f_h = f_h*(n_f_w/f_w);
1304      
1305      var s_img = second.find('img:first-child');
1306      var s_w = s_img.width();
1307      var s_h = s_img.height();
1308      var n_s_w = first.width();
1309      var n_s_h = s_h*(n_s_w/s_w);
1310      
1311      
1312      next.css({display:'block',opacity:0}
1312);
1313      next.animate({
1314        left: third.css('left'),
1315        opacity: 1
1316      },animTime, function() {
1317        next.removeClass('as4uSliderNoVisible');
1318        next.addClass('as4uSliderThird');      
1319        next.removeAttr('style');
1320        jQuery(div).data('blockAnimate', false);
1321      });
1322      
1323      third.switchClass( "as4uSliderThird", "as4uSliderSecond", animTime );
1324      third.css('zIndex', 4);
1325      f_img.animate({
1326        width: n_f_w,
1327        height: n_f_h
1328      },animTime);    
1329      second.switchClass( "as4uSliderSecond", "as4uSliderFirst", animTime );
1330      s_img.animate({
1331        width: n_s_w,
1332        height: n_s_h
1333      },animTime); 
1334      
1335      first.animate({
1336        left: next.css('left'),
1337        opacity: 0      
1338      },animTime, function() {
1339        first.removeClass('as4uSliderFirst');
1340        first.addClass('as4uSliderNoVisible');      
1341        first.removeAttr('style');
1342        obj.animate(div);
1343      }); 
1344      //click na element - otevření galerie - obrázk ujednoho  
1345    } else if (imgCont.hasClass('as4uSliderSecond') || div.find('div.as4uSliderImageCont').length <= 3) {
1346      //[obrID,adrID,minisize,lang,galleryID]
1347      var rel = imgCont.attr('rel');
1348      if (rel) {
1349        var matched = rel.split(',');
1350        this.gallery.fotos[matched[4]] = [matched[4]];
1351        if (matched[1])                                                                  //galleryID bude id fotky
1352          this.gallery.showgallery(matched[0], matched[1], matched[2], matched[3], matched[4]);
1353      } 
1354      jQuery(div).data('blockAnimate', false);    
1355    } 
1356  } 
1357  
1358}
1359
1360
1361function loadGalleryStruktura(id,nid,el) {
1362  if (!nid) var nid = 0;
1363  var url = location.protocol + '//'+location.host+'/galerie/administrace/ajax.php?' + strukturaGetUrlString();
1364  url += '&subsubakce=potomci&nid='+nid+'&akce=struktura';
1365
1366
1367  $.post(url,function(html){
1368    $('#'+id).html(html);
1369    $(el).attr('rel',id);
1370    $(el).attr('onclick','');
1371    $(el).html('-');
1372    $(el).click(function() {
1373      //$('.'+$(this).attr('rel')).toggle();
1374      if ($(this).html() == '+') {
1375        $(this).html('-');
1376        $('#'+$(this).attr('rel')).css('display','block');
1377      } else {
1378        $(this).html('+');
1379        $('#'+$(this).attr('rel')).css('display','none');
1380      }
1381    });
1382  });
1383
1384}
1385
1386function strukturaFind(searchText, id) {
1387  var url = location.protocol + '//'+location.host+'/galerie/administrace/ajax.php?' + strukturaGetUrlString();
1388  url +='&subsubakce=hledat&akce=struktura';
1389  $('#'+id).load(url, {hledat:searchText},function(){});
1390  return false;
1391}
1392
1393
1394function strukturaGetUrlString() {
1395  var urlString = "";
1396  var joiner = '';
1397  var htmlAjax = false;
1398  $('.get_variables').each(function() {
1399    if ($(this).attr('name').indexOf('js_') !== -1) {
1400      if ($(this).attr('name').replace('js_','') == 'htmlAjax') htmlAjax = true;
1401      urlString += joiner + $(this).attr('name').replace('js_','') + '=' + $(this).val();
1402      joiner = '&';
1403    }
1404  });
1405  if (htmlAjax == false) {
1406    urlString += '&htmlAjax=yes';
1407  }
1408  return urlString;
1409}

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.