1function submitSMSnumber(idapp, ids) { 2 3 var smsnumber = $("#smsnumber").val(); 4 5 if (smsnumber.length == 9) { 6 7 $.post("/redakce/ajax.php", {akce: 'sms', smsnumber: smsnumber, ids: ids, idapp: idapp}, 8 function (xml) { 9 $(xml).find('response').each(function () { 10 alert($(this).find('alert').text()); 11 }); 12 }, "xml"); 13 14 15 } else { 16 alert('Telefonnà ÄÃslo uvádÄjte v devÃtimÃstném formátu bez mezer!'); 17 } 18} 19 20 21function loadCal(u) { 22 jQuery('#title_events').load(u, function () { 23 initBuble(); 24 }); 25 jQuery('#menu_calendar').load(u, function () { 26 initBuble(); 27 }); 28} 29 30// bubliny 31 32function initBuble() { 33 34 // inicializace bublin as4u 35 var elmArr = jQuery('td[id ^= event_]'); 36 for (i = 0; i < elmArr.length; i++) { 37 var classinfo = jQuery(elmArr[i]).attr("id"); 38 var elmIDarr = classinfo.split('_'); 39 jQuery(elmArr[i])[0].setAttribute('onmouseover', 'showBubleInfo(this, \'' + elmIDarr[1] + '\', event);'); 40 jQuery(elmArr[i])[0].setAttribute('onmouseout', 'hideBubbleInfo(this)'); 41 } 42 43 as4uBubble.init(); 44 45} 46 47 48 49function hideBubbleInfo(el) { 50 as4uBubble.hideBubble(0); 51} 52 53function showBubleInfo(el, helpid, event) { 54 as4uBubble.hideBubble(0); 55 if (!$(el).hasClass('bubbleOpen')) { 56 $(el).addClass('bubbleOpen'); 57 } 58 59 as4uBubble.showBubble(jQuery('#eventtext_' + helpid), event, false); 60 61} 62 63var as4uRoller; 64var topw = 34.33; 65 66jQuery(document).ready(function () { 67 68 jQuery.get('/getdevice.php', 69 function (xml) { 70 jQuery(xml).find('response').each(function () { 71 if (jQuery(this).find('device').text() != '') { 72 if (jQuery(this).find('device').text() == 'pc') { 73 74 $.getScript("/js/as4u_buble.js", function () { 75 initBuble(); 76 }); 77 78 } 79 80 } 81 }); 82 }, "xml"); 83 84 if ($("body").innerWidth() < 1024) { 85 topw = 50; 86 if ($("body").innerWidth() < 600) { 87 topw = 100; 88 } 89 } 90 91 if ($("#slider_novinky").length && (($("body").innerWidth() >= 1024 && $(".rollitem_novinky").length >= 4) || ($("body").innerWidth() < 1024 && $(".rollitem_novinky").length > 2))) { 92 93 as4uRoller = new As4uRoller({ 94 rollid: 'slider_novinky', 95 smer: 'left', 96 automatic: false, 97 btnright: 'roller_left', 98 btnleft: 'roller_right', 99 animeTime: 1000, 100 stayTime: 8000 101 }); 102 as4uRoller.show(); 103 } 104 105 adjustsliderdrclanek(as4uRoller, "rollitem_novinky", topw, $("#slider_novinky").outerWidth(), 1); 106 107 oldiw = $("body").innerWidth(); 108 var timersl; 109 110 window.addEventListener("resize", function (event) { 111 if ($("body").innerWidth() < 1024) { 112 topw = 50; 113 if ($("body").innerWidth() < 600) { 114 topw = 100; 115 } 116 } else { 117 topw = 34.33; 118 } 119 adjustsliderdrclanek(as4uRoller, "rollitem_novinky", topw, $("#slider_novinky").outerWidth()); 120 }); 121 122}); 123 124function adjustsliderdrclanek(slider, rollitem, wid, wid2, t) { 125 /*console.log({ 126 slider: slider, 127 rollitem: rollitem, 128 wid: wid, 129 wid2: wid2 130 });*/ 131 $("." + rollitem).css("width", (wid2 / 100 * wid) + "px"); 132 if (slider) { 133 slider.refresh(); 134 } 135} 136 137/** ***************************** 138 * As4u roller - based on jquery 139 * 140 * 1.2.2011 - Jan Navratil 141 * v 1.1 - # oprava 7.11.2011 - spatne pocitana sirka elementu s marginem 142 */ 143 144 145function As4uRoller(options) { 146 this.options = options; 147 this.inProgress = false; 148 this.automatic = options.automatic; 149 this.animeTime = options.animeTime ? options.animeTime : 1500; 150 this.stayTime = options.stayTime ? options.stayTime : 10000; 151} 152 153function log(d) { 154 try { 155 //console.log(d); 156 } catch (e) { 157 } 158} 159 160 161As4uRoller.prototype.show = function () { 162 var toto = this; 163 this.rollerMain = $('#' + this.options.rollid); 164 this.rollerMain.css('position', 'relative'); 165 166 167 //nalezeni vnitrniho contu 168 this.itemsCont = this.rollerMain.find('.rollbox-cont').eq(0); 169 170 this.itemsCont.css('position', 'absolute'); 171 this.itemsCont.css('top', '0'); 172 this.itemsCont.css('left', '0'); 173 174 //projdeme si v cyklu existujici itemy 175 this.itemsCount = 0; 176 this.items = []; 177 this.itemWidth = 0; 178 this.itemHeight = 0; 179 180 this.itemsCont.find('.rollitem').each(function (index, element) { 181 182 //mouse eventy 183 /*$(element).mouseenter(function(){ 184 toto.automaticBefore = toto.automatic; 185 toto.automatic = false; 186 }); 187 $(element).mouseleave(function(){ 188 toto.automatic = toto.automaticBefore; 189 if (toto.automatic) 190 toto.animate(); 191 }); */ 192 193 toto.items.push($(element)); //create array of elements 194 var width = $(element).width(); 195 if (parseInt($(element).css('marginLeft')) > 0) { 196 width += parseInt($(element).css('marginLeft')); 197 } 198 if (parseInt($(element).css('marginRight')) > 0) { 199 width += parseInt($(element).css('marginRight')); 200 } 201 if (parseInt($(element).css('marginLeft')) > 0) { 202 width += parseInt($(element).css('marginLeft')); 203 } 204 if (parseInt($(element).css('paddingRight')) > 0) { 205 width += parseInt($(element).css('paddingRight')); 206 } 207 if (parseInt($(element).css('paddingLeft')) > 0) { 208 width += parseInt($(element).css('paddingLeft')); 209 } 210 211 //log('Width : ' + width); 212 if (width > toto.itemWidth) { 213 toto.itemWidth = width; 214 } 215 if ($(element).outerHeight(true) > toto.itemHeight) { 216 toto.itemHeight = $(element).outerHeight(true); 217 } 218 toto.itemsCount++; 219 });
220 221 if (!this.itemsCount) 222 return; 223 224 //naklonujeme posledni element pred prvni 225 /* var cloneItem = this.items[this.items.length-1].clone(); 226 this.itemsCont.prepend(cloneItem);*/ 227 228 229 /*if (this.itemsCount*this.itemWidth > this.rollerMain.width() + this.itemWidth) { 230 this.items[this.items.length-1].detach(); 231 this.items.pop(); 232 this.itemsCount--; 233 } else { //mame pouze o jeden element vice -> pri posunu budou dva vedle sebe, to neni dobre -> naklonujeme druhy zleva (drive prvni) na konec 234 //#BUG - 5.1.2012 235 if (this.rollerMain.width() < this.itemsCount*this.itemWidth) { 236 cloneItem.detach(); 237 for (var i=0;i < this.items.length-1;i++) { 238 this.itemsCont.append(this.items[i].clone()); 239 this.itemsCount++; 240 } 241 var newItems = []; 242 newItems.push(cloneItem); 243 for (var i in this.items) { 244 newItems.push(this.items[i]); 245 } 246 this.items = newItems; 247 this.itemsCont.prepend(this.items[this.items.length-1].clone()); 248 } 249 }*/ 250 251 this.itemsCont.css('width', this.itemsCount * this.itemWidth + this.itemWidth); 252 this.itemsCont.css('height', this.itemHeight); 253 254 255 //posuneme absolutni pozici 256 this.itemsCont.css('left', -parseInt(this.itemWidth)); 257 258 this.smer = this.options.smer ? this.options.smer : "left"; 259 260 //nastaveni akci na tlacitka 261 if ($('#' + this.options.btnleft)) { 262 $('#' + this.options.btnleft).click(function () { 263 if (!$(this).hasClass('noScroll')) 264 toto.btnLeft(); 265 }); 266 } 267 if ($('#' + this.options.btnright)) { 268 $('#' + this.options.btnright).click(function () { 269 if (!$(this).hasClass('noScroll')) 270 toto.btnRight(); 271 }); 272 } 273 /* 274 try { 275 console.log(' --- ' + this.options.rollid + ' ---- '); 276 console.log(this.itemWidth); 277 console.log(this.itemsCount*this.itemWidth); 278 console.log(this.rollerMain.width()); 279 } catch(e) {} */ 280 281 if (this.itemsCount * this.itemWidth > this.rollerMain.width() && this.options.automatic == true) { //animovat jen kdyz je kam 282 var fce = function () { 283 toto.animate(); 284 }; 285 this.animateTimeout = setTimeout(fce, this.stayTime); 286 //this.animate(); 287 } else { //neni kam animovat, nastavime tlacitkum specialni tridy 288 if (!(this.itemsCount * this.itemWidth > this.rollerMain.width())) { 289 // $('#' + this.options.btnleft).addClass('noScroll'); 290 //$('#' + this.options.btnright).addClass('noScroll'); 291 } 292 } 293 294}; 295 296As4uRoller.prototype.btnLeft = function () { 297 if (!this.inProgress) { 298 299 this.smer = "left"; 300 if (this.options.automatic == true) 301 this.afterBtnClick(); 302 303 this.automatic = false; 304 if (this.itemsCount * this.itemWidth > this.rollerMain.width()) 305 this.animate(); 306 } 307} 308 309As4uRoller.prototype.btnRight = function () { 310 if (!this.inProgress) { 311 if (this.options.automatic == true) 312 this.afterBtnClick(); 313 314 this.smer = "right"; 315 this.automatic = false; 316 if (this.itemsCount * this.itemWidth > this.rollerMain.width()) 317 this.animate(); 318 319 } 320} 321 322As4uRoller.prototype.afterBtnClick = function () { 323 var toto = this; 324 clearTimeout(this.clickTimeout); 325 var fce = function () { 326 toto.smer = toto.options.smer ? toto.options.smer : "left"; //vychozi hodnota 327 toto.automatic = toto.options.automatic; 328 if (toto.itemsCount * toto.itemWidth > toto.rollerMain.width() && toto.options.automatic == true) 329 toto.animate(); 330 }; 331 this.clickTimeout = setTimeout(fce, 15000); 332} 333 334 335As4uRoller.prototype.animate = function () { 336 var toto = this; 337 if (!this.inProgress) { 338 339 this.direction = this.smer == 'right' ? '+=' : '-='; 340 this.inProgress = true; 341 this.itemsCont.animate({ 342 left: this.direction + this.itemWidth 343 }, this.animeTime, function () { 344 toto.afterAnimate(); 345 }); 346 var animtimehalf = this.animeTime / 2; 347 if (this.options.rollid == "zahlavi_roller_h") { 348 //console.log(nextslider); 349 $(".pospis_obrazku_animace").animate({ 350 opacity: 0 351 }, animtimehalf, function () { 352 $(".pospis_obrazku_animace h2").html($("#slider_data_" + nextslider).data("name"));
353 $(".pospis_obrazku_animace a").attr("href", $("#slider_data_" + nextslider).data("url")); 354 $(".pospis_obrazku_animace").animate({ 355 opacity: 1 356 }, animtimehalf, function () { 357 nextslider += 1; 358 if (nextslider >= maxslider) { 359 nextslider = 1; 360 } 361 }); 362 }); 363 } 364 } 365} 366 367As4uRoller.prototype.afterAnimate = function () { 368 this.inProgress = false; //animace ukoncena 369 //prosunuti elementu 370 if (this.smer == "left") { //jede to doleva 371 //vezmeme element zleva a nacpem doprava 372 this.itemsCont.append(this.itemsCont.find('.rollitem').eq(0)); 373 } else { //obracene 374 this.itemsCont.prepend(this.itemsCont.find('.rollitem').eq(-1)); 375 } 376 this.itemsCont.css('left', -parseInt(this.itemWidth)); 377 //pokud je tam clear element musime ho presunout 378 try { 379 var clear = this.itemsCont.find('.clear').eq(0).clone(); 380 if (clear.length > 0) { 381 this.itemsCont.find('.clear').detach(); 382 this.itemsCont.append(clear); 383 } 384 } catch (e) { 385 log('Presun se nepovedl ' + e.message); 386 } 387 if (this.automatic) { 388 var toto = this; 389 this.animateTimeout = setTimeout(function () { 390 if (toto.automatic) 391 toto.animate(); 392 }, this.stayTime); 393 } 394} 395 396As4uRoller.prototype.stopAnimate = function () { 397 clearTimeout(this.animateTimeout); 398} 399 400As4uRoller.prototype.refresh = function () { 401 var toto = this; 402 toto.stopAnimate(); 403 this.rollerMain = $('#' + this.options.rollid); 404 this.rollerMain.css('position', 'relative'); 405 406 407 //nalezeni vnitrniho contu 408 this.itemsCont = this.rollerMain.find('.rollbox-cont').eq(0); 409 410 this.itemsCont.css('position', 'absolute'); 411 this.itemsCont.css('top', '0'); 412 413 //projdeme si v cyklu existujici itemy 414 this.itemsCount = 0; 415 this.items = []; 416 this.itemWidth = 0; 417 this.itemHeight = 0; 418 419 this.itemsCont.find('.rollitem').each(function (index, element) { 420 421 toto.items.push($(element)); //create array of elements 422 var width = $(element).width(); 423 if (parseInt($(element).css('marginLeft')) > 0) { 424 width += parseInt($(element).css('marginLeft')); 425 } 426 if (parseInt($(element).css('marginRight')) > 0) { 427 width += parseInt($(element).css('marginRight')); 428 } 429 if (parseInt($(element).css('marginLeft')) > 0) { 430 width += parseInt($(element).css('marginLeft')); 431 } 432 if (parseInt($(element).css('paddingRight')) > 0) { 433 width += parseInt($(element).css('paddingRight')); 434 } 435 if (parseInt($(element).css('paddingLeft')) > 0) { 436 width += parseInt($(element).css('paddingLeft')); 437 } 438 439 if (width > toto.itemWidth) { 440 toto.itemWidth = width; 441 } 442 if ($(element).outerHeight(true) > toto.itemHeight) { 443 toto.itemHeight = $(element).outerHeight(true); 444 } 445 toto.itemsCount++; 446 }); 447 448 if (!this.itemsCount) 449 return; 450 451 this.itemsCont.css('width', this.itemsCount * this.itemWidth + this.itemWidth); 452 this.itemsCont.css('height', this.itemHeight); 453 454 455 //posuneme absolutni pozici 456 //this.itemsCont.css('left', -parseInt(this.itemWidth)); 457 $('#' + this.options.btnright).css('display', 'none'); 458 var skrtl = $('#' + this.options.btnright); 459 460 461 this.smer = this.options.smer ? this.options.smer : "left"; 462 463 //nastaveni akci na tlacitka 464 if ($('#' + this.options.btnleft)) { 465 $('#' + this.options.btnleft).click(function () { 466 skrtl.css('display', ''); 467 if (!$(this).hasClass('noScroll')) { 468 toto.btnLeft(); 469 } 470 }); 471 } 472 if ($('#' + this.options.btnright)) { 473 $('#' + this.options.btnright).click(function () { 474 if (!$(this).hasClass('noScroll')) 475 toto.btnRight(); 476 }); 477 } 478 if (this.itemsCount * this.itemWidth > this.rollerMain.width() && this.options.automatic == true) { //animovat jen kdyz je kam 479 var fce = function () { 480 toto.animate(); 481 }; 482 this.animateTimeout = setTimeout(fce, this.stayTime); 483 //this.animate(); 484 }
484 else { //neni kam animovat, nastavime tlacitkum specialni tridy 485 if (!(this.itemsCount * this.itemWidth > this.rollerMain.width())) { 486 // $('#' + this.options.btnleft).addClass('noScroll'); 487 // $('#' + this.options.btnright).addClass('noScroll'); 488 } 489 } 490 491}; 492 493/*jQuery("span.nadpis_oddilu").click(function () { 494 jQuery(".navigace").toggle(); 495 }); 496 jQuery("span.openMenu").click(function () { 497 jQuery(".sloupec_navigace_obal").toggle(); 498 });*/ 499 500$(document).ready(function () { 501 $(".openMenu").click(function () { 502 $(".sloupec_navigace_obal").toggleClass("open_menu_responsive"); 503 }); 504}); 505 506$(document).ready(function () { 507 $(".openVyh").click(function () { 508 $(".vyhledavani_obal").toggleClass("open_vyh_responsive"); 509 }); 510}); 511 512 513/**/
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.