	$(document).ready(function(){

                         $('.tonnytest-on p.img').cycle({ fx: 'fade', random: 1, cleartype: true, speed: 2000, timeout:  2000 });
		
                         $("div#nav li.parent").each(function(intIndex){
			teller = (intIndex+1);
			var readyTest = true;
			$(this).bind("click",function(event){
					event.stopPropagation();
					$("div#nav li.parent").addClass('tonnytest-off').removeClass('tonnytest-on');
					$(this).removeClass('tonnytest-off').addClass('tonnytest-on');

                                        $('.tonnytest-on p.img').cycle({ fx: 'fade', random: 1, cleartype: true, speed: 2000, timeout:  2000});
                                        $('.tonnytest-off p.img').cycle('pause');

					var activeHeight = $(this).find('.subnav').height();
					$(this).find('ul.subnav').css('height','0px');
					if (readyTest){
				      $(this).find('ul.subnav').animate(
				          {height: activeHeight },
				          {
				              duration: 300,
								queue:false,
				              easing: 'easeOutBack',
				              complete: function() {
				                  //alert('done');
								readyTest = true
				              }
				          });
					}
					readyTest = false;
			});
		});
		$("div#nav li.parent li").each(function(intIndex){
			$(this).bind("click",function(event){
				event.stopPropagation();
				//alert('test');
			});
		});
	});
