
function openParent(url)
{
	var parent;
	if (window.opener && window.opener != 'undefined' 
		&& window.opener.closed && window.location.protocol != 'https:') {
		parent = window.opener;
		try {
			parent.document.location = url;
		} catch (e) {
			alert(e);
		}
	} else {
		parent = window.open(url, '_blank');
	}
	parent.focus();
	return parent;
}
function readyParent()
{
	var parent;
	if (window.opener  && window.opener != 'undefined' && !window.opener.closed) {
		parent = window.opener;
	} else {
		parent = window.open('about:blank', '');
	}
	return parent;
}

function attachOpenParent(selector)
{
	$(selector).click(function () {
		openParent($(this).attr('href'));
		return false;
	});
}

$(function() {
	attachOpenParent(".prvcy");
});
