

function formBox(){
	window.open("mailform.php", "emailList", "width=600, height=300, scrollbars=1");	
}



jQuery(document).ready(function($){
	
	var hash = window.location.hash;
	
	// SB functions
	var afterFinish = function(obj){ 
		var T = obj.options.iClick, SC = $('#shadowbox_content').unbind('click'); //can reset cursor & title if necessary? 
		if(T){ 
			SC.bind('click',function(){ Shadowbox.close(); window.open(T); return false; }) 
			.css({cursor:'pointer'}).attr({title:'Click to go to '+T}); 
		} 
	} 
	, opts = { onFinish: afterFinish }; //plus other options if needed 
	Shadowbox.init(opts);

	decemberAds =[
	
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CK12411.jpg", options: {iClick:'ckimages/CK12411.pdf'}},
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CKDECADS_PG2.jpg", options: {iClick:'ckimages/CKDECADS_PG2.pdf'}},
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CK112011_PG1_A.jpg", options: {iClick:'ckimages/CK112011_PG1_A.pdf'}},
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CK112011_PG1_B.jpg", options: {iClick:'ckimages/CK112011_PG1_B.pdf'}},
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CK112011_PG1_C.jpg", options: {iClick:'ckimages/CK112011_PG1_C.pdf'}},
		{player: "img", title: "Click on the image to open a pdf file <span style='color: #fa8c00'> &mdash; </span> prices good through 12/24/11 but limited to stock on hand<br /><span style='color: #f00'>to order call:</span> 206 382 1138 &bull; 800 683 6950, or better yet, visit us; we'd love to see you!", content: "ckimages/CK112011_PG1_D.jpg", options: {iClick:'ckimages/CK112011_PG1_D.pdf'}}
	]	
		
	
		$(".sblink").click(function(){
		Shadowbox.open(decemberAds, { 
			//slideshowDelay: 3,
			gallery: "December Ads"
			
		});
	});

	$('#cycleport').cycle({
		next: '#next',
		prev: '#prev',
		timeout: 0
	});



// Hash for hash ads
// 	hashads = {'#soda':0, '#lecreuset':1, '#allclad':2, '#bake':3, '#food':4, '#wusthof':5, '#drink':6, '#wine':7}
// 	
// 	// cycle images in response to prev/next
// 	if (hash && hash in hashads){
// 		$('#cycleport').cycle({
// 			startingSlide: hashads[hash],
// 			next: '#next',
// 			prev: '#prev',
// 			pager: '#pager',
// 			timeout: 0
// 		});
// 	} else {
// 		$('#cycleport').cycle({
// 			next: '#next',
// 			prev: '#prev',
// 			pager: '#pager',
// 			timeout: 0
// 		});
// 	};
// 	
	// Hide/Show elements
	$('.orderinfo').hide();
	$(".orderinfoLink").click(function () {
		$('.orderinfo').toggle("slow");
		$(this).text($(this).text() == 'ordering info' ? 'hide' : 'ordering info');
	});
	
	
	
}); 

