
	
	
$(document).ready(function(){
	
	initBgStretcher();

	$("#footer-bg").css({ opacity: 0.4 });
	$("#header-bg").css({ opacity: 0.4 });
	$("div.gsb_bg").css({ opacity: 0.3 });
	$("div.ftr_sep").css({opacity: 0.5 });
	$("div.hdr_sep").css({opacity: 0.5 });
	$("#sec_identifier").css({opacity: 0.5});

	$(".fiftypercent").css({opacity: 0.5});

	//$('BODY').append($('#content'));

	$('BODY').append($('#header'));
	$('BODY').append($('#logo-spacer'));
	$('BODY').append($('#container'));
	$('BODY').append($('#footer'));
	$('BODY').append($('#popup-box'));

	//$('#content').css({'z-index': 10000});

	$("#"+selectedMenu+" a").addClass("menuSelected");		

	
	if(!(typeof pageInit === 'undefined'))
	{
		pageInit();
	}

	var ua = navigator.userAgent;

	if( /iPad/i.test(ua) || /iPhone OS 3_1_2/i.test(ua) || /iPhone OS 3_2_2/i.test(ua) || /iPhone/i.test(ua) )
	{
		window.onscroll = function() {
		  document.getElementById('bgstretcher').style.top =
			 (window.pageYOffset) + 'px';
		};	
	}

});



function initBgStretcher(){


	$('BODY').bgStretcher({
		images: ['images/bg/'+bgimage],
		imageWidth: 1280, 
		imageHeight: 852, 
		slideDirection: 'W',
		slideShow: false,
		transitionEffect: 'superSlide',
		sequenceMode: 'normal',
		pagination: '#nav',
		anchoring: 'center center',
		anchoringImg: 'center center'
			});
}

	function fbs_click()
	{
		u = pageURL;
		t = pageTitle;

		window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer',toolbar=0,status=0,width=450,height=250);
		return false;

	}

	function twt_click()
	{
		u = pageURL;
		t = encodeURIComponent('Whistler & Vancouver Wedding & Portraiture Lifestyle Photographer | gadboisphotography.ca via @gadboisphoto');

		window.open('http://twitter.com/home?status='+t,toolbar=0,status=0,width=450,height=250);
		return false;

	}


