// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function hide_show_cart() {
	new Effect.toggle('cart_items', 'slide', {duration:0.3});
}
function active_shop_item(item_id) {
	$$("#shopBottomHold li.active").each(function(item){item.className = "";});
	$("item_"+item_id).className="active";
}

var number_of_images = 1;

function add_image_field () {
	number_of_images += 1;
	to_add = 'Image: <br /> <input id="image_' + number_of_images + '_uploaded_data" name="image_' + number_of_images + '[uploaded_data]" type="file" size="30"><br />';
	$("section_images").insert(to_add);
	document.forms[0].number_of_images.value = number_of_images;
}

function view_large_image(the_url, the_large) {
	$('bigPic').innerHTML = '<a rel="lightbox" href="' + the_large + '"><img src="' + the_url + '" /></a>';
	initLightbox();
}

function how_you_heard(ts) {
	if (ts.value == "Other") {
		Element.show($('how_you_heard_other'))
	} else {
		Element.hide($('how_you_heard_other'))
	}
}

var billing_checked = false;

function test_billing_checked(ts) {
	if (ts.checked) {
	} else {
		if (billing_checked == false) {
			billing_checked = true;
		}
	}
}
