var curr = window.location.pathname;
var filename = curr.substring(curr.lastIndexOf('/')+1);
jQuery(function($) {
	$('.external').click(function(){
		this.target = '_blank';
		if (filename!='about.html')
		{
			var obj = swfobject.getObjectById('bcr-flash-home');
			if (obj) { obj.stopVideo(); }
			var obj2 = swfobject.getObjectById('bcr-flash-clips');
			if (obj2) { obj2.stopVideo(); }
		}
	});
	$('#bcr-visit a').click(function(){
		if (filename!='about.html')
		{
			var obj = swfobject.getObjectById('bcr-flash-home');
			if (obj) { obj.stopVideo(); }
			var obj2 = swfobject.getObjectById('bcr-flash-clips');
			if (obj2) { obj2.stopVideo(); }
		}
		launchWindow("http://www.sonypictures.com/movies/stepbrothers/site/home.html?hs317=StepBrothers+VisitTheatricalSite","sb",1000,690,"no");
		return false;
	});
});
function launchWindow(url, name, width, height, scrollbars)
{
	screenX = (screen.width /2) - (width /2); // used to center.
	screenY = (screen.height /2) - (height /2); // used to center.
	launchWin = window.open(url,name,"toolbar=no,directories=no,menubar=no,scrollbars=" + scrollbars + ",resizable=yes,width=" + width + ",height=" + height + ",top=" + screenY + ",left=" + screenX + ",screenX=" + screenX + ",screenY=" + screenY+", status=no");
	launchWin.focus();	
}
