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


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); // for MSIE only


jQuery(document).ready(function(){
		
	
		
	jQuery('#topnav li ul a').attr('title', '');
	
	// add arrow to dropdown with nested menu
	jQuery('#topnav li ul li:has(ul)').each(function(){
		$link = jQuery(this).children('a');
		linktext = $link.html();
		$link.html(linktext+" &raquo;");
	});
	// add underline to parent while child is being viewed
	jQuery('#topnav li ul li ul').hover(function(){
		jQuery(this).parent().children('a').css('text-decoration', 'underline');
	},function(){
		jQuery(this).parent().children('a').css('text-decoration', 'none');
	});
	
		if (!jQuery.browser.msie) {	
		jQuery('#topnav li ul').css('opacity', 0.93);
	}
	if (jQuery.browser.msie) {
		if (jQuery('#topnav li ul li:has(ul)').size() == 0) {
			jQuery('#topnav li ul').css('opacity', 0.93);
		}
	}
		
	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('.comments-body-inner > p.comment:last-child').css('border', 'none');		
	jQuery('a#hidden-bio').click(function(){
		 
		jQuery('#bio').slideToggle(350);
	});	
	    
    jQuery(".entry-content img").lazyload({
		effect : "fadeIn",
		threshold : 1500,
		placeholder : "http://aviva-photography.com/blog/wp-content/themes/prophoto2/images/nodefaultimage.gif" 
	});		
		
			 
});

// flash header area
var params = {
	FlashVars: "path2xml=http://aviva-photography.com/blog/wp-content/uploads/p2/images.xml?60562",
	bgcolor: "#ffffff",
	wmode: "opaque"
}
swfobject.embedSWF("http://aviva-photography.com/blog/wp-content/themes/prophoto2/flash/flashheader.swf", "flash-header", "980", "250", "7.0.0", "http://aviva-photography.com/blog/wp-content/themes/prophoto2/flash/expressinstall.swf", false, params);
function randombiopics() {
	var biopics=new Array()
	
	biopics[0]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic1_1230595723.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[1]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic2_1230595746.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[2]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic3_1230595757.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[3]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic4_1230595773.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[4]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic5_1230595785.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[5]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic6_1230595800.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[6]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic7_1230595812.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[7]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic8_1230595824.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

	biopics[8]='<img id="biopic" src="http://aviva-photography.com/blog/wp-content/uploads/p2/biopic9_1230595841.jpg" width="215" height="312" alt="Aviva Photography Blog bio picture" />'

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

