(function(n){n(window.jQuery,window,document)})(function(n,t,i){var u=function(n){if(typeof n!="undefined"&&n!==null&&n.length!==0){var t=n.find("#HeadVideo");t.length}},f=function(n){if(typeof n!="undefined"&&n!==null&&n.length!==0){var t=n.find("#Gallery a.gallery-thumbnail");t.length&&t.iLightBox({skin:"dark",path:"horizontal",overlay:{opacity:.8,blur:!0},keyboard:{esc:!1},styles:{nextOpacity:.55,prevOpacity:.55}})}},e=function(t){if(typeof t!="undefined"&&t!==null&&t.length!==0)t.on("submit",function(i){var u=t[0];if(t.valid()){var f=t.serializeForm(),r={};r.Destination="info@sblsolutions.com.au";r.Subject="[sblsolutions] Contact Request from "+f.Name;r.Body=f.Message;n.ajax({type:u.method,url:u.action,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:function(n){AjaxGlobalHandler.onBeginHandler(n,u)},complete:function(){},success:function(i,r,u){var e,o,f;if(u.readyState===4){if(u.status===200){e=i;o=n("#ContactFormMessage");o.fadeIn().removeClass("alert-danger").removeClass("alert-success").addClass("alert-success").find("div").html('<h4><i class="fa fa-fw fa-check"><\/i>'+e+"!<\/h4><p>We will get back to you very shortly.<\/p>");f=t.find(":submit");f.length&&f.fadeOut();ga("send","event",{eventCategory:"enquiry",eventAction:"contactus",eventLabel:"submit",eventValue:1});return}AjaxGlobalHandler.resetSubmitButton(t[0])}},error:function(i){if(i.readyState===4){var r=data,u=n("#ContactFormMessage");u.fadeIn().removeClass("alert-danger").removeClass("alert-success").addClass("alert-danger").find("div").html('<h4><i class="fa fa-fw fa-times"><\/i>'+r+'!<\/h4><p>Please <a href="mailto:info@sblsolutions.com.au">email us<\/a> directly if problems persists.<\/p>');AjaxGlobalHandler.resetSubmitButton(t[0])}}})}return i.preventDefault(),!1})},r=function(n){if(typeof n!="undefined"&&n!==null&&n.length!==0){u(n);f(n);var t=n.find("#ContactForm");e(t)}};t.initHomeView=r;n(function(){var t=function(){var t=n(i);r(t)}()})})