namespace("PrimeSport");namespace("PrimeSport.Common");PrimeSport.Common.AjaxErrorHandler=function(b,c,a){log("error",this,arguments)};PrimeSport.Common.ResponseValidate=function(b,a){if(b&&b.ResponseCode!=undefined){var c=a.find(".validation-summary-errors, .validation-summary-valid").addClass("validation-summary-errors").removeClass("validation-summary-valid");switch(b.ResponseCode){case 0:c.removeClass("validation-summary-errors").addClass("validation-summary-valid").html("<ul></ul>");return true;case 1:c.addClass("validation-summary-errors").removeClass("validation-summary-valid");var d=c.has("ul").length>0?c.find("ul"):$("<ul>").appendTo(c);$.each(b.ValidationErrors||[],function(){$("<li>").text(this).appendTo(d)});break;case 2:c.addClass("validation-summary-errors").removeClass("validation-summary-valid");var d=c.has("ul").length>0?c.find("ul"):$("<ul>").appendTo(c);$("<li>").text(b.Message).appendTo(d);break}}return false};PrimeSport.Common.FormatCurrency=function(a){a=isNaN(a)||a===""||a===null?0:a;return parseFloat(a).toFixed(2)};jQuery.ajaxSetup({cache:false,error:function(b,c,a){PrimeSport.Common.AjaxErrorHandler.apply(this,[b,c,a])}});jQuery.validator.unobtrusive.adapters.add("brequired",function(a){if(a.element.tagName.toUpperCase()=="INPUT"&&a.element.type.toUpperCase()=="CHECKBOX"){a.rules.required=true;if(a.message){a.messages.required=a.message}}});namespace("PrimeSport.Resources");PrimeSport.Resources.LoadingImage='<img alt="Loading..." class="loading" src="/Content/Images/ajax-loader.gif" />';namespace("PrimeSport.Geolocation");PrimeSport.Geolocation=(function(a,g){function b(){a("#GetGeolocationLoading").show();navigator.geolocation.getCurrentPosition(e,d)}function d(h){switch(h.code){case h.TIMEOUT:log("Location: Timeout");break;case h.POSITION_UNAVAILABLE:log("Location: Position unavailable");break;case h.PERMISSION_DENIED:log("Location: Permission denied");break;case h.UNKNOWN_ERROR:log("Location: Unknown error");break}a("#MenuLocation").parent().removeClass("active");a("#GetGeolocationLoading").hide()}function e(k){var j={},h={};if(k.coords){j={latitude:k.coords.latitude,longitude:k.coords.longitude}}if(k.address){h={country:k.address.country,countryCode:k.address.countryCode,region:k.address.region,city:k.address.city,postalCode:k.address.postalCode}}var l=a.extend(j,h);a.ajax({url:"/Location/SetLocation",type:"POST",data:l,dataType:"json",success:function(m){store.set("geolocation",JSON.stringify(m));a("#GetGeolocationLoading").hide();a("#MenuLocation").parent().removeClass("active");f(m)},error:function(){a("#MenuLocation").parent().removeClass("active");a("#GetGeolocationLoading").hide();log("Location: setPosition error")}})}function f(h){a(window).trigger("location",[h]);window.location.reload()}function c(){if(Modernizr.geolocation){var h=store.get("geolocation");if(!h){navigator.geolocation.getCurrentPosition(e)}}}a(c);return{GetGeolocation:b}})(jQuery);namespace("PrimeSport.Home");PrimeSport.Home.Index=(function(a,c){function b(){a("#EventTabs>ul").tabs("#EventTabs .panels>div");PrimeSport.Navigation.Common.Slideshow()}return{Init:b}}(jQuery));namespace("PrimeSport.Search");PrimeSport.Search.Common=(function(a,k){var c,b;function e(){var l=c.find("input[name=Term]"),m=l.val().replace("<","").replace(">","");l.val(m);c.find("input[name=Performer]").val(c.find("input[name=Performer]").val().replace("<","").replace(">",""));c.find("input[name=Venue]").val(c.find("input[name=Venue]").val().replace("<","").replace(">",""));c.find("input[name=City]").val(c.find("input[name=City]").val().replace("<","").replace(">",""));if(!Modernizr.input.placeholder&&m==l.attr("placeholder")){m=""}return !!m||c.hasClass("advanced")}function j(){c.submit()}function d(){if(c.hasClass("advanced")){c.removeClass("advanced");c.find(".advanced-search").find("select,input").attr("disabled","disabled")}else{c.addClass("advanced");c.find(".advanced-search").find("select,input").removeAttr("disabled")}a("#MenuLocation").parent().removeClass("active")}function h(l){if(!b&&l.keyCode==13){j(l)}else{b=false}}function g(){c=a("#SearchBox").bind("submit",e);c.find("#SubmitSearch").click(j);c.find("input[name=Term]").bind("keypress",h).autocomplete({source:"/Search/Suggestions",select:function(){b=true}}).alphaSearch();c.find("input[name=Performer]").autocomplete({source:"/Search/Suggestions?type=Performer"}).alphaSearch();c.find("input[name=Venue]").autocomplete({source:"/Search/Suggestions?type=Venue"}).alphaSearch();c.find("input[name=City]").autocomplete({source:"/Search/Suggestions?type=City"}).alphaSearch();c.find(".datepicker").datepicker().mask("99/99/9999");c.find("#AdvancedSearch").click(d);c.find(".advanced-search").find("select,input").attr("disabled","disabled");c.find("#FindMyEventAdvSearch").click(function(){a("#IsAdvanced").attr("value","true");c.submit()});f()}function f(){if(!Modernizr.input.placeholder){c.find("input[name=Term]").focus(function(){var l=a(this);if(l.val()==l.attr("placeholder")){l.val("");l.removeClass("placeholder")}}).blur(function(){var l=a(this);if(l.val()==""||l.val()==l.attr("placeholder")){l.addClass("placeholder");l.val(l.attr("placeholder"))}}).blur()}}a(g)})(jQuery);namespace("PrimeSport.Search");PrimeSport.Search.Index=(function(a,c){function b(){a("#PackageTabs>ul").tabs("#PackageTabs .panels>div");PrimeSport.Navigation.Common.Slideshow()}return{Init:b}}(jQuery));namespace("PrimeSport.Navigation");PrimeSport.Navigation.Common=(function(a,n){var m=8000,j=6000;function g(){var r=a("#FooterSlider"),o=7,p=r.find("li").length;function q(s,t){if(s>0){r.find(".prev").removeClass("disabled")}else{r.find(".prev").addClass("disabled")}if(p>o){if(s<p-o){r.find(".next").removeClass("disabled")}else{r.find(".next").addClass("disabled")}}}if(p>o){r.find(".next").click(function(){if(!a(this).hasClass("disabled")){r.data("carousel").scrollRight()}});r.find(".prev").click(function(){if(!a(this).hasClass("disabled")){r.data("carousel").scrollLeft()}});q(0)}r.carousel({itemsPerPage:o,scrollUpdate:q})}function l(){var y,s,r,p,o=4,q;function t(){var A=q.index(this);if(A<y.length){y.dumbCrossFade("jump",A)}}function z(A){q.removeClass("current");a(q.get(A)).addClass("current")}function u(A,B){if(A>0){s.find(".prev").removeClass("disabled")}else{s.find(".prev").addClass("disabled")}if(p>o){if(A<p-o){s.find(".next").removeClass("disabled")}else{s.find(".next").addClass("disabled")}}}var w=0,x=1;function v(){a(r.removeClass("selected").get(w)).addClass("selected");s.data("carousel").gotoItem(w);w=w<x-1?w+1:0;setTimeout(v,j)}s=a("#HomeSlideshow .previews").carousel({itemsPerPage:o,scrollUpdate:u});x=s.find("li").length;r=s.find("li");a(r.get(0)).addClass("selected");p=r.length;if(p>o){s.find(".next").click(function(){if(!a(this).hasClass("disabled")){s.data("carousel").scrollRight()}});s.find(".prev").click(function(){if(!a(this).hasClass("disabled")){s.data("carousel").scrollLeft()}});u(0)}y=a("#HomeSlideshow .slides>div").dumbCrossFade({slideType:"fade",showTime:m,slideChange:z});q=a("#HomeSlideshow .slides-navigation a").click("click",t);z(0);v()}function h(){a("#MenuLocation").click(function(){a("#SearchBox").removeClass("advanced");a(this).parent().toggleClass("active")});a("#ChangeLocation").click(c);a("#GetGeolocation").click(PrimeSport.Geolocation.GetGeolocation);a("#SendNewsLetter").click(b);a("#CityLocation").autocomplete({source:"/Search/Suggestions?type=City"})}function b(){var o=a("#EmailNewsLetter").val();a.ajax({url:"/Navigation/addMailToNewsLetter/",type:"POST",dataType:"json",data:{mail:o},success:function(p){switch(p.ResponseCode){case 0:a(".SuccessNewsLetterSent").text(p.Data);break;case 1:for(i=0;i<p.ValidationErrors.length;i++){a(".SuccessNewsLetterSent").text(p.ValidationErrors[i])}break;case 2:for(i=0;i<p.ValidationErrors.length;i++){a(".SuccessNewsLetterSent").text(p.ValidationErrors[i])}break}}})}function c(){var p=a(this).closest(".location"),o=p.find("input[name=City]").val().trim(),q=p.find("select[name=State]").val();if(o!=""){if(o&&q){a.ajax({url:"/Location/ChangeLocation",type:"POST",data:{city:o,state:q},dataType:"json",success:function(r){p.find("#MenuLocation").text(r.CityLabel+" ▼");a("#MenuLocation").parent().removeClass("active");window.location.reload()}})}}}function k(o,p){a("#MenuLocation").text(p.CityLabel+" ▼")}function f(){a("#SendCustomeService_Message").val(""),a("#SendCustomeService_Mail").val("");a("#SendCustomeService_LName").val(""),a("#SendCustomeService_FName").val("");a("#SendCustomeService_Phone").val("");var o=a("a[href$='CustomerService']").attr("rel","#CustomerServiceDialog").overlay();a("#CustomerServiceDialog").data("overlay",o.data("overlay"));a("#closeContactUs").click(function(){a("#SendCustomeService_Message").val("");a("#SendCustomeService_FName").val("");a("#SendCustomeService_Mail").val("");a("#SendCustomeService_LName").val("");a("#SendCustomeService_Phone").val("");a("#CustomerServiceValidation").attr("class","validation-summary-valid");a(".SuccessSent").text("")});a("#SendCustomeService").click(function(){var s=a("#SendCustomeService_Message").val(),r=a("#SendCustomeService_Mail").val(),p=a("#SendCustomeService_FName").val(),q=a("#SendCustomeService_LName").val(),t=a("#SendCustomeService_Phone").val();a.ajax({url:"/CustomerService/SaveMessage/",type:"POST",dataType:"json",data:{message:s,mail:r,firstName:p,lastName:q,phone:t},success:function(u){switch(u.ResponseCode){case 0:a("#CustomerServiceValidation").attr("class","validation-summary-valid");a("ul","#CustomerServiceValidation").html("");a("#SendCustomeService_Message").val("");a("#SendCustomeService_FName").val("");a("#SendCustomeService_Mail").val("");a("#SendCustomeService_LName").val("");a("#SendCustomeService_Phone").val("");a(".SuccessSent").text(u.Data);break;case 1:a("#SuccessSent").text("");a("#CustomerServiceValidation").attr("class","validation-summary-errors");a("ul","#CustomerServiceValidation").html("");for(i=0;i<u.ValidationErrors.length;i++){a("ul","#CustomerServiceValidation").append("<li>"+u.ValidationErrors[i]+"</li>")}break;case 2:a("#SuccessSent").text("");a("span","#CustomerServiceValidation").text("");a("#CustomerServiceValidation").attr("class","validation-summary-errors");a("ul","#CustomerServiceValidation").html("");for(i=0;i<u.ValidationErrors.length;i++){a("ul","#CustomerServiceValidation").append("<li>"+u.ValidationErrors[i]+"</li>")}break}}})})}function d(){a(".read-all").hide();a(".short-description").hide();a(".long-description").show();a(".read-less").show()}function e(){a(".read-all").show();a(".short-description").show();a(".long-description").hide();a(".read-less").hide()}a(function(){h();g();f();a(window).bind("location",k);a(".read-all").click(d);a(".read-less").click(e)});return{Slideshow:l}}(jQuery));namespace("PrimeSport.Event");PrimeSport.Event.Index=(function(a,g){var e=false;function d(){if(!e){var j=this.getTrigger().attr("data-id");var h=a("<div class='venue-map'>").appendTo(this.getOverlay());h.fanvenues({mapSet:"tt",mapId:j,interactWithTicketList:true,ticketList:{items:[]},fullscreenMapButton:false,resetMapButton:false,printMapButton:false,priceFilter:false}).bind("fvmapNotAvailable",function(){b(a(this),true)});e=true}}function f(h){alert(h)}function b(h,j){var m=a("#TTMapName").val();var k=385;var l="";if(j){k=800;l="-full"}if(m==null||m=="NoMap_all.gif"){a(h).html("<img src='../../Content/Images/no-map"+l+".png'/>")}else{a(h).html("<img style='width:"+k+"px' src='http://www.tickettechnology.com/brokermaps/"+m+"'/>")}}function c(){a(".seating-chart").overlay({onBeforeLoad:d})}return{Init:c}}(jQuery));namespace("PrimeSport.Event");PrimeSport.Event.Details=(function(a,t){var c,h,b,g,f,d;function s(){a(".past-event-photos a[rel^='gallery']").prettyPhoto({theme:"dark_square",maximum_width:579,maximum_height:383,allow_resize:false,social_tools:"",opacity:0.4});a("#play-past-events-gallery").click(function(){a(".past-event-photos a:first").click()})}var e=false;function r(){var v=a("#VenueId").val();if(!e){if(a("#FlatMap").val()==="False"){a("<div id='FullSizeMap' class='venue-map'>").appendTo(this.getOverlay());var u=a("#FullSizeMap");u.fanvenues({mapSet:"tt",mapId:v,interactWithTicketList:false,ticketList:{items:f},sectionSelector:".psection",fullscreenMapButton:false,resetMapButton:true,printMapButton:false,priceFilter:false}).bind("fvmapNotAvailable",function(){l(a(this),true)}).bind("fvmapSectionSelect",function(w,z,y){var x=u.fanvenues.getOriginalSectionNamesFor(y);a.each(x,function(A,B){g.push(B);d.push(1)});g.push(y);d.push(0);p(null,null,null,g,"Section","Asc")}).bind("fvmapSectionBlur",function(w,y,x){a("#thumbnail").html('<img src="'+y+'" />')}).bind("fvmapSectionDeselect",function(x,A,z){var y=u.fanvenues.getOriginalSectionNamesFor(z);a.each(y,function(C,D){for(var B=0;B<g.length;B++){if(g[B]==D){g.splice(B,1);d.splice(B,1)}}});for(var w=0;w<g.length;w++){if(g[w]==z){g.splice(w,1);d.splice(w,1)}}p(null,null,null,g,"Section","Asc")})}e=true}}function l(u,v){var y=a("#TTMapName").val();var w=385;var x="";if(v){w=800;x="-full"}if(y==null||y=="NoMap_all.gif"){a(u).html("<img src='../../Content/Images/no-map"+x+".png'/>")}else{a(u).html("<img style='width:"+w+"px' src='http://www.tickettechnology.com/brokermaps/"+y+"'/>")}}function q(){a.ajax({url:"/Event/PriceRange/"+c,type:"POST",dataType:"json",success:function(u){n(u)}})}function n(B){if(!(B[0]==0&&B[1]===0)){var A=a("#PriceRange .range"),z=a("#PriceRange .quantity"),y=A.find("p"),C=z.find("select"),x=B[0],w=B[B.length-1];var D=a("#selectQty");a.ajax({url:"/Event/QuantityRange/"+c,type:"POST",dataType:"json",success:function(H){for(var G=0;G<H.length;G++){D.append(a("<option></option>").val(H[G]).html(H[G]))}}});var u=a("<input>").attr("readonly","readonly").val(x).appendTo(y);a("<span> to </span>").appendTo(y);var F=a("<input>").attr("readonly","readonly").val(w).appendTo(y);var E=a("<div>").appendTo(A).slider({range:true,min:x,max:w,values:[x,w],slide:function(G,H){u.val(H.values[0]);F.val(H.values[1])},stop:function(G,I){var H=C.val();p(I.values[0],I.values[1],H)}});D.change(function(){var H=a(this).val(),G=u.val(),I=F.val();p(G,I,H)});a("#Tickets").delegate(".thead>a","click",function(){var I=C.val(),G=u.val(),K=F.val(),J=a(this).attr("data-sort"),H=a(this).attr("order-sort");p(G,K,I,null,J,H)})}else{var u="<div class='notickets'>There are no tickets available for this event </div>";var v;b=a.ajax({url:"/Event/NoResults/"+c,type:"POST",data:{id:c},dataType:"html",success:function(G){a("#PriceRange").hide();a("#PriceComplete").empty();a("#PriceComplete").append(G);a("#CreateAccount").click(j)}})}}function p(v,F,B,C,E,z){var u=a("#Tickets");if(b){b.abort()}var D=[];for(var x=0;x<g.length;x++){if(d[x]==0){var y=g[x].split(" ");D.push(y[y.length-1])}else{D.push(g[x])}}var w=parseFloat(v).toFixed(2);var G=parseFloat(F).toFixed(2);var A={fromm:w,to:G,quantity:B,section:D,sortby:E,order:z};u.html(PrimeSport.Resources.LoadingImage);b=a.ajax({url:"/Event/Tickets/"+c,type:"POST",data:JSON.stringify(A),contentType:"application/json",dataType:"html",async:false,success:function(H){H=H.replace(/td>\s+<td/g,"td><td");u.html(H);u.find(".notes img").tooltip();u.find(".buy .button").click(k);if(z=="Asc"){u.find("a").attr("order-sort","Desc")}else{u.find("a").attr("order-sort","Asc")}}})}function o(){var v=a("#VenueId").val();var u=[];a.ajax({url:"/Event/GetSections",type:"POST",data:{eventId:c},dataType:"json",async:false,success:function(y){for(var w=0;w<y.length;w++){var x={id:"123",section:y[w],row:"1",price:"110.00",notes:"n/a"};f.push(x)}}});a("#fvmap").fanvenues({mapSet:"tt",mapId:v,interactWithTicketList:false,ticketList:{items:f},sectionSelector:".psection",fullscreenMapButton:false,resetMapButton:true,printMapButton:false,priceFilter:false}).bind("fvmapNotAvailable",function(){l(a(this),false)}).bind("fvmapSectionSelect",function(w,z,y){var x=a("#fvmap").fanvenues.getOriginalSectionNamesFor(y);a.each(x,function(A,B){g.push(B);d.push(1)});g.push(y);d.push(0);if(g.length>0){p(null,null,null,g,"Section","Asc")}else{p()}}).bind("fvmapSectionBlur",function(w,y,x){a("#thumbnail").html('<img src="'+y+'" />')}).bind("fvmapSectionDeselect",function(x,A,z){var y=a("#fvmap").fanvenues.getOriginalSectionNamesFor(z);a.each(y,function(C,D){for(var B=0;B<g.length;B++){if(g[B]==D){g.splice(B,1);d.splice(B,1)}}});for(var w=0;w<g.length;w++){if(g[w]==z){g.splice(w,1);d.splice(w,1)}}if(g.length>0){p(null,null,null,g,"Section","Asc")}else{p()}})}function k(){var z=a(this),x=z.closest("tr"),y=x.find("select");var w=Number(y.val());if(w){var v=y.attr("data-id");var u=a("#eventId").val();window.location=a("#isAncillary").val()=="True"?"/Checkout/AddToCart?eventSeatId={0}&numberOfSeats={1}&eventId={2}".format(v,w,u):"/Checkout/AddToCart?eventSeatId={0}&numberOfSeats={1}".format(v,w)}return false}function j(){var u=a("#Email").val();b=a.ajax({url:"/CustomerService/SaveSubscriptor/",type:"POST",data:{email:u,eventId:c},dataType:"json",success:function(v){switch(v.ResponseCode){case 0:a(".message").text(v.Data);a("#Email").val("");break;case 1:for(i=0;i<v.ValidationErrors.length;i++){a(".message").text(v.ValidationErrors[i])}a("#Email").val("");break;case 2:for(i=0;i<v.ValidationErrors.length;i++){a(".message").text(v.ValidationErrors[i])}a("#Email").val("");break}}})}function m(){c=a("#EventId").val();h=a("#VenueId").val();g=[];f=[];d=[];q();p();o();a(".buttonInfo").tooltip();a("#SummaryReadAll1").tooltip({events:{def:"click, mouseout"}});a("#ViewFullSizeMap").overlay({onBeforeLoad:r});s()}return{Init:m}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.Common=(function(a,q){function f(){var r=a(this).attr("data-favorite-performerid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/AddFavoritePerformer/",type:"POST",dataType:"json",data:{accountId:s,performerId:r},success:function(t){location.reload()}})}function o(){var r=a(this).attr("data-favorite-performerid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/RemoveFavoritePerformer/",type:"POST",dataType:"json",data:{accountId:s,performerId:r},success:function(t){location.reload()}})}function h(){var r=a(this).attr("data-favorite-venueid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/AddFavoriteVenue/",type:"POST",dataType:"json",data:{accountId:s,venueId:r},success:function(t){location.reload()}})}function p(){var r=a(this).attr("data-favorite-venueid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/RemoveFavoriteVenue/",type:"POST",dataType:"json",data:{accountId:s,venueId:r},success:function(t){location.reload()}})}function b(){var r=a(this).attr("data-favorite-eventid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/AddFavoriteEvent/",type:"POST",dataType:"json",data:{accountId:s,eventId:r},success:function(t){location.reload()}})}function n(){var r=a(this).attr("data-favorite-eventid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/RemoveFavoriteEvent/",type:"POST",dataType:"json",data:{accountId:s,eventId:r},success:function(t){location.reload()}})}function g(){var s=a(this),r=s.hasClass("add"),t=s.attr("data-page"),u=s.attr("data-user");a.ajax({url:"/Account/FavoriteSplashPage/",type:"POST",dataType:"json",data:{action:r?"add":"remove",page:t,user:u},success:function(v){s.toggleClass("add","remove")}})}function j(){a("#addFavoritePerformer").click(f);a("#removeFavoritePerformer").click(o);a("#addFavoriteVenue").click(h);a("#removeFavoriteVenue").click(p);a("#removeFavoriteEvent").click(n);a("#addFavoriteEvent").click(b);a("input[name=IsSubscribed]").click(d);a("#IsSubscribedVenue").click(e);a("#IsSubscribedEvent").click(c);a(".favorite-splash-page").click(g)}function d(){alert("performer");var r=a(this).attr("favoriteid");alert(r);a.ajax({url:"/Performer/ChangePerformerIsSubscribed/"+r,dataType:"json"})}function e(){}function c(){}function m(){var r=a("footer .sitemap a[href$='LogIn']").attr("rel","#LogInDialog").overlay();a("#LogInDialog").data("overlay",r.data("overlay"))}function l(){var r=a("footer .sitemap a[href$='ForgotPassword']").attr("rel","#ForgotPasswordDialog").overlay();a("#ForgotPasswordDialog").data("overlay",r.data("overlay"))}function k(){var r=a("footer .sitemap a[href$='ChangePassword']").attr("rel","#ChangePasswordDialog").overlay();a("#ChangePasswordDialog").data("overlay",r.data("overlay"))}a(j);return{}})(jQuery);namespace("PrimeSport.Checkout");PrimeSport.Checkout.Index=(function(a,s){var b;function e(){if(!(a("#CardType").val()=="AmericanExpress")){a("#SecurityCodeAmerican,#CreditCardNumberAmerican").attr("disabled","disabled").hide();a("#SecurityCode,#CreditCardNumber").removeAttr("disabled").val("");a("#textCardNumber").text("The 16 digits on the front of your credit card");a("#textSecurityCode").text("The last 3 digits displayed on the back of your credit card");a("#SecurityCode,#CreditCardNumber").show()}else{a("#SecurityCode,#CreditCardNumber").attr("disabled","disabled").hide();a("#SecurityCodeAmerican,#CreditCardNumberAmerican").removeAttr("disabled").val("");a("#textCardNumber").text("The 15 digits on the front of your credit card");a("#textSecurityCode").text("The last 4 digits displayed on the back of your credit card");a("#SecurityCodeAmerican,#CreditCardNumberAmerican").show()}}function q(){a("#txtSState").html(a("#txtBState").html());a("#txtSState :selected").text(a("#txtBState :selected").text());a("#txtSAddress").val(a("#BAddress").val());a("#txtSAddress2").val(a("#BAddress2").val());a("#txtSCity").val(a("#txtBCity").val());a("#txtSCountry").val(a("#txtBCountry").val());a("#txtSZipCode").val(a("#txtBZipCode").val());a("#txtSAddress,#txtSAddress2, #txtSCity, #txtSState, #txtSCountry, #txtSZipCode").attr("disabled","disabled").removeClass("input-validation-error");a("#BAddress,#BAddress2,#txtBState, #txtBCity, #txtBZipCode, #txtBPhone, #txtBMobile, #txtBEmail").change(h)}function j(){a("#txtSAddress,#txtSAddress2, #txtSCity, #txtSState, #txtSCountry, #txtSZipCode").removeAttr("disabled").val("");p()}function o(u,x,w){var v=a("#total");_call=a.ajax({url:"/Checkout/CheckCouponCode",type:"POST",data:{code:u,total:x,discount:w},dataType:"json",success:function(y){switch(y.ResponseCode){case 0:a("#ErrorCupon").html("").hide();a("#CuponText").text(y.Data.DiscountText).parent().show();a("#CuponPrice").text(y.Data.DiscountPrice);a("#TotalPrice").text(y.Data.TotalPrice);a("#CancelCoupon").click(d);a("#CancelCoupon").attr("visible","show");a("#CouponCode").attr("disabled","disabled");a("#txtCouponCode").attr("disabled","disabled");break;case 1:a("#ErrorCupon").html("");if(y.ValidationErrors.length>1){a("#ErrorCupon").append(y.ValidationErrors[i]+"...").show()}else{a("#ErrorCupon").append(y.ValidationErrors[i]).show()}break;default:break}}});a("#txtCouponCode").val("")}function f(){var u=a("#txtCouponCode").val().trim();var w=a("#hiddenTotal").val();var v=a("#hiddenDiscount").val();if(u!=""&&u!=null){o(u,w,v)}}function g(){var u=a("#CodeHidden").val();var w=a("#hiddenTotal").val();var v=a("#hiddenDiscount").val();if(u!=""&&u!=null){o(u,w,v)}}function d(){var u=a("#total");_call=a.ajax({url:"/Checkout/CancelCoupon",type:"POST",data:{},success:function(){c();a("#CuponText").text("").parent().hide();a("#CuponPrice").text("");a("#CouponCode").removeAttr("disabled","disabled");a("#txtCouponCode").removeAttr("disabled","disabled")}})}function c(){n();t();var u=a("#Shipping").val();_call=a.ajax({url:"/Checkout/ApplyShipping",type:"POST",data:{idShipping:u},dataType:"json",success:function(v){a("#ShippingPrice").text(v.Data.ShippingPrice);a("#TotalPrice").text(v.Data.TotalPrice)}})}function m(){t();var v=a("option:selected","#txtBCountry").val();var u=a("#state");_call=a.ajax({url:"/Checkout/LoadStatesByCountry",type:"POST",data:{isBilling:true,countryId:v},dataType:"html",success:function(w){u.html(w);if(a("#ShippingSameAsBilling").is(":checked")){q()}}})}function p(){var v=a("option:selected","#txtSCountry").val();var u=a("#Sstate");_call=a.ajax({url:"/Checkout/LoadStatesByCountry",type:"POST",data:{isBilling:false,countryId:v},dataType:"html",success:function(w){u.html(w);if(a("#ShippingSameAsBilling").is(":checked")){q()}}})}function h(){if(a("#ShippingSameAsBilling").is(":checked")){q()}else{j()}}function t(){if((a("#Shipping").val()==1||a("#Shipping").val()==2||a("#Shipping").val()==3)&&a("#txtBCountry").val()!="US"){a("#ShippingSameAsBilling").removeAttr("checked");a("#ShippingSameAsBilling").attr("disabled","disabled");j()}else{if(a("#Shipping").val()==4&&a("#txtBCountry").val()!="CA"){a("#ShippingSameAsBilling").removeAttr("checked");a("#ShippingSameAsBilling").attr("disabled","disabled");j()}else{if(a("#Shipping").val()==5&&(a("#txtBCountry").val()=="CA"||a("#txtBCountry").val()=="US")){a("#ShippingSameAsBilling").removeAttr("checked");a("#ShippingSameAsBilling").attr("disabled","disabled");j()}else{a("#ShippingSameAsBilling").removeAttr("disabled")}}}}function n(){var u=a("#Shipping").val();a("option","#txtSCountry").each(function(){a(this).removeAttr("selected")});a("option","#txtSCountry").each(function(){a(this).attr("disabled","disabled")});if(u=="1"||u=="2"||u=="3"){a("#txtSCountry").find('option[value="US"]').removeAttr("disabled").attr("selected","selected")}else{if(u=="4"){a("#txtSCountry").find('option[value="CA"]').removeAttr("disabled").attr("selected","selected")}else{if(u=="5"){a("option","#txtSCountry").each(function(){a(this).removeAttr("disabled")});a("#txtSCountry").find('option[value="CA"]').attr("disabled","disabled");a("#txtSCountry").find('option[value="US"]').attr("disabled","disabled");a("#txtSCountry").find('option[value="AF"]').attr("selected","selected")}}}p()}function l(){var u=a("#txtContactInfo").val();_call=a.ajax({url:"/Checkout/LoadBillingInfo",type:"POST",data:{contactInfoId:u},dataType:"json",success:function(v){a("#BCardHolderLastName").val(v.Data.CardGolderLastName);a("#BCardHolderFirstName").val(v.Data.CardHolderFirstName);a("#BAddress").val(v.Data.Address);a("#BAddress2").val(v.Data.Address2);a("#txtBPhone").val(v.Data.Phone);a("#txtBMobile").val(v.Data.Mobile);a("#txtBCity").val(v.Data.City);a("#txtBState").val(v.Data.State);a("#txtBCountry").val(v.Data.Country);a("#txtBZipCode").val(v.Data.ZipCode)}})}function r(){b.Load();b.View.dialog("open")}function k(){if(a("#DiscountHidden").val()!=0){g()}a("#CouponCode").click(f);a("#SecurityCode, #SecurityCodeAmerican, #CreditCardNumber, #CreditCardNumberAmerican, #txtBPhone, #txtBMobile").numeric();a("#ShippingSameAsBilling").bind("change",h);a("#txtBCountry").change(m);a("#txtSCountry").change(p);m();p();e();a("#CardType").change(e);c();a("#Shipping").change(c);a("#txtContactInfo").change(l);a(".tt").tooltip({predelay:300,effect:"fade"});a("#TermsAndConditions").click(r);b=PrimeSport.Checkout.TermsOfUse();b.View.dialog({autoOpen:false,modal:true,width:"900px",title:"",height:"700",resizable:false,position:["center",50],buttons:{Close:function(){a(this).dialog("close")}}})}return{Init:k}}(jQuery));namespace("PrimeSport.Checkout");PrimeSport.Checkout.CheckoutSellTickets=(function(a,f){var b;function c(){if(!(a("#CardType").val()=="AmericanExpress")){a("#SecurityCodeAmerican,#CreditCardNumberAmerican").attr("disabled","disabled").hide();a("#SecurityCode,#CreditCardNumber").removeAttr("disabled").val("");a("#textCardNumber").text("The 16 digits on the front of your credit card");a("#textSecurityCode").text("The last 3 digits displayed on the back of your credit card");a("#SecurityCode,#CreditCardNumber").show()}else{a("#SecurityCode,#CreditCardNumber").attr("disabled","disabled").hide();a("#SecurityCodeAmerican,#CreditCardNumberAmerican").removeAttr("disabled").val("");a("#textCardNumber").text("The 15 digits on the front of your credit card");a("#textSecurityCode").text("The last 4 digits displayed on the back of your credit card");a("#SecurityCodeAmerican,#CreditCardNumberAmerican").show()}}function e(){var h=a("option:selected","#txtBCountry").val();var g=a("#state");_call=a.ajax({url:"/Checkout/LoadStatesByCountry",type:"POST",data:{isBilling:true,countryId:h},dataType:"html",success:function(j){g.html(j)}})}function d(){a("#SecurityCode, #SecurityCodeAmerican, #CreditCardNumber, #CreditCardNumberAmerican, #txtSZipCode, #txtBZipCode, #txtBPhone, #txtBMobile").numeric();a("#txtBCountry").change(e);e();c();a("#CardType").change(c);a(".tt").tooltip({predelay:300,effect:"fade"})}return{Init:d}}(jQuery));namespace("PrimeSport.Checkout");(function(a,b){PrimeSport.Checkout.ShoppingCart=function(){a("#tickets-summary a.remove").click(function(){var e=confirm("Do you want to remove this seat?");if(e){var d=a(this).attr("data-id"),c=a(this).attr("data-event"),f=a(this).closest("tr");a.post("/Checkout/RemoveSeatFromEvent",{seatId:d,eventId:c},function(j){if(j.ResponseCode===0){var g=j.Data||{};var h=f.parent();f.remove();a("#tickets-summary-subtotal").text("$"+PrimeSport.Common.FormatCurrency(g.TotalNoShipping));a("#shopping-cart-counter").text("({0})".format(g.CartItemCount));if(h.find("tr").length===0){h.closest(".ticket").remove()}}})}});a(".QuantityList").change(function(){var d=a(this).val(),c=a(this).attr("data-seatId");_call=a.ajax({url:"/Checkout/UpdateQtyByEventSeatId",type:"POST",async:true,data:{id:c,qty:d},dataType:"json",success:function(f){if(f.ResponseCode===0){var e=f.Data||{};a("#tickets-summary-subtotal").text("$"+PrimeSport.Common.FormatCurrency(e.TotalNoShipping));a("#shopping-cart-counter").text("({0})".format(e.CartItemCount))}}})});return{}}}(jQuery));namespace("PrimeSport.Checkout");PrimeSport.Checkout.Confirmation=(function(a,c){function b(){a(".tt").tooltip({predelay:300,effect:"fade"})}return{Init:b}}(jQuery));namespace("PrimeSport.Checkout");PrimeSport.Checkout.Success=(function(a,e){function b(){var f=a("#EventIdHidden").val()}function d(){window.print()}function c(){a("#PrintButton").click(d);a(".tt").tooltip({predelay:300,effect:"fade"})}return{Init:c}}(jQuery));namespace("PrimeSport.Checkout");(function(a,b){PrimeSport.Checkout.TermsOfUse=function(){var d=a("<div class='Navigation-Terms'>"),c="/Navigation/PartialTermsOfUse/";function e(){a.ajax({url:c,data:{},success:function(f){d.html(f)},dataType:"html"})}return{View:d,Load:e}}})(jQuery);namespace("PrimeSport.Account");(function(a,b){PrimeSport.Account.SellingTermsOfUse=function(){var d=a("<div class='Navigation-Terms'>"),c="/Navigation/PartialSellingTermsOfUse/";function e(){a.ajax({url:c,data:{},success:function(f){d.html(f)},dataType:"html"})}return{View:d,Load:e}}})(jQuery);namespace("PrimeSport.Account");PrimeSport.Account.Index=(function(a,q){function g(){var r=a("#favoriteItems");_call=a.ajax({url:"/Event/FavoriteEventsByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k);a(".removeFavoriteEvent").click(m);a(".IsSubscribedEvent").click(c)}})}function h(){log("venues");var r=a("#favoriteItems");_call=a.ajax({url:"/Venue/FavoriteVenuesByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k);a(".removeFavoriteVenue").click(o);a(".IsSubscribedVenue").click(e)}})}function f(){var r=a("#favoriteItems");_call=a.ajax({url:"/Performer/FavoriteArtistsByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k);a(".removeFavoritePerformer").click(n);a(".IsSubscribedPerformer").click(d)}})}function l(){var r=a("#pastItems");_call=a.ajax({url:"/Event/PastEventsByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k);a("#addFavoriteEvent").click(b)}})}function p(){var r=a("#ticketsItems");_call=a.ajax({url:"/Event/TicketsPurchasedByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k)}})}function k(){var u=Number(a(this).attr("data-pager-type")),s=a(this).attr("data-pager-number"),t="";var r=a("#favoriteItems");switch(u){case 1:t="/Event/FavoriteEventsByAccount";break;case 2:t="/Performer/FavoriteArtistsByAccount";break;case 3:t="/Venue/FavoriteVenuesByAccount";break;case 4:t="/Event/PastEventsByAccount";r=a("#pastItems");break;case 5:t="/Event/TicketsPurchasedByAccount";r=a("#ticketsItems");break}_call=a.ajax({url:t,type:"POST",data:{page:s},dataType:"html",success:function(v){r.html(v);a("#pagerLocation",r).click(k)}})}function n(){var r=a(this).attr("favoriteId");a.ajax({url:"/Event/RemoveFavoritePerformer?favoriteId="+r,type:"POST",dataType:"json",success:function(s){f()}})}function o(){var r=a(this).attr("favoriteId");a.ajax({url:"/Event/RemoveFavoriteVenue?favoriteId="+r,type:"POST",dataType:"json",success:function(s){h()}})}function b(){var r=a(this).attr("data-favorite-eventid"),s=a(this).attr("data-favorite-userid");a.ajax({url:"/Event/AddFavoriteEvent/",type:"POST",dataType:"json",data:{accountId:s,eventId:r},success:function(t){location.reload()}})}function m(){var r=a(this).attr("favoriteId");a.ajax({url:"/Event/RemoveFavoriteEvent?favoriteId="+r,type:"POST",dataType:"json",success:function(s){g()}})}function d(){var r=a(this).attr("favoriteid");a.ajax({url:"/Event/ChangePerformerIsSubscribed?favoriteId="+r,type:"POST",dataType:"json"})}function e(){var r=a(this).attr("favoriteid");a.ajax({url:"/Event/ChangeVenueIsSubscribed?favoriteId="+r,type:"POST",dataType:"json"})}function c(){var r=a(this).attr("favoriteid");a.ajax({url:"/Event/ChangeEventIsSubscribed?favoriteId="+r,type:"POST",dataType:"json"})}function j(){var r=a("#ticketsItems");_call=a.ajax({url:"/Event/TicketsPurchasedByAccount",type:"POST",data:{page:1},dataType:"html",success:function(s){r.html(s);a("#pagerLocation",r).click(k)}});a("#AccountTabs>ul").tabs("#AccountTabs .panels>div");a("#FavoriteEvents").click(g);a("#FavoriteVenues").click(h);a("#FavoriteArtists").click(f);a("#pagerLocation").click(k);a("#pastEvents").click(l);a("#ticketsPurchased").click(p)}return{Init:j}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.SellTickets=(function(a,z){var j,d,e,h,b,c,f,g;function k(){var A=parseInt(a("#SelectQty").val());var B=parseInt(a("#SeatFrom").val());if(!isNaN(A)&&!isNaN(B)){a("#SeatTo").val(A+B-1)}else{a("#SeatTo").val("")}}function m(A,B){a("#CategoryId").val(B.item.id);a("#EventList_Seats_0__Row").removeAttr("disabled").val("");b=B.item.id;a("#EventList_Seats_0__Row").autocomplete({source:"/Event/RowSuggestions?id="+b,select:v,change:u});a("#SellTicketsError").removeClass("validation-summary-errors").addClass("validation-summary-valid");a("#SellTicketsError ul").empty()}function v(){a("#EventList_Seats_0__Row").val(a("#RowSelect :selected").text())}function u(A,B){if(!B.item){a("#EventList_Seats_0__Row").val("");a("#SellTicketsError").removeClass("validation-summary-valid").addClass("validation-summary-errors");if(a("#RowError").val()!=""){a("#SellTicketsError ul").append('<li id="RowError">Please choose your Row from the drop down menu.</li>')}}}function l(A,B){if(!B.item){a("#CategoryId").val("");a("#EventList_Seats_0__EventSeatCategory_Name").val("");a("#SellTicketsError").removeClass("validation-summary-valid").addClass("validation-summary-errors");if(a("#SectionError").val()!=""){a("#SellTicketsError ul").append('<li id="SectionError">Please choose your Section from the drop down menu.</li>')}}}function w(){d.Load();d.View.dialog("open")}function x(){e.Load();e.View.dialog("open")}function y(){h.Load();h.View.dialog("open")}function n(){a("#SummaryReadAll").click(function(){a(this).parent().toggleClass("long")})}function r(){a("#SummaryReadLess").click(function(){a(this).parent().toggleClass("short")})}function s(){f=a("#General_Admission").is(":checked");if(a("#hasManifest").val()==1){a("#EventList_Seats_0__Row").attr("disabled","disabled");a("#SeatFrom").attr("disabled","disabled");var A=a("#EventList_Event_VenueId").val();a("#EventList_Seats_0__EventSeatCategory_Name").autocomplete({source:"/Event/Suggestions?id="+A+"&isGA="+f,select:m,change:l});a("#CategoryId").val("")}else{a("#CategoryId").val("1")}a("#EventList_Seats_0__Row").val("");a("#EventList_Seats_0__EventSeatCategory_Name").val("");a("#SeatFrom").val("0");a("#SelectQty").val("1");a("#SeatTo").val("")}function t(){f=a("#General_Admission").is(":checked");if(a("#hasManifest").val()==1){a("#EventList_Seats_0__Row").attr("disabled","disabled");a("#SeatFrom").attr("disabled","disabled");var A=a("#EventList_Event_VenueId").val();a("#EventList_Seats_0__EventSeatCategory_Name").autocomplete({source:"/Event/Suggestions?id="+A+"&isGA="+f,select:m,change:l});a("#CategoryId").val("")}else{a("#CategoryId").val("1")}a("#EventList_Seats_0__Row").val("");a("#EventList_Seats_0__EventSeatCategory_Name").val("");a("#SeatFrom").val("0");a("#SelectQty").val("1");a("#SeatTo").val("")}function p(){a("#RowSelect").html("").attr("disabled","disabled");a("#EventList_Seats_0__Row, #CategoryId, #EventList_Seats_0__EventSeatCategory_Name").val("");a("#SeatFrom").attr("disabled","disabled");var A={term:"",id:a("#EventList_Event_VenueId").val(),isGA:a("#General_Admission").is(":checked")};a.ajax({url:"/Event/Suggestions",data:JSON.stringify(A),type:"POST",dataType:"json",contentType:"application/json",success:function(C){var B=a("#SectionSelect");B.html("");a.each(C,function(){B.append(a("<option />").val(this.id).text(this.label))})}})}function o(){if(a("#SectionSelect").val()!=0){var B=a("#SectionSelect").val();a("#EventList_Seats_0__EventSeatCategory_Name").val(a("#SectionSelect :selected").text());a("#CategoryId").val(B);a("#RowSelect, #SeatFrom").removeAttr("disabled");var A={term:"",id:B};a.ajax({url:"/Event/RowSuggestions",data:JSON.stringify(A),type:"POST",dataType:"json",contentType:"application/json",success:function(D){var C=a("#RowSelect");C.html("");a.each(D,function(){C.append(a("<option />").val(this.id).text(this.label))})}})}else{p()}}function q(){var D="'+"+a("#daysToFinalDate").val();+"'";a("#SellPrice, #SeatFrom").numeric();if(a("#SeatTo").val()==""){a("#SeatTo").attr("readOnly",true)}a("#SelectQty, #SeatFrom").change(k);a(".datepicker").datepicker({maxDate:D,minDate:0});f=a("#General_Admission").is(":checked");a("#CategoryId").val("1");g="The Row field is required";if(a("#hasManifest").val()==1){p();a("#Assigned_Seats").click(p);a("#General_Admission").click(p);a("#SectionSelect").change(o);a("#RowSelect").change(v);if(a("#SeatRow").val()==""){a("#SeatRow").attr("disabled","disabled")}else{a("#SeatRow").autocomplete({source:"/Event/RowSuggestions?id="+a("#CategoryId").val(),select:v,change:u})}if(a("#SeatRow").val()==""){a("#SeatFrom").attr("disabled","disabled")}g="The Row you entered does not match the official manifest, please select the correct Row from the dropdown menu."}else{a("#CategoryId").val("1");g="The Row field is required"}a("#TermsAndConditions").click(w);a("#els-event").click(x);a("#seller-guide").click(y);a("#TicketSale_HandDate").hide();currentDate=new Date();var A=currentDate.getDate();var B=currentDate.getMonth();B++;var C=currentDate.getFullYear();c=B+"/"+A+"/"+C;a("#handDate_now").click(function(){a("#TicketSale_HandDate").hide();a("#TicketSale_HandDate").val(c)});a("#handDate_date").click(function(){a("#TicketSale_HandDate").val("");a("#TicketSale_HandDate").show()});a(".tt").tooltip({predelay:300,effect:"fade"});a("#TicketSale_HandDate").tooltip({predelay:300,effect:"fade",position:"bottom left",events:{input:"blur mouseleave, click"},onShow:function(){this.getTip().delay(10000).fadeOut(400)}});n();r();a("form").submit(function(){if(a("#CategoryId").val()==""){a("#EventList_Seats_0__EventSeatCategory_Name").val("");return false}return true});d=PrimeSport.Account.SellingTermsOfUse();d.View.dialog({autoOpen:false,modal:true,width:"600px",title:"",height:"400",resizable:false,position:["center",50],buttons:{Close:function(){a(this).dialog("close")}}});e=PrimeSport.Account.ELSPage(a("#els-event").attr("data-info"));e.View.dialog({autoOpen:false,modal:true,width:"800px",title:"",height:"500",resizable:false,position:["center",50],buttons:{Close:function(){a(this).dialog("close")}}});h=PrimeSport.Account.SellerGuide(a("#seller-guide").attr("data-info"));h.View.dialog({autoOpen:false,modal:true,width:"800px",title:"",height:"500",resizable:false,position:["center",50],buttons:{Close:function(){a(this).dialog("close")}}});a("#EventList_Seats_0__Row").rules("add",{required:"#Assigned_Seats:checked",messages:{required:g}});a("#SellPrice").rules("add",{min:a("#EventPriceFloor").val(),messages:{min:"Tickets must be listed at face value or higher."}});if(a("#SelectQty").val()>1){k()}}return{Init:q}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.Register=(function(a,d){function b(){a(".full-content form").submit()}function c(){a("#CreateAccount").click(b);a("#SubscribeNewsletter").attr("checked","checked")}return{Init:c}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.Update=(function(a,c){function d(){a("#BirthDate").val(a("#birthdatetxt").val());a(".full-content form").submit()}function b(){a("#ConfirmEmail").val(a("#Email").val());a("#Email").change(function(){a("#ConfirmEmail").val("")});a(".datepicker",".full-content").datepicker().mask("99/99/9999");a("#UpdateAccount").click(d)}return{Init:b}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.UpdateTicket=(function(a,c){function d(){var g=a("#ticketId").val(),f=a("#Quantity").val(),e=a("#Price").val();_call=a.ajax({url:"/Account/UpdateTicketPrice",type:"POST",data:{id:g,price:e,quantity:f},dataType:"json",success:function(h){if(h==1){window.location="TicketsInfo"}else{if(h==3){a("#ErrorUpdateMessage").html("<li>Tickets must be listed at face value or higher.</li>");a("#ErrorUpdate").show()}else{if(h==2){a("#ErrorUpdateMessage").html("<li>There was an error saving the ticket.</li>");a("#ErrorUpdate").show()}}}}})}function b(){a("#UpdateTicket").click(d)}return{Init:b}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.ForgotPassword=(function(a,d){function b(){var e=a("#user_mail").val();a.ajax({url:"/Account/SendForgotPasswordEmail/",type:"POST",dataType:"json",data:{email:e},success:function(f){window.location="/Account"}});log("add fav")}function c(){a("#ForgotPassword").click(b)}return{Init:c}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.ChangePassword=(function(a,d){function b(){a(".full-content form").submit()}function c(){a("#ChangePassword").click(b)}return{Init:c}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.NewPassword=(function(a,d){function c(){var e=a("#NewPassword").val(),f=a("#Token").val();a.ajax({url:"/Account/EmailNewPassword/",type:"POST",dataType:"json",data:{token:f,newPassword:e},success:function(g){if(g.success){window.location="/Home"}}})}function b(){a("#NewPasswordBtn").click(c)}return{Init:b}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.LogOn=(function(a,d){function c(){a(".full-content form").submit()}function b(){a("#LoginButton").click(c)}return{Init:b}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.ContactInfo=(function(a,e){function f(){a(".full-content form").submit()}function d(){var h=a("option:selected","#txtCountry").val();var g=a("#state");_call=a.ajax({url:"/Checkout/LoadStatesByCountry",type:"POST",data:{isBilling:false,countryId:h},dataType:"html",success:function(j){g.html(a(j).html())}})}function c(){var g=a("#Nickname").val();_call=a.ajax({url:"/Checkout/LoadBillingInfo",type:"POST",data:{contactInfoId:g},dataType:"json",success:function(h){a("#CardGolderLastName").val(h.Data.CardGolderLastName);a("#CardHolderFirstName").val(h.Data.CardHolderFirstName);a("#Address").val(h.Data.Address);a("#Address2").val(h.Data.Address2);a("#Phone").val(h.Data.Phone);a("#Mobile").val(h.Data.Mobile);a("#ContactoInfoCity").val(h.Data.City);a("#txtSState").val(h.Data.State);a("#txtCountry").val(h.Data.Country);a("#ContactInfoZipCode").val(h.Data.ZipCode);a("#NicknameName").val(h.Data.Nickname);a("#IdContactInfo").val(h.Data.IdContactInfo)}})}function b(){a("#UpdateAccount").click(f);a("#txtCountry").change(d);a("#Nickname").change(c);d()}return{Init:b}}(jQuery));namespace("PrimeSport.Account");PrimeSport.Account.TicketsInfo=(function(a,h){function g(){var j=a("#onSellTicketsItems");_call=a.ajax({url:"/Event/TicketsOnSaleByAccount",type:"POST",data:{page:1},dataType:"html",success:function(k){j.html(k);a("#pagerLocation",j).click(d);a(".remove").click(e)}})}function f(){var j=a("#soldTicketsItems");_call=a.ajax({url:"/Event/SoldTicketsByAccount",type:"POST",data:{page:1},dataType:"html",success:function(k){j.html(k);a("#pagerLocation",j).click(d)}})}function b(){var j=a("#expiredTicketsItems");_call=a.ajax({url:"/Event/ExpiredTicketsByAccount",type:"POST",data:{page:1},dataType:"html",success:function(k){j.html(k);a("#pagerLocation",j).click(d)}})}function d(){var m=Number(a(this).attr("data-pager-type")),k=a(this).attr("data-pager-number"),l="";var j;switch(m){case 1:l="/Event/TicketsOnSaleByAccount";j=a("#onSellTicketsItems");break;case 2:l="/Event/SoldTicketsByAccount";j=a("#soldTicketsItems");break;case 3:l="/Event/ExpiredTicketsByAccount";j=a("#expiredTicketsItems");break}_call=a.ajax({url:l,type:"POST",data:{page:k},dataType:"html",success:function(n){j.html(n);a("#pagerLocation",j).click(d)}})}function e(){var j=a(this).attr("data-ticketid");if(confirm("Are you sure you want to delete this ticket?")){a.ajax({url:"/Account/DeleteTicket/"+j,dataType:"json",success:function(){g()}})}}function c(){var j=a("#onSellTicketsItems");_call=a.ajax({url:"/Event/TicketsOnSaleByAccount",type:"POST",data:{page:1},dataType:"html",success:function(k){j.html(k);a("#pagerLocation",j).click(d);a(".remove").click(e)}});a("#AccountTabs>ul").tabs("#AccountTabs .panels>div");a("#pagerLocation").click(d);a("#soldTickets").click(f);a("#onSellTickets").click(g);a("#expiredTickets").click(b)}return{Init:c}}(jQuery));namespace("PrimeSport.Account");(function(a,b){PrimeSport.Account.ELSPage=function(e){var d=a("<div class='Navigation-Terms'>"),c="/About/PartialView/";function f(){a.ajax({url:c,data:{code:e},success:function(g){d.html(g)},dataType:"html"})}return{View:d,Load:f}}})(jQuery);namespace("PrimeSport.Account");(function(a,b){PrimeSport.Account.SellerGuide=function(e){var d=a("<div class='Navigation-Terms'>"),c="/About/PartialView/";function f(){a.ajax({url:c,data:{code:e},success:function(g){d.html(g)},dataType:"html"})}return{View:d,Load:f}}})(jQuery);namespace("PrimeSport.Partner");PrimeSport.Partner.Index=(function(a,e){var b;function c(){var f=a("#Email").val();_call=a.ajax({url:"/CustomerService/SavePartnerSubscriptor/",type:"POST",data:{email:f,partnerId:b},dataType:"json",success:function(g){switch(g.ResponseCode){case 0:a(".message").text(g.Data);a("#Email").val("");break;case 1:for(i=0;i<g.ValidationErrors.length;i++){a(".message").text(g.ValidationErrors[i])}a("#Email").val("");break;case 2:for(i=0;i<g.ValidationErrors.length;i++){a(".message").text(g.ValidationErrors[i])}a("#Email").val("");break}}})}function d(){b=a("#PartnerId").val();a("#CreateAccount").click(c)}return{Init:d}}(jQuery));namespace("PrimeSport.Api");PrimeSport.Api.Index=(function(a,d){function b(){var f=a("#id").val(),e=a("#qty").val();a.ajax({url:"/QryApi/GetPrimeSportTickets/",type:"POST",data:{providerTicketId:f,quantitySelected:e},dataType:"json",success:function(g){alert(g.ProviderTicketID+" - "+g.QuantityAvailable+" - "+g.Splits+" - "+g.PricePerTicket+" - "+g.HandlingPerTicket+" - "+g.TicketType)}})}function c(){a("#testbtn").click(b)}return{Init:c}}(jQuery));namespace("PrimeSport.SplashPage");PrimeSport.SplashPage.Index=(function(a,c){function b(){a(".about article ul").each(function(e){var d=1;a("li").each(function(f){if(d==1&&a(this).attr("class")!="title"){a(this).attr("class","even");d=0}else{d=1}})})}return{Init:b}}(jQuery));
