(function(){$.fn.announcementList=function(n){var n=$.extend({linkColor:"#4f4f4f",textHoverColor:"#4f4f4f",allColor:"#d2935b",ocak:"",subat:"",nisan:"",nisan:"",mayis:"",haziran:"",temmuz:"",agustos:"",eylul:"",ekim:"",kasim:"",aralik:"",tarih:"",uygula:"",tarih_araligi_seciniz:"",seciniz:""},n);return this.each(function(){function t(n){var t=$("<div />",{html:"<style>"+n+"<\/style>"}).appendTo("body")}function f(t){let i=new Swiper(n.modulid+t,{slidesPerView:1,spaceBetween:4,pagination:{el:"."+t+"-pagination",clickable:!0,type:"bullets"},autoplay:!1})}var r,i,u;n.modulid="#"+$(this).attr("id");$(n.modulid+" .col .announce-text").css({color:n.linkColor});$(n.modulid+" .col .announce-date").css({color:n.allColor});$(n.modulid+" .ministry-announcements").hover(function(){$(".announce-text",this).css({color:n.textHoverColor})},function(){$(".announce-text",this).css({color:n.linkColor})});$(n.modulid+" .ministry-announcements").css({"border-bottom":n.borderBottom});$(n.modulid+" .icon-arrow_right").css({"border-bottom":n.allColor});$(n.modulid+" .ministry-announcements").hover(function(){$(".announce-text",this).css({"border-bottom":"1px solid "+n.allColor})},function(){$(".announce-text",this).css({"border-bottom":"1px solid #eee"})});$(n.modulid+" .icon-arrow_right").css({color:n.allColor});$(n.modulid+" .dropdown-menu.dateList h6").css({color:n.allColor});$(n.modulid+" .btn-datelist").css({color:n.linkColor});t(n.modulid+" .content-slider .swiper-pagination-bullets .swiper-pagination-bullet.swiper-pagination-bullet-active {background-color: "+n.allColor)+"}";t(n.modulid+" .btn-showmore {border-bottom:1px solid "+n.linkColor);t(n.modulid+" .btn-showmore:before {color:"+n.linkColor);t(n.modulid+" .btn-showmore:hover:before {color:"+n.allColor);t(n.modulid+" .btn-showmore:hover, .btn-showmore.hover {border-bottom-color:"+n.allColor);t(n.modulid+" .btn-datelist.dropdown-toggle::after {color:"+n.allColor);t(n.modulid+" .btn-datelist.dropdown-toggle::after {color:"+n.allColor);t(n.modulid+" .filter-dropdown.list-filter > .form-group .select2-container--default .select2-selection--single .select2-selection__arrow b:before {color:"+n.allColor);t(n.modulid+" .select2-container--default.select2-mini .select2-selection--single .select2-selection__arrow b:before {color:"+n.allColor);t(n.modulid+" .select2-container--default .select2-dropdown .select2-search:before {color:"+n.allColor);t(n.modulid+" .btn-small {border:1px solid "+n.allColor);t(n.modulid+" .btn-small:hover {background-color:"+n.allColor);$(n.modulid+" #MobileAnnounceFilter").mmenu({hooks:{"openPanel:start":function(t){$(n.modulid+" .mm-navbar .mm-navbar__title i",t).hasClass("icon-close")||$(n.modulid+" .mm-navbar .mm-navbar__title",t).append("<i class='icon-close'><\/i>");$(n.modulid+" .mm-navbar .mm-navbar__title",t).click(function(){$(n.modulid+" .mm-wrapper__blocker a").click()});$(".mm-listitem label",t).click(function(){$('[type="date"]',this).trigger("click tap mouseover")});var i=[n.ocak,n.subat,n.mart,n.nisan,n.mayis,n.haziran,n.temmuz,n.agustos,n.eylul,n.ekim,n.kasim,n.aralik];$('[type="date"]',t).change(function(){if($(this).val()==="")$(this).next("span").find(".subtitle").text("");else{var n=$(this).val().split("-"),t=n[2]+" "+i[n[1]-1]+" "+n[0];$(this).next("span").find(".subtitle").html("<span>"+t+"<\/span>")}});$(n.modulid+" .filter-apply").on("click",function(){$(n.modulid+" .mm-wrapper__blocker a").click()})},"openPanel:finish":function(){$(n.modulid+" .navbar-header .icon-close").click(function(){$(n.modulid+" .mm-wrapper__blocker a").click()})}},navbar:{title:n.tarih},navbars:[{position:"bottom",height:1,content:['<a href="javascript:void(0);" onclick="filterSelect(true)" class="filter-apply btn btn-navy">'+n.uygula+"<\/a>"]}],extensions:["pagedim-black","position-front","position-right","border-full"]},{language:"tr"});$(n.modulid+" .dropdown-menu").on({click:function(n){n.stopPropagation()}});r=$("select[multiple]");i=$("select");i.each(function(){if($(this).attr("multiple"))r.select2({placeholder:n.seciniz,language:"tr",multiple:!0,allowClear:!0,closeOnSelect:!1,width:"element",dropdownCssClass:"multiple-dropdown",dropdownParent:$(this).parent(".form-group"),templateResult:function(n,t){return n.element&&$(t).addClass($(n.element).attr("class")),n.text}});else{var t="";t=$(this).hasClass("form-control-sm")?"select2-mini-dropdown":"dropdown-container";$(this).select2({placeholder:n.seciniz,dropdownCssClass:t,language:"tr",width:"style"});$(this).hasClass("form-control-sm")&&$(this).nextAll(".select2:first").addClass("select2-mini")}});i.on("select2:open",function(){$(this).attr("multiple")?(msSelectedItems(r),SelectButtons(this)):$(".select2-search__field",".dropdown-container").attr("placeholder",$(this).data("search-input-placeholder"));$(".select2-results__options").niceScroll({autohidemode:!1,cursorwidth:"4px",cursorborder:"0px",cursorborderradius:"0px",cursorcolor:n.allColor,background:"#EEEEEE"})});i.on("select2:select",function(){$(this).attr("multiple")&&SelectButtons(this)});i.on("select2:unselect",function(){$(this).attr("multiple")&&SelectButtons(this)});i.on("select2:close",function(){$(this).attr("multiple")&&($(".select2-selection__clear").hide(),$(".select2-selection__selectall").remove(),select2_selectedCount===0&&($(".select2-selection__count").remove(),$(".select2-search--inline").show()))});r.change(function(){msSelectedItems(r)});u=$(n.modulid+" .filterButtons .btn-filter");$(n.modulid+" .dateList select").on("change",function(){var i=$(n.modulid+" .btn-datelist"),t;$(n.modulid+" .btn-datetext-start").length===0&&(i.html(""),i.append('<span class="btn-datetext-start"><span class="btn-datetext-selectedmonth"><\/span><span class="btn-datetext-selectedyear"><\/span><\/span> - <span class="btn-datetext-end"><span class="btn-datetext-selectedmonth"><\/span><span class="btn-datetext-selectedyear"><\/span><\/span>'));$(this).val()===""&&i.html("").text(n.tarih_araligi_seciniz);t=$(this).closest('[class*="datelist-"]').find(".selectedDate");$(this).is('[id$="start"]')&&($(this).is('[id*="month"]')&&($(n.modulid+" .selectedmonth",t).html($(this).val()+" "),$(n.modulid+" .btn-datetext-start .btn-datetext-selectedmonth").html($(this).find(":selected").text()+" "),$(n.modulid+" .selectedmonth",t).attr("data-month",$(this).find(":selected").index())),$(this).is('[id*="year"]')&&($(n.modulid+" .selectedyear",t).html($(this).val()),$(n.modulid+" .btn-datetext-start .btn-datetext-selectedyear").html($(this).val()+" ")));$(this).is('[id$="end"]')&&($(this).is('[id*="month"]')&&($(n.modulid+" .selectedmonth",t).html($(this).val()+" "),$(n.modulid+" .btn-datetext-end .btn-datetext-selectedmonth").html($(this).find(":selected").text()+" "),$(n.modulid+" .selectedmonth",t).attr("data-month",$(this).find(":selected").index())),$(this).is('[id*="year"]')&&($(n.modulid+" .selectedyear",t).html($(this).val()),$(n.modulid+" .btn-datetext-end .btn-datetext-selectedyear").html($(this).val()+" ")));$(n.modulid+" .filterButtons a").removeClass("disabled")});f("announce-slider")})}})(jQuery)