function zal (co) {
        $("div[id^=azalm]").hide();
        $("a[id^=zalm]").removeClass("zalozka_active");
        var c = "#a" + co;
        var b = "#" + co;
        $(c).show();
        $(b).addClass("zalozka_active");
        //alert(c);
	
}
function fake_load2(a, b) {
    var c;
    var d = $("#sumpor").html();
    if (a < 3 && d < 3) {
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                co: b,
                action: "porovnat"
            },
            success: function (a) {
                $("#sumpor").html(a)
            }
        });
        if (info_box2) {
            info_box2.pnotify_display();
            return
        }
        info_box2 = $.pnotify({
            pnotify_title: "",
            pnotify_text: "<p class='nastred odsadv20 tucne'>Zboží bylo přidáno k porovnání<br /></p><hr /><br /><div id='pridano nastred'><a href='#' class='pcloser levicak poknak'></a><a class='pcloser2 pravicak poknak3' href='/porovnat/'></a></div><div class='cistic'></div><br />",
            pnotify_notice_icon: "picon picon-object-order-raise",
            pnotify_delay: 2e4,
            pnotify_history: false,
            pnotify_stack: false,
            pnotify_before_open: function (a) {
                a.css({
                    top: $(window).height() / 2 - a.height() / 2,
                    left: $(window).width() / 2 - a.width() / 2
                });
                if (c) c.fadeIn("fast");
                else c = $("<div />", {
                    "class": "ui-widget-overlay",
                    css: {
                        display: "none",
                        position: "fixed",
                        top: "0",
                        bottom: "0",
                        right: "0",
                        left: "0"
                    }
                }).appendTo("body").fadeIn("slow")
            },
            pnotify_before_close: function () {
                c.fadeOut("slow")
            }
        });
        $(".pcloser").click(function () {
            info_box2.pnotify_remove();
            return false
        });
        $(".pcloser2").click(function () {
            info_box2.pnotify_remove();
            return true
        })
    } else {
        if (info_box3) {
            info_box3.pnotify_display();
            return
        }
        info_box3 = $.pnotify({
            pnotify_title: "",
            pnotify_text: "<p class='nastred odsadv20 tucne'>Porovnat lze maximálně 3 položky<br /></p><hr /><br /><div id='pridano nastred'><a href='#' class='pcloser levicak poknak'></a><a class='pcloser2 pravicak poknak3' href='/porovnat/'></a></div><div class='cistic'></div><br />",
            pnotify_notice_icon: "picon picon-object-order-raise",
            pnotify_delay: 2e4,
            pnotify_history: false,
            pnotify_stack: false,
            pnotify_before_open: function (a) {
                a.css({
                    top: $(window).height() / 2 - a.height() / 2,
                    left: $(window).width() / 2 - a.width() / 2
                });
                if (c) c.fadeIn("fast");
                else c = $("<div />", {
                    "class": "ui-widget-overlay",
                    css: {
                        display: "none",
                        position: "fixed",
                        top: "0",
                        bottom: "0",
                        right: "0",
                        left: "0"
                    }
                }).appendTo("body").fadeIn("slow")
            },
            pnotify_before_close: function () {
                c.fadeOut("slow")
            }
        });
        $(".pcloser").click(function () {
            info_box3.pnotify_remove();
            return false
        });
        $(".pcloser2").click(function () {
            info_box3.pnotify_remove();
            return true
        })
    }
}
function por_pryc(a) {
    $.ajax({
        type: "POST",
        url: "/php/functions.php",
        data: {
            co: a,
            action: "porovnat_pryc"
        },
        success: function (a) {
            location.replace("/porovnat/")
        }
    })
}
function fake_logout() {
    var a;
    if (iinfo_box) {
        iinfo_box.pnotify_display();
        return
    }
    iinfo_box = $.pnotify({
        pnotify_title: "",
        pnotify_text: "<p class='nastred odsadv20 tucne'>Bylo zadáno špatné uživatelsé jméno nebo heslo<br /></p><hr /><br /><div id='pridano nastred'><a href='/obnova-hesla/' class='pcloser levicak poknak4'></a><a class='pcloser2 pravicak poknak5' href='#'></a></div><div class='cistic'></div><br />",
        pnotify_notice_icon: "picon picon-object-order-raise",
        pnotify_delay: 2e4,
        pnotify_history: false,
        pnotify_stack: false,
        pnotify_before_open: function (b) {
            b.css({
                top: $(window).height() / 2 - b.height() / 2,
                left: $(window).width() / 2 - b.width() / 2
            });
            if (a) a.fadeIn("fast");
            else a = $("<div />", {
                "class": "ui-widget-overlay",
                css: {
                    display: "none",
                    position: "fixed",
                    top: "0",
                    bottom: "0",
                    right: "0",
                    left: "0"
                }
            }).appendTo("body").fadeIn("slow")
        },
        pnotify_before_close: function () {
            a.fadeOut("slow")
        }
    });
    $(".pcloser").click(function () {
        iinfo_box.pnotify_remove();
        return true
    });
    $(".pcloser2").click(function () {
        iinfo_box.pnotify_remove();
        $(".boxnav").hide();
        $("div#log_reg").slideToggle("slow");
        return true
    })
}
function fake_load() {
    var a;
    if (info_box) {
        info_box.pnotify_display();
        return
    }
    info_box = $.pnotify({
        pnotify_title: "",
        pnotify_text: "<p class='nastred odsadv20 tucne'>Zboží bylo vloženo do košíku<br /></p><hr /><br /><div id='pridano nastred'><a href='#' class='pcloser levicak poknak'></a><a class='pcloser2 pravicak poknak2' href='/kosik/'></a></div><div class='cistic'></div><br />",
        pnotify_notice_icon: "picon picon-object-order-raise",
        pnotify_delay: 2e4,
        pnotify_history: false,
        pnotify_stack: false,
        pnotify_before_open: function (b) {
            b.css({
                top: $(window).height() / 2 - b.height() / 2,
                left: $(window).width() / 2 - b.width() / 2
            });
            if (a) a.fadeIn("fast");
            else a = $("<div />", {
                "class": "ui-widget-overlay",
                css: {
                    display: "none",
                    position: "fixed",
                    top: "0",
                    bottom: "0",
                    right: "0",
                    left: "0"
                }
            }).appendTo("body").fadeIn("slow")
        },
        pnotify_before_close: function () {
            a.fadeOut("slow")
        }
    });
    $(".pcloser").click(function () {
        info_box.pnotify_remove();
        return false
    });
    $(".pcloser2").click(function () {
        info_box.pnotify_remove();
        return true
    })
}
var iinfo_box;
var info_box;
var info_box2;
var info_box3;
jQuery.cookie = function (a, b, c) {
    if (typeof b != "undefined") {
        c = c || {};
        if (b === null) {
            b = "";
            c.expires = -1
        }
        var d = "";
        if (c.expires && (typeof c.expires == "number" || c.expires.toUTCString)) {
            var e;
            if (typeof c.expires == "number") {
                e = new Date;
                e.setTime(e.getTime() + c.expires * 24 * 60 * 60 * 1e3)
            } else {
                e = c.expires
            }
            d = "; expires=" + e.toUTCString()
        }
        var f = c.path ? "; path=" + c.path : "";
        var g = c.domain ? "; domain=" + c.domain : "";
        var h = c.secure ? "; secure" : "";
        document.cookie = [a, "=", encodeURIComponent(b), d, f, g, h].join("")
    } else {
        var i = null;
        if (document.cookie && document.cookie != "") {
            var j = document.cookie.split(";");
            for (var k = 0; k < j.length; k++) {
                var l = jQuery.trim(j[k]);
                if (l.substring(0, a.length + 1) == a + "=") {
                    i = decodeURIComponent(l.substring(a.length + 1));
                    break
                }
            }
        }
        return i
    }
};
$(document).ready(function () {
    function b() {
        document.location.href = "/"
    }
    function a() {
        document.location.href = "/"
    }
    $(".zbozi_perex").expander({
        slicePoint: 95,
        widow: 3,
        expandEffect: "show",
        expandPrefix: "",
        expandText: "[...]"
    });
    $("#doruceni").validationEngine({
        success: false,
        failure: function () {}
    });
    $("#fadresa").validationEngine({
        success: false,
        failure: function () {}
    });
    $("#fadresa2").validationEngine({
        success: false,
        failure: function () {}
    });
    $("#fheslo").validationEngine({
        success: false,
        failure: function () {}
    });
    $("input[id^=kpocet]").mask("9?9999", {
        placeholder: " "
    });
    $("#navo4").click(function () {
        $(".boxnav").hide();
        $("div#log_reg").slideToggle("slow")
    });
    $("#co_hledat").val("Hledat").toggleVal();
    $("ul[id^=rulesmenu]").hide();
    $(".schovat").hide();
    $("#breadCrumb").jBreadCrumb({
        minimumCompressionElements: 4,
        endElementsToLeaveOpen: 1,
        beginingElementsToLeaveOpen: 1,
        openfirst: false
    });
    $("#navo2").click(function () {
        $("#log_reg").hide();
        $(".boxnav").slideToggle("slow");
        return false
    });
    $("#jina").click(function () {
        $("#dodadr").toggle("slow")
    });
    
    $("#co_hledat").autocomplete({
        source: "/administrace/php/get_zbozi.php?q=nazvy2",
        minLength: 2,
        select: function (a, b) {
        	//alert(b);
        	$('#co_hledat').val(b.item.value);
        $.ajax({
            type: "POST",
            url: "/administrace/php/get_zbozi.php?q=reload",
            data: {
                id: b.item.id,
                rel: "reload"
            },
            success: function (aa) {
            	location.href=aa;
			}
		});        	
        	//$('#hledat').submit();
        }
    });
    $("#pikame").PikaChoose();
    $("#pikame2").PikaChoose();
    $("#pikame3").PikaChoose();
    $("a.lghtbx").fancybox({
        titleShow: false,
        transitionIn: "elastic",
        transitionOut: "elastic",
        autoDimensions: "false",
        width: 640,
        height: 500,
        padding: 5,
        scrolling: "no",
        onStart: function () {},
        onClosed: function () {}
    });
    $("div[id^=azalm]").hide();
    $("#azalm1").show();
    $("a[id^=zalm]").click(function () {
        $("div[id^=azalm]").hide();
        $("a[id^=zalm]").removeClass("zalozka_active");
        var a = $(this);
        var b = a.attr("id");
        var c = "#a" + b;
        $(c).show();
        $(this).addClass("zalozka_active");
        return false
    });
    
    $("#basketItemsWrap tr:first").hide();
    $("#basketItemsWrap td img.add").live("click", function (a) {
        var b = this.id.split("_");
        var c = b[1];
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c,
                productCnt: 1,
                action: "addToBasket"
            },
            success: function (a) {
                if ($("#productID_" + c).length > 0) {
                    $("#productID_" + c).animate({
                        opacity: 0
                    }, 500);
                    $("#productID_" + c).before(a).remove();
                    $("#productID_" + c).animate({
                        opacity: 0
                    }, 500);
                    $("#productID_" + c).animate({
                        opacity: 1
                    }, 500);
                    $("#notificationsLoader").empty()
                } else {
                    $("#basketItemsWrap tr:first").before(a);
                    $("#basketItemsWrap tr:first").hide();
                    $("#basketItemsWrap tr:first").show("slow");
                    $("#notificationsLoader").empty()
                }
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        action: "getSumBasket"
                    },
                    success: function (a) {
                        $("#sumkos").empty();
                        $("#sumkos").show();
                        $("#sumkos").html(a);
                        $.ajax({
                            type: "POST",
                            url: "/php/functions.php",
                            data: {
                                action: "getDoprava"
                            },
                            success: function (a) {
                                $(".dopravagratis").empty();
                                $(".dopravagratis").animate({
                                    opacity: .2
                                }, "slow");
                                $(".dopravagratis").html(a);
                                $(".dopravagratis").animate({
                                    opacity: 1
                                }, "slow")
                            }
                        })
                    }
                })
            }
        })
    });
    $("#basketItemsWrap td img.min").live("click", function (a) {
        var b = this.id.split("_");
        var c = b[1];
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c,
                action: "delFromBasket"
            },
            success: function (a) {
                if ($("#productID_" + c).length > 0) {
                    $("#productID_" + c).animate({
                        opacity: 0
                    }, 500);
                    $("#productID_" + c).before(a).remove();
                    $("#productID_" + c).animate({
                        opacity: 0
                    }, 500);
                    $("#productID_" + c).animate({
                        opacity: 1
                    }, 500);
                    $("#notificationsLoader").empty()
                } else {
                    $("#basketItemsWrap tr:first").before(a);
                    $("#basketItemsWrap tr:first").hide();
                    $("#basketItemsWrap tr:first").show("slow");
                    $("#notificationsLoader").empty()
                }
            }
        });
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                action: "getSumBasket"
            },
            success: function (a) {
                $("#sumkos").empty();
                $("#sumkos").html(a);
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        action: "getDoprava"
                    },
                    success: function (a) {
                        $(".dopravagratis").empty();
                        $(".dopravagratis").animate({
                            opacity: .2
                        }, "slow");
                        $(".dopravagratis").html(a);
                        $(".dopravagratis").animate({
                            opacity: 1
                        }, "slow")
                    }
                })
            }
        })
    });
    $(".dokoselink2").click(function () {
        fake_load();
        var a = this.id.split("_");
        var b = a[1];
        var c = this.name.split("_");
        var d = document.getElementById("kos_" + a[1]).value;
        $("#notificationsLoader").html('<img src="/images/loader.gif">');
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c[0],
                cena: c[1],
                productCnt: d,
                action: "addToBasket"
            },
            success: function (a) {
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        action: "getSumBasket"
                    },
                    success: function (a) {
                        $("#sumkos").empty();
                        $("#sumkos").html(a)
                    }
                })
            }
        })
    });
    $(".dokoselink").click(function () {
        fake_load();
        var a = this.id.split("_");
        var b = a[1];
        var c = this.name.split("_");
        var d = $("#productImageWrapID_" + b).offset().left;
        var e = $("#productImageWrapID_" + b).offset().top;
        var f = document.getElementById("kos_" + a[1]).value;
        if ($("#productID_" + b).length > 0) {
            var g = $("#productID_" + b).offset().left;
            var h = $("#productID_" + b).offset().top
        } else {
            var g = $("#basketTitleWrap").offset().left;
            var h = $("#basketTitleWrap").offset().top
        }
        var i = g - d;
        var j = h - e;
        var k = $("#productImageWrapID_" + b).width() / 3;
        var l = $("#productImageWrapID_" + b).height() / 3;
        $("#productImageWrapID_" + b + " img").clone().prependTo("#productImageWrapID_" + b).css({
            position: "absolute"
        }).animate({
            opacity: .4
        }, 100).animate({
            opacity: .1,
            marginLeft: i,
            marginTop: j,
            width: k,
            height: l
        }, 1200, function () {
            $(this).remove();
            $("#notificationsLoader").html('<img src="/images/loader.gif">');
            $.ajax({
                type: "POST",
                url: "/php/functions.php",
                data: {
                    productID: c[0],
                    cena: c[1],
                    productCnt: f,
                    action: "addToBasket"
                },
                success: function (a) {
                    $.ajax({
                        type: "POST",
                        url: "/php/functions.php",
                        data: {
                            action: "getSumBasket"
                        },
                        success: function (a) {
                            $("#sumkos").empty();
                            $("#sumkos").html(a)
                        }
                    })
                }
            })
        })
    });
    $(".dokoselink3").click(function () {
        fake_load();
        var a = this.id.split("_");
        var b = a[1];
        var c = this.name;
        var d = $("#productImageWrapID_" + b).offset().left;
        var e = $("#productImageWrapID_" + b).offset().top;
        var f = document.getElementById("kos_det").value;
        if ($("#productID_" + b).length > 0) {
            var g = $("#productID_" + b).offset().left;
            var h = $("#productID_" + b).offset().top
        } else {
            var g = $("#basketTitleWrap").offset().left;
            var h = $("#basketTitleWrap").offset().top
        }
        var i = g - d;
        var j = h - e;
        var k = $("#productImageWrapID_" + b).width() / 3;
        var l = $("#productImageWrapID_" + b).height() / 3;
        $("#productImageWrapID_" + b + " img").clone().prependTo("#productImageWrapID_" + b).css({
            position: "absolute"
        }).animate({
            opacity: .4
        }, 100).animate({
            opacity: .1,
            marginLeft: i,
            marginTop: j,
            width: k,
            height: l
        }, 1200, function () {
            $(this).remove();
            $("#notificationsLoader").html('<img src="/images/loader.gif">');
            $.ajax({
                type: "POST",
                url: "/php/functions.php",
                data: {
                    productID: c,
                    productCnt: f,
                    action: "addToBasket"
                },
                success: function (a) {
                    if ($("#productID_" + c).length > 0) {
                        $("#productID_" + c).animate({
                            opacity: 0
                        }, 500);
                        $("#productID_" + c).before(a).remove();
                        $("#productID_" + c).animate({
                            opacity: 0
                        }, 500);
                        $("#productID_" + c).animate({
                            opacity: 1
                        }, 500);
                        $("#notificationsLoader").empty()
                    } else {
                        $("#basketItemsWrap tr:first").before(a);
                        $("#basketItemsWrap tr:first").hide();
                        $("#basketItemsWrap tr:first").show("slow");
                        $("#notificationsLoader").empty()
                    }
                    $.ajax({
                        type: "POST",
                        url: "/php/functions.php",
                        data: {
                            action: "getSumBasket"
                        },
                        success: function (a) {
                            $("#sumkos").empty();
                            $("#sumkos").html(a);
                            $.ajax({
                                type: "POST",
                                url: "/php/functions.php",
                                data: {
                                    action: "getDoprava"
                                },
                                success: function (a) {
                                    $(".dopravagratis").empty();
                                    $(".dopravagratis").animate({
                                        opacity: .2
                                    }, "slow");
                                    $(".dopravagratis").html(a);
                                    $(".dopravagratis").animate({
                                        opacity: 1
                                    }, "slow")
                                }
                            })
                        }
                    })
                }
            })
        })
    });
    $("a.prsmazat").live("click", function (a) {
        var b = this.id.split("_");
        var c = b[1];
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c,
                action: "deleteFromBasket"
            },
            success: function (a) {
                location.replace("/kosik/")
            }
        })
    });
    $(".kos_radek2 img").live("click", function (a) {
        var b = this.id.split("_");
        var c = b[1];
        $("#notificationsLoader").html('<img src="/images/loader.gif">');
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c,
                action: "deleteFromBasket"
            },
            success: function (a) {
                $("#productID_" + c).hide("slow", function () {
                    $(this).remove()
                });
                $("#notificationsLoader").empty();
                $("#TKos").html(a)
            }
        });
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                action: "getSumBasket"
            },
            success: function (a) {
                $("#sumkos").empty();
                $("#sumkos").html(a);
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        action: "getDoprava"
                    },
                    success: function (a) {
                        $(".dopravagratis").empty();
                        $(".dopravagratis").animate({
                            opacity: .2
                        }, "slow");
                        $(".dopravagratis").html(a);
                        $(".dopravagratis").animate({
                            opacity: 1
                        }, "slow")
                    }
                })
            }
        });
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                action: "getBasketView"
            },
            success: function (a) {
                $("#TKos").empty();
                $("#TKos").html(a)
            }
        })
    });
    $(".kos_radek1 img").live("click", function (a) {
        var b = this.id.split("_");
        var c = b[1];
        $("#notificationsLoader").html('<img src="/images/loader.gif">');
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                productID: c,
                action: "deleteFromBasket"
            },
            success: function (a) {
                $("#productID_" + c).hide("slow", function () {
                    $(this).remove()
                });
                $("#notificationsLoader").empty();
                $("#TKos").html(a)
            }
        });
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                action: "getSumBasket"
            },
            success: function (a) {
                $("#sumkos").empty();
                $("#sumkos").html(a);
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        action: "getDoprava"
                    },
                    success: function (a) {
                        $(".dopravagratis").empty();
                        $(".dopravagratis").animate({
                            opacity: .2
                        }, "slow");
                        $(".dopravagratis").html(a);
                        $(".dopravagratis").animate({
                            opacity: 1
                        }, "slow")
                    }
                })
            }
        });
        $.ajax({
            type: "POST",
            url: "/php/functions.php",
            data: {
                action: "getBasketView"
            },
            success: function (a) {
                $("#TKos").empty();
                $("#TKos").html(a)
            }
        })
    });
    $("#prepocitat").click(function () {
        $("input[id^=kpocet]").each(function (a) {
            var b = this.id.split(";");
            var c = b[1];
            var d = b[2];
            var e = b[3];
            var f = $(this).val();
            var g = f - e;
            if (g > 0) {
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        productID: c,
                        productCnt: g,
                        cena: d,
                        action: "addToBasket"
                    },
                    success: function (a) {
                        location.reload()
                    }
                })
            }
            if (g < 0) {
                $.ajax({
                    type: "POST",
                    url: "/php/functions.php",
                    data: {
                        productID: c,
                        action: "deleteFromBasket"
                    },
                    success: function (a) {
                        $.ajax({
                            type: "POST",
                            url: "/php/functions.php",
                            data: {
                                productID: c,
                                productCnt: f,
                                cena: d,
                                action: "addToBasket"
                            },
                            success: function (a) {
                                location.reload()
                            }
                        })
                    }
                })
            }
        });
        return false
    })
});
(function (a) {
    a.fn.validationEngineLanguage = function () {};
    a.validationEngineLanguage = {
        newLang: function () {
            a.validationEngineLanguage.allRules = {
                required: {
                    regex: "none",
                    alertText: "* Tato položka je povinná",
                    alertTextCheckboxMultiple: "* Prosím vyberte jednu možnost",
                    alertTextCheckboxe: "* Tato položka je povinná"
                },
                minSize: {
                    regex: "none",
                    alertText: "* Minimálně ",
                    alertText2: " znaky"
                },
                maxSize: {
                    regex: "none",
                    alertText: "* Maximálně ",
                    alertText2: " znaky"
                },
                groupRequired: {
                    regex: "none",
                    alertText: "* You must fill one of the following fields"
                },
                min: {
                    regex: "none",
                    alertText: "* Minimální hodnota je "
                },
                max: {
                    regex: "none",
                    alertText: "* Maximální hodnota je "
                },
                past: {
                    regex: "none",
                    alertText: "* Date prior to "
                },
                future: {
                    regex: "none",
                    alertText: "* Date past "
                },
                maxCheckbox: {
                    regex: "none",
                    alertText: "* Počet vybraných položek přesáhl limit"
                },
                minCheckbox: {
                    regex: "none",
                    alertText: "* Prosím vyberte ",
                    alertText2: " volbu"
                },
                equals: {
                    regex: "none",
                    alertText: "* Pole se neshodují"
                },
                CZphone: {
                    regex: /^([\+][0-9]{1,3}[ \.\-])([0-9]{3}[\-][0-9]{3}[\-][0-9]{3})$/,
                    alertText: "* Neplatné telefoní číslo, zadejte ve formátu +420 598-598-895"
                },
                phone: {
                    regex: /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
                    alertText: "* Invalid phone number"
                },
                email: {
                    regex: /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
                    alertText: "* Neplatná emailová adresa"
                },
                integer: {
                    regex: /^[\-\+]?\d+$/,
                    alertText: "* Zadejte pouze čísla"
                },
                number: {
                    regex: /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
                    alertText: "* Neplatné číslo"
                },
                CZdate: {
                    regex: /^(0[1-9]|[12][0-9]|3[01])[. /.](0[1-9]|1[012])[. /.](19|20)\d{2}$/,
                    alertText: "* Neplatné datum, datum musí být ve formátu den.měsíc.rok (dd.mm.rrrr)"
                },
                date: {
                    regex: /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
                    alertText: "* Neplatné datum, datum musí být ve formátu YYYY-MM-DD"
                },
                ipv4: {
                    regex: /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
                    alertText: "* Neplatná IP adresa"
                },
                rc: {
                    regex: /^\d{2}((0[1-9]|1[012])|(5[1-9]|6[012]))(0[1-9]|[12][0-9]|3[01])\/([0-9]{2,4})$/,
                    alertText: "* Neplatné rodné číslo, tvar musí být 895431/4567"
                },
                psc: {
                    regex: /^\d{3}[ \.\-]\d{2}$/,
                    alertText: "* Neplatné poštovní směrovací číslo, tvar musí být 456 45"
                },
                url: {
                    regex: /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
                    alertText: "* Neplatný odkaz"
                },
                onlyNumberSp: {
                    regex: /^[0-9\ ]+$/,
                    alertText: "* Pouze čísla"
                },
                onlyLetterSp: {
                    regex: /^[a-zA-Z\ \']+$/,
                    alertText: "* Pouze písmena"
                },
                onlyLetterNumber: {
                    regex: /^[0-9a-zA-Z]+$/,
                    alertText: "* Pouze písmena a číslice"
                },
                ajaxUserCall: {
                    url: "ajaxValidateFieldUser",
                    extraData: "name=eric",
                    alertText: "* Uživatelské jméno je již použito",
                    alertTextLoad: "* Ověřování, prosím čekejte"
                },
                ajaxNameCall: {
                    url: "ajaxValidateFieldName",
                    alertText: "* Uživatelské jméno je již použito",
                    alertTextOk: "* Toto jméno je k dispozici",
                    alertTextLoad: "* Ověřování, prosím čekejte"
                },
                validate2fields: {
                    alertText: "* Prosím napište HELLO"
                }
            }
        }
    };
    a.validationEngineLanguage.newLang()
})(jQuery);
(function (a) {
    a.fn.expander = function (b) {
        function g(a) {
            return a.replace(/\//, "")
        }
        function f(a, b) {
            if (a.collapseTimer) {
                d = setTimeout(function () {
                    e(b);
                    a.onCollapse(b.parent(), false)
                }, a.collapseTimer)
            }
        }
        function e(a) {
            a.hide().prev("span.read-more").show()
        }
        var c = a.extend({}, a.fn.expander.defaults, b);
        var d;
        return this.each(function () {
            var b = a(this);
            var h = a.meta ? a.extend({}, c, b.data()) : c;
            var i, j, k;
            var l = b.html();
            var m = l.slice(0, h.slicePoint).replace(/\w+$/, "");
            j = m.match(/<\w[^>]*>/g);
            if (j) {
                m = l.slice(0, h.slicePoint + j.join("").length).replace(/\w+$/, "")
            }
            if (m.lastIndexOf("<") > m.lastIndexOf(">")) {
                m = m.slice(0, m.lastIndexOf("<"))
            }
            var n = l.slice(m.length);
            if (!a("span.details", this).length) {
                if (n.replace(/\s+$/, "").split(" ").length < h.widow) {
                    return
                }
                if (n.indexOf("</") > -1) {
                    k = n.match(/<(\/)?[^>]*>/g);
                    for (var o = 0; o < k.length; o++) {
                        if (k[o].indexOf("</") > -1) {
                            var p, q = false;
                            for (var r = 0; r < o; r++) {
                                p = k[r].slice(0, k[r].indexOf(" ")).replace(/(\w)$/, "$1>");
                                if (p == g(k[o])) {
                                    q = true
                                }
                            }
                            if (!q) {
                                m = m + k[o];
                                var s = false;
                                for (var t = j.length - 1; t >= 0; t--) {
                                    if (j[t].slice(0, j[t].indexOf(" ")).replace(/(\w)$/, "$1>") == g(k[o]) && s == false) {
                                        i = i ? j[t] + i : j[t];
                                        s = true
                                    }
                                }
                            }
                        }
                    }
                    n = i && i + n || n
                }
                b.html([m, '<span class="read-more">', h.expandPrefix, '<a href="#">', h.expandText, "</a>", "</span>", '<span class="details">', n, "</span>"].join(""))
            }
            var u = a("span.details", this),
                v = a("span.read-more", this);
            u.hide();
            v.find("a").click(function () {
                v.hide();
                if (h.expandEffect === "show" && !h.expandSpeed) {
                    h.beforeExpand(b);
                    u.show();
                    h.afterExpand(b);
                    f(h, u)
                } else {
                    h.beforeExpand(b);
                    u[h.expandEffect](h.expandSpeed, function () {
                        u.css({
                            zoom: ""
                        });
                        h.afterExpand(b);
                        f(h, u)
                    })
                }
                return false
            });
            if (h.userCollapse) {
                b.find("span.details").append('<span class="re-collapse">' + h.userCollapsePrefix + '<a href="#">' + h.userCollapseText + "</a></span>");
                b.find("span.re-collapse a").click(function () {
                    clearTimeout(d);
                    var c = a(this).parents("span.details");
                    e(c);
                    h.onCollapse(b, true);
                    return false
                })
            }
        })
    };
    a.fn.expander.defaults = {
        slicePoint: 100,
        widow: 4,
        expandText: "read more",
        expandPrefix: "… ",
        collapseTimer: 0,
        expandEffect: "fadeIn",
        expandSpeed: "",
        userCollapse: true,
        userCollapseText: "[^]",
        userCollapsePrefix: " ",
        beforeExpand: function (a) {},
        afterExpand: function (a) {},
        onCollapse: function (a, b) {}
    }
})(jQuery)
