(function(a){function o(){a.fn.ajaxSubmit.debug&&window.console&&window.console.log&&window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}a.fn.ajaxSubmit=function(b){function c(){function l(){if(!A++){r.detachEvent?r.detachEvent("onload",l):r.removeEventListener("load",l,false);var x=true;try{if(B)throw"timeout";var w,u;u=r.contentWindow?r.contentWindow.document:r.contentDocument?r.contentDocument:r.document;var y=p.dataType=="xml"||u.XMLDocument||a.isXMLDoc(u);o("isXml="+
y);if(!y&&(u.body==null||u.body.innerHTML=="")){if(--F){A=0;setTimeout(l,100);return}o("Could not access iframe DOM after 50 tries.");return}s.responseText=u.body?u.body.innerHTML:null;s.responseXML=u.XMLDocument?u.XMLDocument:u;s.getResponseHeader=function(G){return{"content-type":p.dataType}[G]};if(p.dataType=="json"||p.dataType=="script"){var C=u.getElementsByTagName("textarea")[0];if(C)s.responseText=C.value;else{var D=u.getElementsByTagName("pre")[0];if(D)s.responseText=D.innerHTML}}else if(p.dataType==
"xml"&&!s.responseXML&&s.responseText!=null)s.responseXML=m(s.responseText);w=a.httpData(s,p.dataType)}catch(H){x=false;a.handleError(p,s,"error",H)}if(x){p.success(w,"success");z&&a.event.trigger("ajaxSuccess",[s,p])}z&&a.event.trigger("ajaxComplete",[s,p]);z&&!--a.active&&a.event.trigger("ajaxStop");if(p.complete)p.complete(s,x?"success":"error");setTimeout(function(){v.remove();s.responseXML=null},100)}}function m(x,w){if(window.ActiveXObject){w=new ActiveXObject("Microsoft.XMLDOM");w.async="false";
w.loadXML(x)}else w=(new DOMParser).parseFromString(x,"text/xml");return w&&w.documentElement&&w.documentElement.tagName!="parsererror"?w:null}var n=j[0];if(a(":input[name=submit]",n).length)alert('Error: Form elements must not be named "submit".');else{var p=a.extend({},a.ajaxSettings,b),k=a.extend(true,{},a.extend(true,{},a.ajaxSettings),p),t="jqFormIO"+(new Date).getTime(),v=a('<iframe id="'+t+'" name="'+t+'" src="about:blank" />'),r=v[0];v.css({position:"absolute",top:"-1000px",left:"-1000px"});
var s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;v.attr("src","about:blank")}},z=p.global;z&&!a.active++&&a.event.trigger("ajaxStart");z&&a.event.trigger("ajaxSend",[s,p]);if(k.beforeSend&&k.beforeSend(s,k)===false)k.global&&a.active--;else if(!s.aborted){var A=0,B=0;if(k=n.clk){var E=k.name;if(E&&!k.disabled){b.extraData=b.extraData||{};b.extraData[E]=
k.value;if(k.type=="image"){b.extraData[name+".x"]=n.clk_x;b.extraData[name+".y"]=n.clk_y}}}setTimeout(function(){var x=j.attr("target"),w=j.attr("action");n.setAttribute("target",t);n.getAttribute("method")!="POST"&&n.setAttribute("method","POST");n.getAttribute("action")!=p.url&&n.setAttribute("action",p.url);b.skipEncodingOverride||j.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});p.timeout&&setTimeout(function(){B=true;l()},p.timeout);var u=[];try{if(b.extraData)for(var y in b.extraData)u.push(a('<input type="hidden" name="'+
y+'" value="'+b.extraData[y]+'" />').appendTo(n)[0]);v.appendTo("body");r.attachEvent?r.attachEvent("onload",l):r.addEventListener("load",l,false);n.submit()}finally{n.setAttribute("action",w);x?n.setAttribute("target",x):j.removeAttr("target");a(u).remove()}},10);var F=50}}}if(!this.length){o("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof b=="function")b={success:b};var e=a.trim(this.attr("action"));if(e)e=(e.match(/^([^#]+)/)||[])[1];e=e||window.location.href||
"";b=a.extend({url:e,type:this.attr("method")||"GET"},b||{});e={};this.trigger("form-pre-serialize",[this,b,e]);if(e.veto){o("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(b.beforeSerialize&&b.beforeSerialize(this,b)===false){o("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var d=this.formToArray(b.semantic);if(b.data){b.extraData=b.data;for(var f in b.data)if(b.data[f]instanceof Array)for(var g in b.data[f])d.push({name:f,value:b.data[f][g]});else d.push({name:f,
value:b.data[f]})}if(b.beforeSubmit&&b.beforeSubmit(d,this,b)===false){o("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[d,this,b,e]);if(e.veto){o("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}f=a.param(d);if(b.type.toUpperCase()=="GET"){b.url+=(b.url.indexOf("?")>=0?"&":"?")+f;b.data=null}else b.data=f;var j=this,h=[];b.resetForm&&h.push(function(){j.resetForm()});b.clearForm&&h.push(function(){j.clearForm()});if(!b.dataType&&
b.target){var q=b.success||function(){};h.push(function(l){a(b.target).html(l).each(q,arguments)})}else b.success&&h.push(b.success);b.success=function(l,m){for(var n=0,p=h.length;n<p;n++)h[n].apply(b,[l,m,j])};f=a("input:file",this).fieldValue();g=false;for(e=0;e<f.length;e++)if(f[e])g=true;if(b.iframe||g||0)b.closeKeepAlive?a.get(b.closeKeepAlive,c):c();else a.ajax(b);this.trigger("form-submit-notify",[this,b]);return this};a.fn.ajaxForm=function(b){return this.ajaxFormUnbind().bind("submit.form-plugin",
function(){a(this).ajaxSubmit(b);return false}).bind("click.form-plugin",function(c){var e=a(c.target);if(e.is(":submit,input:image")){var d=this;d.clk=c.target;if(c.target.type=="image")if(c.offsetX!=undefined){d.clk_x=c.offsetX;d.clk_y=c.offsetY}else if(typeof a.fn.offset=="function"){e=e.offset();d.clk_x=c.pageX-e.left;d.clk_y=c.pageY-e.top}else{d.clk_x=c.pageX-c.target.offsetLeft;d.clk_y=c.pageY-c.target.offsetTop}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},10)}})};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};
a.fn.formToArray=function(b){var c=[];if(this.length==0)return c;var e=this[0],d=b?e.getElementsByTagName("*"):e.elements;if(!d)return c;for(var f=0,g=d.length;f<g;f++){var j=d[f],h=j.name;if(h)if(b&&e.clk&&j.type=="image"){if(!j.disabled&&e.clk==j){c.push({name:h,value:a(j).val()});c.push({name:h+".x",value:e.clk_x},{name:h+".y",value:e.clk_y})}}else if((j=a.fieldValue(j,true))&&j.constructor==Array)for(var q=0,l=j.length;q<l;q++)c.push({name:h,value:j[q]});else j!==null&&typeof j!="undefined"&&
c.push({name:h,value:j})}if(!b&&e.clk){b=a(e.clk);d=b[0];if((h=d.name)&&!d.disabled&&d.type=="image"){c.push({name:h,value:b.val()});c.push({name:h+".x",value:e.clk_x},{name:h+".y",value:e.clk_y})}}return c};a.fn.formSerialize=function(b){return a.param(this.formToArray(b))};a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var e=this.name;if(e){var d=a.fieldValue(this,b);if(d&&d.constructor==Array)for(var f=0,g=d.length;f<g;f++)c.push({name:e,value:d[f]});else d!==null&&typeof d!="undefined"&&
c.push({name:this.name,value:d})}});return a.param(c)};a.fn.fieldValue=function(b){for(var c=[],e=0,d=this.length;e<d;e++){var f=a.fieldValue(this[e],b);f===null||typeof f=="undefined"||f.constructor==Array&&!f.length||(f.constructor==Array?a.merge(c,f):c.push(f))}return c};a.fieldValue=function(b,c){var e=b.name,d=b.type,f=b.tagName.toLowerCase();if(typeof c=="undefined")c=true;if(c&&(!e||b.disabled||d=="reset"||d=="button"||(d=="checkbox"||d=="radio")&&!b.checked||(d=="submit"||d=="image")&&b.form&&
b.form.clk!=b||f=="select"&&b.selectedIndex==-1))return null;if(f=="select"){f=b.selectedIndex;if(f<0)return null;c=[];b=b.options;e=(d=d=="select-one")?f+1:b.length;for(f=d?f:0;f<e;f++){var g=b[f];if(g.selected){var j=g.value;j||(j=g.attributes&&g.attributes.value&&!g.attributes.value.specified?g.text:g.value);if(d)return j;c.push(j)}}return c}return b.value};a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})};a.fn.clearFields=a.fn.clearInputs=function(){return this.each(function(){var b=
this.type,c=this.tagName.toLowerCase();if(b=="text"||b=="password"||c=="textarea")this.value="";else if(b=="checkbox"||b=="radio")this.checked=false;else if(c=="select")this.selectedIndex=-1})};a.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};a.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};a.fn.selected=function(b){if(b==undefined)b=true;return this.each(function(){var c=
this.type;if(c=="checkbox"||c=="radio")this.checked=b;else if(this.tagName.toLowerCase()=="option"){c=a(this).parent("select");b&&c[0]&&c[0].type=="select-one"&&c.find("option").selected(false);this.selected=b}})}})(jQuery);LociFood=window.LociFood||{};
(function(a){if(window.log==undefined)window.log={toggle:function(){},move:function(){},resize:function(){},clear:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},profile:function(){}};a.lf=a.lf||{};a.ds=a.ds||{};a.extend(a.ds,{parseUri:function(b){if(b==undefined)b=window.location.href;var c={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",
parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};b=c.parser[c.strictMode?"strict":"loose"].exec(b);for(var e={},d=14;d--;)e[c.key[d]]=b[d]||"";e[c.q.name]={};e[c.key[12]].replace(c.q.parser,
function(f,g,j){if(g)e[c.q.name][g]=j});return e},defaults:{current_url:"",use_sub_domains:false,base_url:"http://localhost:4950",site_slug:"enter your site id here"},getCookie:function(b){return(b=document.cookie.match("\\b"+b+"=([^;]*)\\b"))?b[1]:undefined}});a.lf.display_overlay=function(b){var c=a(b);c.hover(function(){var e=c.find("img");e[0].naturalWidth==undefined&&e.width()>25&&e[0].width();a(".overlay-panel").hide();a(".overlay-panel",c).show().css({"z-index":3})},function(){a(".overlay-panel",
c).hide().css({"z-index":-1})})};a.fn.lfactivities=function(b){b=b||{};a.extend({service:"activities",is_authed:false,has_overlay:false},b);return this.each(function(){var c=a(this);c.hover(function(){c.find(".action-wrapper").addClass("active").show();c.find(".larger_images").show();if(c.data("images_loaded")!=true){a(".has_bigger_image img",c).each(function(){c.find(".larger_images").append('<img src="'+a(this).attr("src2")+'" />')});c.data("images_loaded",true)}},function(){a(this).find(".action-wrapper").removeClass("active").hide();
a(this).find(".larger_images").hide()});a("a.savetoalist",c).each(function(){var e=a(this).attr("activity_id");a(this).modalbox({href:"/user//addlist/",onload:function(){a("#activity_id",a("#list-form")).val(e)}})});a("div.image-panel",c).hover(function(){},function(){});a("a.delete_activity",c).bind("confirm",function(){var e="/api/activity/"+a(this).attr("activity_id")+".json",d=a(this).closest("li");a.ajax({type:"DELETE",url:e,data:{},success:function(){log.debug("in delete");d.html("")},error:function(){d.html("")}});
return false}).confirm()})};a.fn.lfproducer=function(b){var c={service:"producer",is_authed:false,has_overlay:false};b=b||{};a.extend(c,b);return this.each(function(){a(this);log.debug("in producer items");c.has_overlay&&new a.lf.display_overlay(this,c);c.is_authed?a("a.savetoplist",a(this)).each(function(){var e=a(this).attr("object_id");log.debug("in producer savetolist "+e);a(this).modalbox({href:"/user//addlist/",onload:function(){a("#producer_id",a("#list-form")).val(e)}})}):a("a.savetoplist").click(function(){window.location=
"/account/login";return false})})};a.fn.lfproducerfood=function(b){function c(f){log.debug("in after delete ");f.html("")}function e(f,g){a.ajax({type:"DELETE",url:"/api/producerfood/"+f+".json",data:"name=value&key=value2",success:function(){d.ondelete(g)},error:function(){log.error("didnt delete")}});return false}var d={service:"producerfood",confirm:"Delete this item?",del:false,is_authed:false,has_overlay:false,ondelete:c};b=b||{};a.extend(d,b);return this.each(function(){var f=a(this);log.debug("in producerfood items");
d.has_overlay&&new a.lf.display_overlay(this,d);d.is_authed?a("a.savetopflist",a(this)).each(function(){var g=a(this).attr("producerfood_id");a(this).modalbox({href:"/user//addlist/",onload:function(){log.debug("in producerfood savetolist "+g);a("#producerfood_id",a("#list-form")).val(g)}})}):a("a.savetopflist").click(function(){window.location="/account/login";return false});d.del===true&&a("a.delete",this).confirm().bind("confirm",function(){e(a(this).attr("producerfood_id"),f);return false})})};
a.fn.lflinks=function(){return this.each(function(){a(this).click(function(){try{_gat._getTracker("UA-12556318-1")._trackEvent("outbound links",this.href);setTimeout('document.location = "'+this.href+'"',100)}catch(b){}})})};var o=false;a.fn.lfeditor=function(){if(o===false){o=true;var b="",c=null;a("body").bind("advancededitor-done",function(d,f){log.debug("in advanced editor done");log.debug("advanced_editor_field = "+b);b.val(f)});function e(){a("#saveeditor").click(function(){b[0].value=Attacklab.wmdOutputHtml;
a("#"+b[0].id+"md").val(a("#wmd-input").val());a("#mini-profile-"+b[0].id,a("#mini-profile")).html(Attacklab.wmdOutputHtml);a(".modalbox").trigger("modalbox.close",[])});Attacklab.Util.onLoadHandler();c.val()==undefined||c.val()==""||c.val()==null?a("#wmd-input").val(b.val()):a("#wmd-input").val(c.val())}a(".advancededitor").modalbox({href:"/tools/editor/",onload:function(){setTimeout(e,300)},width:"720px"}).click(function(){b=a(this).parent().next();c=a("#"+b[0].id+"md");log.debug("found editor field?");
log.debug("advanced_editor_field = "+b.val())})}};a.fn.lflist=function(b){function c(){log.debug("in after delete "+d.service);f.parent().html("")}function e(){log.debug(f);var g="/api/"+d.service+"/"+f.attr("object_id");if(d.method!=null&&d.method!="")g=g+"/"+d.method;g+=".json";log.debug(g);a.ajax({type:"DELETE",url:g,data:"",success:function(j){d.ondelete(j)}});return false}var d={service:"list",confirm:"Delete this item?",method:"entry",itemsel:null,ondelete:c};b=b||{};a.extend(d,b);var f=null;
return this.each(function(){log.debug("in lflist");d.method=="entry"?a("a.delete",this).confirm().bind("confirm",function(){f=a(this);e();return false}):a(this).confirm().bind("confirm",function(){f=a(this);e();return false})})};a.fn.lfmenu=function(){function b(){a(this).hasClass("active")||a(this).addClass("active")}return this.each(function(){a(this).hoverIntent({interval:100,sensitivity:1,over:b,timeout:500,out:function(){a(this).removeClass("active")}});a("a.amenu",this).click(function(){})})};
a.fn.mygooglemap=function(b){return this.each(function(){a(this).is(".lf-map")||new a.lf.google_map_wrapper(this,b)})};a.lf.google_map_wrapper=function(b,c){var e={map_div:"#"+b.id,title:"",map_overlays:[],only_show_nearby:false,get_nearby:false,address_sel:"#address",submit_sel:"#submit",address_pt_sel:null,load_from_pt:false,zoom:12};c=c||{};a.extend(e,c);this.element=b;var d=this;d.options=e;a.data(this.element,".lf-map",this);d.map=null;d.geocoder=null;d.geocoder=new google.maps.Geocoder;c=a(e.map_div).attr("lat");
var f=a(e.map_div).attr("long");c=new google.maps.LatLng(parseFloat(c),parseFloat(f));d.results=null;log.info("setting zoom = "+d.options.zoom);d.map=new google.maps.Map(b,{zoom:d.options.zoom,center:c,mapTypeControl:false,navigationControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL},mapTypeId:google.maps.MapTypeId.ROADMAP});e.load_from_pt==true&&d.mapGeoPt(c,e.title);for(i in d.options.map_overlays){overlay=d.options.map_overlays[i];d.addOverlayFromPt(new google.maps.LatLng(parseFloat(overlay.lat),
parseFloat(overlay.lng)),overlay.tip_body,overlay.url)}a(b).bind("add_overlay",function(g,j){d.addOverlay(this,j)});a(b).bind("map_address",function(g,j){j.result={success:false};d.mappingFoo(j,j.result)})};a.extend(a.lf.google_map_wrapper.prototype,{getPostalCode:function(b){var c=this;for(i in b){var e=b[i];if(e.types[0]=="postal_code"){a(c.element).trigger("zip_code_found",e.long_name);return e.long_name}}return null},mapGeoPt:function(b,c){var e=this;e.map.setCenter(b);new google.maps.Marker({map:e.map,
title:c,position:b,icon:"http://maps.gstatic.com/intl/en_us/mapfiles/ms/micons/blue-dot.png"})},mappingFoo:function(b,c){var e=this;c.success=false;e.geocoder&&e.geocoder.geocode({address:b.address},function(d,f){if(f==google.maps.GeocoderStatus.OK){c.postal_code=e.getPostalCode(d[0].address_components);c.address_geo_pt=d[0].geometry.location;c.formatted_address=d[0].formatted_address;a(e.options.address_pt_sel).attr("value",d[0].geometry.location);if(e.options.get_nearby)e.geocoder.geocode({latLng:d[0].geometry.location},
function(g,j){if(j==google.maps.GeocoderStatus.OK)if(g[1]){e.mapGeoPt(g[1].geometry.location);e.addOverlayFromPt(g[1].geometry.location,b.tip_body);c.nearby_geo_pt=g[1].geometry.location;c.nearby_address=g[1].formatted_address;c.success=true;a(e.options.map_div).trigger("nearby_found",g[1])}});else c.success=true}});return c},addOverlayFromPt:function(b,c,e){b=new google.maps.Marker({position:b,map:this.map,icon:"http://maps.gstatic.com/intl/en_us/mapfiles/ms/micons/blue-dot.png"});if(c){var d=a('<a id="a'+
c+'" href="'+e+'" body="'+c+'" style="display:none;"></a>');a("body").append(d);a(d).tooltip({extraClass:"miniwin thin",showURL:false});google.maps.event.addListener(b,"click",function(){window.location.href=d.attr("href")});google.maps.event.addListener(b,"mouseover",function(){d.trigger("mouseover")});google.maps.event.addListener(b,"mouseout",function(){d.trigger("mouseout")})}}});a.fn.lfgeoaddress=function(b){function c(f){e.geocoder&&e.geocoder.geocode({address:f},function(g,j){if(j==google.maps.GeocoderStatus.OK){log.debug(g[0].formatted_address);
e.options.address_formatted_sel!=null&&a(e.options.address_formatted_sel).val(g[0].formatted_address);a(e.options.address_pt_sel).attr("value",g[0].geometry.location)}});return{}}var e=this,d={address_sel:null,zip_code:null,address_formatted_sel:null,address_pt_sel:"#addre"};b=b||{};a.extend(d,b);e.options=d;e.geocoder=new google.maps.Geocoder;a(d.address_sel).blur(function(){log.debug("in address blur");c(a(this).val())})};a.fn.modalbox=function(b){b=a.extend({content:null,width:400,cssclass:"modalbox",
onload:function(){}},b);var c={ESC:27,AT:50};if(a("#modalbox").length==0){a("body").append('<div id="modalbox" class="modalbox" style="display:none;"><div class="modalbox-inner"></div></div>');a(".modalbox-inner").css({width:b.width})}return this.each(function(){function e(){if(b.content){a(".modalbox-inner").html(a(b.content).html());f();b.onload()}else if(b.href){log.debug("getting "+b.href);a.get(b.href,function(h){a(".modalbox-inner").html(h);log.debug("finished loading data");f();b.onload()})}}
function d(){a(".modalbox").fadeOut(200);a(".modalbox-overlay").remove()}function f(){a(".modalbox").before('<div class="modalbox-overlay"></div>');a(".modalbox").fadeIn(200);a(".modalbox-overlay").live("click",function(){log.debug("clicked close overlay");g.trigger("modalbox.close",[]);d()});a(".close",a(".modalbox")).live("click",function(){log.debug("clicked close2 button/cancel");g.trigger("modalbox.close",[]);d()});a(".showtipsy").trigger("cancel-tipsy",[]);a(".modalbox").bind("modalbox.close",
function(){d()})}var g=a(this);g.el=this;g.bind(a.browser.opera?"keypress":"keydown",function(h){switch(h.keyCode||h.which){case c.ESC:d();break;default:break}}).focus(function(){});var j=null;a(this).click(function(){var h=b.content?b.content:b.href;if(j!=h)e();else{f();b.onload()}j=h;return false})})};a.fn.lfhints=function(b){a.extend({hint_selector:".hint",hint_class:"hint"},b);return this.each(function(){a("input, textarea",a(this)).each(function(){var c=a(this),e=a("#"+c.attr("id")+"_label");
c.val()==""||c.val()==null?e.css({"z-index":"3"}).show():e.css({"z-index":"-1"}).hide();c.focus(function(){e.css({"z-index":"-1"}).hide()}).blur(function(){log.debug("in blur");a(this).val()==""||a(this).val()==null?e.css({"z-index":"3"}).show():e.css({"z-index":"-1"}).hide()})})})};a.fn.dstags=function(b){return this.each(function(){a(this).is(".ds-tag-helper")||new a.ds.tag_helper(this,b)})};a.ds.tag={defaults:{tag_div_selector:"#tag_list_div",tagged_class:"tagged_wdelete",tag_input:"#tags",id:"tbd"}};
a.ds.tag_helper=function(b,c){var e=this;c=a.extend({tags:[],tagd:{}},a.ds.tag.defaults,c);e.first_tag=true;e.element=b;e.options=c;a.data(this.element,".ds-tag-helper",this);c=c.tags;for(var d=0;d<c.length;d++)e.add_tag(c[d]);e=this;a("a",a(b)).click(function(){e.click_tag(a(this).html())})};a.extend(a.ds.tag_helper.prototype,{add_tag:function(b){var c=this;if(c.first_tag===true){a(c.options.tag_input).focus();c.first_tag=false}b.indexOf(":")>0?a("#tag_"+b.replace(":","")).addClass(c.options.tagged_class):
a("#tag_"+b).addClass(c.options.tagged_class);if(!(b in c.options.tagd)){c.options.tagd[b]=b;c.options.tags[c.options.length]=b}var e=",",d=a(c.options.tag_input).val();if(d=="")e="";a(c.options.tag_input).val(d+e+b)},click_tag:function(b){var c=this;if(b in c.options.tagd){delete c.options.tagd[b];var e=[];for(var d in c.options.tagd)e[e.length]=d;c.options.tags=e;b.indexOf(":")>0?a("#tag_"+b.replace(":","")).removeClass(c.options.tagged_class):a("#tag_"+b).removeClass(c.options.tagged_class);a(c.options.tag_input).val(e.join(","))}else c.add_tag(b)}});
a.ds.humanMsg={msgId:"humanMsg",msgOpacity:0.9,tmin:1500,tmax:5E3,t2:5E3,t1:700,removeMsg:null,loaded:false,setup:function(b,c){this.msgID="humanMsg";this.loaded=true;if(b==undefined)b="body";this.msgOpacity=0.8;if(c!=undefined)this.msgOpacity=parseFloat(c);jQuery(b).append('<div id="'+this.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>')},displayMsg:function(b){if(b!=""){this.loaded===false&&this.setup();clearTimeout(this.t2);jQuery("#"+this.msgID+" p").html(b);
jQuery("#"+this.msgID+"").show().animate({opacity:this.msgOpacity});this.t1=setTimeout("$.ds.humanMsg.bindEvents()",this.tmin);this.t2=setTimeout("$.ds.humanMsg.removeMsg()",this.tmax)}},bindEvents:function(){jQuery(window).mousemove(this.removeMsg).click(this.removeMsg).keypress(this.removeMsg)},removeMsg:function(){var b=a.ds.humanMsg;jQuery(window).unbind("mousemove",b.removeMsg).unbind("click",b.removeMsg).unbind("keypress",b.removeMsg);jQuery("#"+b.msgID).css("opacity")==b.msgOpacity&&jQuery("#"+
b.msgID).animate({opacity:0},500,function(){jQuery(this).hide()})}};a.extend(a,{showmessage:function(b){a.ds.humanMsg.displayMsg(b)}})})(jQuery);jQuery(document).ready(function(){jQuery.ds.humanMsg.setup()});
(function(a){function o(k){if(!h.parent){h.parent=a('<div id="'+k.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();a.fn.bgiframe&&h.parent.bgiframe();h.title=a("h3",h.parent);h.body=a("div.body",h.parent);h.url=a("div.url",h.parent)}}function b(k){return a.data(k,"tooltip-settings")}function c(k){if(b(this).delay)m=setTimeout(d,b(this).delay);else d();p=!!b(this).track;a(document.body).bind("mousemove",f);b(this).width>0&&h.parent.css({width:b(this).width+
"px"});f(k)}function e(){if(!(a.tooltip.blocked||this==q||!this.tooltipText&&!b(this).bodyHandler&&!a(this).attr("body"))){q=this;l=this.tooltipText;if(b(this).bodyHandler){h.title.hide();var k=b(this).bodyHandler.call(this);k.nodeType||k.jquery?h.body.empty().append(k):h.body.html(k);h.body.show()}else if(b(this).showBody){k=l.split(b(this).showBody);h.title.html(k.shift()).show();h.body.empty();for(var t=0,v;v=k[t];t++){t>0&&h.body.append("<br/>");h.body.append(v)}h.body.hideWhenEmpty()}else{h.title.html(l).show();
h.body.hide()}if(a(this).attr("body")&&a(this).attr("body").length>3){k=a(a(this).attr("body")).html();h.body.empty();h.body.html(k);h.body.show()}b(this).showURL&&a(this).url()?h.url.html(a(this).url().replace("http://","")).show():h.url.hide();h.title&&h.title.html().length<3&&h.title.hide();h.parent.addClass(b(this).extraClass);b(this).fixPNG&&h.parent.fixPNG();c.apply(this,arguments)}}function d(){m=null;h.parent.show();f()}function f(k){if(!a.tooltip.blocked){!p&&h.parent.is(":visible")&&a(document.body).unbind("mousemove",
f);if(q==null)a(document.body).unbind("mousemove",f);else{h.parent.removeClass("viewport-right").removeClass("viewport-bottom");var t=h.parent[0].offsetLeft,v=h.parent[0].offsetTop;if(k){t=k.pageX+b(q).left;v=k.pageY+b(q).top;h.parent.css({left:t+"px",top:v+"px"})}k=g();var r=h.parent[0];if(k.x+k.cx<r.offsetLeft+r.offsetWidth){t-=r.offsetWidth+20+b(q).left;h.parent.css({left:t+"px"}).addClass("viewport-right")}if(k.y+k.cy<r.offsetTop+r.offsetHeight){v-=r.offsetHeight+20+b(q).top;h.parent.css({top:v+
"px"}).addClass("viewport-bottom")}}}}function g(){return{x:a(window).scrollLeft(),y:a(window).scrollTop(),cx:a(window).width(),cy:a(window).height()}}function j(){if(!a.tooltip.blocked){m&&clearTimeout(m);q=null;h.parent.hide().removeClass(b(this).extraClass);b(this).fixPNG&&h.parent.unfixPNG()}}var h={},q,l,m,n=a.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),p=false;a.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){a.tooltip.blocked=
!a.tooltip.blocked}};a.fn.extend({tooltip:function(k){k=a.extend({},a.tooltip.defaults,k);o(k);return this.each(function(){a.data(this,"tooltip-settings",k);this.tooltipText=this.title;a(this).removeAttr("title");this.alt=""}).hover(e,j).click(j)},fixPNG:n?function(){return this.each(function(){var k=a(this).css("backgroundImage");if(k.match(/^url\(["']?(.*\.png)["']?\)$/i)){k=RegExp.$1;a(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+
k+"')"}).each(function(){var t=a(this).css("position");t!="absolute"&&t!="relative"&&a(this).css("position","relative")})}})}:function(){return this},unfixPNG:n?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")}});a.fn.Tooltip=a.fn.tooltip})(jQuery);
(function(a){var o=a.fn.height,b=a.fn.width;a.fn.extend({height:function(){if(this[0]==window)return self.innerHeight||a.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max(document.body.scrollHeight,document.body.offsetHeight);return o.apply(this,arguments)},width:function(){if(this[0]==window)return self.innerWidth||a.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)return Math.max(document.body.scrollWidth,
document.body.offsetWidth);return b.apply(this,arguments)},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-c(this,"borderTopWidth")-c(this,"borderBottomWidth"):this.height()+c(this,"paddingTop")+c(this,"paddingBottom")},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-c(this,"borderLeftWidth")-c(this,"borderRightWidth"):this.width()+c(this,"paddingLeft")+c(this,
"paddingRight")},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight:this.height()+c(this,"borderTopWidth")+c(this,"borderBottomWidth")+c(this,"paddingTop")+c(this,"paddingBottom")},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth:this.width()+c(this,"borderLeftWidth")+c(this,"borderRightWidth")+c(this,"paddingLeft")+c(this,"paddingRight")},scrollLeft:function(d){if(d!=
undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(d,a(window).scrollTop());else this.scrollLeft=d});if(this[0]==window||this[0]==document)return self.pageXOffset||a.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft},scrollTop:function(d){if(d!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(a(window).scrollLeft(),d);else this.scrollTop=d});if(this[0]==window||this[0]==document)return self.pageYOffset||
a.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop},position:function(d,f){var g=this[0],j=g.parentNode,h=g.offsetParent;d=a.extend({margin:false,border:false,padding:false,scroll:false},d||{});var q=g.offsetLeft,l=g.offsetTop,m=g.scrollLeft,n=g.scrollTop;if(a.browser.mozilla||a.browser.msie){q+=c(g,"borderLeftWidth");l+=c(g,"borderTopWidth")}if(a.browser.mozilla){do{if(a.browser.mozilla&&j!=g&&a.css(j,"overflow")!="visible"){q+=c(j,"borderLeftWidth");
l+=c(j,"borderTopWidth")}if(j==h)break}while((j=j.parentNode)&&(j.tagName.toLowerCase()!="body"||j.tagName.toLowerCase()!="html"))}d=e(g,d,q,l,m,n);if(f){a.extend(f,d);return this}else return d},offset:function(d,f){var g=0,j=0,h=0,q=0,l=this[0],m=this[0],n,p=a.css(l,"position"),k=a.browser.mozilla,t=a.browser.msie,v=a.browser.safari;n=a.browser.opera;var r=false,s=false;d=a.extend({margin:true,border:false,padding:false,scroll:true,lite:false},d||{});if(d.lite)return this.offsetLite(d,f);if(l.tagName.toLowerCase()==
"body"){g=l.offsetLeft;j=l.offsetTop;if(k){g+=c(l,"marginLeft")+c(l,"borderLeftWidth")*2;j+=c(l,"marginTop")+c(l,"borderTopWidth")*2}else if(n){g+=c(l,"marginLeft");j+=c(l,"marginTop")}else if(t&&jQuery.boxModel){g+=c(l,"borderLeftWidth");j+=c(l,"borderTopWidth")}}else{do{n=a.css(m,"position");g+=m.offsetLeft;j+=m.offsetTop;if(k||t){g+=c(m,"borderLeftWidth");j+=c(m,"borderTopWidth");if(k&&n=="absolute")r=true;if(t&&n=="relative")s=true}n=m.offsetParent;if(d.scroll||k){do{if(d.scroll){h+=m.scrollLeft;
q+=m.scrollTop}if(k&&m!=l&&a.css(m,"overflow")!="visible"){g+=c(m,"borderLeftWidth");j+=c(m,"borderTopWidth")}m=m.parentNode}while(m!=n)}m=n;if(m.tagName.toLowerCase()=="body"||m.tagName.toLowerCase()=="html"){if((v||t&&a.boxModel)&&p!="absolute"&&p!="fixed"){g+=c(m,"marginLeft");j+=c(m,"marginTop")}if(k&&!r&&p!="fixed"||t&&p=="static"&&!s){g+=c(m,"borderLeftWidth");j+=c(m,"borderTopWidth")}break}}while(m)}d=e(l,d,g,j,h,q);if(f){a.extend(f,d);return this}else return d},offsetLite:function(d,f){var g=
0,j=0,h=0,q=0,l=this[0],m;d=a.extend({margin:true,border:false,padding:false,scroll:true},d||{});do{g+=l.offsetLeft;j+=l.offsetTop;m=l.offsetParent;if(d.scroll){do{h+=l.scrollLeft;q+=l.scrollTop;l=l.parentNode}while(l!=m)}l=m}while(l&&l.tagName.toLowerCase()!="body"&&l.tagName.toLowerCase()!="html");d=e(this[0],d,g,j,h,q);if(f){a.extend(f,d);return this}else return d}});var c=function(d,f){return parseInt(a.css(d.jquery?d[0]:d,f))||0},e=function(d,f,g,j,h,q){if(!f.margin){g-=c(d,"marginLeft");j-=
c(d,"marginTop")}if(f.border&&(a.browser.safari||a.browser.opera)){g+=c(d,"borderLeftWidth");j+=c(d,"borderTopWidth")}else if(!f.border&&!(a.browser.safari||a.browser.opera)){g-=c(d,"borderLeftWidth");j-=c(d,"borderTopWidth")}if(f.padding){g+=c(d,"paddingLeft");j+=c(d,"paddingTop")}if(f.scroll){h-=d.scrollLeft;q-=d.scrollTop}return f.scroll?{top:j-q,left:g-h,scrollTop:q,scrollLeft:h}:{top:j,left:g}}})(jQuery);
(function(a){a.fn.bgIframe=a.fn.bgiframe=function(o){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){o=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},o||{});var b=function(e){return e&&e.constructor==Number?e+"px":e},c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+o.src+'"style="display:block;position:absolute;z-index:-1;'+(o.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(o.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
b(o.top))+";left:"+(o.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(o.left))+";width:"+(o.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(o.width))+";height:"+(o.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(o.height))+';"/>';return this.each(function(){a("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(c),this.firstChild)})}return this}})(jQuery);
jQuery.fn.vchecks=function(){object=jQuery(this);object.addClass("geogoer_vchecks");object.find("li:first").addClass("first");object.find("li:last").addClass("last");object.find("input[type=checkbox]").each(function(){$(this).hide()});object.find("li").each(function(){$(this).find("input[type=checkbox]").attr("checked")==true?$(this).addClass("checked"):$(this).addClass("unchecked");$(this).find("span").append('<div class="check_div"></div>')});object.find("li").find("span").click(function(a){a.preventDefault();
check_li=$(this).parent("li");checkbox=$(this).parent("li").find("input[type=checkbox]");if(checkbox.attr("checked")==true){checkbox.attr("checked",false);check_li.removeClass("checked");check_li.addClass("unchecked")}else{checkbox.attr("checked",true);check_li.removeClass("unchecked");check_li.addClass("checked")}});object.find("li:not(:last,:first)").find("span").bind("mouseover",function(){$(this).parent("li").addClass("hover")});object.find("li:not(:last,:first)").find("span").bind("mouseout",
function(){$(this).parent("li").removeClass("hover")});object.find("li:first").find("span").bind("mouseover",function(){$(this).parent("li").addClass("first_hover")});object.find("li:first").find("span").bind("mouseout",function(){$(this).parent("li").removeClass("first_hover")});object.find("li:last").find("span").bind("mouseover",function(){$(this).parent("li").addClass("last_hover")});object.find("li:last").find("span").bind("mouseout",function(){$(this).parent("li").removeClass("last_hover")})};
jQuery.fn.confirm=function(a){a=jQuery.extend({msg:"Are you sure? ",stopAfter:"never",wrapper:"<span></span>",eventType:"click",dialogShow:"show",dialogSpeed:"",timeout:0},a);a.stopAfter=a.stopAfter.toLowerCase();if(!a.stopAfter in["never","once","ok","cancel"])a.stopAfter="never";a.buttons=jQuery.extend({ok:"Yes",cancel:"Cancel",wrapper:'<a href="#"></a>',separator:" / "},a.buttons);var o=a.eventType;return this.each(function(){var b=jQuery(this);if(b.hasClass("jquery-confirm"))return b;b.addClass("jquery-confirm");
var c,e=jQuery(a.buttons.wrapper).append(a.buttons.ok).click(function(){a.timeout!=0&&clearTimeout(c);b.show();f.hide();b.trigger("confirm",{});return false}),d=jQuery(a.buttons.wrapper).append(a.buttons.cancel).click(function(){a.timeout!=0&&clearTimeout(c);b.show();f.hide();return false});if(a.buttons.cls){e.addClass(a.buttons.cls);d.addClass(a.buttons.cls)}var f=jQuery(a.wrapper).append(a.msg).append(e).append(a.buttons.separator).append(d),g=function(){jQuery(this).hide();a.dialogShow!="show"&&
f.hide();f.insertBefore(this);f[a.dialogShow](a.dialogSpeed);if(a.timeout!=0){clearTimeout(c);c=setTimeout(function(){d.click();b.one(o,g)},a.timeout)}return false};b.click(g)})};

