Cufon.replace('h4', { fontFamily: 'HelveticaNeue' });
Cufon.replace('h2', { fontFamily: 'HelveticaNeue' });
Cufon.replace('div#content > div.right h3', { fontFamily: 'HelveticaNeue' });

jQuery(document).ready( function(){
	/*jQuery(window).bind("resize", resizeWindow);
	
	function resizeWindow(e) {
		var documentHeight = jQuery(document).height();
		var pageHeight = jQuery('div#pageWrapper').height();
		if(pageHeight < documentHeight){
			jQuery('div#pageWrapper').height(documentHeight);
		}
	}
	resizeWindow();
	var wHeight = jQuery(window).height();
	var sHeight = jQuery(window).scrollTop();
	//jQuery('div.erik, div.josh').css('position','relative').css('top',sHeight-wHeight);
	
	jQuery(window).scroll( function(){
		wHeight = jQuery(window).height();
		sHeight = jQuery(window).scrollTop();
		//jQuery('div.erik, div.josh').css('top',sHeight-wHeight);
	});*/
	jQuery('form#searchform input#s').attr('value','Search').focus(function(){
		if(jQuery(this).attr('value') == 'Search'){
			jQuery(this).attr('value', '');
		}
	}).blur(function(){
		if(jQuery(this).attr('value') == ''){
			jQuery(this).attr('value', 'Search');
		}
	});
	
	var allEntries = jQuery('div.entry');
	var iTunesLink = jQuery('a.itunesLink').attr('href');
	for(i=0; i<allEntries.length; i++){
		if(jQuery(allEntries[i]).has('img.leftcol').length > 0){
			jQuery(allEntries[i]).find('img.leftcol').parents('p').addClass('hide');
			jQuery(allEntries[i]).children('div.right').before(
				'<div class="left"><img src="'+jQuery(allEntries[i]).addClass('twoColumn').find('img.leftcol').attr('src')+'" alt="'+jQuery(allEntries[i]).find('img.leftcol').attr('alt')+'" title="'+jQuery(allEntries[i]).find('img.leftcol').attr('alt')+'" /><a href="http://www.neovisionproductions.com/itunes" class="subscribeBtn">Subscribe</a><a href="'+jQuery(allEntries[i]).find('a.powerpress_link_d').attr('href')+'" class="downloadBtn">Download</a></div>'
			);
		}
	}
});
