  // When the document loads do everything inside here ...
  $(document).ready(function(){
	$('div.short').expander({
	    slicePoint:       100,  // default is 100
	    userCollapseText: '< Hide'  // default is '[collapse expanded text]'
	  });
	
	
	// When a link is clicked
	$("a.tab").click(function () {


		// switch all tabs off
		$(".active").removeClass("active");

		// switch this tab on
		$(this).addClass("active");

		// slide all content up
		$(".content").slideUp();

		// slide this content up
		var content_show = $(this).attr("title");
		$("#"+content_show).slideDown();

	});
	
	$(".various5").fancybox({
			'width'				: 650,
			'height'			: 470,
	        'autoScale'     	: false,
	        'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
	
	
	$('a[href*=#]').click(function() {

	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
	        && location.hostname == this.hostname) {

	            var $target = $(this.hash);

	            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');

	            if ($target.length) {

	                var targetOffset = $target.offset().top;

	                $('html,body').animate({scrollTop: targetOffset}, 1000);

	                return false;

	            }

	        }

	    });
	
	$("a[href$=.jpg],a[href$=.png],a[href$=.gif],a[href$=.JPG]").fancybox();
	
		$('#slider').tinycarousel({ display: 6 });
	
		$(".video_lnk").click(function() {
			$.fancybox({
					'padding'		: 0,
					'autoScale'		: false,
					'transitionIn'	: 'none',
					'transitionOut'	: 'none',
					'title'			: this.title,
					'width'		: 680,
					'height'		: 495,
					'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
					'type'			: 'swf',
					'swf'			: {
					   	 'wmode'		: 'transparent',
						'allowfullscreen'	: 'true'
					}
				});

			return false;
		});
		
		$('#stories').cycle({
				fx: 'scrollUp', timeout: 6000 // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			});
			
			
			
			
		

  });
