function home_demo_clicked(d){d=d=="stop";next_example_delay_visited=[];var c=new Date().getTime();var a=c-(gl.demo_last_clicked||0)>64*1000;
gl.demo_last_clicked=new Date().getTime();var e=$(".demo img");if(d){gl.demo_last_clicked=0}if(d||(!a&&e.attr("src").match(/_demo\./))){e.attr("src","/images/animated_demo_paused.gif");
return false}var b=$(".demo img:first");b.attr("src","/images/animated_demo.gif?"+new Date().getTime());return false}function home_try_it(){home_demo_clicked("stop");
next_example_delay_visited=[];memorize("try_it");return false}home_fields_cleared=false;function home_clear_fields_maybe(){if(home_fields_cleared){return
}home_fields_cleared=true;$("#enter_a_few_submit input").val("").css("color","#000")}example_labels=[["Studying","1"],["Training","32"],["People","65"],["Projects","89"],["Maps","126"],["Tutorials","146"],["Questions","171"],["More","214"]];
function example_number_hover(d){if(typeof(d)=="number"){var c=1500;var b=d;var a=$("#example_numbers li").eq(b-1)}else{var c=300;next_example_delay_visited=[];
$("#examples").stop();var a=$(d.target);var b=Number($.trim(a.html()))}a.siblings().removeClass("on");a.addClass("on");$("#examples").scrollTo({top:0,left:(325*(b-1))},c);
$("#example_label").html(example_labels[b-1][0]).css("padding-left",example_labels[b-1][1]+"px")}function scroll_ticker(){var a=$("#ticker");
a.scrollTo("li:eq(0)",0,{easing:"linear"}).animate({opacity:1},{easing:"swing",duration:1000});if(a.find("li").length<14){return}a.scrollTo("li:eq(11)",95000,{easing:"linear",axis:"x"}).animate({opacity:0},{easing:"swing",duration:600});
_.delay(scroll_ticker,96000)}next_example_delay_visited=[7,1];function next_example_delay(){if(next_example_delay_visited.length==0){return
}var a=Math.floor(Math.random()*7)+1;next_example_delay_visited=next_example_delay_visited.slice(0,5);while(_.include(next_example_delay_visited,a)){var a=Math.floor(Math.random()*7)+1
}next_example_delay_visited.unshift(a);example_number_hover(a);if(next_example_delay_visited.length>0){_.delay(next_example_delay,6500)
}}function candyland_hover(){if(gl.candyland_hover_already){return false}gl.candyland_hover_already=true;$("#candyland").animate({height:557},{easing:"swing",duration:600});
$("#candyland .bottom").show()}$(function(){scroll_ticker();$(".demo img:first").click(home_demo_clicked);$("#faq_balloon li").click(function(){window.location="/faq"
});$("#blog_balloon li").click(function(){window.location="/blog"});$("#quote_balloon li").click(function(){window.location="/user-quotes"
});gl.demo_last_clicked=new Date().getTime();$("#enter_a_few_submit input").focus(home_clear_fields_maybe);$("#example_numbers li").mouseover(example_number_hover);
next_example_delay();var a=$(".search_field input");a.val("SEARCH PAGES").addClass("with_word");a.focus(function(c){var b=$(c.target);
if(!b.hasClass("with_word")){return}b.val("").removeClass("with_word")});a.blur(function(c){var b=$(c.target);if(b.val()!=""){return
}b.val("").val("SEARCH PAGES").addClass("with_word")});$("#candyland .top").hover(candyland_hover);$("#candyland").click(candyland_hover)
});
