

// pop up function

function popup(url,name,windowWidth,windowHeight,scroll){
	try
		{
			myleft=(screen.width)?(screen.width-windowWidth)/2:100;
			mytop=(screen.height)?(screen.height-windowHeight)/2:100;
			properties = "width="+windowWidth+",height="+windowHeight+",scrollbars="+scroll+",top="+mytop+",left="+myleft;
			var new_window = window.open(url,name,properties);
			new_window.focus();

			if ( new_window == null )
				return false;
			if ( window.opera )
				if (!new_window.opera)
					return false;
		}
		catch(err)
		{
			return false;
		}
		return true;
}




// social bar

var socialY = 0;
var socialYOffset = 0;
var socialHiddenX = 0;
var socialHiddenY = -100;
var socialHidden = true;

function moveSocial(py)
{
	socialY = py;
	
	if (socialHidden)
		return;
		
	$( "#social" ).css("top", socialY + socialYOffset);
	$( "#social2" ).css("top", socialY + socialYOffset);
}

function hideSocial()
{
	socialHidden = true;
	$( "#social" ).css("top", socialHiddenY);
	$( "#social2" ).css("top", socialHiddenY);
}
function showSocial()
{
	socialHidden = false;
	moveSocial(socialY);
}


