window.addEvent('domready', function() { 

	// enable the read more links
	$$('.readMore').each(function(item) {
		// go up to li, and give it active.
		item.addEvent('click', function(e) {
			e.preventDefault();
			$(e.target).getParent('li').addClass('active');
		});
	});

	// enable the read less links
		$$('.readLess').each(function(item) {
		// go up to li, and give it active.
		item.addEvent('click', function(e) {
			e.preventDefault();
			$(e.target).getParent('li').removeClass('active');
		});
	});

	// check boxes now.
	$$('input[type=checkbox]').each(function(item) {
		item.addEvent('change', function(e) {
			if (e.target.value){
				$(e.target).getParent('li').addClass('checked');
			} else {
				$(e.target).getParent('li').removeClass('checked');
			}

			console.log($$('input[type=checkbox][checked]').length)

		});
	});
	

	Shadowbox.init();

});
