jQuery(document).ready(function(){
	jQuery("#newGames .nav a").click(function(){
		jQuery(this).parents(".nav").siblings(".panel").hide();
		jQuery(this).parents(".nav").siblings("."+jQuery(this).attr("rel")).show();
		jQuery("#newGames .nav a").removeClass("hot");
		jQuery(this).addClass("hot");
		return false;
	});
	
	jQuery("a[target=bigfish]").click(function(){
		if(jQuery(this).attr("name")=="buy"){
			window.open(jQuery(this).attr("href"),"bfg","height=680,width=800,scrollbars=1,status=0,toolbar=0,menubar=0");
		}else{
			window.open(jQuery(this).attr("href"),"bfg","height=350,width=550,status=0,toolbar=0,menubar=0"); 
		}
		
		return false;
	});

	jQuery("#gamesearch input[type=text]").focus(function(){
		jQuery(this).select();
		jQuery(this).addClass("on");
	})
	jQuery("#gamesearch input[type=text]").blur(function(){
		jQuery(this).removeClass("on");
	})
	
	jQuery("#mybfg a").click(function(){
		jQuery.get( "/bigfish.php", {}, function(data){} );
	});
	
	jQuery(".bm").click(function(){
		var title = jQuery(this).attr("title");
		var url = jQuery(this).attr("href");
		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
		}else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title); 
		}
	})
});


YAHOO.util.Event.addListener(window ,"load", topTenInit);
function topTenInit(e){
	var table 	= document.getElementById("toptentable");
	if(table)
	{
		var games	= table.getElementsByTagName("A");
		var linkcnt	= games.length;
		for(var i = 0; i < linkcnt; i++)
		{
			var tmpname 	= this.name;
			var gameid		= tmpname.replace("tt","");
			var samegame 	= document.getElementsByName("tt"+gameid); 
			
			YAHOO.util.Event.addListener(games[i] ,"mouseover", function(){
				var tmpname 	= this.name;
				var gameid		= tmpname.replace("tt","");
				var samegame 	= document.getElementsByName("tt"+gameid); 
				for(var z=0; z<samegame.length; z++){
					samegame[z].parentNode.className = samegame[z].rel;
				}
			});
			YAHOO.util.Event.addListener(games[i] ,"mouseout", function(){
				var tmpname 	= this.name;
				var gameid		= tmpname.replace("tt","");
				var samegame 	= document.getElementsByName("tt"+gameid); 
				for(var z=0; z<samegame.length; z++){
					samegame[z].parentNode.className = "";
				}
			});
		}
	}
}

YAHOO.util.Event.addListener(window ,"load", saveToMyListInit);
function saveToMyListInit(){	
	var savelinks 	= document.getElementsByName("savetomylist");
	var savecount 	= savelinks.length;
	for(var i=0; i < savecount; i++){ YAHOO.util.Event.addListener(savelinks[i] ,"click", saveToMyList); }
}
function saveToMyList(e){
	YAHOO.util.Event.preventDefault(e);
	var currentIcon = this.className;
	
	var targetlist 	= "myList";
	var targetels 	= "LI";
	var targetpos 	= "first";
	
	if(this.className == "minicheck"){ //check if in list already
		alert("This game is already in your 'My Games' List");
		return false; 
	}

	function savedfail(o){
		if(o.responseText){ //direct failure
			alert("The Add To My Games functionality is temporarily unavailable.  Please try again in a few minutes - PopGamers");
			this.className 	= currentIcon;
			this.innerHTML 	= "Add to My Games";			
		}else{ //passed through success function first
			alert("Please Sign In to start adding games to your 'My Games' List.");
			o.className 	= "minilocked";
			o.innerHTML 	= "Add to My Games";
		}
		return false;
	}
	function savedok(o)
	{
		if(parseInt(o.responseText)%1 == 0) //if succesfull will return an inserted id (integer)
		{
			this.innerHTML = "Saved in My Games";
			this.className = "minicheck";
			
			/*********************************animate saveing to list*********************************/
			var myListCount = document.getElementById("myListCount");
			//1. get x+y of target list area 1st or last
			if(myList	= document.getElementById(targetlist))
			{
				//var tlels	= myList.getElementsByTagName(targetels);
				//var getel	= (targetpos == "first") ? tlels[0] : tlels[tlels.length-1];
				getel = myListCount; //bypass above 2 lines
				var getelxy = YAHOO.util.Dom.getXY(getel);
				var getelw	= getel.offsetWidth;
				var getelh	= getel.offsetHeight;
				
				//2. create empty div with grey border , pos abs over save button get x+y
				var stupid	= document.getElementsByTagName("BODY");
				var thebody	= stupid[0];
				
				var thisxy	= YAHOO.util.Dom.getXY(this);
				var tmpdiv 	= document.createElement("DIV");
				tmpdiv.setAttribute("class","saveanim");
				tmpdiv.style.width 		= this.offsetWidth;
				tmpdiv.style.height 	= this.offsetHeight;
				tmpdiv.style.position 	= "absolute";
				thebody.appendChild(tmpdiv);
				YAHOO.util.Dom.setXY(tmpdiv, thisxy);
			
				//3. animate from 2 -> 1 
				var attributes = {
					points:{to:getelxy},
					width: {by: getelw - this.offsetWidth},
					height: {by: getelh - this.offsetHeight}
				}
				var saveAnim = new YAHOO.util.Motion(tmpdiv,attributes,1.25,YAHOO.util.Easing.easeOut);
				saveAnim.animate();
				saveAnim.onComplete.subscribe(function(){
					removeEl(tmpdiv);
					if(myListCount){
						var oldCount 			= myListCount.innerHTML;
						oldCount = oldCount.replace("<a>","");
						oldCount = oldCount.replace("</a>","");
						myListCount.innerHTML 	= parseFloat(oldCount) + 1;
					}
				});
				/*********************************xxx*********************************/
				
				/*********************************indicate item saved in my list*********************************/
				var gameid = o.argument.gameid;
				var gametitle = o.argument.gametitle;

				var tlels	= myList.getElementsByTagName(targetels);
				//var remel	= (targetpos != "first") ? tlels[0] : tlels[tlels.length-1];
				if(document.getElementById("nosaved")) document.getElementById("nosaved").style.display = "none";
				
				var tmpCONT = document.createElement(targetels);
				tmpCONT.setAttribute("class","clr");
				tmpCONT.setAttribute("id","remove" + gameid);
				
				var tmpdl		= document.createElement("A");
				tmpdl.innerHTML	= "Download";
				tmpdl.setAttribute("href","http://arcade.reflexive.com/downloadgame.aspx?AID=" + gameid + "&CID=21656");
				tmpdl.setAttribute("title","Download " + gametitle + " Now!");
				tmpdl.setAttribute("rev",gameid);
				tmpdl.setAttribute("class","minidown");
				tmpdl.setAttribute("name","dl");				
				tmpdl.setAttribute("rel","nofollow");
				
				var tmprm	= document.createElement("A");
				tmprm.innerHTML	= "Remove";
				tmprm.setAttribute("href","/_save.php?AID=" + gameid + "&remove=1");
				tmprm.setAttribute("title","Remove " + gametitle + " From My Saved Games List");
				tmprm.setAttribute("rev",gameid);
				tmprm.setAttribute("class","miniclose");
				tmprm.setAttribute("name","removefromlist");				
				tmprm.setAttribute("rel","nofollow");
				
				var tmptit 	= document.createElement("STRONG");
				tmptit.innerHTML = '<a href="/game.php?AID=' + gameid + '" title="' + gametitle + ' Details Page">' + gametitle + '</a>';
				
				tmpCONT.appendChild(tmpdl);
				tmpCONT.appendChild(tmprm);
				tmpCONT.appendChild(tmptit);
				
				//removeEl(remel); //do animated version? nah if its gonna be hidden away
				if(tlels[0]) {
					myList.insertBefore(tmpCONT,tlels[0]);
				}else{
					myList.appendChild(tmpCONT);
				}
				
				/*********************************reattach events*********************************/		
				saveDownloadInit();
				removeFromMyListInit();
				/*********************************xxx*********************************/
			}
		}else{
			savedfail(this);
		}
		return;
	}
	
	//change text to indicating working/saving...
	this.innerHTML 	= "Adding Game...";
	this.className	= "miniconfig";
	
	var savehref	= this.href + "&x=1"; //add x=1 to identify an ajax call
	var tmpsplit1	= savehref.split("AID=");
	var tmpsplit2	= tmpsplit1[1].split("&");
	var gameid		= tmpsplit2[0];
	var title 		= this.title;
	var cut1		= "Add ";
	var cut2		= " to ";
	var gametitle 	= title.substring(title.indexOf(cut1) + cut1.length, title.indexOf(cut2) );
	
	var callback	= { success: savedok, failure: savedfail, argument: { gameid: gameid , gametitle: gametitle }, scope:this }
	var cObj 		= YAHOO.util.Connect.asyncRequest('GET',savehref,callback,null);
	return false;
}

function registerForm(theForm)
{
	var user 	= document.getElementById("user_login").value;
	var pwd1 	= document.getElementById("user_pass").value;
	var pwd2 	= document.getElementById("user_pass2").value;
	var email 	= document.getElementById("user_email").value;
	
	if(!user){ alert("Please enter a username"); return false; }
	if(user.indexOf("http") >= 0  || user.indexOf("<") >= 0  || user.indexOf(">") >= 0 || user.indexOf("script") >= 0 ) { alert("Sorry, invalid username"); return false; }
	if(!pwd1){ alert("Please enter a password"); return false; }
	if(!email){ alert("Please enter an email address"); return false; }
	if(email.indexOf("@") < 0 || email.indexOf(".") < 0 ){
		alert("Please enter a valid email address");
		document.getElementById("user_email").value = "";
		return false; 
	}
	if(pwd1 != pwd2){ 
		alert("The passwords do not match, please re-enter passwords.");
		document.getElementById("user_pass").value = "";
		document.getElementById("user_pass2").value = "";
		return false; 
	}	
	return true; 
}

function checkFeedback(theForm)
{
	var checkrobot 	= document.getElementById("machinefilter").value;
	var comment 	= document.getElementById("contact_comment").value;
	var email 		= document.getElementById("contact_email").value;

	if(checkrobot != "pop"){ 
		alert("'pop' is spelled 'p' - 'o' - 'p'"); 
		document.getElementById("machinefilter").value = "";
		document.getElementById("machinefilter").focus();
		return false; 
	}
	if(!comment){ 
		alert("Please fill in the comment field."); 
		document.getElementById("contact_comment").focus();
		return false; 
	}
	if(!email){ 
		alert("Please enter an email address"); 
		document.getElementById("contact_email").focus();
		return false; 
	}
	if(email.indexOf("@") < 0 || email.indexOf(".") < 0 ){
		alert("Please enter a valid email address");
		document.getElementById("contact_email").value = "";
		document.getElementById("contact_email").focus();
		return false; 
	}	
	
	return true; 
}

//if JS do custom signing in first , then ajax forward to WP, and location href
function login(theForm)
{
	var user 	= document.getElementById("log").value;
	var pwd 	= document.getElementById("pwd").value;
	var origin	= theForm.className;

	//need validating scripts
	if(!user){ alert("Please enter username"); return false; }
	if(!pwd){ alert("Please enter password"); return false; }
		
	function success(o)
	{
		var unstatus = o.responseText;
		switch(unstatus)
		{
			case "<pwdbad/>":
				alert("Wrong password. Please try again.");
				document.getElementById("pwd").value = "";
			break;    
			case "<unbad/>":
				alert("Username does not exist. Please correct and try again.");
				document.getElementById("pwd").value = "";
				document.getElementById("log").value = "";
			break;
			default: 
				var formName	= theForm.name;
				var postUrl 	= theForm.action;
				var redirectto	= document.getElementById("redirect_to").value;

				//1 create some temporary messaging					
				var tmpMsg = document.createElement("P"); //create some temporary messaging
				tmpMsg.setAttribute("class", "animSignIn");
				tmpMsg.innerHTML = "Signing in to your account,<br/>one moment please...";
				
				//2 Fade to Visibility Hidden
				var attributes = { opacity: { to: .20 } }
				var removeAnim = new YAHOO.util.Anim(theForm, attributes, .5, YAHOO.util.Easing.easeOut);
				removeAnim.onComplete.subscribe(function(){
					if(theForm){ 
						tmpMsg.style.width	= theForm.parentNode.offsetWidth + "px";
						theForm.parentNode.insertBefore(tmpMsg,theForm); 
					}
				});
				removeAnim.animate();	
	
				function signedin(o)
				{
					if(origin == "page"){
						//location.href = redirectto; 
					}
					location.href = redirectto; 
					return false; 
				}
				
				var callback2 = { 
					success: signedin,
					failure: function(){ alert("Sign in failed. Please try again."); return false; },
					argument: 1	,
					scope:this	
				}
				
				YAHOO.util.Connect.setForm(formName);
				var cObj = YAHOO.util.Connect.asyncRequest('POST',postUrl,callback2 );
			break;
		}
		return false;
	}

	var callback = { 
		success: success,
		failure: function(){ alert("Sign in Failed. Please try again."); return false; },
		argument: 1	,
		scope:this 
	}
	
	//first check with my page, to set session for "save game stuff", then allow post.
	var cObj = YAHOO.util.Connect.asyncRequest('GET','/_signin.php?log='+user+'&pwd='+pwd,callback );
	return false;
}

function checkComment(theForm)
{
	var checked = commented = false;
	var radios = theForm.overall;
	for(var i = 0; i < radios.length; i++){
		if(radios[i].checked){ checked = true; }
	}
	if(theForm.comment.value != ""){ 
		commented = true; 
	}else{
		alert("Please be sure review is not empty.");
		return false;
	}
	if(checked && commented){ return true; }
	alert("Please select an overall impression");
	return false;
}

YAHOO.util.Event.addListener(window ,"load", tabInit);
function tabInit()
{
	var topcontainerID		= "topTenLists";
	var tabflagsNAME		= "tentabs";
	var contentcontainerID	= "panels";
	var topbox				= document.getElementById(topcontainerID);
		
	if(topbox)
	{
		function swapPanels(e)
		{
			YAHOO.util.Event.preventDefault(e);
			for(var i=0; i < tabs.length; i++)
			{	
				tabs[i].parentNode.className="";
			}
			
			var checkpanel = document.getElementById(contentcontainerID).firstChild;
			
			while(checkpanel)
			{	
				if(checkpanel.nodeName=="OL")
				{
					checkpanel.style.display = "none";
				}
				checkpanel=checkpanel.nextSibling;
			}
			this.parentNode.className = "on";
			document.getElementById(this.rel).style.display = "block";
			return false;
		}
		
		//adds click events to tabs
		var tabs = document.getElementsByName(tabflagsNAME);
		for(var i=0; i < tabs.length; i++)
		{
			tabs[i].panelid = tabs[i].rel;
			YAHOO.util.Event.addListener(tabs[i],'click',swapPanels);
		}
	}
}

/*********************************Done*********************************/
YAHOO.util.Event.addListener(['seeMy'] ,"mouseover", myGamesDrop );
YAHOO.util.Event.addListener(['seeMy'] ,"mouseout", function(){ window.myGamesOpen = false; setTimeout("hideMyGames()",700); } );
YAHOO.util.Event.addListener(['MySavedGamesList'] ,"mouseover", function(){ window.myGamesOpen = true; } );
YAHOO.util.Event.addListener(['MySavedGamesList'] ,"mouseout", function(){ window.myGamesOpen = false; setTimeout("hideMyGames()",700); } );
var dropdownbox;
YAHOO.util.Event.addListener(window ,"load", function(){
	var attributes = { opacity: { to: 0 } }
	if(document.getElementById('MySavedGamesList')){
		dropdownbox = new YAHOO.util.Anim(document.getElementById('MySavedGamesList'), attributes, .30, YAHOO.util.Easing.easeOut);
		dropdownbox.animate();
		dropdownbox.onComplete.subscribe( function(){ 
			if(!window.myGamesOpen){ 
				document.getElementById('MySavedGamesList').style.display = "none";
			}
		} );
	}
});
function myGamesDrop(e){
	YAHOO.util.Event.preventDefault(e);
	window.myGamesOpen = true;
	document.getElementById('MySavedGamesList').style.display = "block";
	dropdownbox.attributes.opacity = { to: .97 };	
	dropdownbox.animate();
	return false;
}
function hideMyGames(){
	if(!window.myGamesOpen){ 
		dropdownbox.attributes.opacity = { to: 0 }; 
		dropdownbox.animate(); 		
	}
	return false;
}

YAHOO.util.Event.addListener(window ,"load", removeFromMyListInit);
function removeFromMyListInit(){
	var removelinks	= document.getElementsByName("removefromlist");
	for(var i=0; i < removelinks.length; i++){ YAHOO.util.Event.addListener(removelinks[i] ,"click", removeFromMyList); }
}
function removeFromMyList(e)
{
	YAHOO.util.Event.preventDefault(e);
	this.innerHTML 	= "Removing...";

	function x(){
		alert("This functionality is temporarily unavailable.  Please try again in a few minutes - PopGamers");
		return false;
	}
	function o(){
		var removewhat	= "remove" + this.rev; //"remove123"
		var removethis	= document.getElementById(removewhat);
		
		var attributes = { opacity:{ to: 0 } };
		var removeAnim = new YAHOO.util.Anim(removethis, attributes, 1, YAHOO.util.Easing.easeOut);
		removeAnim.animate();
		removeAnim.onComplete.subscribe( function(){ 
			if(removethis){
				removeEl(removethis); 
				if(myListCount = document.getElementById("myListCount")){
					var oldCount 	= myListCount.innerHTML;
					oldCount = oldCount.replace("<a>","");
					oldCount = oldCount.replace("</a>","");
					myListCount.innerHTML = parseFloat(oldCount) - 1;
				}
			}
		} );
		return false;
	}
	var callback 	= { success:o, failure:x, argument:1, scope:this };
	var removehref	= this.href + "&x=1";
	var cObj 		= YAHOO.util.Connect.asyncRequest('GET',removehref,callback,null);
	return false;
}

YAHOO.util.Event.addListener(window ,"load", saveDownloadInit);
function saveDownloadInit(){				  
	var dllinks = document.getElementsByName("dl");
	var dlcount = dllinks.length;
	for(var i=0; i < dlcount; i++){ YAHOO.util.Event.addListener(dllinks[i] ,"click", saveDownload); }
}
function saveDownload(e){
	YAHOO.util.Event.preventDefault(e);
	function x(o){ return false; }
	function o(o){ location.href=this.href; return false; }
	var callback	= { success:o, failure:x, argument:1, scope:this }
	var dlhref		= '/_dl.php?AID='+this.rev+'&x=1';
 	var cObj 		= YAHOO.util.Connect.asyncRequest('GET',dlhref,callback,null);
	return false;
}

YAHOO.util.Event.addListener(['randomize'] ,"click", getRandomScreens);
function getRandomScreens(e){
	YAHOO.util.Event.preventDefault(e);	
	this.innerHTML = "Randomizing...";	
	
	function x(o){
		var split 		= this.href.split("?");
		var justurl 	= split[0]
		location.href	= justurl;
		return false;
	}
	function o(o){
		this.innerHTML 			= "Next Set &raquo;"
		var screenslist 		= document.getElementById("randomscreenslist");
		screenslist.innerHTML	= o.responseText;
		popUpScreenInit(); //reattach screenshot events
		return false;
	}
	var callback 	= { success:o, failure:x, argument:1, scope:this }
	var cObj 		= YAHOO.util.Connect.asyncRequest('GET',this.href,callback,null);
	return false;
}

YAHOO.util.Event.addListener(window ,"load", popUpScreenInit);
function popUpScreenInit(){
	var screenlinks	= document.getElementsByName("screenshot");
	for(var i=0; i < screenlinks.length; i++){ YAHOO.util.Event.addListener(screenlinks[i] ,"click", popScreen); }
	
	function popScreen(e){
		YAHOO.util.Event.preventDefault(e);
		var theurl = this.href;
		window.open(theurl,this.target,"location=yes,toolbar=no,menubar=no,scrollbars=no,directories=no,resizable=yes,width=778,height=600");
		return false; 
	}
}

function removeEl(el){ el.parentNode.removeChild(el); }

function preload(){
	var imgs = new Array();
	for (i=0; i < preload.arguments.length; i++){
		imgs[i] 	= new Image();
		imgs[i].src	= preload.arguments[i];
	}
}

YAHOO.util.Event.addListener(window, 'load', function(){
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addSearchEngine == 'function'))
	{
		if(document.getElementById("ffsearch")) document.getElementById("ffsearch").style.display = "block";
	}
});
YAHOO.util.Event.addListener( ['addfflink'], 'click', addEngine );
function addEngine(e) {
	YAHOO.util.Event.preventDefault(e);
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addSearchEngine == 'function'))
	{
		var thesrc 	= "http://www.popgamers.com/popgamers.src";
		var theico 	= "http://www.popgamers.com/popgamers.gif";
		var thename = "PopGamers.com";
		var thecat	= "Fun and Games";
		window.sidebar.addSearchEngine(thesrc, theico, thename, thecat);
	}
	return false;
}
/*********************************Done*********************************/
/*
YAHOO.util.Event.addListener(window ,"load", function(){ 
	var slides = document.getElementsByName("pgpicks");
	for(var i=0; i<slides.length; i++)
    {
    	YAHOO.util.Event.addListener(slides[i] ,"click", changeSlide);
    }
	
});
*/
function changeSlide(e)
{
	YAHOO.util.Event.preventDefault(e);
	var slidespans 	= document.getElementById("rotate");
	var spans		= slidespans.getElementsByTagName("SPAN");
	var sc 			= spans.length;

	var typeofe = typeof e; //for IE + Firefox  --> setTimeout returns a in Firefox : number , in IE : undefined
	
	if((typeof e == "undefined" || typeofe == "number")){
		for(var i = 0; i < sc; i++)
		{
			if(	spans[i].className == "on")
			{
				spans[i].className = "";
				if( i == (sc -1) ){
					spans[0].className = "on";
					var gameid = spans[0].id;
				}else{
					spans[i+1].className = "on";
					var gameid = spans[i+1].id;
				}
				break;
			}
		}
		
		var parent = document.getElementById("featuredGame");
		var attributes = { opacity: { to: .25 } }
		var featurebox = new YAHOO.util.Anim(parent, attributes, .5, YAHOO.util.Easing.easeOut);
		featurebox.second = false;
		featurebox.onComplete.subscribe( function(){
			if(!featurebox.second)
			{
		        function x(o){ return false; }
		        function o(o)
		        {
					var fbody = document.getElementById("featurebody");
					fbody.innerHTML = o.responseText;
					
					/*********************************xxx*********************************/
					saveToMyListInit();
					saveDownloadInit();
					/*********************************xxx*********************************/
					
					featurebox.attributes.opacity = { to: 1 };
					featurebox.second = true;
					featurebox.animate();
		        	return false;
		        }
				var callback = { success:o, failure:x, argument:1, scope:this }	
		        var someHREF = "_feature.php?AID=" + gameid + "&x=1";
		        var cObj = YAHOO.util.Connect.asyncRequest( 'GET',someHREF,callback,null );
			}
		} );
		featurebox.animate();
		//setTimeout(changeSlide,8000);
	}else if(typeofe == 'object'){
	
		YAHOO.util.Event.preventDefault(e);
		var gameid = this.parentNode.id;
		
		featureslide = false; //slideshow is automatic until someone clicks
		
		for(var i = 0; i < sc; i++)
		{
			if(spans[i].id == gameid){
				spans[i].className = "on";
			}else{
				spans[i].className = "";
			}
		}

		var parent = document.getElementById("featuredGame");
		var attributes = { opacity: { to: .25 } }
		var featurebox = new YAHOO.util.Anim(parent, attributes, .5, YAHOO.util.Easing.easeOut);
		featurebox.second = false;
		featurebox.onComplete.subscribe( function(){
			if(!featurebox.second)
			{
		        function x(o){ return false; }
		        function o(o)
		        {
					var fbody = document.getElementById("featurebody");
					fbody.innerHTML = o.responseText;
					
					/*********************************xxx*********************************/
					saveToMyListInit();
					saveDownloadInit();
					/*********************************xxx*********************************/
					
					featurebox.attributes.opacity = { to: 1 };
					featurebox.second = true;
					featurebox.animate();
					
					//document.getElementById("fsgo").innerHTML = "Start";
		        	return false;
		        }
				var callback = { success:o, failure:x, argument:1, scope:this }	
		        var someHREF = "_feature.php?AID=" + gameid + "&x=1";
		        var cObj = YAHOO.util.Connect.asyncRequest( 'GET',someHREF,callback,null );
			}
		} );
		featurebox.animate();
	}
	return false;
}