
		
	  	  function loadJSON(url) {
			  var yahooPipe = 'http://pipes.yahoo.com/pipes/9oyONQzA2xGOkM4FqGIyXQ/run?&_render=JSON&_callback=processJSON&feed=';
			  var headID = document.getElementsByTagName("head")[0];         
			  var newScript = document.createElement('script');
			      newScript.type = 'text/javascript';
			      newScript.src = yahooPipe+url;
			  headID.appendChild(newScript);
			}
	  	  
	  	  
	  	  function processJSON(feed) {
				
				var usashipprice = '';
				var mexcanshipprice = '';
				var elseshipprice = '';		
								
			   	for (var i=0; i<feed.value.items.length; i++) {
			    	
			    	var the_title = feed.value.items[i].title;
			    	var the_description = feed.value.items[i].description;
			    	if (the_title == 'USA')
			    		{
				    	var usashipprice = the_description;
				    	}
				    else if (the_title == 'MexCan')
				    	{
				    	var mexcanshipprice = the_description;
				    	}
				    else if (the_title == 'UK')
				    	{
				    	var ukshipprice = the_description;
				    	}
				    else if (the_title == 'Else')				    
				    	{
				    	var elseshipprice = the_description;
				    	}
				    else if (the_title == 'Announce')				    
				    	{
				    	var announce = the_description;
				    	}
				    else if (the_title == 'Notice')				    
				    	{
				    	var notice = the_description;
				    	}
				    			    							   
			   	}
			   	
			  	jQuery('#us_price_ins').text(usashipprice);
			  	jQuery('#mexcan_price_ins').text(mexcanshipprice);
			  	jQuery('#uk_price_ins').text(ukshipprice);
			  	jQuery('#else_price_ins').text(elseshipprice);
			  	
			  	if (announce == '1') {
			  		var completemsg = '<div id="public_notice"><div class="notice_inner">' + notice + '</div></div>';
			  		jQuery('#page').before(completemsg);
			  	}
			  	
			  	
			}
			
			loadJSON('http://www.darngoodyarn.com/dgypricefeed');