function BuildShoppingCart(){$.ajax({type:"GET",url:orderUrl,accept:"application/json",contentType:"application/json; charset=utf-8"}).done(function(n){alert("here");$.each(n.Items,function(n,t){$("<li>",{text:formatItem(t)}).appendTo($("#OI"))})}).error(function(n){alert(n)})}function formatItem(n){return n.Name+": $"+n.UnitPrice}function AddItemToOrder(n){$.post(orderUrl,{"":{"":n}}).done(function(){window.location.replace("/Cart")}).error(function(){})}function RemoveFromCart(n){$.ajax({url:orderUrl,type:"DELETE",data:{"":n},success:function(){alert("success")}})}function ToggleCustomContentNavLinks(n){n?(activeClass=".customContentEditOn",inactiveClass=".customContentEditOff"):(activeClass=".customContentEditOff",inactiveClass=".customContentEditOn");$(activeClass).show();$(inactiveClass).hide()}function printElement(n){var i=n.cloneNode(!0),t;printElement_RemoveNonPrintableElements(i);t=getPrintSectionContainer();t.appendChild(i);window.print();t.remove()}function printElement_RemoveNonPrintableElements(n){for(var t=n.getElementsByClassName("NoPrint");t[0];)t[0].parentNode.removeChild(t[0])}function getPrintSectionContainer(){var n=document.getElementById("printSection");return n||(n=document.createElement("div"),n.id="printSection",document.body.appendChild(n)),n.innerHTML="",n}function PrintGuestPassDialog(n){printElement(document.getElementById(n))}function MakeAJAXPost_CheckIn(n,t,i,r,u){$.ajax({url:t,type:"POST",processData:!1,dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify(i),success:function(t){r(t,n)},error:function(n){u(n)}})}function MakeAJAXPost_StandBy(n,t,i,r){$.ajax({url:n,type:"Post",processData:!1,dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify(t),success:function(n){i(n)},error:function(n){r(n)}})}function ToggleSelfCheckIn(n,t){n.WasSucessfull?$("[data-id="+t+"]").toggleClass("hidden").toggleClass("show"):alert(n.Reason)}function FailedCheckIn(){alert("Unable to check user in")}function UpdateQueryString(n,t,i){var u,r,f;return i||(i=window.location.href),u=new RegExp("([?&])"+n+"=.*?(&|#|$)(.*)","gi"),u.test(i)?typeof t!="undefined"&&t!==null?i.replace(u,"$1"+n+"="+t+"$2$3"):(r=i.split("#"),i=r[0].replace(u,"$1$3").replace(/(&|\?)$/,""),typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):typeof t!="undefined"&&t!==null?(f=i.indexOf("?")!==-1?"&":"?",r=i.split("#"),i=r[0]+f+n+"="+t,typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):i}function GoToNewsDetails(n){window.location.replace(n)}var orderUrl;$(function(){$(".dropdown.keep-open").on({"shown.bs.dropdown":function(){$(this).data("closable",!1)},click:function(){$(this).data("closable",!0)},"hide.bs.dropdown":function(){return $(this).data("closable")}})});orderUrl="/api/Order";$(document).ajaxError(function(n,t){if(t.status===401){var i=location.href.toLowerCase(),r=i.indexOf("/fusionim")!=-1;r||location.reload()}}),function(n){n.fn.popr=function(t){var i=n.extend({speed:200,mode:"bottom"},t);return this.each(function(){var t=".popr_container_"+i.mode,r=!0;n(this).click(function(u){var f,e,o;n(".popr_container_top").remove();n(".popr_container_bottom").remove();r?(u.stopPropagation(),r=!1):r=!0;f=i.mode;n(this).attr("data-mode")&&(f=n(this).attr("data-mode"),t=".popr_container_"+f);e='<div class="popr_container_'+f+'"><div class="popr_point_'+f+'"><div class="popr_content">'+n('div[data-box-id="'+n(this).attr("data-id")+'"]').html()+"<\/div><\/div><\/div>";n(this).append(e);var s=n(t).outerWidth(),h=n(this).width(),c=h/2-s/2;n(t).css("margin-left",c+"px");n(this).removeAttr("title alt");f=="top"&&(o=n(t).outerHeight()+39,n(t).css("margin-top","-"+o+"px"));n(t).fadeIn(i.speed)});n("html").click(function(){n(".popr_container_top").remove();n(".popr_container_bottom").remove();r=!0})})}}(jQuery);var SelectionMethods={None:0,Single:1,Multi:2},CardDisplay={selectedCardCSSClass:"cardDisplay-selected",SetSelected:function(n){var t,i;(this.SelectionMethod==SelectionMethods.Single||this.SelectionMethod==SelectionMethods.Multi)&&(this.SelectionMethod==SelectionMethods.Single&&(t=this.GetSelectedCards(),t.each(function(){$(this).toggleClass(CardDisplay.selectedCardCSSClass)})),i=$('.cardDisplay[data-id="'+n+'"]'),i.toggleClass(CardDisplay.selectedCardCSSClass))},SelectAll:function(){var t=this.GetSelectedIds(),n=$(".cardDisplay");t.length==n.length?n.removeClass(CardDisplay.selectedCardCSSClass):n.addClass(CardDisplay.selectedCardCSSClass)},GetSelectedIds:function(){return this.GetSelectedDataAtt("id")},GetSelectedDataAtt:function(n){var t=this.GetSelectedCards(),i=[];for(x=0;x<t.length;x++)i.push($(t[x]).data(n));return i},GetSelectedCards:function(){return $("."+CardDisplay.selectedCardCSSClass)},GetCardById:function(n){return $("[data-id="+n+"]")},GetDataAttributeByCardId:function(n,t){var i=CardDisplay.GetCardById(n);return CardDisplay.GetDataAttribute(i,t)},GetDataAttribute:function(n,t){return n.data(t)},SelectionMethod:SelectionMethods.None},MemberSearch={selectedCSSClass:"memberSearch-selected",SetSelected:function(n){var t,i;(this.SelectionMethod==SelectionMethods.Single||this.SelectionMethod==SelectionMethods.Multi)&&(this.SelectionMethod==SelectionMethods.Single&&(t=this.GetSelectedMembers(),t.each(function(){$(this).toggleClass(MemberSearch.selectedCSSClass)})),i=$('.memberSearch[data-id="'+n+'"]'),i.toggleClass(MemberSearch.selectedCSSClass))},GetSelectedIds:function(){return this.GetSelectedDataAtt("id")},GetSelectedDataAtt:function(n){var t=this.GetSelectedMembers(),i=[];for(x=0;x<t.length;x++)i.push($(t[x]).data(n));return i},GetSelectedMembers:function(){return $("."+MemberSearch.selectedCSSClass)},SelectionMethod:SelectionMethods.None},innoGenEntity={};$(function(){innoGenEntity={self:this,unsaved:!1,resetUnsave:function(){self.unsaved=!1},setUnsave:function(){self.unsaved=!0},checkPartialOnChange:function(){if(self.unsaved){var n=Date.now();return confirm($("#hdn-navigate-away-message").val())}return!0},checkUnsaved:function(){return self.unsaved},setOnChange:function(){$(window).on("beforeunload",function(){if(self.unsaved)return"You have unsaved changes on this page. Do you want to leave this page and discard your changes or stay on this page?"});$(":input").not(".innoGen-Ignore").change(function(){self.unsaved=!0})}}})