(function(){$(function(){var d;0<$("#search_input").length&&($("#search_input").autocomplete({minLength:2,scrollHeight:220,source:function(a,b){return $.ajax({url:$("#search_input").attr("data-url"),type:"get",dataType:"json",data:"query="+a.term,async:!0,cache:!0,success:function(a){return b($.map(a,function(a){return{nom:a.nom,url:a.url}}))}})},focus:function(a,b){$(this).val(b.item.nom);return!1},select:function(a,b){window.location.href=b.item.url;return!1}}).data("ui-autocomplete")._renderItem=
function(a,b){return $("<li></li>").data("ui-autocomplete-item",b).append('<a href="'+b.url+'">'+b.nom+"</span></a>").appendTo(a.addClass("list-row"))});$(".fancybox").fancybox();d=$("#notifications");d.popover({content:$("#notifications-content").html(),html:!0}).click(function(a){a.stopPropagation();return $(this).popover("show")});$(".popov").popover({"original-title":"<i class=glyphicon glyphicon-question-sign></i> Aide",placement:"bottom",trigger:"focus",content:$(this).attr("data-content"),
html:!0});$("#btn-tchat").click(function(a){return $("#messagerie").show()});$("#messagerie").draggable();$(".closemessagerie").click(function(){return $("#messagerie").hide()});$("html").click(function(){return d.popover("hide")});$(window).scroll(function(){return 100<=$(document).scrollTop()?$("body .navbar-default").stop(!0,!0).animate({opacity:0.8}):$("body .navbar-default").stop(!0,!0).animate({opacity:1})});$("body .navbar-default").hover(function(){return $(this).stop(!0,!0).animate({opacity:1})},
function(){if(100<=$(document).scrollTop())return $("body .navbar-default").stop(!0,!0).animate({opacity:0.8})});$(".multiselect").multiselect({buttonText:function(a,b){var c;if(0===a.length)return"Aucune";c="";a.each(function(){return c+=$(this).text()+", "});return c.substr(0,c.length-2)+' <b class="caret"></b>'},maxHeight:200,maxWidth:200,buttonWidth:200,enableFiltering:!0,enableCaseInsensitiveFiltering:!0});$(".date").datepicker();$(".alert-success").delay(5E3).slideUp("fast");$("#moresearch").click(function(){return $("#advancedsearch").toggleClass("hide",
"")});$("form").on("submit",function(a){$(this).find("button[type=submit]").attr("disabled","disabled");$(this).find("button[type=submit]").text("Envoi en cours...");return $("#overlay").removeClass("hide")});$("input[required]").on("blur",function(a){if(0===$(this).val().length)return $(this).addClass("parsley-error")});$("input[required]").on("keydown",function(a){return $(this).removeClass("parsley-error")});$(window).scroll(function(){return 100<$(this).scrollTop()?$(".scrollup").fadeIn():$(".scrollup").fadeOut()});
return $(".scrollup").click(function(){$("html, body").animate({scrollTop:0},600);return!1})})}).call(this);
