	$(document).ready(function() {

		
		// Tabbed Box 1  --------------------------------------------------------------
		$('.tabBox1 .tabBoxNav a').click(function(event) {
			// Show / Hide Items
			$('.tabBox1 .tabBoxCopy .tabBox').hide();
			$('.tabBox1 .tabBoxNav a').removeClass('selected');
			// Highlight-unhightlight tabs
			$(this).addClass('selected');
			$('div#'+$(this).attr('id').replace('title','copy')).show();
		});


		// Tabbed Box 2  --------------------------------------------------------------
		$('.tabBox2 .tabBoxNav a').click(function(event) {
			// Show / Hide Items
			$('.tabBox2 .tabBoxCopy .tabBox').hide();
			$('.tabBox2 .tabBoxNav a').removeClass('selected');
			// Highlight-unhightlight tabs
			$(this).addClass('selected');
			$('div#'+$(this).attr('id').replace('title','copy')).show();
		});


		// Right Bar Accordion --------------------------------------------------------
		$('dl.accordion > dd').hide();
		$('dl.accordion > dt').click(function() {
			var $nextDT = $(this).next();
			var $visibleSiblings = $nextDT.siblings('dd:visible');
			if($nextDT.text() == '') {
				$visibleSiblings.slideUp();
			} else {
				if($visibleSiblings.length) {
					$visibleSiblings.slideUp('normal', function() {
						$nextDT.slideToggle('normal');
					});
				} else {
					 $nextDT.slideToggle('normal');
				}
			}
		});

	// End Document Ready
	});




	// Featured Picks -------------------------------------------------------------
	(function() {
		$.fn.featured_slider = function() {
			function repeat(str, n) {
				return new Array(n + 1).join(str);
			}
			return this.each(function() {
				// Magic!
				var $wrapper = $('> div', this).css('overflow', 'hidden'),
				$slider = $wrapper.find('> ul').width(9999),
				$items = $slider.find('> li'),
				$single = $items.filter(':first')
				singleWidth = $single.outerWidth(),
				visible = Math.ceil($wrapper.innerWidth() / singleWidth),
				currentPage = 1,
				pages = Math.ceil($items.length / visible);

				// 1. Pad the pages with empty element if required
				if($items.length % visible != 0) {
					// Pad
					$slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
					$items = $slider.find('> li');
				}
				// 2. Create the carousel padding on left and right (cloned)
				$items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));
				$items.filter(':last').after($items.slice(0, visible).clone().addClass('cloned'));
				$items = $slider.find('> li');
				// 3. Reset scroll
				$wrapper.scrollLeft(singleWidth * visible);
				// 4. Paging function
				function gotoPage(page) {
					var dir = page < currentPage ? -1 : 1,
					n = Math.abs(currentPage - page),
					left = singleWidth * dir * visible * n;
					$wrapper.filter(':not(:animated)').animate({
						scrollLeft : '+=' + left
					}, 750, function() {
						// if page == last page - then reset position
						if(page > pages) {
							$wrapper.scrollLeft(singleWidth * visible);
							page = 1;
						} else if(page == 0) {
							page = pages;
							$wrapper.scrollLeft(singleWidth * visible * pages);
						}
						currentPage = page;
					});
				}
				// 5. Insert the back and forward link
				$wrapper.after('<a href="#" class="arrow back"></a><a href="#" class="arrow forward"></a>');
				// 6. Bind the back and forward links
				$('a.back', this).click(function() {
					gotoPage(currentPage - 1);
					return false;
				});
				$('a.forward', this).click(function() {
					gotoPage(currentPage + 1);
					return false;
				});
				$(this).bind('goto', function(event, page) {
					gotoPage(page);
				});
				// When Uncommented This Will Automate Slides Changing Once Hovered Over
				$(this).bind('next', function() {
					//gotoPage(currentPage + 1);
				});
			});
		};
	})(jQuery);


	$(document).ready(function() {
		// Code For Automatic Featured Picks
		var autoscrolling = false;
		$('.featured_slider').featured_slider().mouseover(function() {
			autoscrolling = false;
		}).mouseout(function() {
			autoscrolling = true;
		});
		setInterval(function() {
			if(autoscrolling) {
				$('.featured_slider').trigger('next');
			}
		},7000);

	// End Document Ready
	});
