$(document).ready(function(){
			if ($("#s4").length) {
			$.fn.cycle.defaults.timeout = 11500;
					$(function() {
					// run the code in the markup!
					$('#s4').before('<div id="nav" class="nav">').cycle({
						fx:     'fade',
						speed:  'slow',
						autostopCount:   4,
						autostop:   4,
						timeout: 11500,
						pager:  '#nav'
					});
					});
				};
		    if ($("#featureCarousel").length) {
			$(document).ready(function() {
								$("#featureCarousel").featureCarousel({
								});
			});
			};
			$.fn.equalHeight = function() {
				var group = this;
				$(window).bind('resize', function(){
				var tallest = 0;
				$(group).height('auto').each(function() {
				tallest = Math.max(tallest, $(this).height());
				}).height(tallest);
				}).trigger('resize');
			}
			
			$('#toc a').click(function(){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
				$.scrollTo( this.hash, 1500);
				$(this.hash).find('#options-examples').text( this.title );
				return false;
			});
			$(".height").equalHeight();
						jQuery('ul.nav').superfish();
						DD_roundies.addRule('.button_small_rev, .button_small, .pagination a, .picture, .pagination, .act', '5px');
	});	
	
