jQuery("a").click(function(d){var a="Links";var c="Click";if(jQuery(this).attr("id")){var b=jQuery(this).attr("id")}else{var b=jQuery(this).attr("href")}_gaq.push(["_trackEvent",a,c,b])});function wipeCommas(){jQuery("#search-form").submit(function(){var b=jQuery("#id_q").val();var a=b.replace(","," ");jQuery("#id_q").val(a)})}jQuery(document).ready(function(){wipeCommas()});jQuery(document).ajaxSend(function(c,f,b){function a(g){var l=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var j=0;j<k.length;j++){var h=jQuery.trim(k[j]);if(h.substring(0,g.length+1)==(g+"=")){l=decodeURIComponent(h.substring(g.length+1));break}}}return l}function e(h){var j=document.location.host;var k=document.location.protocol;var i="//"+j;var g=k+i;return(h==g||h.slice(0,g.length+1)==g+"/")||(h==i||h.slice(0,i.length+1)==i+"/")||!(/^(\/\/|http:|https:).*/.test(h))}function d(g){return(/^(GET|HEAD|OPTIONS|TRACE)$/.test(g))}if(!d(b.type)&&e(b.url)){f.setRequestHeader("X-CSRFToken",a("csrftoken"))}});ele=jQuery(".remove-place");ele.click(function(a){a.preventDefault();link=$(this);url="/user/bucketlist/remove/"+jQuery(this).attr("placeid")+"/";jQuery.ajax({url:url,type:"post",success:function(){if(jQuery("body").attr("id")=="bucket_list"){var c=link.parentsUntil(".place").parent();c.animate({opacity:0},300,function(){c.remove()})}for(var b=0;b<$("#mapCanvas").data("gmarkers").length;b++){if(($("#mapCanvas").data("gmarkers")[b].id==link.attr("placeid"))){$("#mapCanvas").data("gmarkers")[b].setVisible(false)}}}})});ele=jQuery(".cross-off");ele.click(function(a){a.preventDefault();link=$(this);url="/user/visited/add/"+jQuery(this).attr("placeid")+"/";jQuery.ajax({url:url,type:"post",success:function(){if(jQuery("body").attr("id")=="bucket_list"){var c=link.parentsUntil(".place").parent();c.animate({opacity:0},300,function(){c.remove()})}for(var b=0;b<$("#mapCanvas").data("gmarkers").length;b++){if(($("#mapCanvas").data("gmarkers")[b].id==link.attr("placeid"))){$("#mapCanvas").data("gmarkers")[b].setVisible(false)}}}})});(function(a){a.fn.movingdiv=function(){return this.each(function(){a.movingdiv(this)})};a.movingdiv=function(b){var d=a(b);a(window).scroll(function(){d.stop().animate({marginTop:(a(window).scrollTop())+"px"},"slow")})}})(jQuery);
