(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false;}progress+=seperator;});words[wordAt]=v;v=words.join(options.multipleSeparator);}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value)return[""];if(!options.multiple)return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null;});}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);if(words.length==1)return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""));}return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");$input.trigger("result",null);}}});}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select();}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}}else if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end;}});}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}};})(jQuery);var tempX = 0, tempY = 0, actualHeight, mapHeight, lateHeight, accommodationHeight, recordType = "Venue"; function HideMostPopularSearch() { $("#divMostPopularLinks").fadeOut("slow") } function ShowMostPopularSearch() { $("#divMostPopularLinks").fadeIn("slow"); $("#divMostPopularLinks").css({ position: "absolute", top: tempY - 122, left: 420 }) } function GetLateAvailabilityHeight() { return $(".lateAvailability").is(":hidden") ? 0 : lateHeight }
function GetAccommodationControlHeight() { return $(".accommodations").is(":hidden") ? 0 : accommodationHeight } function GetMapHeight() { return $(".mapsearch").is(":hidden") ? 0 : mapHeight + 90 } function SearchBoxOnFocus(a, e) { var q = $(e).val().length; if (a) $(e).removeClass("autosearch"); else q === 0 && $(e).addClass("autosearch") }
function GetTabName() { return $("#" + IDMainContent() + "ucSearchVenues_rdobtnVenues").is(":checked") ? "Venue" : $("#" + IDMainContent() + "ucSearchVenues_rdobtnAccommodation").is(":checked") ? "Accommodation" : "LateAvailability" }
function SetSearchCriteria() { var a = GetTabName(); $("#" + IDMainContent() + "ucSearchVenues_hiddenDisplayTab").val(a); if (a == "LateAvailability") { a = $("#" + IDMainContent() + "ucSearchVenues_ddlMonths"); $("#" + IDMainContent() + "ucSearchVenues_hiddenYear").val(a.find(":selected").val()); $("#" + IDMainContent() + "ucSearchVenues_hiddenMonthName").val(a.find(":selected").text()) } $(".autosearch").val(); $(".autosearch-button").click() } function findValue(a) { if (a === null) return alert("No match!"); return true }
function formatItem(a) { return '<a href="' + a[0] + '">' + a[1] + "</a>" } function SearchByText() { SetSearchCriteria("0"); return false }
function InitiateAutocompleteSearch() {
    $("#" + IDMainContent() + "ucSearchVenues_txtSuggest").removeData("events"); var a = $("#" + IDMainContent() + "ucSearchVenues_hiddenTabEnum").val(), e = $("#" + IDMainContent() + "ucSearchVenues_hiddenMonthName").val(), q = $("#" + IDMainContent() + "ucSearchVenues_hiddenYear").val(); if (a === null) a = ""; $(".autosearch").autocomplete("/handlers/search.aspx", { minChars: 1, mustMatch: false, delay: 10, cacheLength: 100, matchContains: true, max: 20, onFindValue: findValue, formatItem: formatItem, autoFill: false,
        extraParams: { t: a, m: e, y: q}
    }).result(function (c, h) { $(".autosearch").val(h[2]); location.href = h[0] }); $(".autosearch").bind("keypress", function (c) { if (c.which && c.which == 13 || c.keyCode && c.keyCode == 13) { SearchByText(); return false } })
}
function ToggleLateAvailabilitySection() { if ($("#" + IDMainContent() + "ucSearchVenues_rdobtnLateAvailability").is(":checked")) { $(".lateAvailability").slideDown("fast"); $(".accommodations").slideUp("fast") } else { $("#" + IDMainContent() + "ucSearchVenues_rdobtnAccommodation").is(":checked") ? $(".accommodations").slideDown("fast") : $(".accommodations").slideUp("fast"); $(".lateAvailability").slideUp("fast") } InitiateAutocompleteSearch() }
function OnChangeLateAvailabilityMonth() { var a = $("#" + IDMainContent() + "ucSearchVenues_ddlMonths"); $("#" + IDMainContent() + "ucSearchVenues_hiddenYear").val(a.find(":selected").val()); $("#" + IDMainContent() + "ucSearchVenues_hiddenMonthName").val(a.find(":selected").text()); InitiateAutocompleteSearch() } function getMouseXY(a) { tempX = a.pageX; tempY = a.pageY; return true }
function GetTabEnum() { var a; if ($("#" + IDMainContent() + "ucSearchVenues_rdobtnVenues").is(":checked")) a = "1"; else if ($("#" + IDMainContent() + "ucSearchVenues_rdobtnAccommodation").is(":checked")) a = "2"; else if ($("#" + IDMainContent() + "ucSearchVenues_rdobtnLateAvailability").is(":checked")) a = "3"; return a } function lookupAjax() { $("#" + IDMainContent() + "ucSearchVenues_suggest1")[0].Autocompleter.findValue(); return false }
$(document).ready(function () {
    $("#ancMostPopularSearch").bind("mousemove", function (a) { getMouseXY(a) }); mapHeight = $(".mapsearch").height(); $("#popupClose").click(function () { HideMostPopularSearch() }); $("#ancMostPopularSearch").bind("click", function () { ShowMostPopularSearch(); return false }); $("#" + IDMainContent() + "ucSearchVenues_txtVenueName").autocomplete("/handlers/SearchVenue.aspx", { minChars: 1, mustMatch: false, delay: 10, cacheLength: 100, matchContains: true, max: 20, onFindValue: findValue, formatItem: formatItem,
        autoFill: false
    }).result(function (a, e) { $("#" + IDMainContent() + "ucSearchVenues_txtVenueName").val(e[1]); location.href = e[0] }); $("div.search-for-right").click(function () { ToggleLateAvailabilitySection() }); actualHeight = $("#rightHandNavDiv").height(); lateHeight = $(".lateAvailability").height(); accommodationHeight = $(".accommodations").height(); ToggleLateAvailabilitySection()
});
(function (a) {
    var e = {}, q = {}; a.manageAjax = function () { return { create: function (c, h) { e[c] = new a.manageAjax._manager(c, h); return e[c] } } } (); a.manageAjax._manager = function (c, h) { this.requests = {}; this.inProgress = 0; this.qName = this.name = c; this.opts = a.extend({}, a.ajaxSettings, a.manageAjax.defaults, h); if (h.queue && h.queue !== true && typeof h.queue === "string" && h.queue !== "clear") this.qName = h.queue }; a.manageAjax._manager.prototype = { add: function (c) {
        c = a.extend({}, this.opts, c); var h = c.complete, k = c.success, m = c.beforeSend,
d = c.error, j = typeof c.data == "string" ? c.data : a.param(c.data || {}), o = c.type + c.url + j, p = this, g = this._createAjax(o, c, k, h); if (!(this.requests[o] && c.preventDoubbleRequests)) {
            g.xhrID = o; c.xhrID = o; c.beforeSend = function (f, b) { var i = m.call(this, f, b); i === false && p._removeXHR(o); return i }; c.complete = function (f, b) { p._complete.call(p, this, h, f, b, o, c) }; c.success = function (f, b, i) { p._success.call(p, this, k, f, b, i, c) }; c.error = function (f, b, i) {
                var l = "", n = ""; if (b !== "timeout" && f) { l = f.status; n = f.responseXML || f.responseText } d ? d.call(this,
f, b, i, c) : setTimeout(function () { throw b + "| status: " + l + " | URL: " + c.url + " | data: " + j + " | thrown: " + i + " | response: " + n; }, 0); f = null
            }; c.queue === "clear" && a(document).clearQueue(this.qName); if (c.queue) { a.queue(document, this.qName, g); this.inProgress < c.maxRequests && a.dequeue(document, this.qName); return o } return g()
        } 
    }, _createAjax: function (c, h, k, m) {
        var d = this; return function () {
            if (h.beforeCreate.call(h.context || d, c, h) !== false) {
                d.inProgress++; if (h.cacheResponse && q[c]) {
                    d.requests[c] = {}; setTimeout(function () {
                        d._complete.call(d,
h.context || h, m, {}, "success", c, h); d._success.call(d, h.context || h, k, q[c], "success", {}, h)
                    }, 0)
                } else d.requests[c] = a.ajax(h); d.inProgress === 1 && a.event.trigger(d.name + "AjaxStart"); return c
            } 
        } 
    }, _removeXHR: function (c) { this.opts.queue && a.dequeue(document, this.qName); this.inProgress--; this.requests[c] = null; delete this.requests[c] }, _isAbort: function (c, h) { return !!(h.abortIsNoSuccess && (!c || c.readyState === 0 || this.lastAbort === h.xhrID)) }, _complete: function (c, h, k, m, d, j) {
        if (this._isAbort(k, j)) {
            m = "abort"; j.abort.call(c,
k, m, j)
        } h.call(c, k, m, j); a.event.trigger(this.name + "AjaxComplete", [k, m, j]); j.domCompleteTrigger && a(j.domCompleteTrigger).trigger(this.name + "DOMComplete", [k, m, j]).trigger("DOMComplete", [k, m, j]); this._removeXHR(d); this.inProgress || a.event.trigger(this.name + "AjaxStop")
    }, _success: function (c, h, k, m, d, j) {
        var o = this; if (!this._isAbort(d, j)) {
            j.abortOld && a.each(this.requests, function (p) { if (p === j.xhrID) return false; o.abort(p) }); if (j.cacheResponse && !q[j.xhrID]) q[j.xhrID] = k; h.call(c, k, m, d, j); a.event.trigger(this.name +
"AjaxSuccess", [d, j, k]); j.domSuccessTrigger && a(j.domSuccessTrigger).trigger(this.name + "DOMSuccess", [k, j]).trigger("DOMSuccess", [k, j])
        } d = null
    }, getData: function (c) { if (c) { var h = this.requests[c]; if (!h && this.opts.queue) h = a.grep(a(document).queue(this.qName), function (k) { return k.xhrID === c })[0]; return h } return { requests: this.requests, queue: this.opts.queue ? a(document).queue(this.qName) : [], inProgress: this.inProgress} }, abort: function (c) {
        var h; if (c) {
            if ((h = this.getData(c)) && h.abort) {
                this.lastAbort = c; h.abort();
                this.lastAbort = false
            } else a(document).queue(this.qName, a.grep(a(document).queue(this.qName), function (d) { return d !== h })); h = null
        } else { var k = this, m = []; a.each(this.requests, function (d) { m.push(d) }); a.each(m, function (d, j) { k.abort(j) }) } 
    }, clear: function (c) { a(document).clearQueue(this.qName); c && this.abort() } 
    }; a.manageAjax._manager.prototype.getXHR = a.manageAjax._manager.prototype.getData; a.manageAjax.defaults = { complete: a.noop, success: a.noop, beforeSend: a.noop, beforeCreate: a.noop, abort: a.noop, abortIsNoSuccess: true,
        maxRequests: 1, cacheResponse: false, domCompleteTrigger: false, domSuccessTrigger: false, preventDoubbleRequests: true, queue: false
    }; a.each(a.manageAjax._manager.prototype, function (c, h) { c.indexOf("_") === 0 || !a.isFunction(h) || (a.manageAjax[c] = function (k, m) { if (!e[k]) if (c === "add") a.manageAjax.create(k, m); else return; var d = Array.prototype.slice.call(arguments, 1); e[k][c].apply(e[k], d) }) })
})(jQuery);
var asmxCommon = "/API/Venues/JSWSCommon.asmx/", $HitchedAjaxOptions = { type: "POST", contentType: "application/json; charset=utf-8", dataType: "text",dataFilter: function (data, type) {return $.parseJSON(data);}, error: function (a) { alert("Error in server:" + a.status + " " + a.statusText) },cache:false }; function ValidateTownField() { if ($("#" + IDMainContent() + "ucBrowseVenues_ddlCities").find(":selected").val() == "0") { alert("Please select town from the drop down list..."); return false } else return true }
function PopulateCountriesCallBack(a) { $("#" + IDMainContent() + "ucBrowseVenues_ddlCounty").html("<option value=''>Please Select...</option>" + a.d); $("#" + IDMainContent() + "ucBrowseVenues_ddlCounty").find(":selected").val(0) } function PopulateCounties() { var a = $HitchedAjaxOptions; a.url = asmxCommon + "GetCounties"; a.data = "{CountryName:'" + $("#" + IDMainContent() + "ucBrowseVenues_ddlCountry").find(":selected").text() + "'}"; a.success = PopulateCountriesCallBack; $.ajax(a) } var prev = 1;
function DisplayData(a) { $("#td_" + prev).attr("class", "tab-grey"); $("#td_" + a).attr("class", "tab-blue"); $("#div" + prev).attr("class", "hideDiv"); $("#div" + a).attr("class", "showDiv"); prev = a }
$(document).ready(function () {
    $("#" + IDMainContent() + "ucSearchVenues_ddlMonths").change(function () { OnChangeLateAvailabilityMonth() }); var a = $("#optionId").val(); DisplayData(a); $("div .checklistNav").find("div").click(function () { var e = this.id; e = e.split("_"); DisplayData(e[1]) }); $("#" + IDMainContent() + "ucBrowseVenues_btnCitySearch").click(function () { return ValidateTownField() }); $(".mapsearch-link").click(function () {
        $(".mapsearch").is(":hidden") ? $(".mapsearch").slideDown("normal") : $(".mapsearch").slideUp("fast");
        return false
    }); a = $("#" + IDMainContent() + "ucBrowseVenues_ddlCountry"); a.change(function () { PopulateCounties() }); a = a.val(); a !== 0 && a !== "" && a !== void 0 && PopulateCounties(); $("#MapDiv a").tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", top: -55, left: -20 })
});
(function (a) {
    var e, q, c, h, k, m, d, j, o, p; e = document.namespaces; if ((has_canvas = (has_canvas = document.createElement("canvas")) && has_canvas.getContext) || e) {
        if (has_canvas) {
            d = function (g, f) { if (f <= 1) { g.style.opacity = f; window.setTimeout(d, 10, g, f + 0.1, 10) } }; j = function (g) { return Math.max(0, Math.min(parseInt(g, 16), 255)) }; o = function (g, f) { return "rgba(" + j(g.substr(0, 2)) + "," + j(g.substr(2, 2)) + "," + j(g.substr(4, 2)) + "," + f + ")" }; q = function (g) {
                g = a('<canvas style="width:' + g.width + "px;height:" + g.height + 'px;"></canvas>').get(0);
                g.getContext("2d").clearRect(0, 0, g.width, g.height); return g
            }; c = function (g, f, b, i) { var l = g.getContext("2d"); l.beginPath(); if (f == "rect") l.rect(b[0], b[1], b[2] - b[0], b[3] - b[1]); else if (f == "poly") { l.moveTo(b[0], b[1]); for (f = 2; f < b.length; f += 2) l.lineTo(b[f], b[f + 1]) } else f == "circ" && l.arc(b[0], b[1], b[2], 0, Math.PI * 2, false); l.closePath(); if (i.fill) { l.fillStyle = o(i.fillColor, i.fillOpacity); l.fill() } if (i.stroke) { l.strokeStyle = o(i.strokeColor, i.strokeOpacity); l.lineWidth = i.strokeWidth; l.stroke() } i.fade && d(g, 0, 0) };
            h = function (g) { g.getContext("2d").clearRect(0, 0, g.width, g.height) } 
        } else {
            if (!document.documentMode || document.documentMode < 8) { document.createStyleSheet().addRule("v\\:*", "behavior: url(#default#VML); antialias: true;"); document.namespaces.add("v", "urn:schemas-microsoft-com:vml") } else {
                e = document.createStyleSheet(); e.addRule("v\\:shape", "behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:group", "behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:polyline",
"behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:stroke", "behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:fill", "behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:rect", "behavior:url(#default#VML); display:inline-block; antialias:true"); e.addRule("v\\:oval", "behavior:url(#default#VML); display:inline-block; antialias:true"); document.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML")
            } q =
function (g) { return a('<var style="zoom:1;overflow:hidden;display:block;width:' + g.width + "px;height:" + g.height + 'px;"></var>').get(0) }; c = function (g, f, b, i) {
    var l, n, r; l = '<v:fill color="#' + i.fillColor + '" opacity="' + (i.fill ? i.fillOpacity : 0) + '" />'; n = i.stroke ? 'strokeweight="' + i.strokeWidth + '" stroked="t" strokecolor="#' + i.strokeColor + '"' : 'stroked="f"'; i = '<v:stroke opacity="' + i.strokeOpacity + '"/>'; if (f == "rect") r = a('<v:rect filled="t" ' + n + ' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:' +
b[0] + "px;top:" + b[1] + "px;width:" + (b[2] - b[0]) + "px;height:" + (b[3] - b[1]) + 'px;"></v:rect>'); else if (f == "poly") r = a('<v:shape filled="t" ' + n + ' coordorigin="0,0" coordsize="' + g.width + "," + g.height + '" path="m ' + b[0] + "," + b[1] + " l " + b.join(",") + ' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:' + g.width + "px;height:" + g.height + 'px;"></v:shape>'); else if (f == "circ") r = a('<v:oval filled="t" ' + n + ' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:' + (b[0] -
b[2]) + "px;top:" + (b[1] - b[2]) + "px;width:" + b[2] * 2 + "px;height:" + b[2] * 2 + 'px;"></v:oval>'); r.get(0).innerHTML = l + i; a(g).append(r)
}; h = function (g) { a(g).empty() } 
        } k = function (g) { var f, b = g.getAttribute("coords").split(","); for (f = 0; f < b.length; f++) b[f] = parseFloat(b[f]); return [g.getAttribute("shape").toLowerCase().substr(0, 4), b] }; p = function (g) { if (!g.complete) return false; if (typeof g.naturalWidth != "undefined" && g.naturalWidth == 0) return false; return true }; m = { position: "absolute", left: 0, top: 0, padding: 0, border: 0 }; a.fn.maphilight =
function (g) {
    g = a.extend({}, a.fn.maphilight.defaults, g); return this.each(function () {
        var f, b, i, l, n, r; f = a(this); if (!p(this)) return window.setTimeout(function () { f.maphilight(g) }, 200); i = a.metadata ? a.extend({}, g, f.metadata()) : g; l = a('map[name="' + f.attr("usemap").substr(1) + '"]'); if (f.is("img") && f.attr("usemap") && l.size() > 0 && !f.hasClass("maphilighted")) {
            b = a("<div>").css({ display: "block", background: "url(" + this.src + ") no-repeat", position: "relative", padding: "0px", width: this.width, height: this.height }); f.before(b).css("opacity",
0).css(m).remove(); a.browser.msie && f.css("filter", "Alpha(opacity=50)"); b.append(f); n = q(this); a(n).css(m); n.height = this.height; n.width = this.width; b = function () { var s, t; t = a.metadata ? a.extend({}, i, a(this).metadata()) : i; if (!t.alwaysOn) { s = k(this); c(n, s[0], s[1], t) } }; if (i.alwaysOn) a(l).find("area[coords]").each(b); else {
                a.metadata && a(l).find("area[coords]").each(function () {
                    var s, t; t = a.metadata ? a.extend({}, i, a(this).metadata()) : i; if (t.alwaysOn) {
                        if (!r) {
                            r = q(f.get()); a(r).css(m); r.width = f.width() + "px"; r.height =
f.height() + "px"; f.before(r)
                        } s = k(this); c(r, s[0], s[1], t)
                    } 
                }); a(l).find("area[coords]").mouseover(b).mouseout(function () { h(n) })
            } f.before(n); f.addClass("maphilighted")
        } 
    })
}; a.fn.maphilight.defaults = { fill: true, fillColor: "597830", fillOpacity: 0.8, stroke: false, strokeColor: "ffffff", strokeOpacity: 1, strokeWidth: 1, fade: false, alwaysOn: false}
    } else a.fn.maphilight = function () { return this } 
})(jQuery);
(function (a) {
    function e(b) { return a.data(b, "tooltip") } function q(b) { if (e(this).delay) p = setTimeout(h, e(this).delay); else h(); f = !!e(this).track; a(document.body).bind("mousemove", k); k(b) } function c() {
        if (!(a.tooltip.blocked || this == j || !this.tooltipText && !e(this).bodyHandler)) {
            j = this; o = this.tooltipText; if (e(this).bodyHandler) { d.title.hide(); var b = e(this).bodyHandler.call(this); b.nodeType || b.jquery ? d.body.empty().append(b) : d.body.html(b); d.body.show() } else if (e(this).showBody) {
                b = o.split(e(this).showBody);
                d.title.html(b.shift()).show(); d.body.empty(); for (var i = 0, l; l = b[i]; i++) { i > 0 && d.body.append("<br/>"); d.body.append(l) } d.body.hideWhenEmpty()
            } else { d.title.html(o).show(); d.body.hide() } e(this).showURL && a(this).url() ? d.url.html(a(this).url().replace("http://", "")).show() : d.url.hide(); d.parent.addClass(e(this).extraClass); e(this).fixPNG && d.parent.fixPNG(); q.apply(this, arguments)
        } 
    } function h() {
        p = null; if ((!g || !a.fn.bgiframe) && e(j).fade) if (d.parent.is(":animated")) d.parent.stop().show().fadeTo(e(j).fade,
j.tOpacity); else d.parent.is(":visible") ? d.parent.fadeTo(e(j).fade, j.tOpacity) : d.parent.fadeIn(e(j).fade); else d.parent.show(); k(null)
    } function k(b) {
        if (!a.tooltip.blocked) if (!(b && b.target.tagName == "OPTION")) {
            !f && d.parent.is(":visible") && a(document.body).unbind("mousemove", k); if (j == null) a(document.body).unbind("mousemove", k); else {
                d.parent.removeClass("viewport-right").removeClass("viewport-bottom"); var i = d.parent[0].offsetLeft, l = d.parent[0].offsetTop; if (b) {
                    i = b.pageX + e(j).left; l = b.pageY + e(j).top; b =
"auto"; if (e(j).positionLeft) { b = a(window).width() - i; i = "auto" } d.parent.css({ left: i, right: b, top: l })
                } b = { x: a(window).scrollLeft(), y: a(window).scrollTop(), cx: a(window).width(), cy: a(window).height() }; var n = d.parent[0]; if (b.x + b.cx < n.offsetLeft + n.offsetWidth) { i -= n.offsetWidth + 20 + e(j).left; d.parent.css({ left: i + "px" }).addClass("viewport-right") } if (b.y + b.cy < n.offsetTop + n.offsetHeight) { l -= n.offsetHeight + 20 + e(j).top; d.parent.css({ top: l + "px" }).addClass("viewport-bottom") } 
            } 
        } 
    } function m() {
        function b() {
            d.parent.removeClass(i.extraClass).hide().css("opacity",
"")
        } if (!a.tooltip.blocked) { p && clearTimeout(p); j = null; var i = e(this); if ((!g || !a.fn.bgiframe) && i.fade) d.parent.is(":animated") ? d.parent.stop().fadeTo(i.fade, 0, b) : d.parent.stop().fadeOut(i.fade, b); else b(); e(this).fixPNG && d.parent.unfixPNG() } 
    } var d = {}, j, o, p, g = a.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent), f = false; a.tooltip = { blocked: false, defaults: { delay: 200, fade: false, showURL: true, extraClass: "", top: 15, left: 15, id: "tooltip" }, block: function () { a.tooltip.blocked = !a.tooltip.blocked } }; a.fn.extend({ tooltip: function (b) {
        b =
a.extend({}, a.tooltip.defaults, b); if (!d.parent) { d.parent = a('<div id="' + b.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide(); a.fn.bgiframe && d.parent.bgiframe(); d.title = a("h3", d.parent); d.body = a("div.body", d.parent); d.url = a("div.url", d.parent) } return this.each(function () { a.data(this, "tooltip", b); this.tOpacity = d.parent.css("opacity"); this.tooltipText = this.title; a(this).removeAttr("title"); this.alt = "" }).bind("mouseover", c).bind("mouseout", m).click(m)
    },
        fixPNG: g ? function () { return this.each(function () { var b = a(this).css("backgroundImage"); if (b.match(/^url\(["']?(.*\.png)["']?\)$/i)) { b = RegExp.$1; a(this).css({ backgroundImage: "none", filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + b + "')" }).each(function () { var i = a(this).css("position"); i != "absolute" && i != "relative" && a(this).css("position", "relative") }) } }) } : function () { return this }, unfixPNG: g ? function () { return this.each(function () { a(this).css({ filter: "", backgroundImage: "" }) }) } :
function () { return this }, hideWhenEmpty: function () { return this.each(function () { a(this)[a(this).html() ? "show" : "hide"]() }) }, url: function () { return this.attr("href") || this.attr("src") } 
    })
})(jQuery); $(document).ready(function () { $("#wedding-navigation li").bind("mouseover", function () { $(this).addClass("over") }).bind("mouseout", function () { $(this).removeClass("over") }) }); $(document).ready(function () { $("div .toggle-list-head").click(function () { var a = this.id; a = a.split("_"); ToggleHeader(a[1]) }) });
function checkListing(a) { var e = $("*[id$='hddnFirstHeaderId']").val(); if (e !== null || e !== "undefined" || e !== "" || e !== undefined) { $("#slideeffectRegion" + e).slideDown("slow"); if (a == "Venues") { $("#lblHeaderName_" + e).attr("style", "display:none"); $("#lblHeaderName_00").attr("style", "display:none"); $("#slideeffectRegion00").attr("style", "display:none") } } }
function ToggleHeader(a) { var e = $("#hddnWebsiteName").val(); if ($("#slideeffectRegion" + a).is(":hidden")) { $("#lblHeaderName_" + a).css({ backgroundImage: "url(" + e + "/Images/down_arrow.gif)" }); $("#slideeffectRegion" + a).slideDown("slow") } else { $("#lblHeaderName_" + a).css({ backgroundImage: "url(" + e + "/Images/left_arrow.gif)" }); $("#slideeffectRegion" + a).slideUp("slow") } };//googlecse.js
$(function() {  
var q = $("#q");
var qSubmit = $("#qSubmit");
q.keypress(function (e) {  
	if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {  
            qSubmit.trigger("click");
		return false;  
	} else {
		return true;  
	}
});
    var qBlur = function () {
	if (q.val() == '') {
		q.addClass("search-watermark");
        }
};
    q.bind("focus", function () {
	q.removeClass("search-watermark");
});
    q.bind("blur", qBlur);
    qSubmit.bind("click", function (e) {
        location.href = "/search/index.aspx?q=" + q.val();
    });
    qBlur();
});
