!function(t){t.fn.dcSlick=function(a){var e={classWrapper:"dc-slick",classContent:"dc-slick-content",idWrapper:"dc-slick-"+t(this).index(),location:"left",align:"top",offset:"100px",speed:"slow",tabText:"Click",classTab:"tab",classOpen:"slick-open",classClose:"slick-close",classToggle:"slick-toggle",autoClose:!0,loadOpen:!1,onLoad:function(){},beforeOpen:function(){},beforeClose:function(){}},a=t.extend(e,a),s=this;return s.each(function(){function a(){t("."+n).css({zIndex:1e4}),p.css({zIndex:10001}),"bottom"==e.location&&p.animate({marginBottom:"-=5px"},"fast").animate({marginBottom:0},e.speed),"top"==e.location&&p.animate({marginTop:"-=5px"},"fast").animate({marginTop:0},e.speed),"left"==e.location&&p.animate({marginLeft:"-=5px"},"fast").animate({marginLeft:0},e.speed),"right"==e.location&&p.animate({marginRight:"-=5px"},"fast").animate({marginRight:0},e.speed),p.addClass("active"),e.beforeOpen.call(this)}function i(){if(p.css({zIndex:1e4}),p.hasClass("active")){var t={marginBottom:"-"+T};switch(e.location){case"top":t={marginTop:"-"+T};break;case"left":t={marginLeft:"-"+b};break;case"right":t={marginRight:"-"+b}}p.removeClass("active").animate(t,e.speed)}e.beforeClose.call(this)}function o(a){var s=t("."+e.classContent,a);t(a).addClass(e.location).addClass("align-"+e.align).css({position:"fixed",zIndex:1e4});var i=(p.css("border-top-width"),p.css("border-right-width"),p.css("border-bottom-width"),p.css("border-left-width"),t("."+e.classTab,p)),o=i.outerWidth(!0),n=o+"px",l=i.outerHeight(!0),c=l+"px",r=s.height(),g=s.outerHeight(!0)-r,f=k-l;C>f&&(r=f-x-g,T=f+"px"),s.css({height:r+"px"});var d={marginLeft:"-"+b,top:e.offset},m={marginRight:"-"+n};"right"==e.location&&(d={marginRight:"-"+b,top:e.offset},m={marginLeft:"-"+n}),"top"==e.location&&(d={marginTop:"-"+T},m={marginBottom:"-"+c},"left"==e.align?(d={marginTop:"-"+T,left:e.offset},m={marginBottom:"-"+c,left:0}):(d={marginTop:"-"+T,right:e.offset},m={marginBottom:"-"+c,right:0})),"bottom"==e.location&&(d={marginBottom:"-"+T},m={marginTop:"-"+c},"left"==e.align?(d={marginBottom:"-"+T,left:e.offset},m={marginTop:"-"+c,left:0}):(d={marginBottom:"-"+T,right:e.offset},m={marginTop:"-"+c,right:0})),t(a).css(d),i.css(m),e.onLoad.call(this)}var n=e.classWrapper,l=s.html();s.css("float","left");s.width();s.empty();var c='<div class="'+e.classTab+'"><span>'+e.tabText+"</span></div>";t(this).hide();var r=e.idWrapper,g='<div id="'+r+'" class="'+n+'">'+c+'<div class="'+e.classContent+'">'+l+"</div></div>";t("body").append(g);var p=t("#"+r),f=t("."+e.classTab,p);f.css({position:"absolute"});var d=t("."+e.classOpen),m=t("."+e.classClose),h=t("."+e.classToggle),u=p.height();p.css("float","left");var v=p.outerWidth(),b=v+"px";p.css("float","none");var C=p.outerHeight(),x=C-u,T=C+"px",k=t(window).height();o(p),1==e.autoClose&&t("body").mouseup(function(a){p.hasClass("active")&&(t(a.target).parents("#"+e.idWrapper).length||t(a.target).hasClass(e.classOpen)||t(a.target).hasClass(e.classToggle)||i())}),f.click(function(){p.hasClass("active")?i():a()}),t(d).click(function(t){a(),t.preventDefault()}),t(m).click(function(t){p.hasClass("active")&&i(),t.preventDefault()}),t(h).click(function(t){p.hasClass("active")?i():a(),t.preventDefault()}),1==e.loadOpen&&a()})}}(jQuery);