
$(document).ready(function(){


	    /*  ALL EXTERNAL LINKS OPEN IN NEW WINDOW  */
	    
		jQuery("a[href^='http:']").not("[href*='peanutbutterandjargon.com']").attr('target','_blank');
	    
	    
	    /*  CHECKLIST TOGGLE  */
	    
	    $("div.post ul li, body.recipe ul li").toggle(
	      function () {
	        $(this).css({"text-decoration":"line-through"});
	      },
	      function () {
	        $(this).css({"text-decoration":"none"});
	      }
	    );
	
	
	    /*  JQUERY SPAM BLOCKER  */	
	
		$('a.email').each(function(){
			e = this.rel.replace('/','@').replace('site','peanutbutterandjargon.com');
			this.href = 'mailto:' + e;
		});
		
		
	    /*  CREATE PRINT DIV FOR RECIPE  */
	    
		if ($('div#fullstory h4').length != 0) {
				$('div#fullstory h4:last, div#fullstory h4:last ~ address, div#fullstory h4:last ~ ul, div#fullstory h4:last ~ p').wrapAll('<div id="print-recipe"></div>');
		} else {
				$('p#print-meta').hide();
		};
	
	
		/*  PRINT LINK FOR RECIPE  */
		$("#print-recipe-link").click(function(){
			$("div#print-recipe").printElement(
				{ leaveOpen:true, printMode:'popup', printBodyOptions:
					{ styleToAdd:'padding:10px;margin:10px;',
					  classNameToAdd : 'recipe' }
				});
            });


	});


    /*  LOAD JQUERY LIGHTBOX  */
    
	$(function() {
        $('div.post a.lightbox').lightBox();
    });
    
    
    /*  PRINT RECIPE LOCATION  */
    




