// set the selected menu
function setmenu()
{
	// set all submenus to hidden
	//if (document.getElementById){ //DynamicDrive.com change
	//document.write('<style type="text/css">\n')
	//document.write('.submenu{display: none;}\n')
	//document.write('</style>\n')
	//}

	// set the main nav to the selected element
	if (mainNavSelected != '')
	{
		var mainNav = document.getElementById(mainNavSelected);
		mainNav.className = "margin active";
	}

	// display selected submenu
	if (subNavOn != '')
	{
		var displaySubNav = document.getElementById(subNavOn);
		displaySubNav.style.display = "block";
	}

	// set the subnav to the selected element
	if (subNavSelected != '')
	{
		var subNav = document.getElementById(subNavSelected);  			
		subNav.className="active";

		// set the class of the main menu to active
		var subNavMenu = document.getElementById(subNavSelected + "Menu");
		subNavMenu.style.display = "block";
	}
}

//Initialize the Image-Caption Arrays

ImageSize749208 = [
	{
		image:'pbpn_calibay_main_opt.jpg', 
		caption:'Juniper Ridge president and head wildcrafter Hall Newbegin harvesting an armful of Juniper.'},
	{
		image:'pbpn_cedar_main_opt.jpg', 
		caption:'Wildcrafting Juniper on the V6 ranch.'},
	{
		image:'pbpn_pinon_main_opt.jpg', 
		caption:'Wildflower Appreciation Day. Every Summer we take a day to enjoy the wildflowers—we turn off the phones, lock up the office, and walk out into the coastal mountains of gorgeous Northern California. Here we are on the Matt Davis trail on the west slope of Mt. Tamalpais, high on a coastal ridge with the fog below us. Now that\'s what I call a work day!'},
	{
		image:'pbpn_mountainfir_main.jpg', 
		caption:'Aaron Handler and Alli Darling clipping Douglas Fir tips to make our tea and sachets.'},
	{
		image:'pbpn_juniper_main_optimized.jpg', 
		caption:'Long time Juniper Ridge customer Nicole Stephenson wildcrafting Juniper that will be used in our Juniper soap, incense and sachet.'},
	{
		image:'pbpn_manzanita_main_opt.jpg', 
		caption:'Our Art Director Vicki Kuskowski is a woman of many talents. Not only did Vicki design our gorgeous website, catalog, everything else marketing related at Juniper Ridge, she\'s also an expert wildcrafter. Here she is unloading a bucket of juniper she harvested that will be used to make our Juniper incense, soap and sachet. Is there anything she\'s not good at?'},
	{
		image:'pbpn_mugwort_main_opt.jpg', 
		caption:'Farmers\' market salesperson, Jane Agapova, and long time Juniper Ridge customer Nicole Stephenson wildcrafting Juniper.'},
	{
		image:'pbpn_sweetgrass_main_opt.jpg', 
		caption:'President and head wildcrafter, Hall Newbegin, nerdily thumbing through one of his many plant books.'},
	{
		image:'pbpn_whitesage_main_opt.jpg', 
		caption:'While sustainable harvesting is easy when you\'re working with tall trees like Juniper, Douglas Fir and Cedar because they respond to pruning with vigorous new growth and they keep growing taller and taller, it gets much trickier with smaller shrubs like White Sage. White Sage\'s popularity has taken off as a worldwide phenomenon in past few years bringing hordes of harvesters to it\'s rather limited range. At the same time it\'s primary habitat is very small to begin with and is under termendous pressure from suburban sprawl. But the good news is that an individual White Sage plant can be harvested indfinitely in a way that doesn\'t harm the plant but stimulates new growth if harvesters pay attention to one simple rule—always harvest above the woody portion of the stem. I know it\'s slower to do it this way, but if you harvest below the woody portion you kill the stem—if you harvest above it there will be two clusters next year where you harvested one. There are a few bad apples among the new harvesters doing it the cheap fast way, and they are doing a tremendous amount of damage to the limited stands of white sage that still remain.'},
	{
		image:'pbc_soap_main.jpg', 
		caption:'Our production manager, Kelly Hatcher Mellon, cruising a hillside of Douglas Fir looking for succulent needle tips for our tea and sachets.'},
	{
		image:'pbc_sachet_main_opt.jpg', 
		caption:'Our production manager, Kelly Hatcher Mellon, lowering buckets of Douglas Fir down a hillside.'},
	{
		image:'pbc_tea_main_opt.jpg', 
		caption:'Tom Taylor climbing a Douglas Fir to wildcraft some particularly succulent looking Douglas Fir needle tips.'},
	{
		image:'pbc_smudge_main_opt.jpg', 
		caption:'Rancher Jack Varian harvesting Black Sage—Every year we go down to Jack\'s gorgeous ranch in central California. In addition to being a rancher, Jack has so many skills and interests, I can’t begin to fit them all in here. He is an architect, an incredibly talented iron sculptor, and an ecological steward who prioritizes the long-term health of his land over short term profits. He has a gentle, engaging way that has thoroughly charmed all of us. Thanks for the great times Jack!'},
	{
		image:'pbc_wreaths_main.jpg', 
		caption:'At the hippie shack—Here we are loading the Douglas Fir into the drying room in Southern Oregon. In addition to the Douglas Fir tips for our tea, you can see our Cedar and Mugwort smudge sticks staked up on the right.'},
	{
		image:'pbc_giftpack_main_opt.jpg', 
		caption:'Wildcrafting isn\'t all work—wholesale manager Alli Darling, long-time Juniper Ridge customer Nicole Stephenson and Art Director Vicki Kuskowski having some fun after a day of harvesting Juniper.'},
	{
		image:'atc_giftpack_steepravine_opt.jpg', 
		caption:'Dragging tarps full of Juniper is hard work! Alli Darling, Nicole Stephenson, and Vicki Kuskowski carry a heavy load over to the truck. This Juniper will be dried and made into our Western Juniper soap and sachets.'},
	{
		image:'atc_giftpack_sachet_opt.jpg', 
		caption:'Alli Darling harvests Douglas Fir amidst a beautiful, feathery stand of Ocean spray.'},
	{
		image:'atc_giftpack_incense_opt.jpg', 
		caption:'Jered Nelson hard at working making incense holders for our incense gift packs.'},
	{
		image:'atc_giftpack_cascadia_opt.jpg', 
		caption:'Juniper Ridge owner Hall Newbegin wildcrafting in a forest of Douglas Fir.'},
	{
		image:'atc_wreath_siskiyou_opt.jpg', 
		caption:'The quiet little creek near our campsite during our Douglas Fir harvesting trip in Cave Junction, Oregon. It was sweltering hot that week, so we did a lot of creek swimming!'},
	{
		image:'atc_giftpack_pueblo_opt.jpg', 
		caption:'Nicole, Alli, and Vicki pose for a photo in a big pile of Juniper after a hard day\'s work.'},
	{
		image:'atc_giftpack_tea_opt.jpg', 
		caption:'Tom Taylor harvests Douglas Fir in Cave Junction, Oregon.'},
	{
		image:'atc_wreath_mttam_opt.jpg', 
		caption:'Hall Newbegin, president and head wildcrafter of Juniper Ridge, leads the way down the service road as the wildcrafting crew kicks off a long day of harvesting Douglas Fir. Notice how all the buckets are empty.'},
	{
		image:'pbc_incense_main_opt.jpg', 
		caption:'Half the challenge of wildcrafting is getting the plant trimmings to the truck. Here we are loading a tarp full of juniper onto the truck.'},
	{
		image:'atc_icense_sampler_opt.jpg', 
		caption:'Relaxing by the campfire with a cup of Juniper Ridge tea.'},
	{
		image:'atc_giftpack_soap_opt.jpg', 
		caption:'Jane, Reese, and Hall use the lift gate to load a full (and extremely heavy) tarp of Juniper into the truck.'},
	{
		image:'atc_giftpack_jrsampler_opt.jpg', 
		caption:'Fog and the beautiful Marin Headlands—many Juniper Ridge products have been inspired by this very spot. If you ever come to San Francisco, drive over the Golden Gate Bridge and explore the Headlands.'},
	{
		image:'atc_giftcertificate_opt.jpg', 
		caption:'Sun sets on a patch of White Sage.'},
	{
		image:'atc_teeshirt_opt.jpg', 
		caption:'A large, spiky Coulter Pinecone found at the V6 ranch, Parkfield, CA.'}
];

ImageSize749275 = [
	{
		image:'pbc_master_main_opt.jpg', 
		caption:'We always try to fit some fun time into our wildcrafting trips. This year on our trip to the V6 ranch, after we filled up the truck with Juniper, we headed off to the Parkfield Bluegrass Festival. If you go to the Parkfield Bluegrass festival next year, look for us there. We should be easy to spot—we\'re the ones with the clippers and the funky truck full of plant trimmings.'},
	{
		image:'121809_a.jpg', 
		caption:'Nothing beats a campfire after a great day of hiking in the home of white sage, near Anzo Burrego in Southern California. Looks like Laura, Hall and Vicki are sippin some White Sage tea too.'},	
	{
		image:'749275_a.jpg', 
		caption:'It is a labor of love to snip the Spring tips of the Douglas Fir for our Douglas Fir Tip Tea, but so worth that uniquely sweet flavor.'},	
	{
		image:'749275_b.jpg', 
		caption:'There is Tom way up in a Douglas Fir against the blue Oregon sky, getting the best Spring tips for our Douglas Fir Tip Tea.'},
	{
		image:'749275_c.jpg', 
		caption:'The whole gang hanging out on top of an old tractor on our Douglas Fir Tip wildcrafting trip last Spring. Not our tractor, we don\'t have any use for those things except to climb on.'},	
	{
		image:'749275_d.jpg', 
		caption:'Alli hauling her trash can, or maybe we should call it a highly-specialized, Douglas Fir Tip, wildcrafting device.'},
	{
		image:'749275_e.jpg', 
		caption:'The worst day wildcrafting is better than the best day in the office. be sure to become our friend on facebook to learn how to join us on hiking and wildcrafting trips.'},
	{
		image:'749275_f.jpg', 
		caption:'Although we are all about working hard, don\'t get us wrong, there is always plenty of time to stare at the view of expansive wilderness.'},
	{
		image:'749275_g.jpg', 
		caption:'Hall, founder of Juniper Ridge, is happiest with his Douglas Fir in the Spring getting ready for a new batch of the Douglas Fir Tip Tea.'},
	{
		image:'749275_h.jpg', 
		caption:'Old friends Alli and Vicki collecting Douglas Fir Tips for Douglas Fir Tip Tea. Be sure to join us on Facebook and check our blog to join us on wildcrafting trips and become our old friends too!'},
	{
		image:'749275_i.jpg', 
		caption:'Hall and the two Lauras going for a hike searching for Spring flowers in the heart of White Sage country near Anzo Borrego in Southern California'},
	{
		image:'749275_j.jpg', 
		caption:'Laura found what she was looking for in a Spring trip to Southern California last year: beautiful wildflowers, warm sunshine and plenty of hiking in the heart of White Sage country.'},
	{
		image:'749275_k.jpg', 
		caption:'The gang at the end of the trail: Anzo Borrego, Southern California, Spring 08.'},
	{
		image:'749275_l.jpg', 
		caption:'Laura looking for Yerba Buena on a beautiful Spring afternoon on the Central/Northern Coast in California. If you would like to learn how to join us on trips, please become our friend on Facebook and check our weblog.'}
];

ImageSize295450 = [
	{
		image:'atc_soap_bay_opt.jpg', 
		caption:'Reese Baker hard at work harvesting Juniper.'},
	{
		image:'atc_soap_siskiyou_opt.jpg', 
		caption:'A waterfall on the Steep Ravine trail on Mt. Tamalpais. This shot was taken on Wildflower Appreciation Day, 2005.'},
	{
		image:'atc_soap_sierra_opt.jpg', 
		caption:'Art Director Vicki Kuskowski roasting a marshmallow for smores at the V6 campsite.'},

	{
		image:'atc_sachet_siskiyou_opt.jpg', 
		caption:'A beautiful Parkfield, CA sunset on the V6 ranch. Reese brings his last bundle of Juniper back to the truck.'},

	{
		image:'atc_soap_pinon_opt.jpg', 
		caption:'Tom Taylor leans in to cut some Douglas Fir tips in Cave Junction, Oregon.'},

	{
		image:'atc_sachet_douglas_opt.jpg', 
		caption:'Here we are transporting Douglas Fir down a particularly steep slope. Kelly came up with a great pulley system to help us out.'},

	{
		image:'atc_tea_douglas_opt.jpg', 
		caption:'Vicki lost in a sea of Douglas Fir.'},

	{
		image:'atc_soap_juniper_opt.jpg', 
		caption:'Dara carries an armful of Juniper down a road on the V6 ranch.'},

	{
		image:'atc_sachet_juniper_opt.jpg', 
		caption:'Alli Darling helps to fill Juniper into the truck. The buckets in the back are what we use to clip the Juniper into, then we carry the buckets and load it into the truck. We still have a long way to go in this picture!'},

	{
		image:'atc_tea_manzanita_opt.jpg', 
		caption:'A full truck of Juniper with some happy wildcrafters on top.'},

	{
		image:'atc_soap_sage.jpg', 
		caption:'Nicole Stephenson carries a bundle of freshly-harvested Juniper on the V6 ranch. As the sun was setting, a group of herding cows came by to hang out with us while we were harvesting that day.'},

	{
		image:'atc_tea_whitesage_opt.jpg', 
		caption:'Vicki relaxes by the campfire after a tough day of wildcrafting. Juniper Ridge tea is a great way to warm up when dusk sets in at camp.'},
	{
		image:'atc_soap_coastal_opt.jpg', 
		caption:'Jane Apagova, our farmers\' market salesperson, has fun while wildcrafting Juniper.'},
{
		image:'atc_sachet_christmas_opt.jpg', 
		caption:'Lunch break while wildcrafting in Cave Junction, Oregon. It was scorching hot over this weekend so we settled into a routine of getting up at dawn to wildcraft and then taking free time in the afternoon to swim in the creek.'}	
];

ImageSize295300 = [
	{
		image:'atc_incense_cedar_right_main_opt.jpg', 
		caption:'Alli darling reaches to snip some Douglas Fir tips.'},
	{
		image:'atc_smudge_sierralarge_opt.jpg', 
		caption:'The Juniper truck is only half full—still a long way to go—but how can you beat working in such a beautiful place?'},
	{
		image:'atc_smudge_sisklarge_opt.jpg', 
		caption:'Reese Baker gets the stake bed truck ready to transport Juniper back to camp .'},

	{
		image:'atc_incense_pinon_right_main_opt.jpg', 
		caption:'Owner and head wildcrafter Hall Newbegin basks in the sun with a bundle of Juniper boughs after a long day of wildcrafting.'},

	{
		image:'atc_incense_dougfir_right_main_opt.jpg', 
		caption:'Alli Darling and Vicki Kuskowski unload Douglas Fir from tarps and hoist it onto tables in the drying room where it will stay for a few weeks until it\'s ready to be made into tea and sachets.'},

	{
		image:'atc_incense_juniper_right_main_opt.jpg', 
		caption:'A handful of Juniper berries plucked during a wildcrafting expedition.'},

	{
		image:'atc_smudge_mugwort_opt.jpg', 
		caption:'Nicole Stephenson hoists Juniper into the truck.'},

	{
		image:'atc_incense_sweetgrass_right_main_opt.jpg', 
		caption:'Dusk falls on the Illinois River in Cave Junction, Oregon.'},

	{
		image:'atc_smudge_sweetgrass_opt.jpg', 
		caption:'Aaron Handler harvests Douglas Fir on a steep hillside in Cave Junction, Oregon.'},

	{
		image:'atc_incense_sage_right_main_opt.jpg', 
		caption:'A shot of the campsite on our Douglas Fir harvesting trip in Cave Junction, Oregon.'},

	{
		image:'atc_smudge_wsmini_opt.jpg', 
		caption:'President and head wildcrafter Hall Newbegin loves White Sage!'},

	{
		image:'atc_smudge_sierramini_opt.jpg', 
		caption:'Kelly enjoys the sun while wildcrafting in beautiful Cave Junction, Oregon.'},

	{
		image:'atc_smudge_sisklarge_opt.jpg', 
		caption:'Reese Baker gets the stake bed truck ready to transport Juniper back to camp .'},

	{
		image:'atc_smudge_siskmini_opt.jpg', 
		caption:'Kelly and Vicki pose for the camera atop an abandoned piece of machinery found on the trail to where we harvested Douglas Fir.'}	
];

$(document).ready(function() {
   // put all your jQuery goodness in here.
   if ($("#ImageSize749208").length > 0)
   {
   		randomNumber = Math.floor(Math.random()*29); //change 5 to whatever the length is
   		$("#ImageSize749208").attr("background","Merchant2/assets/" + ImageSize749208[randomNumber].image);
   		$("#caption").html(ImageSize749208[randomNumber].caption);
   }
   
   if ($("#ImageSize749275").length > 0)
   {
   		randomNumber = Math.floor(Math.random()*14);
   		$("#ImageSize749275").attr("background","Merchant2/assets/" + ImageSize749275[randomNumber].image);
   		$("#caption").html(ImageSize749275[randomNumber].caption);
   }
   
      if ($("#ImageSize295450").length > 0)
   {
   		randomNumber = Math.floor(Math.random()*14);
   		$("#ImageSize295450").attr("background","Merchant2/assets/" + ImageSize295450[randomNumber].image);
   		$("#caption").html(ImageSize295450[randomNumber].caption);
   }
   

      if ($("#ImageSize295300").length > 0)
   {
   		randomNumber = Math.floor(Math.random()*14);
   		$("#ImageSize295300").attr("background","Merchant2/assets/" + ImageSize295300[randomNumber].image);
   		$("#caption").html(ImageSize295300[randomNumber].caption);
   }
 });
