/*
 * home.js
 * John Pennypacker 2008-09-02
 * John_Pennypacker@brown.edu
 */

var aTimer='';var delay;$(document).ready(function(){if(get_cookie('search')=="people"){$("#sd").attr({checked:"checked"});}else if(get_cookie('search')=="pages"){$("#sg").attr({checked:"checked"});}
$(".hentry .story").show();var get=parseQueryString();if(get.open)activeWindow=get.open;if(jQuery.inArray(activeWindow,options)==-1){activeWindow=Math.floor(Math.random()*options.length);}else{activeWindow=jQuery.inArray(activeWindow,options);}
$.ui.accordion.animations.brownSlide=function(options){this.slide(options,{duration:400});};jQuery('#listings').accordion({header:'.winhead',event:'focus',animated:"brownSlide",active:activeWindow});jQuery('#listings').accordion("activate",activeWindow);$(".winhead").each(function(i){$(this).bind("mouseover",function(){var el=$(this);$(this).parent("li").addClass("hover");delay=window.setTimeout(function(){jQuery('#listings').accordion("activate",el);},400);});$(this).bind("mouseout",function(){$(this).parent("li").removeClass("hover");window.clearTimeout(delay);});});$(".home ul#listings ul.filters").mouseover(function(){return false;});if(navigator.userAgent.indexOf("MSIE")!=-1){$(".feature a").each(function(i,el){$(el).css({color:$(el).parent().css("color")});$(el).bind("mouseover",function(){$(this).css({color:"FBCD00"})});$(el).bind("mouseout",function(){$(this).css({color:$(el).parent().css("color")})});});}});function get_cookie(cookie_name){var results=document.cookie.match('(^|;) ?'+cookie_name+'=([^;]*)(;|$)');if(results)
return(unescape(results[2]));else
return null;}
function parseQueryString(){var q=new Object();var u=window.location.toString();var ub=u.split("?");if(ub[1]){var pairs=ub[1].split("&");if(pairs){for(var i=0;i<pairs.length;i++){var v=pairs[i].split("=");q[v[0]]=v[1];}}}
return q;}
