jQuery(function($) {
	$('.external').click(function(){
		this.target = '_blank';
		var obj = swfobject.getObjectById('bcr-flash-home-swf');
		if (obj) { obj.stopVideo(); }
		var obj2 = swfobject.getObjectById('bcr-flash-clips-swf');
		if (obj2) { obj2.stopVideo(); }
	});
	$('#bcr-enter-popup').click(function(){
	
		var obj = swfobject.getObjectById('bcr-flash-home-swf');
		if (obj) { obj.stopVideo(); }
		var obj2 = swfobject.getObjectById('bcr-flash-clips-swf');
		if (obj2) { obj2.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/nickandnorah/site/?hs317=NickNorasInfinitePlaylist+enterthesite";
	  	var popup = window.open(url,'remote',windowprops); // open popup window with properties
		popup.resizeTo(screen.width,screen.height);
		
		return false;
	});
});