var curr = window.location.pathname;
var filename = curr.substring(curr.lastIndexOf('/')+1);
jQuery(function($) {
	$('#box_wallpapers a,#box_ps3 a,#box_icons a,#box_iphone a,a.bcr_blank,area.bcr_blank').click(function(){
		this.target = "_blank";
		if (filename=='clips.html')
		{
			var obj = swfobject.getObjectById('bcr-flash');
			if (obj) { obj.stopVideo(); }
		}
	});
	$('#bcr-visit a').click(function(){
		if (filename=='clips.html')
		{
			var obj = swfobject.getObjectById('bcr-flash');
			if (obj) { obj.stopVideo(); }
		}
		
		var w = screen.width; //fixed width
		var h = screen.height; //fixed height
		leftPosition = 0;                      // centering horizontal position to middle of screen
  		topPosition = 0;          // centering vertical position to middle of screen
  		var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition +',toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no'; //set popup window properties
		var url = "http://www.sonypictures.com/movies/hancock/site/main.php?hs317=Hancock+VisitTheatricalSite";
	  	var popup = window.open(url,'remote',windowprops); // open popup window with properties
		
		return false;
	});
});