Skip to content
Snippets Groups Projects
Commit 4e6cdc9f authored by jarmil's avatar jarmil
Browse files

Merged with test (branches diverged, rebase would be pain i.t.a.)

parents ecf3df14 3395a2c5
No related branches found
No related tags found
2 merge requests!173Release,!134Weby pro MS
Showing
with 849 additions and 0 deletions
green_deal/static/green_deal/images/overlays/15.png

137 B

green_deal/static/green_deal/images/overlays/16.png

941 B

green_deal/static/green_deal/images/pdf.png

490 B

green_deal/static/green_deal/images/prevlabel.gif

598 B

green_deal/static/green_deal/images/ru.png

233 B

green_deal/static/green_deal/images/table.jpg

831 B

green_deal/static/green_deal/images/twitters.png

2.56 KiB

green_deal/static/green_deal/images/wmv.png

825 B

This diff is collapsed.
$(document).ready(function(){$(".zdroje .item a").click(function(e){var el=$(this).parent().find("div.hide");if(el.is(":hidden"))el.slideDown();else el.slideUp()});$(".zdroje .item h3 a").click(function(e){var el=$(this).parent().parent().find("div.hide");if(el.is(":hidden"))el.slideDown();else el.slideUp()})});$(window).scroll(function(){var scrolled=$(window).scrollTop();$(".parallax").each(function(index,element){var initY=$(this).offset().top;var height=$(this).height();var endY=initY+$(this).height();var visible=isInViewport(this);if(visible){var diff=scrolled-initY;var ratio=Math.round(diff/height*100);$(this).css("background-position","left "+parseInt(-(ratio*1.5))+"px")}})});$(window).on("load",function(){var pos=location.href.lastIndexOf("#");if(pos>0){var aid=location.href.substring(pos+1);if(aid&&aid.length!==0){var ael=$("#"+aid);$("body").animate({scrollTop:ael.offset().top-80},"slow");$("#"+aid+" a.readmore").trigger("click")}}$("#qm0 ul a").click(function(e){var url=$(this).attr("href");var view=url.substr(url.lastIndexOf("/")+1);view=view.split("#")[0];var thisview=location.pathname.substr(location.pathname.lastIndexOf("/")+1);thisview=thisview.split("#")[0];if(view.indexOf(thisview)>0)e.preventDefault();var aid=url.substring(url.indexOf("#")+1);if(aid&&aid.length!==0){var ael=$("#"+aid);$("body").animate({scrollTop:ael.offset().top-80},"slow");$("#"+aid+" a.readmore").trigger("click")}});$("#anchorlist a").click(function(e){e.preventDefault();var aid=$(this).attr("href");var ael=$(aid);$("body").animate({scrollTop:ael.offset().top-80},"slow")})});$(document).ready(function(){if($(window).width()<=700){$(".head_menu .topmenu li a").each(function(){var oldUrl=$(this).attr("href");var newUrl=oldUrl+"#content";$(this).attr("href",newUrl)})}});$(document).ready(function(){$("#kontakt label").on("click",function(){$(this).animate({top:"0.5em",fontSize:"75%"},300,"swing")});$("#kontakt input:text, #kontakt textarea").on("focusout",function(){if($(this).val()=="")$(this).prev().animate({top:"2.5em",fontSize:"90%"},300,"swing")}).on("click",function(){$(this).prev().animate({top:"0.5em",fontSize:"75%"},300,"swing")})});var scr=0;$(window).scroll(function(){if($(this).scrollTop()>250&&$(window).width()>100){if(scr==0){$("#sticky_menu").addClass("sticky");$("#sticky_menu").css("top","-65px");scr=1;$("#sticky_menu").stop().animate({top:"0px"},400,"easeOutCirc",function(){$("#sticky_menu").removeAttr("style")})}else $("#sticky_menu").addClass("sticky")}else{$("#sticky_menu").removeClass("sticky");scr=0}});function getNavigation(){$(".navi").each(function(){var scrollto=$(this);var html=$.parseHTML('<a href="javascript:void(0)" class="alink">'+$(this).children(":first").text()+"</a>");$("#navigation").append(html);$(html).click(function(){$("body").animate({scrollTop:scrollto.offset().top-80},"slow")})})}$(document).ready(function(){$("#historie a.readmore, #history a.readmore").click(function(event){event.preventDefault();var el=$(this).prev();var img=$(this).parent().find("img");var h=el.prop("scrollHeight");var hei=""+h+"px";if(el.height()>53){el.animate({height:"53px"},500);if(lang=="cz")$(this).text("Podrobnosti");if(lang=="en")$(this).text("Read more")}else{el.animate({height:hei},500);if(lang=="cz")$(this).text("Zavřít");if(lang=="en")$(this).text("Close")}});$("#aktuality-all a.readmore").click(function(event){event.preventDefault();var el=$(this).prev();var h=el.prop("scrollHeight");var hei=""+h+"px";if(el.height()>54){el.animate({height:"54px"},500);$(this).toggleClass("readmore readmoreup");if(lang=="cz")$(this).text("Více");if(lang=="en")$(this).text("Read more")}else{el.animate({height:hei},500);$(this).toggleClass("readmore readmoreup");if(lang=="cz")$(this).text("Zavřít");if(lang=="en")$(this).text("Close")}})});$(document).ready(function(){$("#statisticke-udaje").Lazy({beforeLoad:function(element){$(".statsLeft").hide();$(".middle").hide();$(".statsRight").hide()},statsLoader:function(element,response){var number=0;var target=$(".js_counter").text();var counter=setInterval(function(){console.log(target);$(".js_counter").text(number);if(number>=target)clearInterval(counter);number++},50);setTimeout(function(){$(".statsLeft").show("slide",1200);$(".middle").show("fade",1500);$(".statsRight").show("slide",{direction:"right"},1200);response(true)},100)}});$("#galerie_cont").Lazy()});$(window).on("load",function(){var pos=location.href.lastIndexOf("#");if(pos>0){var aid=location.href.substring(pos+1);if(aid&&aid.length!==0){var ael=$("#"+aid);$("body").animate({scrollTop:ael.offset().top-80},"slow");$("#"+aid+" a.readmore").trigger("click")}}$("#qm0 ul a, .mainmenu a").click(function(e){var url=$(this).attr("href");var view=url.substr(url.lastIndexOf("/")+1);view=view.split("#")[0];var thisview=location.pathname.substr(location.pathname.lastIndexOf("/")+1);thisview=thisview.split("#")[0];if(view.indexOf(thisview)>0)e.preventDefault();var aid=url.substring(url.indexOf("#")+1);if(aid&&aid.length!==0){var ael=$("#"+aid);$("body").animate({scrollTop:ael.offset().top-80},"slow");$("#"+aid+" a.readmore").trigger("click")}});$("#anchorlist a").click(function(e){e.preventDefault();var aid=$(this).attr("href");var ael=$(aid);$("body").animate({scrollTop:ael.offset().top-80},"slow")})});
/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch(e) {}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (value !== undefined && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setTime(+t + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {};
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
var cookies = document.cookie ? document.cookie.split('; ') : [];
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = parts.join('=');
if (key && key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) === undefined) {
return false;
}
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return !$.cookie(key);
};
}));
/*!
* jCarouselLite - v1.1 - 2014-09-28
* http://www.gmarwaha.com/jquery/jcarousellite/
* Copyright (c) 2014 Ganeshji Marwaha
* Licensed MIT (https://github.com/ganeshmax/jcarousellite/blob/master/LICENSE)
*/
!function(a){a.jCarouselLite={version:"1.1"},a.fn.jCarouselLite=function(b){return b=a.extend({},a.fn.jCarouselLite.options,b||{}),this.each(function(){function c(a){return n||(clearTimeout(A),z=a,b.beforeStart&&b.beforeStart.call(this,i()),b.circular?j(a):k(a),m({start:function(){n=!0},done:function(){b.afterEnd&&b.afterEnd.call(this,i()),b.auto&&h(),n=!1}}),b.circular||l()),!1}function d(){if(n=!1,o=b.vertical?"top":"left",p=b.vertical?"height":"width",q=B.find(">ul"),r=q.find(">li"),x=r.size(),w=x<b.visible?x:b.visible,b.circular){var c=r.slice(x-w).clone(),d=r.slice(0,w).clone();q.prepend(c).append(d),b.start+=w}s=a("li",q),y=s.size(),z=b.start}function e(){B.css("visibility","visible"),s.css({overflow:"hidden","float":b.vertical?"none":"left"}),q.css({margin:"0",padding:"0",position:"relative","list-style":"none","z-index":"1"}),B.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"}),!b.circular&&b.btnPrev&&0==b.start&&a(b.btnPrev).addClass("disabled")}function f(){t=b.vertical?s.outerHeight(!0):s.outerWidth(!0),u=t*y,v=t*w,s.css({width:s.width(),height:s.height()}),q.css(p,u+"px").css(o,-(z*t)),B.css(p,v+"px")}function g(){b.btnPrev&&a(b.btnPrev).click(function(){return c(z-b.scroll)}),b.btnNext&&a(b.btnNext).click(function(){return c(z+b.scroll)}),b.btnGo&&a.each(b.btnGo,function(d,e){a(e).click(function(){return c(b.circular?w+d:d)})}),b.mouseWheel&&B.mousewheel&&B.mousewheel(function(a,d){return c(d>0?z-b.scroll:z+b.scroll)}),b.auto&&h()}function h(){A=setTimeout(function(){c(z+b.scroll)},b.auto)}function i(){return s.slice(z).slice(0,w)}function j(a){var c;a<=b.start-w-1?(c=a+x+b.scroll,q.css(o,-(c*t)+"px"),z=c-b.scroll):a>=y-w+1&&(c=a-x-b.scroll,q.css(o,-(c*t)+"px"),z=c+b.scroll)}function k(a){0>a?z=0:a>y-w&&(z=y-w)}function l(){a(b.btnPrev+","+b.btnNext).removeClass("disabled"),a(z-b.scroll<0&&b.btnPrev||z+b.scroll>y-w&&b.btnNext||[]).addClass("disabled")}function m(c){n=!0,q.animate("left"==o?{left:-(z*t)}:{top:-(z*t)},a.extend({duration:b.speed,easing:b.easing},c))}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B=a(this);d(),e(),f(),g()})},a.fn.jCarouselLite.options={btnPrev:null,btnNext:null,btnGo:null,mouseWheel:!1,auto:null,speed:200,easing:null,vertical:!1,circular:!0,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null}}(jQuery);
/*! jQuery & Zepto Lazy v1.7.7 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
!function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window);
This diff is collapsed.
/*
* jQuery Nivo Slider v3.2
* http://nivo.dev7studios.com
*
* Copyright 2012, Dev7studios
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("<img/>").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('<div class="nivo-caption"></div>'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+r.prevText+'</a><a class="nivo-nextNav">'+r.nextText+"</a></div>");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('<div class="nivo-controlNav"></div>');s.after(i.controlNavEl);for(var l=0;l<o.length;l++){if(r.controlNavThumbs){i.controlNavEl.addClass("nivo-thumbs-enabled");var c=o.eq(l);if(!c.is("img")){c=c.find("img:first")}if(c.attr("data-thumb"))i.controlNavEl.append('<a class="nivo-control" rel="'+l+'"><img src="'+c.attr("data-thumb")+'" alt="" /></a>')}else{i.controlNavEl.append('<a class="nivo-control" rel="'+l+'">'+(l+1)+"</a>")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s<n.slices;s++){var o=Math.round(t.width()/n.slices);if(s===n.slices-1){t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o<n.boxRows;o++){for(var a=0;a<n.boxCols;a++){if(a===n.boxCols-1){t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x<r.boxCols*2;x++){var T=x;for(var N=0;N<r.boxRows;N++){if(T>=0&&T<r.boxCols){(function(n,i,s,u,a){var f=e(S[n][i]);var l=f.width();var c=f.height();if(o==="boxRainGrow"||o==="boxRainGrowReverse"){f.width(0).height(0)}if(u===a-1){setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3,"",function(){t.trigger("nivo:animFinished")})},100+s)}else{setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3)},100+s)}})(N,T,l,c,g);c++}T--}l+=100}}};var v=function(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r,10),n=e[--r],e[r]=e[t],e[t]=n);return e};var m=function(e){if(this.console&&typeof console.log!=="undefined"){console.log(e)}};this.stop=function(){if(!e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=true;m("Stop Slider")}};this.start=function(){if(e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=false;m("Start Slider")}};r.afterLoad.call(this);return this};e.fn.nivoSlider=function(n){return this.each(function(r,i){var s=e(this);if(s.data("nivoslider")){return s.data("nivoslider")}var o=new t(this,n);s.data("nivoslider",o)})};e.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};e.fn._reverse=[].reverse})(jQuery)
This diff is collapsed.
function validate(){var notice="";if(!$("#souhlas").is(":checked")){if(lang==null){notice="Musíte potvrdit souhlas se zpracováním osobních údajů!"}else{switch(lang){case"cz":notice="Musíte potvrdit souhlas se zpracováním osobních údajů!";break;case"en":notice="You must agree with processing of your personal data!";break;case"de":notice="Sie müssen der Verarbeitung Ihrer persönlichen Daten zustimmen!";break;default:notice="Musíte potvrdit souhlas se zpracováním osobních údajů!";break}}$("#souhlas").focus()}if(notice!=""){alert(notice);return false}else return true}$(document).ready(function(){$("#mob_menu_open").click(function(){var x=$(this);$(this).addClass("rotate");$(this).animate({opacity:0},250);$("#mob_menu_close").removeClass("hide").addClass("rotate_back").animate({opacity:1},150);setTimeout(function(){x.addClass("hide").removeClass("rotate").css("opacity",1)},250);$(".head_menu").animate({right:"-5%"},500)});$("#mob_menu_close").click(function(){var x=$(this);$(this).removeClass("rotate_back");$(this).animate({opacity:0},250);$("#mob_menu_open").removeClass("hide").removeClass("rotate").animate({opacity:1},250);setTimeout(function(){x.addClass("hide").removeClass("rotate_back").css("opacity",1)},250);$(".head_menu").animate({right:"-110%"},500)})});function popup(id){var popupBox=$(id);$(popupBox).fadeIn(300);var popMargTop=($(popupBox).height()+24)/2;var popMargLeft=($(popupBox).width()+24)/2;$(popupBox).css({"margin-top":-popMargTop,"margin-left":-popMargLeft});$("body").append('<div id="mask"></div>');$("#mask").fadeIn(300);return false}function popup_cart(){$("#cart_content").fadeIn(300);return false}$(function(){$(document.body).on("click","#mask",function(){$("#mask , .popup").fadeOut(300,function(){$("#mask").remove()});return false});$(document.body).on("click","#intro",function(){$("#mask , .popup").fadeOut(300,function(){$("#mask").remove()});return false});$(document.body).on("click","a.close",function(){$("#mask , .popup").fadeOut(300,function(){$("#mask").remove()});return false});$(document.body).on("click","a.cart_close",function(){$("#cart_content").fadeOut(300,function(){});return false})});function toggleContent(name,n){var i,t="",el=document.getElementById(name);if(!el.origCont)el.origCont=el.innerHTML;for(i=0;i<n;i++)t+=el.origCont;el.innerHTML=t}function makeSafe(kde){var co=new Array("- "," ","+",",","á","ä","č","ď","ň","é","ě","í","ĺ","ľ","Ł","ó","ô","ő","ö","ŕ","š","ť","ú","ů","ű","ü","ý","ř","ž","Á","Ä","Č","Ď","É","Ě","Í","Ĺ","Ľ","Ň","Ó","Ô","Ł","Ö","Ŕ","Ř","Š","Ť","Ú","Ů","Ű","Ü","Ý","Ł","Ž");var cim=new Array("","-","-","","a","a","c","d","n","e","e","i","l","l","n","o","o","o","o","r","s","t","u","u","u","u","y","r","z","a","a","c","d","e","e","i","l","l","n","o","o","o","o","r","r","s","t","u","u","u","u","y","r","z");var safe=str_replace(co,cim,kde);safe=safe.toLowerCase();safe=safe.trim();return safe}function str_replace(search,replace,subject,count){var i=0,j=0,temp="",repl="",sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0}for(i=0,sl=s.length;i<sl;i++){if(s[i]===""){continue}for(j=0,fl=f.length;j<fl;j++){temp=s[i]+"";repl=ra?r[j]!==undefined?r[j]:"":r[0];s[i]=temp.split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length}}}return sa?s:s[0]}function closeAllExcept(e){var menu=document.getElementById("menu");var lis=menu.getElementsByTagName("li");var isLong="";for(i=0;i<lis.length;i++){if(lis[i]!=e){if(lis[i].className.search(/long/)>-1)isLong=" long";if(lis[i].className.search(/open/)>-1)lis[i].className="close"+isLong;if(lis[i].className.search("open")>-1)alert(lis[i].id)}}}function closeAll(){var menu=document.getElementById("menu");var lis=menu.getElementsByTagName("li");var isLong="";for(i=0;i<lis.length;i++){if(lis[i].className.search(/long/)>0)isLong=" long";if(lis[i].className.search(/open/)>0)lis[i].className="close"+isLong}document.cookie="menu=0; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"}function menu_switch(e,ev){if(e.nodeName=="LI"){var d=new Date;d.setTime(d.getTime()+15*60*1e3);var trida;var ext="";trida=e.className;arr=trida.split(" ");trida=arr[0];for(i=1;i<arr.length;i++){ext+=" "+arr[i]}if(window.event){ev.cancelBubble=true}else{ev.stopPropagation()}if(trida=="close"||trida=="open"){e.className=trida=="open"?"close"+ext:"open"+ext;if(trida=="close"){document.cookie="menu="+e.id+"; expires="+d.toUTCString()+"; path=/"}else document.cookie="menu="+e.id+"; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/";closeAllExcept(e);return false}}else return true}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return null}function setCookie(name,val,hours){var d=new Date;d.setTime(d.getTime()+hours*60*1e3);if(hours)document.cookie=name+"="+val+"; expires="+d.toUTCString()+"; path=/";else document.cookie=name+"="+val+"; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/";return false}function onBlur(el){if(el.value==""){el.value=el.defaultValue}}function onFocus(el){if(el.value==el.defaultValue){el.value=""}}function isInViewport(node){var rect=node.getBoundingClientRect();return(rect.height>0||rect.width>0)&&rect.bottom>=0&&rect.right>=0&&rect.top<=(window.innerHeight||document.documentElement.clientHeight)&&rect.left<=(window.innerWidth||document.documentElement.clientWidth)}function send_xmlhttprequest(state_change,method,url,content,headers){var xmlhttp=XMLHttpRequest?new XMLHttpRequest:ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):false;if(!xmlhttp){return false}xmlhttp.open(method,url);xmlhttp.onreadystatechange=function(){state_change(xmlhttp)};if(headers){for(var key in headers){xmlhttp.setRequestHeader(key,headers[key])}}xmlhttp.send(content);return true}
// Demo http://codepen.io/AlexEmashev/pen/BKgQdx
(function ($) {
$.fn.swipeDetector = function (options) {
// States: 0 - no swipe, 1 - swipe started, 2 - swipe released
var swipeState = 0;
// Coordinates when swipe started
var startX = 0;
var startY = 0;
// Distance of swipe
var pixelOffsetX = 0;
var pixelOffsetY = 0;
// Target element which should detect swipes.
var swipeTarget = this;
var defaultSettings = {
// Amount of pixels, when swipe don't count.
swipeThreshold: 70,
// Flag that indicates that plugin should react only on touch events.
// Not on mouse events too.
useOnlyTouch: false
};
// Initializer
(function init() {
options = $.extend(defaultSettings, options);
// Support touch and mouse as well.
swipeTarget.on('mousedown touchstart', swipeStart);
$('html').on('mouseup touchend', swipeEnd);
$('html').on('mousemove touchmove', swiping);
})();
function swipeStart(event) {
if (options.useOnlyTouch && !event.originalEvent.touches)
return;
if (event.originalEvent.touches)
event = event.originalEvent.touches[0];
if (swipeState === 0) {
swipeState = 1;
startX = event.clientX;
startY = event.clientY;
}
}
function swipeEnd(event) {
if (swipeState === 2) {
swipeState = 0;
if (Math.abs(pixelOffsetX) > Math.abs(pixelOffsetY) &&
Math.abs(pixelOffsetX) > options.swipeThreshold) { // Horizontal Swipe
if (pixelOffsetX < 0) {
swipeTarget.trigger($.Event('swipeLeft.sd'));
console.log('Left');
} else {
swipeTarget.trigger($.Event('swipeRight.sd'));
console.log('Right');
}
} else if (Math.abs(pixelOffsetY) > options.swipeThreshold) { // Vertical swipe
if (pixelOffsetY < 0) {
swipeTarget.trigger($.Event('swipeUp.sd'));
console.log('Up');
} else {
swipeTarget.trigger($.Event('swipeDown.sd'));
console.log('Down');
}
}
}
}
function swiping(event) {
// If swipe don't occuring, do nothing.
if (swipeState !== 1)
return;
if (event.originalEvent.touches) {
event = event.originalEvent.touches[0];
}
var swipeOffsetX = event.clientX - startX;
var swipeOffsetY = event.clientY - startY;
if ((Math.abs(swipeOffsetX) > options.swipeThreshold) ||
(Math.abs(swipeOffsetY) > options.swipeThreshold)) {
swipeState = 2;
pixelOffsetX = swipeOffsetX;
pixelOffsetY = swipeOffsetY;
console.log(pixelOffsetX);
}
}
return swipeTarget; // Return element available for chaining.
}
}(jQuery));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment