function hideSearch() {
	$(".form-search").slideUp(effectDuration), $(".search-toggle").removeClass("active").html("search")
}
function hideNavigation() {
	$(".navigation__flyout").slideUp(effectDuration), $(".navigation-toggle").removeClass("active").html("rows")
}
var config = {
	widgets: {
		carousel: {
			use: !0,
			container: ".carousel"
		},
		tooltips: {
			use: !0,
			container: ".tooltips"
		},
		popovers: {
			use: !0,
			container: "a[data-toggle=popover]"
		},
		responsiveTable: {
			use: !0,
			container: "table.responsive"
		},
		scrollToTop: {
			use: !0,
			container: 'a.banner__toggle[href^="#"], a[rel="self"]'
		}
	}
};
$(document).ready(function() {
    var a = $("html, body"),
        b = "wipo-int";
    $("a[href='#" + b + "']").click(function() {
        $.scrollTo($("#" + b), 600)
    }), Navigation.init("nav.navigation", ".banner__toggle-navigation, .navigation-toggle"), config.widgets.carousel.use === !0 && $(config.widgets.carousel.container).carousel(), config.widgets.tooltips.use === !0 && $(config.widgets.tooltips.container).tooltip({
        selector: "a[data-toggle=tooltip]"
    }), config.widgets.popovers.use === !0 && $(config.widgets.popovers.container).popover().on("click", function(a) {
        a.preventDefault()
    }), config.widgets.responsiveTable.use === !0 && $.fn.table && $(config.widgets.responsiveTable.container).table({
        idprefix: null,
        persist: "persist"
    }), config.widgets.scrollToTop.use === !0 && $(config.widgets.scrollToTop.container).on("click", function(b) {
        var c = $(b.target).closest("a"),
            d = c.attr("href");
        d && d.length && 0 === d.indexOf("#") && (b.preventDefault(), a.animate({
            scrollTop: $(d).offset().top
        }, {
            duration: 500
        }).promise().done(function() {
            window.location.hash = d
        }))
    })
}), 0 == Modernizr.svg && $('img[src$="svg"]').attr("src", function() {
    return $(this).attr("src").replace(".svg", ".png")
});
var effectDuration = 200;
$(".search-toggle").click(function(a) {
    $(this).toggleClass("active"), $(this).hasClass("active") ? ($(this).html("close"), $(".flyout-control.selected  > a").click(), $(".navigation-toggle").click(function() {
        hideSearch()
    })) : $(this).html("search"), $(".form-search").slideToggle(effectDuration), a.preventDefault()}), $(".navigation-toggle").click(function(a) {
    $(this).toggleClass("active"), $(this).hasClass("active") ? ($(this).html("close"), $(".search-toggle").click(function() {
        hideNavigation()
    })) : $(this).html("rows"), $(".navigation__flyout").slideToggle(effectDuration), a.preventDefault()
});
var $accordionToggle = $(".accordion__toggle");
$accordionToggle.data("text-original", $(this).text()), $accordionToggle.click(function() {
	var a = $(this);
	"" == a.data("text-hide") && a.data("text-hide", "Show less"), a.text() == a.data("text-hide") ? a.text(a.data("text-original")) : (a.data("text-original", a.text()), a.text(a.data("text-hide")))
});
// multi nav
$('.m-flyout-control__checkbox').click(function() {
	var flyout = $(this).siblings('.flyout');
	if ( $(this).is(':checked') ) {
		flyout.attr('aria-expanded', 'true');
	} else {
		flyout.attr('aria-expanded', 'false');
	}
});
if ( $('.navigation').css('position') === 'relative' ) {
	$('.flyout-control--tools .flyout__list').clone().removeAttr('class').wrap('<div id="tools" />').parent().appendTo($('#wipo-int > header'))
}