

/** 
 *
 * REGIONAL LAYOUTS
 *
**/
jQuery(document).ready( function() {
	if(jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7)
	{
		jQuery("#text-size a").textresizer({
	        target: "div#content",
	        type: "fontSize",
			selectedIndex: 0,
	        sizes: [ 
	           "100%", 
	           "120%" 
	        ]
	     });		
	}
	else
	{
		jQuery("#text-size a").textresizer({
	        target: "div#content",
	        type: "cssClass",
			selectedIndex: 0,
	        sizes: [ 
	           "small-text", 
	           "large-text" 
	        ]
	     });				
	}
	
	// Placeholder text
	jQuery('input[type=text]').bind('focus', function() {
		if ( $(this).attr('placeholder') && $(this).val() == $(this).attr('placeholder') ) $(this).val('');
	}).bind('blur', function() {
		if ( $(this).attr('placeholder') && !$(this).val() ) $(this).val( $(this).attr('placeholder') );
	}).each( function() {
		if ( !$(this).attr('placeholder') && $(this).val() != "" ) $(this).attr('placeholder', $(this).val() );
	});

	var check;

	jQuery('a#disclaimerPopup').click(function () {

		$('body').append('<div id="popup-mask"></div><div id="media-popup"><div class="popup-container"><p>This report has been prepared by the Administrators ("LDD"), for creditors (including unit holders) of Australian Property Custodian Holdings Ltd. ("APCHL") in its capacity as responsible entity ("RE") for the Prime Retirement and Aged Care Property Trust ("Prime Trust") (Administrators appointed) (Receivers and Managers Appointed) (Controllers Appointed) ACN: 095 474 436. In order to view the report you must make the following declaration:<br/><br/>I hereby declare that I am either, a creditor or unit holder of APCHL, or authorised by LDD to access this report. I understand that receipt of this report is under a seal of confidentiality and I will not disclose any details contained in this report to any person other than my professional advisor. <br/><br/>To make this declaration and access the report, please click "Yes" below.<br/><br/>Alternatively, click "No" to exit this screen.<br/><br/>If you wish to discuss this matter or otherwise are a stakeholder wishing to receive a copy of the report, please contact this office on (03) 9679 2222.</p><div class="popup-buttons"><a id="yes" href="' + $(this).attr('href') + '" target="_blank" class="prominent"><span>Yes</span></a><a id="no" href="#No" class="prominent"><span>No</span></a></div></div></div>');

		// center it horizontally
		var width = $(window).width() / 2 - $('#media-popup').width() / 2;
		var height = $(window).height() / 2 - $('#media-popup').height() / 2;		
		$('#media-popup').css({left: width, top: height});

		// fill the mask
		$('#popup-mask').css({width:$(window).width(), height:$(document).height()});

		return false;

	});

	// center it horizontally on window resize	
	jQuery(window).resize(function () {
		var width = $(window).width() / 2 - $('#media-popup').width() / 2;
		var height = $(window).height() / 2 - $('#media-popup').height() / 2;		
		$('#media-popup').css({left: width, top: height});
				
		$('#popup-mask').css({width:$(window).width(), height:$(document).height()});		
	});
	
	jQuery('#media-popup a#no').live('click', function () {
		$('#popup-mask, #media-popup').remove();
		return false;
	});
	
	jQuery('#media-popup a#yes').live('click', function () {
		$('#popup-mask, #media-popup').remove();		
	});	

});



