function simblaFormSubmit(e){function t(){i.remove(),"text"==r.data("failure-type")?r.append('
"):"link"==r.data("failure-type")&&(window.location=r.data("failure"))}var r=$(e);if(r.find(".simbla-form").remove(),void 0==r.attr("action")){var o=r.serializeArray(),a={};o.forEach(function(e){var t=e.name;a[t]?($.isArray(a[t])||(a[t]=[a[t]]),a[t].push(e.value)):a[t]=e.value}),a.formName=r.attr("name");var i=$('
');return r.append(i),$.post("/",a,function(e){e&&null!=e.err?t():(i.remove(),"text"==r.data("success-type")?r.append('"):"link"==r.data("success-type")&&(window.location=r.data("success")))}).fail(t),!1}}function getColor(e,t){var r="#fff";switch(t){case"solid":case"rounded":r=$(e).css("backgroundColor");break;case"underline":r=$(e).css("borderBottomColor");break;case"border":r=$(e).css("borderColor");break;case"divider":var o=0==$(e).parents(".rtl").length?"borderRightColor":"borderLeftColor";r=$(e).css(o)}return r}function setBackgroundType(e,t,r,o){r=r.toLowerCase();var a={};if(o||(a={border:"none",borderBottom:"none",borderRight:"none",borderLeft:"none",backgroundColor:"transparent",borderRadius:0,marginRight:0,marginLeft:0}),"none"!=r)switch(r){case"solid":a.backgroundColor=t;break;case"underline":a.borderBottom="5px solid "+t;break;case"border":a.border="2px solid "+t,a.borderRight="2px solid "+t,a.borderLeft="2px solid "+t,a.borderBottom="2px solid "+t;break;case"rounded":a.backgroundColor=t,a.borderRadius="4px",a.marginRight="3px",o&&"0px"==$(e).css("marginLeft")&&(a.marginLeft="3px");break;case"divider":a.borderLeft="1px solid "+t,a.borderRight="1px solid "+t}$(e).css(a)}function getOpacity(e,t){var r=1;switch(t){case"solid":case"rounded":r=$(e).css("backgroundColor");break;case"underline":r=$(e).css("borderBottomColor");break;case"border":r=$(e).css("borderColor");break;case"divider":var o=0==$(e).parents(".rtl").length?"borderRightColor":"borderLeftColor";r=$(e).css(o)}return!r||r>=1||"string"!=typeof r?1:r.split(",").pop().replace(")","")}function hexToRgb(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,r,o){return t+t+r+r+o+o});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null}$(function(){$("[data-hover-color], [data-hover-backgroundcolor]").each(function(){elem=$(this),elem.off("mouseenter mouseleave");{var e=elem.find("a:first").css("color"),t=elem.attr("data-hover-color"),r=elem.attr("data-hover-backgroundcolor"),o=elem.attr("data-hover-opacity")||1,a=elem.find("a:first")[0].style.fontFamily,i=elem.attr("data-hover-fontfamily"),n=elem.find("a:first").css("fontSize"),s=elem.attr("data-hover-fontsize"),d=elem.find("a:first").css("fontWeight"),l=elem.attr("data-hover-fontweight"),c=elem.attr("data-bgtype")||"solid",f=elem.attr("data-hover-bgtype")||"solid",u=getColor(elem.find("a:first"),c);getOpacity(elem.find("a:first"),c)}if(r){var h=hexToRgb(r);r="rgba("+h.r+","+h.g+","+h.b+","+o+")"}elem.parents(".container-fluid").find(".navbar-toggle").is(":visible")&&elem.css("height",""),(r||t)&&elem.on({mouseenter:function(){$(this).data("custom-style")||($(this).css({color:t,fontFamily:i,fontSize:s,fontWeight:l}),setBackgroundType(this,r,f,!0))},mouseleave:function(){$(this).data("custom-style")||($(this).css({color:e,fontFamily:a,fontSize:n,fontWeight:d}),setBackgroundType(this,u,c,!1))}},"a")}),$("ul.nav li a.current").each(function(){var e=$(this).parents("ul.nav"),t=e.data("current-backgroundcolor"),r=e.data("current-color"),o=e.data("current-opacity")||1,a=e.data("current-fontfamily"),i=e.data("current-fontsize")||"13px",n=e.data("current-fontweight")||"normal",s=e.data("current-bgtype")||"solid";if(t){var d=hexToRgb(t);t="rgba("+d.r+","+d.g+","+d.b+","+o+")",$(this).css({color:r,fontFamily:a,fontSize:i,fontWeight:n}).data("custom-style",!0),setBackgroundType(this,t,s,!0)}}),$(".right.carousel-control").click(),$('a[href^="#"]').on("click",function(e){e.preventDefault();var t=this.hash,r=$(t);$("html, body").stop().animate({scrollTop:r.offset().top},700,"swing",function(){window.location.hash=t})})}),$(window).load(function(){$(".simblaHeader.sticky").length>0&&$("#bodyContainer").css("margin-top",$(".simblaHeader.sticky").outerHeight()),setTimeout(function(){1==$('.simblaFooter:not(".sticky")').length&&$("#windowDiv").height()+$(".simblaFooter").outerHeight()>window.innerHeight?$("#windowDiv").height($("#windowDiv").height()+$(".simblaFooter").outerHeight()):$("#windowDiv").height()