// do not edit this file, it is created by the theme, any edits will be lost

jQuery(document).ready(function(){
	
	// handle contact form submission messages
	var hash = window.location.hash.substr(1);
	if ( hash == 'error' ) {
		jQuery(".error").css('display', 'block');
		jQuery(".error").animate({opacity: 1.0}, 3500);
		jQuery(".error").fadeTo(500, 0);
		jQuery(".error").slideUp(300);
	}
	if ( hash == 'success' ) {
		jQuery(".success").css('display', 'block');
		jQuery(".success").animate({opacity: 1.0}, 3500);
		jQuery(".success").fadeTo(500, 0);
		jQuery(".success").slideUp(300);
	}
	
	jQuery('.entry-post:last').css('border', 'none');
	var padding = jQuery('body.single .entry-content').css('padding-bottom');
	jQuery('.entry-post:last').css('padding-bottom', '0');
	jQuery('.entry-post:last').css('background-image', 'none');
		jQuery('#statcounter-wrapper br').remove();	
	jQuery('a#hidden-bio').click(function(){
				jQuery('#bio').slideToggle(350);
	});
		 
});




var params = {
	FlashVars: "path2xml=http://fairytaledreamer.com/wp-content/uploads/p2/images.xml?38508",
	bgcolor: "#ffffff",
	wmode: "opaque"
}
swfobject.embedSWF("http://fairytaledreamer.com/wp-content/themes/prophoto2/flash/flashheader.swf", "flash-header", "980", "325", "7.0.0", "http://fairytaledreamer.com/wp-content/themes/prophoto2/flash/expressinstall.swf", false, params);
sfHover = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

jQuery(document).ready(function(){        
    jQuery(".entry-content img").lazyload({
		effect : "fadeIn",
		threshold : 1500,
		placeholder : "http://fairytaledreamer.com/wp-content/themes/prophoto2/images/nodefaultimage.gif" 
	});
});
jQuery(document).ready(function(){
	jQuery(".form-message").animate({opacity: 1.0}, 3500);
	jQuery(".form-message").fadeTo(500, 0);
	jQuery(".form-message").slideUp(300);
});

function randombiopics() {
	var biopics=new Array()
	
	biopics[0]='<img id="biopic" src="http://fairytaledreamer.com/wp-content/uploads/p2/biopic1_1234430320.jpg" width="200" height="300" alt="Fairytale Dreamer Photography &#8211; LA Wedding Photographers Orange County Wedding Photography Los Angeles wedding photographer LA Photographers bio picture" />'

	biopics[1]='<img id="biopic" src="http://fairytaledreamer.com/wp-content/uploads/p2/biopic2_1234430575.jpg" width="200" height="300" alt="Fairytale Dreamer Photography &#8211; LA Wedding Photographers Orange County Wedding Photography Los Angeles wedding photographer LA Photographers bio picture" />'

	var biopic = Math.floor(Math.random()*(biopics.length));
	document.write(biopics[biopic]);
}	

