jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox({ }) })

$().ready(function() {

	$("#scroller").simplyScroll({ autoMode: 'loop' });

	$('.module').mouseenter(function() {
		$(this).animate({ opacity: 0.7 }, 250, function() { });
		});	
	$('.module').mouseleave(function() {
		$(this).animate({ opacity: 1 }, 250, function() { });
		});	


	$("#webinarform").validate({
		rules: {
			fullname: "required",
			position: "required",
			organisation: "required",
			address: "required",
			phone: "required",
			hear: "required",
			email: {
				required: true,
				email: true
			}
		}
	});

	$('#hear').change(function() {
  		//alert('Handler for .change() called.');
 		$('.otheroption').hide();
        $('.' + $(this).val()).show();
});


	$("#subnav.capabilities").treeview({
		animated: "fast"
		});
	$('#slideshow').cycle({
		fx: 'fade'
		});
	$('#slider-1').cycle({
		fx: 'scrollVert',
		next:   '#coda-nav-left-1 a', 
    	prev:   '#coda-nav-right-1 a' 
		});
	
	$('#copy .event, #copy .all').click( function() {
		$('#copy .event, #copy .all').removeClass('active');
		$(this).addClass('active');
		var title = $(this).children('h3').text() + ' - ' + $(this).children('p').children('strong').text();
		$(this).parent().children('#webinarform').children('input[name="event"]').val(title);
		$(this).parent().children('#webinarform').children('h3').children('strong').text(title);
		});

	});

animatedcollapse.addDiv('newsletter', 'fade=1,height=170px')
animatedcollapse.ontoggle=function($, divobj, state){ }
animatedcollapse.init()
