// Ad management routines for Splendor in the Raw

function contains(haystack, needle) {
	if (haystack.indexOf(needle) != -1) {
		return true;
	} else {
		return false;
	}
}

$(document).ready(function(){
	
	var deck = new Array();
	var loc = document.location.href;
	
	// template
	if (contains(loc, "nothing.html")) {
		/* 468x60  */ deck[1] = '';
		/* 120x60  */ deck[2] = '';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '';
	}
	
	// home page and default - house ads
	
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/messageboards/"><img src="/ads/CTJ_WebAd_300x250_MessgBd.png" alt="CTJ_WebAd_300x250_MessgBd" width="300" height="250" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_300x250_Affil2.jpg" alt="CTJ_WebAd_300x250_Affil2" width="300" height="250" /></a>';

	
	// terms & conditions
	if (contains(loc, "terms.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_468x60_BoR.png" alt="CTJ_WebAd_468x60_BoR" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://click.linksynergy.com/fs-bin/click?id=JqYdGVbAk3M&offerid=164816.10000013&subid=0&type=4"><img src="/ads/phionbalance300x250.jpg" alt="phionbalance300x250" width="300" height="250" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_300x250_Affil2.jpg" alt="CTJ_WebAd_300x250_Affil2" width="300" height="250" /></a>';
	}
	
	// privacy policy
	if (contains(loc, "privacy.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=90115&u=427474&m=13478&urllink=&afftrack="><img src="http://www.shareasale.com/image/OGHpets468x60.gif"  border="0"></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://www.healthforce.com/index.php?&aff_id=55&banner_id=18"><img src="/ads/HealthForce_300x250.png" alt="HealthForce_300x250" width="300" height="250" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_300x250_Affil2.jpg" alt="CTJ_WebAd_300x250_Affil2" width="300" height="250" /></a>';
	}
	
	// ad sales
	if (contains(loc, "adsales.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_468x60_Affil.png" alt="CTJ_WebAd_468x60_Affil" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=96401&u=427474&m=12767&urllink=&afftrack="><img src="http://www.shareasale.com/image/320.jpg"  border="0"></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html" target="_blank"><img border="0" src="http://thebodydeliaffiliate.com/banners/250-1.jpg" width="250" height="250"></a>';
	}
	
	// affiliate program
	if (contains(loc, "affiliateprogram.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_468x60_Kitchen.png" alt="CTJ_WebAd_468x60_Kitchen" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_300x600_BoR2.jpg" alt="CTJ_WebAd_300x600_BoR2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '';
	}
	
	// contact us
	if (contains(loc, "contact.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_468x60_Kitchen.png" alt="CTJ_WebAd_468x60_Kitchen" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=226770&u=427474&m=12767&urllink=&afftrack="><img src="http://www.shareasale.com/image/12767/120x60_green-check.jpg"  border="0"></a>';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html" target="_blank"><img border="0" src="http://thebodydeliaffiliate.com/banners/250-1.jpg" width="250" height="250"></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x250_Choc2.jpg" alt="CTJ_WebAd_300x250_Choc2" width="300" height="250" /></a>';
	}
	
	// about tina jo
	if (contains(loc, "about-tina-jo.html")) {
		/* 468x60  */ deck[1] = '<img src="/ads/CTJ_WebAd_468x60_BoR.png" alt="CTJ_WebAd_468x60_BoR.png" width="468" height="60" />';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.theanimalrescuesite.com/tpc/ARS_linktous_120x60_01"><img alt="The Animal Rescue Site" src="http://www.greatergood.com/images/linktous/120x60_ars-oneclick.jpg"></img></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_300x600_BoR2.jpg" alt="CTJ_WebAd_300x600_BoR2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.bestfriends.org/"><img src="/ads/BestFriends_300x250.png" alt="BestFriends_300x250" width="300" height="250" /></a>';
	}
	
	// services
	if (contains(loc, "services.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_468x60_Kitchen.png" alt="CTJ_WebAd_468x60_Kitchen" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<img src="/ads/CTJ_WebAd_120x60_BoR.png" alt="CTJ_WebAd_120x60_BoR.png" width="120" height="60" />';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://myorganicacres.com/index.php?id=4132"><img src="/ads/OrganicAcres__300x600_1.png" alt="OrganicAcres__300x600_1" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_300x250_Affil3.jpg" alt="CTJ_WebAd_300x250_Affil3" width="300" height="250" /></a>';
	}
	
	// testimonials
	if (contains(loc, "testimonials.html")) {
		/* 468x60  */ deck[1] = '<img src="/ads/CTJ_WebAd_468x60_BoR.png" alt="CTJ_WebAd_468x60_BoR.png" width="468" height="60" />';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/kidsinthekitchen/"><img src="/ads/CTJ_WebAd_300x600_Kids.jpg" alt="Real Life Raw: Kids in the Kitchen" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x250_Kitchen3.jpg" alt="CTJ_WebAd_300x250_Kitchen3" width="300" height="250" /></a>';
	}
	
	// seen & heard
	if (contains(loc, "seenandheard.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/adsales.html"><img src="/ads/CTJ_WebAd_300x600_Advertise2.jpg" alt="CTJ_WebAd_300x600_Advertise2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=96401&u=427474&m=12767&urllink=&afftrack="><img src="http://www.shareasale.com/image/320.jpg"  border="0"></a>';
	}
	
	// ask tina jo
	if (contains(loc, "asktinajo.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_468x60_BoR.png" alt="CTJ_WebAd_468x60_BoR" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=89564&u=427474&m=13478&urllink=&afftrack="><img src="/ads/ourgreenhouse_120x60.gif" alt="ourgreenhouse_120x60" width="120" height="60" /></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="/blog/services.html"><img src="/ads/CTJ_WebAd_300x250_30toRaw4.jpg" alt="CTJ_WebAd_300x250_30toRaw4" width="300" height="250" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html" target="_blank"><img border="0" src="http://thebodydeliaffiliate.com/banners/250-1.jpg" width="250" height="250"></a>';
	}
	
	// Raw for Beginners
	if (contains(loc, "/raw_for_beginners/")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://youbars.com/"><img src="/ads/YouBar__468x60_1.png" alt="YouBar__468x60_1" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<img src="/ads/CTJ_WebAd_120x60_BoR.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" />';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/services.html"><img src="/ads/CTJ_WebAd_300x600_30toRaw4.jpg" alt="CTJ_WebAd_300x600_30toRaw4" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x250_Kitchen3.jpg" alt="CTJ_WebAd_300x250_Kitchen3" width="300" height="250" /></a>';
	}
	
	// calculate nutrients
	if (contains(loc, "calculate-nutrients.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.essentiallivingfoods.com/?a_aid=4dcd67618d248"><img src="/ads/elf_468x60.jpg" alt="Essential Living Foods" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/services.html"><img src="/ads/CTJ_WebAd_300x600_Coach2.jpg" alt="CTJ_WebAd_300x600_Coach2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.cheftinajo.com/kidsinthekitchen/"><img src="/ads/CTJ_WebAd_300x250_Kids.jpg" alt="CTJ_WebAd_300x250_Kids.jpg" width="300" height="250" /></a>';
	}

	// kitchen setup
	if (contains(loc, "kitchen-setup.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.foodmatters.tv/AP.aspx?ID=547&EID=5974341" target="_blank"><img src="http://www.foodmatters.tv/images/googleAffiliates/468x60FMtheDVD.jpg" alt="Food Matters - Learn from the World"s Leaders in Nutrition and Natural Healing" width="468" height="60" border="0" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x600_Kitchen2.jpg" alt="CTJ_WebAd_300x600_Kitchen2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="new" target="_blank" href="http://click.linksynergy.com/fs-bin/click?id=JqYdGVbAk3M&offerid=127265.10000810&subid=0&type=4"><IMG border="0"   alt="Gaiam.com, Inc" src="http://ad.linksynergy.com/fs-bin/show?id=JqYdGVbAk3M&bids=127265.10000810&subid=0&type=4&gridnum=13"></a>';
	}
	
	// tips & tricks
	if (contains(loc, "/tips_tricks/")) {
		/* 468x60  */ deck[1] = '<a target="new" target="_blank" href="http://click.linksynergy.com/fs-bin/click?id=JqYdGVbAk3M&offerid=164816.10000144&subid=0&type=4"><IMG border="0"   alt="Basic animated banner for Probiotics" src="http://ad.linksynergy.com/fs-bin/show?id=JqYdGVbAk3M&bids=164816.10000144&subid=0&type=4&gridnum=1"></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x250 */ deck[3] = '';
		/* 300x600 */ deck[4] = '<a target="_blank" href="http://www.blendtec.com/productDetails.aspx?id=27&affiliateid=264437"><img src="/ads/Blendtec_260x600.jpg" alt="Blendtec_260x600" width="260" height="600" /></a>';
	}
	
	// recipes - intro
	if (contains(loc, "/recipes/")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x600_Kitchen2.jpg" alt="CTJ_WebAd_300x600_Kitchen2" width="300" height="600" /></a>';
	}
	
	// recipes - juices & smoothies
	if (contains(loc, "juices-and-smoothies.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.amazon.com/gp/product/B000GIGZXM/ref=as_li_ss_tl?ie=UTF8&tag=cheftinajo-20&linkCode=as2&camp=217145&creative=399369&creativeASIN=B000GIGZXM"><img src="/ads/CTJ_WebAd_468x60_Blendtec.jpg" alt="CTJ_WebAd_468x60_Blendtec.jpg" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.cheftinajo.com/7dayjuicefeasting"><img src="/ads/CTJ_WebAd_300x600_Juice.jpg" alt="CTJ_WebAd_300x600_Juice.jpg" width="300" height="600" /></a>';
	}
	
	// recipes - appetizers
	if (contains(loc, "appetizers.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.essentiallivingfoods.com/?a_aid=4dcd67618d248"><img src="/ads/elf_468x60.jpg" alt="Essential Living Foods" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.excaliburdehydrator.com/"><img src="/ads/Excalibur_WebAd_300x600.png" alt="Excalibur_WebAd_300x600" width="300" height="600" /></a>';
	}
	
	// recipes - salads
	if (contains(loc, "salads.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_468x60_Kitchen.png" alt="CTJ_WebAd_468x60_Kitchen" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://myorganicacres.com/index.php?id=4132"><img src="/ads/OrganicAcres__300x600_1.png" alt="OrganicAcres__300x600_1" width="300" height="600" /></a>';
	}
	
	// recipes - soups
	if (contains(loc, "soups.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_468x60_BoR.png" alt="CTJ_WebAd_468x60_BoR" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.blendtec.com/productDetails.aspx?id=27&affiliateid=264437"><img src="/ads/Blendtec_260x600.jpg" alt="Blendtec_260x600" width="260" height="600" /></a>';
	}
	
	// recipes - main courses
	if (contains(loc, "main-courses.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_468x60_Affil2.png" alt="CTJ_WebAd_468x60_Affil2" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/services.html"><img src="/ads/CTJ_WebAd_300x600_Coach2.jpg" alt="CTJ_WebAd_300x600_Coach2" width="300" height="600" /></a>';
	}
	
	// recipes - dips & spreads
	if (contains(loc, "dips-spreads.html")) {
		/* 468x60  */ deck[1] = '<a target="new" target="_blank" href="http://click.linksynergy.com/fs-bin/click?id=JqYdGVbAk3M&offerid=164816.10000144&subid=0&type=4"><IMG border="0"   alt="Basic animated banner for Probiotics" src="http://ad.linksynergy.com/fs-bin/show?id=JqYdGVbAk3M&bids=164816.10000144&subid=0&type=4&gridnum=1"></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x600_Kitchen2.jpg" alt="CTJ_WebAd_300x600_Kitchen2" width="300" height="600" /></a>';
	}
	
	// recipes - side dishes
	if (contains(loc, "side-dishes.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.essentiallivingfoods.com/?a_aid=4dcd67618d248"><img src="/ads/elf_468x60.jpg" alt="Essential Living Foods" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_300x600_Affil2.jpg" alt="CTJ_WebAd_300x600_Affil2" width="300" height="600" /></a>';
	}
	
	// recipes - desserts
	if (contains(loc, "desserts.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.ifood.tv/cheftinajo"><img src="/ads/ifood_120x60.png" alt="Chef Tina Jo Videos on iFood.tv" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://astore.amazon.com/cheftinajo-20"><img src="/ads/CTJ_WebAd_300x600_Choc2.jpg" alt="CTJ_WebAd_300x600_Choc2" width="300" height="600" /></a>';
	}
	
	// recipes - gourmet or special evening
	if (contains(loc, "gourmet-or-special-evening.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html" target="_blank"><img src="/ads/body-deli-468x60.png" width="468" height="60"/></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://www.dpbolvw.net/dd106iqzwqyDHNFINHIDFELEHJFI" onmouseover="window.status="http://www.organicbouquet.com";return true;" onmouseout="window.status=" ";return true;">  <img src="http://www.lduhtrp.net/s9118tkocig15B36B56132925736" alt="Eco-Elegant Flowers" border="0"/></a>';
		/* 300x600 */ deck[3] = '';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://cheftinajo.com/blog/asktinajo.html"><img src="/ads/CTJ_WebAd_300x600_Recipes2.jpg" alt="CTJ_WebAd_300x600_Recipes2" width="300" height="600" /></a>';
	}
	
	// the raw lifestyle
	if (contains(loc, "/the-raw-lifestyle/")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.bodyecologyaffiliates.com/idevaffiliate.php?id=132_6_1_3" target="_blank"><img border="0" src="http://www.bodyecologyaffiliates.com/banners/animatedbanner1.gif" width="468" height="60" alt=""></a>';
		/* 120x60  */ deck[2] = '<img src="/ads/CTJ_WebAd_120x60_BoR.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" />';
		/* 300x250 */ deck[3] = '<a target="_blank" href="http://myorganicacres.com/index.php?id=4132"><img src="/ads/OrganicAcres__300x250_1.png" alt="OrganicAcres__300x250_1" width="300" height="250" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.kqzyfj.com/4l117xdmjdl04A25A45021692AA6"><img src="/ads/Sunfoods_300x250_FreshlifeSprouter.png" alt="Sunfoods_300x250_FreshlifeSprouter" width="300" height="250" /></a>';
	}
	
	// raw on a budget
	if (contains(loc, "raw-on-a-budget.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.bodyecologyaffiliates.com/idevaffiliate.php?id=132_6_1_3" target="_blank"><img border="0" src="http://www.bodyecologyaffiliates.com/banners/animatedbanner1.gif" width="468" height="60" alt=""></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://myorganicacres.com/index.php?id=4132"><img src="/ads/OrganicAcres__300x600_2.jpg" alt="OrganicAcres__300x600_2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://essentiallivingfoods.com/trail-mix/superfood-trail-mix-8oz.html?a_aid=4dcd67618d248&amp;a_bid=71dbccda"><img src="http://essentiallivingfoods.com/pap/accounts/default1/banners/trailmix.gif" alt="Essential Living Foods"  /></a>';
	}
	
	// parties, gatherings and entertaining
	if (contains(loc, "entertaining.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/7dayjuicefeasting/"><img src="/ads/CTJ_WebAd_300x600_Juice.jpg" alt="CTJ_WebAd_300x600_Juice.jpg" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<img src="/ads/CTJ_WebAd_300x250_BoR.png" alt="CTJ_WebAd_300x250_BoR.png" width="300" height="250" /></a>';
	}
	
	// traveling
	if (contains(loc, "traveling.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.sproutman.com/affiliates/jrox.php?id=799_1_bid_2"><img src="http://www.sproutman.com/affiliates/image.php?bid=2&mid=799" width="468" height="60" border="0"/></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=192112&u=427474&m=14966&urllink=&afftrack="><img src="http://www.shareasale.com/image/160x600-Alien-v2.gif" alt="Ecolunchbox" border="0"></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.kqzyfj.com/4l117xdmjdl04A25A45021692AA6" onmouseover="window.status="http://www.sunfood.com";return true;" onmouseout="window.status=" ";return true;"><img src="/ads/Sunfoods_300x250_Tribest.png" alt="Sunfoods_300x250_Tribest" width="300" height="250" /></a>';
	}
	
	// restaurants
	if (contains(loc, "restaurants.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.foodmatters.tv/AP.aspx?ID=547&EID=5974341" target="_blank"><img src="http://www.foodmatters.tv/images/googleAffiliates/468x60FMtheDVD.jpg" alt="Food Matters - Learn from the World"s Leaders in Nutrition and Natural Healing" width="468" height="60" border="0" /></a>';
		/* 120x60  */ deck[2] = '<img src="/ads/CTJ_WebAd_120x60_BoR.png" alt="CTJ_WebAd_120x60_BoR.png" width="120" height="60" />';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://myorganicacres.com/index.php?id=4132"><img src="/ads/OrganicAcres__300x600_1.png" alt="OrganicAcres__300x600_1" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=96401&u=427474&m=12767&urllink=&afftrack="><img src="http://www.shareasale.com/image/320.jpg"  border="0"></a>';
	}
	
	// kids
	if (contains(loc, "kids.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/kidsinthekitchen/"><img src="/ads/CTJ_WebAd_300x600_Kids.jpg" alt="Real Life Raw: Kids in the Kitchen" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?u=427474&b=283478&m=31172&afftrack=&urllink=www%2Eamazinggrass%2Ecom%2Fchocolate%2Dgreen%2Dsuperfood%2Dpowder%2Ehtml" target="_blank"><img src="http://www.amazinggrass.com/media/affiliate/banner_ad_11.jpg" border="0"></a>';
	}
	
	// beauty
	if (contains(loc, "beauty.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.bodyecologyaffiliates.com/idevaffiliate.php?id=132_6_1_3" target="_blank"><img border="0" src="http://www.bodyecologyaffiliates.com/banners/animatedbanner1.gif" width="468" height="60" alt=""></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html"><img src="/ads/bod-deli-300x600.png" alt="bod-deli-300x600" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=96401&u=427474&m=12767&urllink=&afftrack="><img src="http://www.shareasale.com/image/320.jpg"  border="0"></a>';
	}
	
	// my organic acres
	if (contains(loc, "my-organic-acres.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://www.essentiallivingfoods.com/?a_aid=4dcd67618d248"><img src="/ads/elf_468x60.jpg" alt="Essential Living Foods" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://thebodydeliaffiliate.com/186-0-1-15.html"><img src="/ads/bod-deli-300x600.png" alt="bod-deli-300x600" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://www.shareasale.com/r.cfm?b=215475&u=427474&m=12215&urllink=&afftrack="><img src="http://www.shareasale.com/image/12215/336X280.gif" alt="Globally conscious herbal teas and supplements" border="0"></a>';
	}
	
	// template
	if (contains(loc, "/tv_episodes/")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/blog/affiliateprogram.html"><img src="/ads/CTJ_WebAd_468x60_Affil.png" alt="CTJ_WebAd_468x60_Affil" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<img src="/ads/CTJ_WebAd_120x60_BoR.png" alt="CTJ_WebAd_120x60_BoR.png" width="120" height="60" />';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/2009/12/the-best-in-raw-2009.html"><img src="/ads/CTJ_WebAd_300x600_BoR2.jpg" alt="CTJ_WebAd_300x600_BoR2" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<a target="_blank" href="http://click.linksynergy.com/fs-bin/click?id=JqYdGVbAk3M&offerid=164816.10000013&subid=0&type=4"><img src="/ads/phionbalance300x250.jpg" alt="phionbalance300x250" width="300" height="250" /></a>';
	}
			
	// shop
	if (contains(loc, "shop.html")) {
		/* 468x60  */ deck[1] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge"><img src="/ads/CTJ_WebAd_468x60_3Day.png" alt="CTJ_WebAd_468x60_3Day.png" width="468" height="60" /></a>';
		/* 120x60  */ deck[2] = '<a target="_blank" href="http://cheftinajo.com/3daychallenge/"><img src="/ads/CTJ_WebAd_120x60_3Day.png" alt="CTJ_WebAd_120x60_3Day" width="120" height="60" /></a></a>';
		/* 300x600 */ deck[3] = '<a target="_blank" href="http://cheftinajo.com/blog/services.html"><img src="/ads/CTJ_WebAd_300x600_Coach2.jpg" alt="CTJ_WebAd_300x600_Coach2.jpg" width="300" height="600" /></a>';
		/* 300x250 */ deck[4] = '<img src="/ads/CTJ_WebAd_300x250_BoR.png" alt="CTJ_WebAd_300x250_BoR.png" width="300" height="250" />';
	}
	
	
	// //////////////////////////////////////////////////////////////////////
	
	// put the ads in their places
	
	for (j in deck) {
		$("#deck" + j).empty().append(deck[j]);
	}	

});
