


$(document).ready(function() {

	$("#ourSitesSelect").sSelect({ddMaxHeight: '600px'}).change(function() {
		var thisVal = $(this).val();
		if(thisVal != "" && thisVal != "0") {
			location=thisVal;
		}		
	});
	
	$("#magSubscriptSelect").sSelect({ddMaxHeight: '500px'}).change(function() {
		var thisVal = $(this).val();
		if(thisVal != "" && thisVal != "0") {
			location=thisVal;
		}
	});
	

});


// CondeNet_DestSites:
// 
// Array containing (name, url) pairs for the "Destination Sites" section of 
// the "Our Sites" dropdown.
// 
// Each pair is surrounded by { braces } and separated by a ',' comma, except
// the last pair in the array, which does not have a succeeding comma after 
// the closing brace:
//
// [
//     {
//         name: "",
//         url: ""
//     },
// ...
//     {
//         name: "",
//         url: ""
//     }
// ];
//


var CondeNet_DestSites = [
	{
		name: "Epicurious.com",
		url: "http://www.epicurious.com"
	},

	{
		name: "Concierge.com",
		url: "http://www.concierge.com"
	},

	{
		name: "Style.com",
		url: "http://www.style.com"
	},
/*
	{
		name: "Men.Style.com",
		url: "http://men.style.com"
	},
*/		
	{
		name: "Wired.com",
		url: "http://www.wired.com"
	},
	
	{
		name: "NutritionData.com",
		url: "http://www.nutritiondata.com"
	},
    
    {
		name: "Reddit.com",
		url: "http://www.reddit.com"
	}, 
	
	{
		name: "WebMonkey.com",
		url: "http://www.webmonkey.com"
	},

	{
		name: "ArsTechnica.com",
		url: "http://arstechnica.com/index.ars"
	}	
];




// CondeNet_MagSites:
//
// Array containing (name, url) pairs for the "Magazine Sites" section of the
// "Our Sites" dropdown.
// 
// Each pair is surrounded by { braces } and separated by a ',' comma, except
// the last pair in the array, which does not have a succeeding comma after 
// the closing brace:
//
// [
//     {
//         name: "",
//         url: ""
//     },
// ...
//     {
//         name: "",
//         url: ""
//     }
// ];
//
var CondeNet_MagSites = [
	{
		name: "Allure",
		url: "http://www.allure.com"
	},
	
	{
		name: "Architectural Digest",
		url: "http://www.archdigest.com"
	},
	
	{
		name: "Bon App&#233;tit",
		url: "http://www.epicurious.com/bonappetit/"
	},
	
	{
		name: "Brides.com",
		url: "http://www.brides.com"
	}/*,
	
	{
		name: "Cond&#233; Nast Portfolio",
		url: "http://www.portfolio.com"
	}*/,
	
	{
		name: "Cond&#233; Nast Traveler",
		url: "http://www.concierge.com/cntraveler/"
	},
	
	{
		name: "Concierge",
		url: "http://www.concierge.com"
	},
	
	{
		name: "Details",
		url: "http://www.details.com"
	},
	
	{
		name: "Epicurious",
		url: "http://www.epicurious.com"
	},
	
	{
		name: "Glamour",
		url: "http://www.glamour.com"
	},
	
	{
		name: "Golf Digest",
		url: "http://www.golfdigest.com"
	},	
	
	{
		name: "Golf World",
		url: "http://www.golfdigest.com/golfworld"
	},
	
	{
		name: "GQ",
		url: "http://www.gq.com"
	},
	
	{
		name: "Hotel Chatter",
		url: "http://www.hotelchatter.com"
	},
	
	{
		name: "Jaunted",
		url: "http://www.jaunted.com"
	},
	
	{
		name: "Lucky",
		url: "http://www.luckymag.com"
	},
/*	
	{
		name: "Men.Style",
		url: "http://men.style.com"
	},
*/	
	{
		name: "Nutrition Data",
		url: "http://www.nutritiondata.com"
	},
	
	{
		name: "Reddit",
		url: "http://www.reddit.com"
	},
	
	{
		name: "Self",
		url: "http://www.self.com"
	},
	
	{
		name: "Style",
		url: "http://www.style.com"
	},
	
	{
		name: "Teen Vogue",
		url: "http://www.teenvogue.com"
	},
	
	{
		name: "The New Yorker",
		url: "http://www.newyorker.com"
	},
	
	{
		name: "The Sartorialist",
		url: "http://www.thesartorialist.com"
	},
	
	{
		name: "Vanity Fair",
		url: "http://www.vanityfair.com"
	},
	
	{
		name: "Vegas Chatter",
		url: "http://www.vegaschatter.com"
	},
	
	{
		name: "Vogue",
		url: "http://www.vogue.com"
	},
	
	{
		name: "W",
		url: "http://www.wmagazine.com"
	},
	
	{
		name: "Wired",
		url: "http://www.wired.com"
	},
	
	{
		name: "Your Prom",
		url: "http://www.yourprom.com"
	}

];



// CondeNet_MagSubs:
//
// Array containing (name, url) pairs for the Magazine Subscriptions
// dropdown.
// 
// Each pair is surrounded by { braces } and separated by a ',' comma, except
// the last pair in the array, which does not have a succeeding comma after 
// the closing brace:
//
// [
//     {
//         name: "",
//         url: ""
//     },
// ...
//     {
//         name: "",
//         url: ""
//     }
// ];
//
var CondeNet_MagSubs = [
	{
		name: "Allure",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=ALL&amp;cds_page_id=1209&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Architectural Digest",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=ARD&amp;cds_page_id=405&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Bon App&eacute;tit",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=BNA&amp;cds_page_id=100&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Brides",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=BRI&amp;cds_page_id=633&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Cond&eacute; Nast Traveler",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=TVL&amp;cds_page_id=811&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Details",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=DET&amp;cds_page_id=1253&amp;cds_response_key=ILDN51UD"
	},
	
	/*{
		name: "Domino",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=DNO&amp;cds_page_id=21347&amp;cds_response_key=IRDNMUDD"
	},*/
	
	{
		name: "Glamour",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=GLM&amp;cds_page_id=956&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Golf Digest",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=GLF&amp;cds_page_id=17303&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Golf World",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=GWD&amp;cds_page_id=17323&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "GQ",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=GQM&amp;cds_page_id=976&amp;cds_response_key=ILDN51UD"
	},
	
	/*{
		name: "House &amp; Garden",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=HGD&amp;cds_page_id=420&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Jane",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=JNE&amp;cds_page_id=3147&amp;cds_response_key=ILDN51UD"
	},*/
	
	{
		name: "Lucky",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=LKY&amp;cds_page_id=799&amp;cds_response_key=ILDN51UD"
	},
	
	/*{
		name: "Men\'s Vogue",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=MVG&amp;cds_page_id=26741&amp;cds_response_key=IRDNMUDD"
	},*/
	
	{
		name: "Self",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=SLF&amp;cds_page_id=1231&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Teen Vogue",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=TNV&amp;cds_page_id=15117&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "The New Yorker",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=NYR&amp;cds_page_id=12454&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Vanity Fair",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=VYF&amp;cds_page_id=2367&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Vogue",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=VOG&amp;cds_page_id=1242&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "W",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=WMG&amp;cds_page_id=3158&amp;cds_response_key=ILDN51UD"
	},
	
	{
		name: "Wired",
		url: "https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=WIR&amp;cds_page_id=22463&cds_response_key=I2DNWTUD"
	}
];








/************************************************/
/* EXECUTE ON LOAD                              */
/************************************************/




document.writeln("<div class=\"sectionHead\">Our Sites</div>");
document.writeln("<form id=\"ourSites\" class=\"pageSelect\">");
document.writeln("    <select id=\"ourSitesSelect\" name=\"ourSites\">");
document.writeln("        <option value=\"0\">SELECT ONE</option>", 0);
document.writeln("        <option value=\"0\"></option>");
//document.writeln("        <option value=\"0\">Destination Sites:</option>");
//for (var i = 0; i < CondeNet_DestSites.length; ++i)
	//document.writeln("        <option value=\"" + CondeNet_DestSites[i].url + "\">" + CondeNet_DestSites[i].name + "</option>");
//document.writeln("        <option value=\"0\">- - - - - - - - - - - - - -</option>");
//document.writeln("        <option value=\"0\">Magazines Sites:</option>");
for (var i = 0; i < CondeNet_MagSites.length; ++i)
	document.writeln("        <option value=\"" + CondeNet_MagSites[i].url + "\">" + CondeNet_MagSites[i].name + "</option>");
document.writeln("    </select>");
document.writeln("</form>");


document.writeln("<div id=\"magSubs\" class=\"sectionHead\">Magazine Subscriptions</div>");
document.writeln("<form id=\"magSubscript\" class=\"pageSelect\">");
document.writeln("    <select id=\"magSubscriptSelect\" name=\"magSubs\">");
document.writeln("        <option value=\"0\">SELECT ONE</option>");
document.writeln("        <option value=\"0\"></option>");
document.writeln("        <option value=\"https://m1.buysub.com/webapp/wcs/stores/servlet/CategoryDisplay?catalogId=11451&storeId=11451&categoryId=10484&langId=-1&sourcekey=ILDN51SP\">View Special Offers</option>");
document.writeln("        <option value=\"https://m1.buysub.com/webapp/wcs/stores/servlet/CategoryDisplay?catalogId=11451&storeId=11451&categoryId=10585&langId=-1&sourcekey=ILDN51UD\">View All Titles</option>");
document.writeln("        <option value=\"0\">- - - - - - - - - - - - - -</option>");
for (var i = 0; i < CondeNet_MagSubs.length; ++i)
	document.writeln("        <option value=\"" + CondeNet_MagSubs[i].url + "\">" + CondeNet_MagSubs[i].name + "</option>");
document.writeln("    </select>");
document.writeln("</form>");


