// 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');
	});
	
		
	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('a#hidden-bio').click(function(){
		 
		jQuery('#bio').slideToggle(350,function(){
			jQuery('#bio-outer').css('display', 'block');
			jQuery('#biocolumns').css('display', 'inline');
			jQuery('.biocolumn').css('display', 'block');
			});
	});	
		if (!jQuery.browser.msie) {	    
	    jQuery(".entry-content img").lazyload({
			effect : "fadeIn",
			threshold : 1500,
			placeholder : "http://www.homespunforte.com/wp-content/themes/prophoto2/images/nodefaultimage.gif" 
		});
	}		
		
	
			 
});

// flash header area


function biotwitter() {
	document.write('<div id="twitter-badge" style="width:176px;text-align:center"><embed src="http://twitter.com/flash/twitter_badge.swf"  flashvars="color1=8485241&type=user&id=56807483"  quality="high" width="176" height="176" name="twitter_badge" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br /><a style="font-size: 10px; color: #817979; text-decoration: none" href="http://twitter.com/HomeSpunForte">follow me on http://twitter.com/homespunforts</a></div>')
}
